Function: elisp-flymake--batch-compile-for-flymake

elisp-flymake--batch-compile-for-flymake is an interactive and byte-compiled function defined in elisp-mode.el.gz.

Signature

(elisp-flymake--batch-compile-for-flymake &optional FILE)

Documentation

Helper for elisp-flymake-byte-compile.

Runs in a batch-mode Emacs. Interactively use variable buffer-file-name(var)/buffer-file-name(fun) for FILE.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
(defun elisp-flymake--batch-compile-for-flymake (&optional file)
  "Helper for `elisp-flymake-byte-compile'.
Runs in a batch-mode Emacs.  Interactively use variable
`buffer-file-name' for FILE."
  (interactive (list buffer-file-name))
  (let* ((file (or file
                   (car command-line-args-left)))
         (byte-compile-log-buffer
          (generate-new-buffer " *dummy-byte-compile-log-buffer*"))
         (byte-compile-dest-file-function #'ignore)
         (collected)
         (byte-compile-log-warning-function
          (lambda (string &optional position fill level)
            (push (list string position fill level)
                  collected)
            t)))
    (unwind-protect
        (byte-compile-file file)
      (ignore-errors
        (kill-buffer byte-compile-log-buffer)))
    (prin1 :elisp-flymake-output-start)
    (terpri)
    (pp collected)))