changeset 59122:9b98188d56ae

(find-function-noselect): Call symbol-file with `defun'. (find-variable-noselect): Call symbol-file with `defvar'.
author Richard M. Stallman <rms@gnu.org>
date Mon, 27 Dec 2004 16:17:10 +0000
parents 7b2031432b63
children f9293296e0cb
files lisp/emacs-lisp/find-func.el
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/find-func.el	Mon Dec 27 16:16:24 2004 +0000
+++ b/lisp/emacs-lisp/find-func.el	Mon Dec 27 16:17:10 2004 +0000
@@ -242,7 +242,7 @@
     (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 @@
 `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)))
 
 ;;;###autoload