Commit 3ab6a7ae authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(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.
parent 33af2b6e
2007-06-14 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/bytecomp.el (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.
2007-06-14 Michael Kifer <kifer@cs.stonybrook.edu> 2007-06-14 Michael Kifer <kifer@cs.stonybrook.edu>
* viper.el (viper-describe-key-ad, viper-describe-key-briefly-ad): * viper.el (viper-describe-key-ad, viper-describe-key-briefly-ad):
different advices for Emacs and XEmacs. Compile them conditionally. different advices for Emacs and XEmacs. Compile them conditionally.
(viper-version): belated version change. (viper-version): belated version change.
2007-06-14 Juanma Barranquero <lekktu@gmail.com> 2007-06-14 Juanma Barranquero <lekktu@gmail.com>
* follow.el (follow-all-followers, follow-generic-filter): * follow.el (follow-all-followers, follow-generic-filter):
......
...@@ -879,7 +879,6 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'." ...@@ -879,7 +879,6 @@ Each function's symbol gets added to `byte-compile-noruntime-functions'."
(defvar byte-compile-current-form nil) (defvar byte-compile-current-form nil)
(defvar byte-compile-dest-file nil) (defvar byte-compile-dest-file nil)
(defvar byte-compile-current-file nil) (defvar byte-compile-current-file nil)
(defvar byte-compile-current-group nil)
(defvar byte-compile-current-buffer nil) (defvar byte-compile-current-buffer nil)
;; Log something that isn't a warning. ;; Log something that isn't a warning.
...@@ -1281,29 +1280,20 @@ extra args." ...@@ -1281,29 +1280,20 @@ extra args."
;; Warn if a custom definition fails to specify :group. ;; Warn if a custom definition fails to specify :group.
(defun byte-compile-nogroup-warn (form) (defun byte-compile-nogroup-warn (form)
(if (and (memq (car form) '(custom-declare-face custom-declare-variable)) (let ((keyword-args (cdr (cdr (cdr (cdr form)))))
byte-compile-current-group) (name (cadr form)))
;; The group will be provided implicitly. (or (not (eq (car-safe name) 'quote))
nil (and (eq (car form) 'custom-declare-group)
(let ((keyword-args (cdr (cdr (cdr (cdr form))))) (equal name ''emacs))
(name (cadr form))) (plist-get keyword-args :group)
(or (not (eq (car-safe name) 'quote)) (not (and (consp name) (eq (car name) 'quote)))
(and (eq (car form) 'custom-declare-group) (byte-compile-warn
(equal name ''emacs)) "%s for `%s' fails to specify containing group"
(plist-get keyword-args :group) (cdr (assq (car form)
(not (and (consp name) (eq (car name) 'quote))) '((custom-declare-group . defgroup)
(byte-compile-warn (custom-declare-face . defface)
"%s for `%s' fails to specify containing group" (custom-declare-variable . defcustom))))
(cdr (assq (car form) (cadr name)))))
'((custom-declare-group . defgroup)
(custom-declare-face . defface)
(custom-declare-variable . defcustom))))
(cadr name)))
;; Update the current group, if needed.
(if (and byte-compile-current-file ;Only when byte-compiling a whole file.
(eq (car form) 'custom-declare-group)
(eq (car-safe name) 'quote))
(setq byte-compile-current-group (cadr name))))))
;; Warn if the function or macro is being redefined with a different ;; Warn if the function or macro is being redefined with a different
;; number of arguments. ;; number of arguments.
...@@ -1665,7 +1655,6 @@ The value is non-nil if there were no errors, nil if errors." ...@@ -1665,7 +1655,6 @@ The value is non-nil if there were no errors, nil if errors."
;; Force logging of the file name for each file compiled. ;; Force logging of the file name for each file compiled.
(setq byte-compile-last-logged-file nil) (setq byte-compile-last-logged-file nil)
(let ((byte-compile-current-file filename) (let ((byte-compile-current-file filename)
(byte-compile-current-group nil)
(set-auto-coding-for-load t) (set-auto-coding-for-load t)
target-file input-buffer output-buffer target-file input-buffer output-buffer
byte-compile-dest-file) byte-compile-dest-file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment