diff options
| author | Tom Tromey <tromey@redhat.com> | 2013-07-06 23:18:58 -0600 |
|---|---|---|
| committer | Tom Tromey <tromey@redhat.com> | 2013-07-06 23:18:58 -0600 |
| commit | 6dacdad5fcb278e5a16b38bb81786aac9ca27be4 (patch) | |
| tree | f5f331ea361ba0f99e0f9b638d183ad492a7da31 /lisp/files.el | |
| parent | 0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a (diff) | |
| parent | 219afb88d9d484393418820d1c08dc93299110ec (diff) | |
| download | emacs-6dacdad5fcb278e5a16b38bb81786aac9ca27be4.tar.gz | |
merge from trunk
this merges frmo trunk and fixes various build issues.
this needed a few ugly tweaks.
this hangs in "make check" now
Diffstat (limited to 'lisp/files.el')
| -rw-r--r-- | lisp/files.el | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lisp/files.el b/lisp/files.el index 871a4b0548b..9b56dfa9693 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1859,13 +1859,12 @@ the various files." (setq buffer-read-only read-only))) (setq buffer-file-read-only read-only)) - (when (and (not (eq (not (null rawfile)) - (not (null find-file-literally)))) - (not nonexistent) - ;; It is confusing to ask whether to visit - ;; non-literally if they have the file in - ;; hexl-mode or image-mode. - (not (memq major-mode '(hexl-mode image-mode)))) + (unless (or (eq (null rawfile) (null find-file-literally)) + nonexistent + ;; It is confusing to ask whether to visit + ;; non-literally if they have the file in + ;; hexl-mode or image-mode. + (memq major-mode '(hexl-mode image-mode))) (if (buffer-modified-p) (if (y-or-n-p (format @@ -3879,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)))) |
