From 7edaa77c5e1c0284aac4ce2dc0254d22ae6e49af Mon Sep 17 00:00:00 2001 From: Philipp Stephani Date: Sat, 3 Sep 2016 20:37:47 +0200 Subject: Stop calling ‘byte-compile-log-warning’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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’. --- lisp/emacs-lisp/byte-opt.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp/byte-opt.el') diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index dbaf2bc6f6a..610c3b6c190 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -288,8 +288,8 @@ (if (eq (car-safe newfn) 'function) (byte-compile-unfold-lambda `(,(cadr newfn) ,@(cdr form))) ;; This can happen because of macroexp-warn-and-return &co. - (byte-compile-log-warning - (format "Inlining closure %S failed" name)) + (byte-compile-warn + "Inlining closure %S failed" name) form)))) (_ ;; Give up on inlining. -- cgit v1.2.3