diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2013-07-06 19:58:41 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2013-07-06 19:58:41 +0200 |
commit | 1afb1d071576f7884a475c04955fc33126f70221 (patch) | |
tree | 96ed2d6b2ca528e3b3778db14e2cd41a7361bb73 /lisp/files.el | |
parent | 23de972aa74fce7360b263d639ffbd674931e408 (diff) | |
download | emacs-1afb1d071576f7884a475c04955fc33126f70221.tar.gz |
* lisp/files.el (write-file): Do not display confirm dialog for NS,
it does its own dialog, which can't be cancelled.
* src/nsfns.m: Remove panelOK.
(ns_fd_data): New.
(ns_run_file_dialog): New function.
(Fns_read_file_name): Fill in ns_fd_data, post an event and start the
event loop, so file dialog is popped up by ns_run_file_dialog, called
by sendEvent (Bug#14578).
(EmacsSavePanel, EmacsOpenPanel): Remove ok and cancel methods.
* src/nsterm.h (NSSavePanel): Update comment.
(NSAPP_DATA2_RUNFILEDIALOG): Define.
(ns_run_file_dialog): Declare.
* src/nsterm.m (sendEvent:): Handle NSAPP_DATA2_RUNFILEDIALOG.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lisp/files.el b/lisp/files.el index e59a9acb7b9..9b56dfa9693 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -3878,6 +3878,10 @@ Interactively, confirmation is required unless you supply a prefix argument." (or buffer-file-name (buffer-name)))))) (and confirm (file-exists-p filename) + ;; NS does its own confirm dialog. + (not (and (eq (framep-on-display) 'ns) + (listp last-nonmenu-event) + use-dialog-box)) (or (y-or-n-p (format "File `%s' exists; overwrite? " filename)) (error "Canceled"))) (set-visited-file-name filename (not confirm)))) |