Mercurial > emacs
changeset 14731:3682b5e64ce3
(set-visited-file-name): Query if there's already another
buffer visiting this file.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 01 Mar 1996 20:29:32 +0000 |
parents | 5b81926cc17f |
children | 6bd77cce44a6 |
files | lisp/files.el |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/files.el Fri Mar 01 20:13:42 1996 +0000 +++ b/lisp/files.el Fri Mar 01 20:29:32 1996 +0000 @@ -1422,6 +1422,11 @@ (setq truename (file-truename filename)) (if find-file-visit-truename (setq filename truename)))) + (let ((buffer (find-buffer-visiting filename))) + (and buffer (not (eq buffer (current-buffer))) + (not (y-or-n-p (message "A buffer is visiting %s; proceed? " + filename))) + (error "Aborted"))) (or (equal filename buffer-file-name) (progn (and filename (lock-buffer filename))