Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2aafe808
Commit
2aafe808
authored
Aug 02, 2009
by
Jason Rumney
Browse files
(read-file-name): Treat confirm options to
MUSTMATCH as nil when invoking x-file-dialog. (Bug#3969)
parent
e094097c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/minibuffer.el
lisp/minibuffer.el
+14
-3
No files found.
lisp/ChangeLog
View file @
2aafe808
2009-08-02 Jason Rumney <jasonr@gnu.org>
* minibuffer.el (read-file-name): Treat confirm options to
MUSTMATCH as nil when invoking x-file-dialog. (Bug#3969)
2009-08-02 Chong Yidong <cyd@stupidchicken.com>
* font-lock.el (font-lock-string-face, font-lock-builtin-face)
...
...
lisp/minibuffer.el
View file @
2aafe808
...
...
@@ -1134,7 +1134,8 @@ DIR should be an absolute directory name. It defaults to the value of
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 @@ and `read-file-name-function'."
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 @@ and `read-file-name-function'."
(
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
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment