diff options
| author | Stefan Monnier | 2007-06-14 21:25:12 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2007-06-14 21:25:12 +0000 |
| commit | 3ab6a7ae0503d07bf4aca37d877c7e2f46c85f42 (patch) | |
| tree | 9b835c5714682d5f6cfdd8789d7ccd1cc912cce1 | |
| parent | 33af2b6ea3180a689702d5bf05d40ea7a0f100de (diff) | |
| download | emacs-3ab6a7ae0503d07bf4aca37d877c7e2f46c85f42.tar.gz emacs-3ab6a7ae0503d07bf4aca37d877c7e2f46c85f42.zip | |
(byte-compile-current-group, byte-compile-nogroup-warn, byte-compile-file):
Revert part of last change. Apparently the "warning even if the group is
implicit" is a feature rather than a bug.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 39 |
2 files changed, 24 insertions, 28 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index aa55ba8d0ca..c6e9a0a2dc6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,9 +1,16 @@ | |||
| 1 | 2007-06-14 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-current-group) | ||
| 4 | (byte-compile-nogroup-warn, byte-compile-file): Revert part of last | ||
| 5 | change. Apparently the "warning even if the group is implicit" is | ||
| 6 | a feature rather than a bug. | ||
| 7 | |||
| 1 | 2007-06-14 Michael Kifer <kifer@cs.stonybrook.edu> | 8 | 2007-06-14 Michael Kifer <kifer@cs.stonybrook.edu> |
| 2 | 9 | ||
| 3 | * viper.el (viper-describe-key-ad, viper-describe-key-briefly-ad): | 10 | * viper.el (viper-describe-key-ad, viper-describe-key-briefly-ad): |
| 4 | different advices for Emacs and XEmacs. Compile them conditionally. | 11 | different advices for Emacs and XEmacs. Compile them conditionally. |
| 5 | (viper-version): belated version change. | 12 | (viper-version): belated version change. |
| 6 | 13 | ||
| 7 | 2007-06-14 Juanma Barranquero <lekktu@gmail.com> | 14 | 2007-06-14 Juanma Barranquero <lekktu@gmail.com> |
| 8 | 15 | ||
| 9 | * follow.el (follow-all-followers, follow-generic-filter): | 16 | * follow.el (follow-all-followers, follow-generic-filter): |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6a9381d787e..8760f36775b 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -879,7 +879,6 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." | |||
| 879 | (defvar byte-compile-current-form nil) | 879 | (defvar byte-compile-current-form nil) |
| 880 | (defvar byte-compile-dest-file nil) | 880 | (defvar byte-compile-dest-file nil) |
| 881 | (defvar byte-compile-current-file nil) | 881 | (defvar byte-compile-current-file nil) |
| 882 | (defvar byte-compile-current-group nil) | ||
| 883 | (defvar byte-compile-current-buffer nil) | 882 | (defvar byte-compile-current-buffer nil) |
| 884 | 883 | ||
| 885 | ;; Log something that isn't a warning. | 884 | ;; Log something that isn't a warning. |
| @@ -1281,29 +1280,20 @@ extra args." | |||
| 1281 | 1280 | ||
| 1282 | ;; Warn if a custom definition fails to specify :group. | 1281 | ;; Warn if a custom definition fails to specify :group. |
| 1283 | (defun byte-compile-nogroup-warn (form) | 1282 | (defun byte-compile-nogroup-warn (form) |
| 1284 | (if (and (memq (car form) '(custom-declare-face custom-declare-variable)) | 1283 | (let ((keyword-args (cdr (cdr (cdr (cdr form))))) |
| 1285 | byte-compile-current-group) | 1284 | (name (cadr form))) |
| 1286 | ;; The group will be provided implicitly. | 1285 | (or (not (eq (car-safe name) 'quote)) |
| 1287 | nil | 1286 | (and (eq (car form) 'custom-declare-group) |
| 1288 | (let ((keyword-args (cdr (cdr (cdr (cdr form))))) | 1287 | (equal name ''emacs)) |
| 1289 | (name (cadr form))) | 1288 | (plist-get keyword-args :group) |
| 1290 | (or (not (eq (car-safe name) 'quote)) | 1289 | (not (and (consp name) (eq (car name) 'quote))) |
| 1291 | (and (eq (car form) 'custom-declare-group) | 1290 | (byte-compile-warn |
| 1292 | (equal name ''emacs)) | 1291 | "%s for `%s' fails to specify containing group" |
| 1293 | (plist-get keyword-args :group) | 1292 | (cdr (assq (car form) |
| 1294 | (not (and (consp name) (eq (car name) 'quote))) | 1293 | '((custom-declare-group . defgroup) |
| 1295 | (byte-compile-warn | 1294 | (custom-declare-face . defface) |
| 1296 | "%s for `%s' fails to specify containing group" | 1295 | (custom-declare-variable . defcustom)))) |
| 1297 | (cdr (assq (car form) | 1296 | (cadr name))))) |
| 1298 | '((custom-declare-group . defgroup) | ||
| 1299 | (custom-declare-face . defface) | ||
| 1300 | (custom-declare-variable . defcustom)))) | ||
| 1301 | (cadr name))) | ||
| 1302 | ;; Update the current group, if needed. | ||
| 1303 | (if (and byte-compile-current-file ;Only when byte-compiling a whole file. | ||
| 1304 | (eq (car form) 'custom-declare-group) | ||
| 1305 | (eq (car-safe name) 'quote)) | ||
| 1306 | (setq byte-compile-current-group (cadr name)))))) | ||
| 1307 | 1297 | ||
| 1308 | ;; Warn if the function or macro is being redefined with a different | 1298 | ;; Warn if the function or macro is being redefined with a different |
| 1309 | ;; number of arguments. | 1299 | ;; number of arguments. |
| @@ -1665,7 +1655,6 @@ The value is non-nil if there were no errors, nil if errors." | |||
| 1665 | ;; Force logging of the file name for each file compiled. | 1655 | ;; Force logging of the file name for each file compiled. |
| 1666 | (setq byte-compile-last-logged-file nil) | 1656 | (setq byte-compile-last-logged-file nil) |
| 1667 | (let ((byte-compile-current-file filename) | 1657 | (let ((byte-compile-current-file filename) |
| 1668 | (byte-compile-current-group nil) | ||
| 1669 | (set-auto-coding-for-load t) | 1658 | (set-auto-coding-for-load t) |
| 1670 | target-file input-buffer output-buffer | 1659 | target-file input-buffer output-buffer |
| 1671 | byte-compile-dest-file) | 1660 | byte-compile-dest-file) |