emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master e63c489: Minor fix for symbol-file


From: Glenn Morris
Subject: [Emacs-diffs] master e63c489: Minor fix for symbol-file
Date: Thu, 8 Dec 2016 07:18:51 +0000 (UTC)

branch: master
commit e63c489dd496e53b68b942d0b76e13b62117fae9
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Minor fix for symbol-file
    
    * lisp/subr.el (symbol-file): Avoid false matches with "require"
    elements in load-history.  (Bug#25109)
---
 lisp/subr.el |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/subr.el b/lisp/subr.el
index 5da5bf8..7d4409e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1879,7 +1879,7 @@ definition, variable definition, or face definition only."
           (autoloadp (symbol-function symbol)))
       (nth 1 (symbol-function symbol))
     (let ((files load-history)
-         file)
+         file match)
       (while files
        (if (if type
                (if (eq type 'defvar)
@@ -1890,7 +1890,8 @@ definition, variable definition, or face definition only."
              ;; We accept all types, so look for variable def
              ;; and then for any other kind.
              (or (member symbol (cdr (car files)))
-                 (rassq symbol (cdr (car files)))))
+                 (and (setq match (rassq symbol (cdr (car files))))
+                      (not (eq 'require (car match))))))
            (setq file (car (car files)) files nil))
        (setq files (cdr files)))
       file)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]