summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/macroexp.el
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2016-09-03 20:37:47 +0200
committerPhilipp Stephani <phst@google.com>2016-09-11 18:12:33 +0200
commit7edaa77c5e1c0284aac4ce2dc0254d22ae6e49af (patch)
tree56c3e91df1ae23425e8eb6d3833ace680fdc868a /lisp/emacs-lisp/macroexp.el
parent5fd1f7f931163ddf04f0ba0c362840fc91fba54a (diff)
downloademacs-7edaa77c5e1c0284aac4ce2dc0254d22ae6e49af.tar.gz
emacs-7edaa77c5e1c0284aac4ce2dc0254d22ae6e49af.tar.bz2
emacs-7edaa77c5e1c0284aac4ce2dc0254d22ae6e49af.zip
Stop calling ‘byte-compile-log-warning’
For errors, use ‘byte-compile-report-error’ instead so that the error is registered and causes compilation to fail (Bug#24359). For warnings, use ‘byte-compile-warn’ instead so that ‘byte-compile-error-on-warn’ is honored (Bug#24360). * lisp/emacs-lisp/macroexp.el (macroexp--funcall-if-compiled) (macroexp--warn-and-return): Use ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’. * lisp/emacs-lisp/bytecomp.el (byte-compile-form, byte-compile-unfold-bcf) (byte-compile-setq, byte-compile-funcall): Use ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’. (byte-compile-log-warning): Convert comment to documentation string. Explain that the function shouldn’t be called directly. (byte-compile-report-error): Add optional FILL argument. * lisp/emacs-lisp/cconv.el (cconv-convert, cconv--analyze-use) (cconv--analyze-function, cconv-analyze-form): Use ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’. * lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand): Use ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’. * lisp/subr.el (add-to-list): Use ‘byte-compile-report-error’ instead of ‘byte-compile-log-warning’. (do-after-load-evaluation): Use ‘byte-compile-warn’ instead of ‘byte-compile-log-warning’.
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r--lisp/emacs-lisp/macroexp.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el
index 310ca29e9a1..6d89145c6a2 100644
--- a/lisp/emacs-lisp/macroexp.el
+++ b/lisp/emacs-lisp/macroexp.el
@@ -103,7 +103,7 @@ each clause."
(defun macroexp--funcall-if-compiled (_form)
"Pseudo function used internally by macroexp to delay warnings.
The purpose is to delay warnings to bytecomp.el, so they can use things
-like `byte-compile-log-warning' to get better file-and-line-number data
+like `byte-compile-warn' to get better file-and-line-number data
and also to avoid outputting the warning during normal execution."
nil)
(put 'macroexp--funcall-if-compiled 'byte-compile
@@ -122,7 +122,7 @@ and also to avoid outputting the warning during normal execution."
(defvar macroexp--warned (make-hash-table :test #'equal :weakness 'key))
(defun macroexp--warn-and-return (msg form &optional compile-only)
- (let ((when-compiled (lambda () (byte-compile-log-warning msg t))))
+ (let ((when-compiled (lambda () (byte-compile-warn "%s" msg))))
(cond
((null msg) form)
((macroexp--compiling-p)