changeset: 4577:7e01763ea6560a1ee82ba950ddd47bd62d769b8a
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Dec 27 16:02:25 2008 +0000
files: lisp/ChangeLog lisp/loadhist.el
description:
Correct a misunderstanding of the semantics of #'return in #'symbol-file.
2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
Use #'defun*, not #'defun, to allow the checks for autoloaded
functions and variables to call #'return-from correctly. Use
#'return-from instead of #'return throughout the function.
diff -r 061e030e3270035d8cde0206b6e34cff27c697bd -r
7e01763ea6560a1ee82ba950ddd47bd62d769b8a lisp/ChangeLog
--- a/lisp/ChangeLog Sat Dec 27 14:05:50 2008 +0000
+++ b/lisp/ChangeLog Sat Dec 27 16:02:25 2008 +0000
@@ -1,3 +1,10 @@ 2008-12-27 Aidan Kehoe <kehoea@parhasa
+2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * loadhist.el (symbol-file):
+ Use #'defun*, not #'defun, to allow the checks for autoloaded
+ functions and variables to call #'return-from correctly. Use
+ #'return-from instead of #'return throughout the function.
+
2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
* loadup.el (load-history):
diff -r 061e030e3270035d8cde0206b6e34cff27c697bd -r
7e01763ea6560a1ee82ba950ddd47bd62d769b8a lisp/loadhist.el
--- a/lisp/loadhist.el Sat Dec 27 14:05:50 2008 +0000
+++ b/lisp/loadhist.el Sat Dec 27 16:02:25 2008 +0000
@@ -41,7 +41,7 @@
;; XEmacs; this function is in subr.el in GNU, and does not deal with
;; built-in symbols.
-(defun symbol-file (sym &optional type)
+(defun* symbol-file (sym &optional type)
"Return the input source from which SYM was loaded.
This is a file name, or nil if the source was a buffer with no associated file.
@@ -63,26 +63,26 @@ with `defface' and `custom-declare-face'
(eq (fifth autoload-cons) 'keymap))
(and (or (null type) (eq 'defun type))
(memq (fifth autoload-cons) '(nil macro)))))
- (return (locate-library (second autoload-cons))))
+ (return-from symbol-file (locate-library (second autoload-cons))))
((eq 'defvar type)
;; Load history entries corresponding to variables are just
;; symbols.
(dolist (entry load-history)
(when (memq sym (cdr entry))
- (return (car entry)))))
+ (return-from symbol-file (car entry)))))
((not (null type))
;; Non-variables have the type stored as the car of the entry.
(dolist (entry load-history)
(when (and (setq symbol-details (rassq sym (cdr entry)))
(eq type (car symbol-details)))
- (return (car entry)))))
+ (return-from symbol-file (car entry)))))
(t
;; If TYPE hasn't been specified, we need to check both for
;; variables and other symbols.
(dolist (entry load-history)
(when (or (memq sym (cdr entry))
(rassq sym (cdr entry)))
- (return (car entry))))))
+ (return-from symbol-file (car entry))))))
(when (setq built-in-file (built-in-symbol-file sym type))
(if (equal built-in-file (file-truename built-in-file))
;; Probably a full path name:
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches