summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-05-22 15:22:30 -0300
committerStefan Monnier <monnier@iro.umontreal.ca>2011-05-22 15:22:30 -0300
commit9c848d8a7578d84212bac6559681fd0cf795581c (patch)
treeabd2b0230e653f625ded84ee1f3004f53937c7ce /lisp/emacs-lisp
parent79106a44d30dd3ec15a5bdd653b1d1911fe05ff7 (diff)
downloademacs-9c848d8a7578d84212bac6559681fd0cf795581c.tar.gz
emacs-9c848d8a7578d84212bac6559681fd0cf795581c.tar.bz2
emacs-9c848d8a7578d84212bac6559681fd0cf795581c.zip
* 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
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/bytecomp.el4
-rw-r--r--lisp/emacs-lisp/macroexp.el10
2 files changed, 11 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index e7f2115a848..49b39b6a1f9 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -2892,8 +2892,8 @@ If FORM is a lambda or a macro, byte-compile it as a function."
That command is designed for interactive use only" fn))
(if (and (fboundp (car form))
(eq (car-safe (symbol-function (car form))) 'macro))
- (byte-compile-report-error
- (format "Forgot to expand macro %s" (car form))))
+ (byte-compile-log-warning
+ (format "Forgot to expand macro %s" (car form)) nil :error))
(if (and handler
;; Make sure that function exists. This is important
;; for CL compiler macros since the symbol may be
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)