From: Glenn Morris Date: Thu, 8 Dec 2016 07:18:36 +0000 (-0800) Subject: Minor fix for symbol-file X-Git-Tag: emacs-26.0.90~1153 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e63c489dd496e53b68b942d0b76e13b62117fae9;p=emacs.git Minor fix for symbol-file * lisp/subr.el (symbol-file): Avoid false matches with "require" elements in load-history. (Bug#25109) --- diff --git a/lisp/subr.el b/lisp/subr.el index 5da5bf8388a..7d4409e3167 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)))