summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-09-22 00:16:22 +0200
committerStefan Kangas <stefan@marxist.se>2020-10-20 18:48:27 +0200
commit4a575eb18cca3eed5019f2d2d2abeea1f0c07005 (patch)
tree35e8c571c372be83912db166607b4fb5894b6a92 /lisp/emacs-lisp
parent1841b13282473b0ed8c591974e89bd781026180d (diff)
downloademacs-4a575eb18cca3eed5019f2d2d2abeea1f0c07005.tar.gz
emacs-4a575eb18cca3eed5019f2d2d2abeea1f0c07005.tar.bz2
emacs-4a575eb18cca3eed5019f2d2d2abeea1f0c07005.zip
byte-compile-file: Make optional LOAD argument obsolete
* lisp/emacs-lisp/bytecomp.el (byte-compile-file): Declare optional LOAD argument obsolete. Adjust callers. (Bug#38072) (byte-recompile-file): Declare optional LOAD argument obsolete. * doc/lispref/compile.texi (Compilation Functions): Update documentation to reflect above obsoletion. * etc/NEWS: Announce above obsoletion.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 90809a929b9..b63d06a5849 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1845,10 +1845,9 @@ compile FILENAME. If optional argument ARG is 0, it compiles
the input file even if the `.elc' file does not exist.
Any other non-nil value of ARG means to ask the user.
-If optional argument LOAD is non-nil, loads the file after compiling.
-
If compilation is needed, this functions returns the result of
`byte-compile-file'; otherwise it returns `no-byte-compile'."
+ (declare (advertised-calling-convention (filename &optional force arg) "28.1"))
(interactive
(let ((file buffer-file-name)
(file-name nil)
@@ -1877,7 +1876,9 @@ If compilation is needed, this functions returns the result of
(progn
(if (and noninteractive (not byte-compile-verbose))
(message "Compiling %s..." filename))
- (byte-compile-file filename load))
+ (byte-compile-file filename)
+ (when load
+ (load (if (file-exists-p dest) dest filename))))
(when load
(load (if (file-exists-p dest) dest filename)))
'no-byte-compile)))
@@ -1901,8 +1902,10 @@ If compilation is needed, this functions returns the result of
"Compile a file of Lisp code named FILENAME into a file of byte code.
The output file's name is generated by passing FILENAME to the
function `byte-compile-dest-file' (which see).
-With prefix arg (noninteractively: 2nd arg), LOAD the file after compiling.
-The value is non-nil if there were no errors, nil if errors."
+The value is non-nil if there were no errors, nil if errors.
+
+See also `emacs-lisp-byte-compile-and-load'."
+ (declare (advertised-calling-convention (filename) "28.1"))
;; (interactive "fByte compile file: \nP")
(interactive
(let ((file buffer-file-name)
@@ -2068,7 +2071,7 @@ The value is non-nil if there were no errors, nil if errors."
(insert (format "%S\n" (cons var filename))))
(write-region (point-min) (point-max) dynvar-file)))))
(if load
- (load target-file))
+ (load target-file))
t))))
;;; compiling a single function