diff lisp/help.el @ 4535:69a1eda3da06

Distinguish vars and functions in #'symbol-file, #'describe-{function,variable} lisp/ChangeLog addition: 2008-12-22 Aidan Kehoe <kehoea@parhasard.net> * loadhist.el (symbol-file): Add support for differentiating between variables and functions to #'symbol-file. * help.el (describe-function-1): (describe-variable): Call #'symbol-function explicitly with a 'defun or 'defvar argument, depending on whether we're looking for a variable or a function. * cus-face.el (custom-declare-face): Record information about the face in the load history; code taken from GNU, pre-GPLv3 revision 1.45. src/ChangeLog addition: 2008-12-22 Aidan Kehoe <kehoea@parhasard.net> * symbols.c (Fdefine_function): * eval.c (define_function): Record explicitly that we're defining a function in the load history, in both these files.
author Aidan Kehoe <kehoea@parhasard.net>
date Mon, 22 Dec 2008 14:07:48 +0000
parents bd28481bb0e1
children a1a8728fec10
line wrap: on
line diff
--- a/lisp/help.el	Mon Dec 22 12:09:08 2008 +0000
+++ b/lisp/help.el	Mon Dec 22 14:07:48 2008 +0000
@@ -1425,7 +1425,7 @@
              nil)))
     (princ "\n")
     (or file-name
-	(setq file-name (symbol-file function)))
+	(setq file-name (symbol-file function 'defun)))
     (when file-name
 	(princ "  -- loaded from \"")
 	(if (not (bufferp standard-output))
@@ -1651,7 +1651,7 @@
 	 (princ (built-in-variable-doc variable))
 	 (princ ".\n")
 	 (require 'hyper-apropos)
-	 (let ((file-name (symbol-file variable))
+	 (let ((file-name (symbol-file variable 'defvar))
 	       opoint e)
 	   (when file-name
 	       (princ "  -- loaded from \"")