Index: emacs/lisp/emacs-lisp/bytecomp.el
diff -c emacs/lisp/emacs-lisp/bytecomp.el:2.176 
emacs/lisp/emacs-lisp/bytecomp.el:2.177
*** emacs/lisp/emacs-lisp/bytecomp.el:2.176     Sat Jul 16 21:17:10 2005
--- emacs/lisp/emacs-lisp/bytecomp.el   Fri Jul 29 19:54:18 2005
***************
*** 3790,3795 ****
--- 3790,3808 ----
  (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
  


_______________________________________________
Emacs-diffs mailing list
Emacs-diffs@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-diffs

Reply via email to