[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/files.el,v
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/files.el,v |
Date: |
Sat, 30 Sep 2006 10:02:23 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 06/09/30 10:02:23
Index: files.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/files.el,v
retrieving revision 1.858
retrieving revision 1.859
diff -u -b -r1.858 -r1.859
--- files.el 22 Sep 2006 15:01:41 -0000 1.858
+++ files.el 30 Sep 2006 10:02:22 -0000 1.859
@@ -1117,13 +1117,15 @@
(mapcar 'switch-to-buffer (cdr value))))
(switch-to-buffer-other-frame value))))
-(defun find-file-existing (filename &optional wildcards)
+(defun find-file-existing (filename)
"Edit the existing file FILENAME.
-Like \\[find-file] but only allow a file that exists."
- (interactive (find-file-read-args "Find existing file: " t))
- (unless (file-exists-p filename) (error "%s does not exist" filename))
- (find-file filename wildcards)
- (current-buffer))
+Like \\[find-file] but only allow a file that exists, and do not allow
+file names with wildcards."
+ (interactive (nbutlast (find-file-read-args "Find existing file: " t)))
+ (if (and (not (interactive-p)) (not (file-exists-p filename)))
+ (error "%s does not exist" filename)
+ (find-file filename)
+ (current-buffer)))
(defun find-file-read-only (filename &optional wildcards)
"Edit file FILENAME but don't allow changes.
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Stefan Monnier, 2006/09/06
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Richard M. Stallman, 2006/09/08
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Stefan Monnier, 2006/09/20
- [Emacs-diffs] Changes to emacs/lisp/files.el,v, Chong Yidong, 2006/09/22
- [Emacs-diffs] Changes to emacs/lisp/files.el,v,
Eli Zaretskii <=