Mercurial > emacs
comparison lisp/files.el @ 94560:9154a25c84c6
(minibuffer-with-setup-hook): Allow `fun' expressions rather than only value.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 02 May 2008 17:22:04 +0000 |
parents | 0e056b86de6f |
children | ee5932bf781d |
comparison
equal
deleted
inserted
replaced
94559:687d0af3b0f3 | 94560:9154a25c84c6 |
---|---|
1122 (setq ,hook | 1122 (setq ,hook |
1123 (lambda () | 1123 (lambda () |
1124 ;; Clear out this hook so it does not interfere | 1124 ;; Clear out this hook so it does not interfere |
1125 ;; with any recursive minibuffer usage. | 1125 ;; with any recursive minibuffer usage. |
1126 (remove-hook 'minibuffer-setup-hook ,hook) | 1126 (remove-hook 'minibuffer-setup-hook ,hook) |
1127 (,fun))) | 1127 (funcall ,fun))) |
1128 (unwind-protect | 1128 (unwind-protect |
1129 (progn | 1129 (progn |
1130 (add-hook 'minibuffer-setup-hook ,hook) | 1130 (add-hook 'minibuffer-setup-hook ,hook) |
1131 ,@body) | 1131 ,@body) |
1132 (remove-hook 'minibuffer-setup-hook ,hook))))) | 1132 (remove-hook 'minibuffer-setup-hook ,hook))))) |