aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/subr.el17
2 files changed, 13 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index be3fdb60436..970ee1086fc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-09-06 Martin Rudalics <rudalics@gmx.at>
2
3 * subr.el (symbol-file): Fix doc-string.
4
12008-09-06 Glenn Morris <rgm@gnu.org> 52008-09-06 Glenn Morris <rgm@gnu.org>
2 6
3 * help-mode.el (help-xref-forward-stack): Doc fix. 7 * help-mode.el (help-xref-forward-stack): Doc fix.
diff --git a/lisp/subr.el b/lisp/subr.el
index f8d26024c45..b7b6b2c38de 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1458,14 +1458,15 @@ If TOGGLE has a `:menu-tag', that is used for the menu item's label."
1458;; (setq symbol-file-load-history-loaded t))) 1458;; (setq symbol-file-load-history-loaded t)))
1459 1459
1460(defun symbol-file (symbol &optional type) 1460(defun symbol-file (symbol &optional type)
1461 "Return the input source in which SYMBOL was defined. 1461 "Return the name of the file that defined SYMBOL.
1462The value is an absolute file name. 1462The value is normally an absolute file name. It can also be nil,
1463It can also be nil, if the definition is not associated with any file. 1463if the definition is not associated with any file. If SYMBOL
1464 1464specifies an autoloaded function, the value can be a relative
1465If TYPE is nil, then any kind of definition is acceptable. 1465file name without extension.
1466If TYPE is `defun' or `defvar', that specifies function 1466
1467definition only or variable definition only. 1467If TYPE is nil, then any kind of definition is acceptable. If
1468`defface' specifies a face definition only." 1468TYPE is `defun', `defvar', or `defface', that specifies function
1469definition, variable definition, or face definition only."
1469 (if (and (or (null type) (eq type 'defun)) 1470 (if (and (or (null type) (eq type 'defun))
1470 (symbolp symbol) (fboundp symbol) 1471 (symbolp symbol) (fboundp symbol)
1471 (eq 'autoload (car-safe (symbol-function symbol)))) 1472 (eq 'autoload (car-safe (symbol-function symbol))))