1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Minor fix for symbol-file

* lisp/subr.el (symbol-file): Avoid false matches with "require"
elements in load-history.  (Bug#25109)
This commit is contained in:
Glenn Morris 2016-12-07 23:18:36 -08:00
parent af96803459
commit e63c489dd4

View file

@ -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)))