From 9c848d8a7578d84212bac6559681fd0cf795581c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 22 May 2011 15:22:30 -0300 Subject: * lisp/emacs-lisp/macroexp.el (macroexpand-all-1): Convert ' to #' for funcall as well. Warn when performing those conversions. * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Fix error report. Fixes: debbugs:8712 --- lisp/emacs-lisp/macroexp.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/macroexp.el') diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index f0a075ace37..ccfdf2e0551 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -169,14 +169,22 @@ Assumes the caller has bound `macroexpand-all-environment'." ;; here, so that any code that cares about the difference will ;; see the same transformation. ;; First arg is a function: - (`(,(and fun (or `apply `mapcar `mapatoms `mapconcat `mapc)) + (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc)) ',(and f `(lambda . ,_)) . ,args) + (byte-compile-log-warning + (format "%s quoted with ' rather than with #'" + (list 'lambda (nth 1 f) '...)) + t) ;; We don't use `maybe-cons' since there's clearly a change. (cons fun (cons (macroexpand-all-1 (list 'function f)) (macroexpand-all-forms args)))) ;; Second arg is a function: (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args) + (byte-compile-log-warning + (format "%s quoted with ' rather than with #'" + (list 'lambda (nth 1 f) '...)) + t) ;; We don't use `maybe-cons' since there's clearly a change. (cons fun (cons (macroexpand-all-1 arg1) -- cgit v1.2.3