Function: ebnf-directory

ebnf-directory is a byte-compiled function defined in ebnf2ps.el.gz.

Signature

(ebnf-directory FUN &optional DIRECTORY)

Documentation

Process files in DIRECTORY applying function FUN on each file.

If DIRECTORY is nil, use default-directory.

Only files in DIRECTORY that match ebnf-file-suffix-regexp (which see) are processed.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ebnf2ps.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Internal functions


(defun ebnf-directory (fun &optional directory)
  "Process files in DIRECTORY applying function FUN on each file.

If DIRECTORY is nil, use `default-directory'.

Only files in DIRECTORY that match `ebnf-file-suffix-regexp' (which see) are
processed."
  (let ((files (directory-files (or directory default-directory)
				t ebnf-file-suffix-regexp)))
    (while files
      (set-buffer (find-file-noselect (car files)))
      (funcall fun)
      (setq buffer-backed-up t)		    ; Do not back it up.
      (save-buffer)			    ; Just save new version.
      (kill-buffer (current-buffer))
      (setq files (cdr files)))))