[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v |
Date: |
Sun, 08 Jun 2008 02:07:26 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Stefan Monnier <monnier> 08/06/08 02:07:25
Index: emacs-lisp/bytecomp.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.239
retrieving revision 2.240
diff -u -b -r2.239 -r2.240
--- emacs-lisp/bytecomp.el 6 May 2008 03:21:11 -0000 2.239
+++ emacs-lisp/bytecomp.el 8 Jun 2008 02:07:25 -0000 2.240
@@ -924,6 +924,7 @@
(defvar byte-compile-current-form nil)
(defvar byte-compile-dest-file nil)
(defvar byte-compile-current-file nil)
+(defvar byte-compile-current-group nil)
(defvar byte-compile-current-buffer nil)
;; Log something that isn't a warning.
@@ -1335,6 +1336,10 @@
;; Warn if a custom definition fails to specify :group.
(defun byte-compile-nogroup-warn (form)
+ (if (and (memq (car form) '(custom-declare-face custom-declare-variable))
+ byte-compile-current-group)
+ ;; The group will be provided implicitly.
+ nil
(let ((keyword-args (cdr (cdr (cdr (cdr form)))))
(name (cadr form)))
(or (not (eq (car-safe name) 'quote))
@@ -1348,7 +1353,12 @@
'((custom-declare-group . defgroup)
(custom-declare-face . defface)
(custom-declare-variable . defcustom))))
- (cadr name)))))
+ (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
;; number of arguments.
@@ -1713,6 +1723,7 @@
;; Force logging of the file name for each file compiled.
(setq byte-compile-last-logged-file nil)
(let ((byte-compile-current-file bytecomp-filename)
+ (byte-compile-current-group nil)
(set-auto-coding-for-load t)
target-file input-buffer output-buffer
byte-compile-dest-file)
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/bytecomp.el,v,
Stefan Monnier <=