1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-23 22:20:24 -08:00

(find-function-noselect): Call symbol-file with `defun'.

(find-variable-noselect): Call symbol-file with `defvar'.
This commit is contained in:
Richard M. Stallman 2004-12-27 16:17:10 +00:00
parent 5cb345c184
commit 9f14330b7b

View file

@ -242,7 +242,7 @@ in `load-path'."
(let ((library (let ((library
(cond ((eq (car-safe def) 'autoload) (cond ((eq (car-safe def) 'autoload)
(nth 1 def)) (nth 1 def))
((symbol-file function))))) ((symbol-file function 'defun)))))
(find-function-search-for-symbol function nil library)))) (find-function-search-for-symbol function nil library))))
(defalias 'function-at-point 'function-called-at-point) (defalias 'function-at-point 'function-called-at-point)
@ -347,8 +347,7 @@ The library where VARIABLE is defined is searched for in FILE or
`find-function-source-path', if non nil, otherwise in `load-path'." `find-function-source-path', if non nil, otherwise in `load-path'."
(if (not variable) (if (not variable)
(error "You didn't specify a variable")) (error "You didn't specify a variable"))
;; Fixme: I think `symbol-file' should be fixed instead. -- fx (let ((library (or file (symbol-file variable 'defvar))))
(let ((library (or file (symbol-file (cons 'defvar variable)))))
(find-function-search-for-symbol variable 'variable library))) (find-function-search-for-symbol variable 'variable library)))
;;;###autoload ;;;###autoload