Interactive tag byte compilation functions in emacs-lisp-mode

* lisp/progmodes/elisp-mode.el (emacs-lisp-byte-compile)
(emacs-lisp-byte-compile-and-load): Add interactive tagging
(bug#46721).
This commit is contained in:
Doug Davis 2021-02-24 17:43:49 +01:00 committed by Lars Ingebrigtsen
parent a2a6364265
commit b7a2b2bdd9

View file

@ -182,14 +182,14 @@ All commands in `lisp-mode-shared-map' are inherited by this map.")
(defun emacs-lisp-byte-compile ()
"Byte compile the file containing the current buffer."
(interactive)
(interactive nil emacs-lisp-mode)
(if buffer-file-name
(byte-compile-file buffer-file-name)
(error "The buffer must be saved in a file first")))
(defun emacs-lisp-byte-compile-and-load ()
"Byte-compile the current file (if it has changed), then load compiled code."
(interactive)
(interactive nil emacs-lisp-mode)
(or buffer-file-name
(error "The buffer must be saved in a file first"))
(require 'bytecomp)