emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/files.el


From: Jan Djärv
Subject: [Emacs-diffs] Changes to emacs/lisp/files.el
Date: Tue, 02 Nov 2004 03:03:23 -0500

Index: emacs/lisp/files.el
diff -c emacs/lisp/files.el:1.718 emacs/lisp/files.el:1.719
*** emacs/lisp/files.el:1.718   Mon Nov  1 23:16:42 2004
--- emacs/lisp/files.el Tue Nov  2 07:57:52 2004
***************
*** 977,982 ****
--- 977,990 ----
          (mapcar 'switch-to-buffer (cdr value)))
        (switch-to-buffer-other-frame value))))
  
+ (defun find-file-existing (filename &optional wildcards)
+   "Edit the existing file FILENAME.
+ Like \\[find-file] but only allow files 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))
+ 
  (defun find-file-read-only (filename &optional wildcards)
    "Edit file FILENAME but don't allow changes.
  Like \\[find-file] but marks buffer as read-only.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]