Function: emacs-lisp--before-compile-buffer

emacs-lisp--before-compile-buffer is a byte-compiled function defined in elisp-mode.el.gz.

Signature

(emacs-lisp--before-compile-buffer)

Documentation

Make sure the buffer is saved before compiling.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/elisp-mode.el.gz
(defun emacs-lisp--before-compile-buffer ()
  "Make sure the buffer is saved before compiling."
  (or buffer-file-name
      (error "The buffer must be saved in a file first"))
  ;; Recompile if file or buffer has changed since last compilation.
  (if (and (buffer-modified-p)
	   (y-or-n-p (format "Save buffer %s first? " (buffer-name))))
      (save-buffer)))