emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog minibuffer.el


From: Jason Rumney
Subject: [Emacs-diffs] emacs/lisp ChangeLog minibuffer.el
Date: Sun, 02 Aug 2009 14:56:08 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Jason Rumney <jasonr>   09/08/02 14:56:08

Modified files:
        lisp           : ChangeLog minibuffer.el 

Log message:
        (read-file-name): Treat confirm options to
        MUSTMATCH as nil when invoking x-file-dialog.  (Bug#3969)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15876&r2=1.15877
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/minibuffer.el?cvsroot=emacs&r1=1.76&r2=1.77

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15876
retrieving revision 1.15877
diff -u -b -r1.15876 -r1.15877
--- ChangeLog   2 Aug 2009 14:20:02 -0000       1.15876
+++ ChangeLog   2 Aug 2009 14:56:04 -0000       1.15877
@@ -1,3 +1,8 @@
+2009-08-02  Jason Rumney  <address@hidden>
+
+       * minibuffer.el (read-file-name): Treat confirm options to
+       MUSTMATCH as nil when invoking x-file-dialog.  (Bug#3969)
+
 2009-08-02  Chong Yidong  <address@hidden>
 
        * font-lock.el (font-lock-string-face, font-lock-builtin-face)

Index: minibuffer.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/minibuffer.el,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -b -r1.76 -r1.77
--- minibuffer.el       14 Apr 2009 02:02:33 -0000      1.76
+++ minibuffer.el       2 Aug 2009 14:56:07 -0000       1.77
@@ -1134,7 +1134,8 @@
 If this command was invoked with the mouse, use a graphical file
 dialog if `use-dialog-box' is non-nil, and the window system or X
 toolkit in use provides a file dialog box.  For graphical file
-dialogs, any non-nil value of MUSTMATCH is equivalent to t.
+dialogs, any the special values of MUSTMATCH; `confirm' and
+`confirm-after-completion' are treated as equivalent to nil.
 
 See also `read-file-name-completion-ignore-case'
 and `read-file-name-function'."
@@ -1180,7 +1181,16 @@
                                          default-filename)))
                   ;; If DEFAULT-FILENAME not supplied and DIR contains
                   ;; a file name, split it.
-                  (let ((file (file-name-nondirectory dir)))
+                  (let ((file (file-name-nondirectory dir))
+                       ;; When using a dialog, revert to nil and non-nil
+                       ;; interpretation of mustmatch. confirm options
+                       ;; need to be interpreted as nil, otherwise
+                       ;; it is impossible to create new files using
+                       ;; dialogs with the default settings.
+                       (dialog-mustmatch
+                        (and (not (eq mustmatch 'confirm))
+                             (not (eq mustmatch 'confirm-after-completion))
+                             mustmatch)))
                     (when (and (not default-filename)
                               (not (zerop (length file))))
                       (setq default-filename file)
@@ -1189,7 +1199,8 @@
                         (setq default-filename
                               (expand-file-name default-filename dir)))
                     (setq add-to-history t)
-                    (x-file-dialog prompt dir default-filename mustmatch
+                    (x-file-dialog prompt dir default-filename
+                                  dialog-mustmatch
                                    (eq predicate 'file-directory-p)))))
 
                (replace-in-history (eq (car-safe file-name-history) val)))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]