diff options
author | Miles Bader <miles@gnu.org> | 2005-08-05 10:57:36 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2005-08-05 10:57:36 +0000 |
commit | 5e10f34207ff594cd6570928bc0292a7b53297b8 (patch) | |
tree | d03b31da4d83d4a49fac3162e5481b77849754d5 /lisp/emacs-lisp/bytecomp.el | |
parent | 07bd7822113da5ae28d0db471453622a2ed5d6cd (diff) | |
parent | 11e22c4a01e2535ad784e0d122a65837a13ec71c (diff) | |
download | emacs-5e10f34207ff594cd6570928bc0292a7b53297b8.tar.gz emacs-5e10f34207ff594cd6570928bc0292a7b53297b8.tar.bz2 emacs-5e10f34207ff594cd6570928bc0292a7b53297b8.zip |
Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-77
Merge from emacs--cvs-trunk--0
Patches applied:
* emacs--cvs-trunk--0 (patch 504-513)
- Update from CVS
- Merge from gnus--rel--5.10
- Update from CVS: .cvsignore: Add `lock'.
* gnus--rel--5.10 (patch 99-103)
- Update from CVS
Diffstat (limited to 'lisp/emacs-lisp/bytecomp.el')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 1094b1b8cb1..0dd0ead9d61 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -3792,6 +3792,19 @@ that suppresses all warnings during execution of BODY." (defun byte-compile-no-warnings (form) (let (byte-compile-warnings) (byte-compile-form (cons 'progn (cdr form))))) + +;; Warn about misuses of make-variable-buffer-local. +(byte-defop-compiler-1 make-variable-buffer-local byte-compile-make-variable-buffer-local) +(defun byte-compile-make-variable-buffer-local (form) + (if (eq (car-safe (car-safe (cdr-safe form))) 'quote) + (byte-compile-warn + "`make-variable-buffer-local' should be called at toplevel")) + (byte-compile-normal-call form)) +(put 'make-variable-buffer-local + 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) +(defun byte-compile-form-make-variable-buffer-local (form) + (byte-compile-keep-pending form 'byte-compile-normal-call)) + ;;; tags |