changeset 45389:1450fcbbad57

(find-file-read-args): Don't trash existing value of `minibuffer-setup-hook', just add our hook to it.
author Miles Bader <miles@gnu.org>
date Mon, 20 May 2002 04:40:40 +0000
parents 5d0456e4e35b
children c9c1367befe1
files lisp/files.el
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/files.el	Mon May 20 03:09:11 2002 +0000
+++ b/lisp/files.el	Mon May 20 04:40:40 2002 +0000
@@ -773,12 +773,15 @@
   (list (let ((find-file-default
 	       (and buffer-file-name
 		    (abbreviate-file-name buffer-file-name)))
+	      (munge-default-fun
+	       (lambda ()
+		 (setq minibuffer-default find-file-default)
+		 ;; Clear out this hook so it does not interfere
+		 ;; with any recursive minibuffer usage.
+		 (pop minibuffer-setup-hook)))
 	      (minibuffer-setup-hook
-	       '((lambda ()
-		   (setq minibuffer-default find-file-default)
-		   ;; Clear out this hook so it does not interfere
-		   ;; with any recursive minibuffer usage.
-		   (setq minibuffer-setup-hook nil)))))
+	       minibuffer-setup-hook))
+	  (add-hook 'minibuffer-setup-hook munge-default-fun)
 	  (read-file-name prompt nil default-directory))
 	current-prefix-arg))