diff options
author | Eli Zaretskii <eliz@gnu.org> | 2023-12-22 16:49:49 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-12-22 16:49:49 +0200 |
commit | bd0c75897153ea5ce1e4ba12c81c3b280a0b95e4 (patch) | |
tree | b928561be25fe76ef91052af50e5021a94e4cd32 /lisp/progmodes | |
parent | 1ad126c0f28aae2b5d2da9b347a33e4300424de9 (diff) | |
download | emacs-bd0c75897153ea5ce1e4ba12c81c3b280a0b95e4.tar.gz emacs-bd0c75897153ea5ce1e4ba12c81c3b280a0b95e4.tar.bz2 emacs-bd0c75897153ea5ce1e4ba12c81c3b280a0b95e4.zip |
Improve documentation of new native-compilation commands
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu)
(emacs-lisp-native-compile, emacs-lisp-native-compile-and-load):
Doc fixes.
* doc/lispref/compile.texi (Native-Compilation Functions):
Document 'emacs-lisp-native-compile' and
'emacs-lisp-native-compile-and-load'.
Diffstat (limited to 'lisp/progmodes')
-rw-r--r-- | lisp/progmodes/elisp-mode.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index 354d98c50dc..105b017c215 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -85,10 +85,10 @@ All commands in `lisp-mode-shared-map' are inherited by this map." ["Byte-recompile Directory..." byte-recompile-directory :help "Recompile every `.el' file in DIRECTORY that needs recompilation"] ["Native-compile This File" emacs-lisp-native-compile - :help "Compile the current file containing the current buffer to native code" + :help "Compile this buffer's file to native code" :active (native-comp-available-p)] ["Native-compile and Load" emacs-lisp-native-compile-and-load - :help "Compile the current file to native code, then load compiled native code" + :help "Compile this buffer's file to native code, then load compiled native code" :active (native-comp-available-p)] ["Disassemble Byte Compiled Object..." disassemble :help "Print disassembled code for OBJECT in a buffer"] @@ -224,7 +224,9 @@ All commands in `lisp-mode-shared-map' are inherited by this map." (declare-function comp-write-bytecode-file "comp") (defun emacs-lisp-native-compile () - "Native-compile synchronously the current file (if it has changed)." + "Native-compile the current buffer's file (if it has changed). +This invokes a synchronous native-compilation of the file that is +visited by the current buffer." (interactive nil emacs-lisp-mode) (emacs-lisp--before-compile-buffer) (let* ((byte+native-compile t) @@ -234,12 +236,14 @@ All commands in `lisp-mode-shared-map' are inherited by this map." (comp-write-bytecode-file eln)))) (defun emacs-lisp-native-compile-and-load () - "Native-compile synchronously the current file (if it has changed). -Load the compiled code when finished. + "Native-compile the current buffer's file (if it has changed), then load it. +This invokes a synchronous native-compilation of the file that is +visited by the current buffer, then loads the compiled native code +when the compilation is finished. Use `emacs-lisp-byte-compile-and-load' in combination with `native-comp-jit-compilation' set to t to achieve asynchronous -native compilation." +native compilation of the current buffer's file." (interactive nil emacs-lisp-mode) (when-let ((byte-file (emacs-lisp-native-compile))) (load (file-name-sans-extension byte-file)))) |