[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112667: Tweak byte-compile-file-form
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112667: Tweak byte-compile-file-form-autoload warnings |
Date: |
Wed, 22 May 2013 00:50:30 -0700 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112667
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-05-22 00:50:30 -0700
message:
Tweak byte-compile-file-form-autoload warnings
* emacs-lisp/bytecomp.el (byte-compile-file-form-autoload):
Always delete the autoloaded function from the noruntime and
unresolved functions lists.
modified:
lisp/ChangeLog
lisp/emacs-lisp/bytecomp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-22 07:07:19 +0000
+++ b/lisp/ChangeLog 2013-05-22 07:50:30 +0000
@@ -1,5 +1,9 @@
2013-05-22 Glenn Morris <address@hidden>
+ * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload):
+ Always delete the autoloaded function from the noruntime and
+ unresolved functions lists.
+
* allout.el: No need to load epa, epg, overlay when compiling.
(epg-context-set-passphrase-callback, epg-list-keys)
(epg-decrypt-string, epg-encrypt-string, epg-user-id-string)
=== modified file 'lisp/emacs-lisp/bytecomp.el'
--- a/lisp/emacs-lisp/bytecomp.el 2013-05-08 15:06:28 +0000
+++ b/lisp/emacs-lisp/bytecomp.el 2013-05-22 07:50:30 +0000
@@ -2213,13 +2213,15 @@
(when (and (consp (nth 1 form))
(eq (car (nth 1 form)) 'quote)
(consp (cdr (nth 1 form)))
- (symbolp (nth 1 (nth 1 form)))
- ;; Don't add it if it's already defined. Otherwise, it might
- ;; hide the actual definition.
- (not (fboundp (nth 1 (nth 1 form)))))
- (push (cons (nth 1 (nth 1 form))
- (cons 'autoload (cdr (cdr form))))
- byte-compile-function-environment)
+ (symbolp (nth 1 (nth 1 form))))
+ ;; Don't add it if it's already defined. Otherwise, it might
+ ;; hide the actual definition. However, do remove any entry from
+ ;; byte-compile-noruntime-functions, in case we have an autoload
+ ;; of foo-func following an (eval-when-compile (require 'foo)).
+ (unless (fboundp (nth 1 (nth 1 form)))
+ (push (cons (nth 1 (nth 1 form))
+ (cons 'autoload (cdr (cdr form))))
+ byte-compile-function-environment))
;; If an autoload occurs _before_ the first call to a function,
;; byte-compile-callargs-warn does not add an entry to
;; byte-compile-unresolved-functions. Here we mimic the logic
@@ -2227,11 +2229,14 @@
;; autoload comes _after_ the function call.
;; Alternatively, similar logic could go in
;; byte-compile-warn-about-unresolved-functions.
- (or (memq (nth 1 (nth 1 form)) byte-compile-noruntime-functions)
- (setq byte-compile-unresolved-functions
- (delq (assq (nth 1 (nth 1 form))
- byte-compile-unresolved-functions)
- byte-compile-unresolved-functions))))
+ (if (memq (nth 1 (nth 1 form)) byte-compile-noruntime-functions)
+ (setq byte-compile-noruntime-functions
+ (delq (nth 1 (nth 1 form)) byte-compile-noruntime-functions)
+ byte-compile-noruntime-functions)
+ (setq byte-compile-unresolved-functions
+ (delq (assq (nth 1 (nth 1 form))
+ byte-compile-unresolved-functions)
+ byte-compile-unresolved-functions))))
(if (stringp (nth 3 form))
form
;; No doc string, so we can compile this as a normal form.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112667: Tweak byte-compile-file-form-autoload warnings,
Glenn Morris <=