comparison lisp/loadhist.el @ 286:57709be46d1b r21-0b41

Import from CVS: tag r21-0b41
author cvs
date Mon, 13 Aug 2007 10:35:03 +0200
parents 85a06df23a9a
children 8626e4521993
comparison
equal deleted inserted replaced
285:9a3756523c1b 286:57709be46d1b
35 ;;; Code: 35 ;;; Code:
36 36
37 (defun symbol-file (sym) 37 (defun symbol-file (sym)
38 "Return the input source from which SYM was loaded. 38 "Return the input source from which SYM was loaded.
39 This is a file name, or nil if the source was a buffer with no associated file." 39 This is a file name, or nil if the source was a buffer with no associated file."
40 (interactive "S") ; XEmacs 40 (interactive "SFind source file for symbol: ") ; XEmacs
41 (catch 'foundit 41 (catch 'foundit
42 (mapcar 42 (mapcar
43 (function (lambda (x) (if (memq sym (cdr x)) (throw 'foundit (car x))))) 43 (function (lambda (x) (if (memq sym (cdr x)) (throw 'foundit (car x)))))
44 load-history) 44 load-history)
45 nil)) 45 nil))