diff options
| author | Stefan Monnier | 2005-07-29 19:54:18 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-07-29 19:54:18 +0000 |
| commit | 01e4a4fa0349d23595f61f531fec66d8f3c11c65 (patch) | |
| tree | ad1aded31b11d02f1e3f2347fa930156ad2b7af1 | |
| parent | d0278ce84522bdbc650e00e91137904e001b5de9 (diff) | |
| download | emacs-01e4a4fa0349d23595f61f531fec66d8f3c11c65.tar.gz emacs-01e4a4fa0349d23595f61f531fec66d8f3c11c65.zip | |
(byte-compile-make-variable-buffer-local)
(byte-compile-form-make-variable-buffer-local): New functions to warn about
misuses of make-variable-buffer-local where make-local-variable was meant.
| -rw-r--r-- | lisp/ChangeLog | 19 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 13 |
2 files changed, 25 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1cc3c86785c..4f7aa114de5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2005-07-29 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-make-variable-buffer-local) | ||
| 4 | (byte-compile-form-make-variable-buffer-local): New functions to warn | ||
| 5 | about misuses of make-variable-buffer-local where make-local-variable | ||
| 6 | was meant. | ||
| 7 | |||
| 1 | 2005-07-29 Juanma Barranquero <lekktu@gmail.com> | 8 | 2005-07-29 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 9 | ||
| 3 | * bs.el (bs-attributes-list): Doc fix. | 10 | * bs.el (bs-attributes-list): Doc fix. |
| @@ -21,8 +28,8 @@ | |||
| 21 | 28 | ||
| 22 | 2005-07-29 Kenichi Handa <handa@m17n.org> | 29 | 2005-07-29 Kenichi Handa <handa@m17n.org> |
| 23 | 30 | ||
| 24 | * international/mule-cmds.el (select-message-coding-system): Be | 31 | * international/mule-cmds.el (select-message-coding-system): |
| 25 | sure to use LF for end-of-line. If no coding system is decided, | 32 | Be sure to use LF for end-of-line. If no coding system is decided, |
| 26 | return iso-8859-1-unix. | 33 | return iso-8859-1-unix. |
| 27 | 34 | ||
| 28 | 2005-07-28 Stefan Monnier <monnier@iro.umontreal.ca> | 35 | 2005-07-28 Stefan Monnier <monnier@iro.umontreal.ca> |
| @@ -89,17 +96,15 @@ | |||
| 89 | 96 | ||
| 90 | * term/README: Describe the terminal-init-* functionality. | 97 | * term/README: Describe the terminal-init-* functionality. |
| 91 | 98 | ||
| 92 | * startup.el (command-line): After loading the terminal | 99 | * startup.el (command-line): After loading the terminal initialization |
| 93 | initialization file call the corresponding terminal initialization | 100 | file call the corresponding terminal initialization function. |
| 94 | function. | ||
| 95 | 101 | ||
| 96 | 2005-07-27 Kenichi Handa <handa@m17n.org> | 102 | 2005-07-27 Kenichi Handa <handa@m17n.org> |
| 97 | 103 | ||
| 98 | * ps-bdf.el (bdf-read-font-info): Ignore glyphs whose ENCODING is | 104 | * ps-bdf.el (bdf-read-font-info): Ignore glyphs whose ENCODING is |
| 99 | negative. | 105 | negative. |
| 100 | 106 | ||
| 101 | * ps-mule.el (ps-mule-bitmap-prologue): Fix arguments to | 107 | * ps-mule.el (ps-mule-bitmap-prologue): Fix arguments to setcharwidth. |
| 102 | setcharwidth. | ||
| 103 | (ps-mule-composition-prologue): Fix for the case that | 108 | (ps-mule-composition-prologue): Fix for the case that |
| 104 | RelativeCompose is false. | 109 | RelativeCompose is false. |
| 105 | 110 | ||
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index e21a7ccb4a0..6ccf65b1fd9 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -3790,6 +3790,19 @@ that suppresses all warnings during execution of BODY." | |||
| 3790 | (defun byte-compile-no-warnings (form) | 3790 | (defun byte-compile-no-warnings (form) |
| 3791 | (let (byte-compile-warnings) | 3791 | (let (byte-compile-warnings) |
| 3792 | (byte-compile-form (cons 'progn (cdr form))))) | 3792 | (byte-compile-form (cons 'progn (cdr form))))) |
| 3793 | |||
| 3794 | ;; Warn about misuses of make-variable-buffer-local. | ||
| 3795 | (byte-defop-compiler-1 make-variable-buffer-local byte-compile-make-variable-buffer-local) | ||
| 3796 | (defun byte-compile-make-variable-buffer-local (form) | ||
| 3797 | (if (eq (car-safe (car-safe (cdr-safe form))) 'quote) | ||
| 3798 | (byte-compile-warn | ||
| 3799 | "`make-variable-buffer-local' should be called at toplevel")) | ||
| 3800 | (byte-compile-normal-call form)) | ||
| 3801 | (put 'make-variable-buffer-local | ||
| 3802 | 'byte-hunk-handler 'byte-compile-form-make-variable-buffer-local) | ||
| 3803 | (defun byte-compile-form-make-variable-buffer-local (form) | ||
| 3804 | (byte-compile-keep-pending form 'byte-compile-normal-call)) | ||
| 3805 | |||
| 3793 | 3806 | ||
| 3794 | ;;; tags | 3807 | ;;; tags |
| 3795 | 3808 | ||