diff lisp/prim/minibuf.el @ 48:56c54cf7c5b6 r19-16b90

Import from CVS: tag r19-16b90
author cvs
date Mon, 13 Aug 2007 08:56:04 +0200
parents 4103f0995bd7
children 131b0175ea99
line wrap: on
line diff
--- a/lisp/prim/minibuf.el	Mon Aug 13 08:55:32 2007 +0200
+++ b/lisp/prim/minibuf.el	Mon Aug 13 08:56:04 2007 +0200
@@ -268,6 +268,8 @@
   "If this variable is non-nil, a string will not be added to the
 minibuffer history if its length is less than that value.")
 
+(define-error 'input-error "Keyboard input error")
+
 (defun read-from-minibuffer (prompt &optional initial-contents
                                     keymap
                                     readp
@@ -420,7 +422,10 @@
                            ;; total total kludge
                            (if (stringp v) (setq v (list 'quote v)))
                            (setq val v))
-                       (error (setq err e))))
+                       (end-of-file
+			(setq err
+			      '(input-error "End of input before end of expression")))
+		       (error (setq err e))))
                  ;; Add the value to the appropriate history list unless
                  ;; it's already the most recent element, or it's only
                  ;; two characters long.
@@ -1764,25 +1769,29 @@
 
 (defun mouse-file-display-completion-list (window dir minibuf user-data)
   (let ((standard-output (window-buffer window)))
-    (display-completion-list 
-     (directory-files dir nil nil nil t)
-     :window-width (* 2 (window-width window))
-     :activate-callback
-     'mouse-read-file-name-activate-callback
-     :user-data user-data
-     :reference-buffer minibuf
-     :help-string "")))
+    (condition-case nil
+	(display-completion-list 
+	 (directory-files dir nil nil nil t)
+	 :window-width (* 2 (window-width window))
+	 :activate-callback
+	 'mouse-read-file-name-activate-callback
+	 :user-data user-data
+	 :reference-buffer minibuf
+	 :help-string "")
+      (t nil))))
 
 (defun mouse-directory-display-completion-list (window dir minibuf user-data)
   (let ((standard-output (window-buffer window)))
-    (display-completion-list
-     (delete "." (directory-files dir nil nil nil 1))
-     :window-width (window-width window)
-     :activate-callback
-     'mouse-read-file-name-activate-callback
-     :user-data user-data
-     :reference-buffer minibuf
-     :help-string "")))
+    (condition-case nil
+	(display-completion-list
+	 (delete "." (directory-files dir nil nil nil 1))
+	 :window-width (window-width window)
+	 :activate-callback
+	 'mouse-read-file-name-activate-callback
+	 :user-data user-data
+	 :reference-buffer minibuf
+	 :help-string "")
+      (t nil))))
 
 (defun mouse-read-file-name-activate-callback (event extent user-data)
   (let* ((file (extent-string extent))