(find-function-noselect): Call symbol-file with `defun'.
authorRichard M. Stallman <rms@gnu.org>
Mon, 27 Dec 2004 16:17:10 +0000 (16:17 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 27 Dec 2004 16:17:10 +0000 (16:17 +0000)
(find-variable-noselect): Call symbol-file with `defvar'.

lisp/emacs-lisp/find-func.el

index 2a58c10..a70adb4 100644 (file)
@@ -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)))
 
 ;;;###autoload