Commit 9f14330b authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

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

(find-variable-noselect): Call symbol-file with `defvar'.
parent 5cb345c1
......@@ -242,7 +242,7 @@ in `load-path'."
(let ((library
(cond ((eq (car-safe def) 'autoload)
(nth 1 def))
((symbol-file function)))))
((symbol-file function 'defun)))))
(find-function-search-for-symbol function nil library))))
(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'."
(if (not variable)
(error "You didn't specify a variable"))
;; Fixme: I think `symbol-file' should be fixed instead. -- fx
(let ((library (or file (symbol-file (cons 'defvar variable)))))
(let ((library (or file (symbol-file variable 'defvar))))
(find-function-search-for-symbol variable 'variable library)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment