+2005-12-23 Jan Dj\e,Ad\e(Brv <jan.h.d@swipnet.se>
+
+ * menu-bar.el (menu-find-file-existing): New function.
+ (menu-bar-file-menu): Use menu-find-file-existing for Open.
+
+ * tool-bar.el (tool-bar-setup): open changed to menu-find-file-existing.
+
2005-12-22 Stefan Monnier <monnier@iro.umontreal.ca>
* vc.el: Remove unnecessary leading * in docstrings.
(define-key menu-bar-file-menu [separator-save]
'(menu-item "--"))
+(defun menu-find-file-existing ()
+ "Edit the existing file FILENAME."
+ (interactive)
+ (let* ((mustmatch (not (and (fboundp 'x-uses-old-gtk-dialog)
+ (x-uses-old-gtk-dialog))))
+ (filename (car (find-file-read-args "Find file: " mustmatch))))
+ (if mustmatch
+ (find-file-existing filename)
+ (find-file filename))))
+
+
(define-key menu-bar-file-menu [kill-buffer]
'(menu-item "Close" kill-this-buffer
:enable (kill-this-buffer-enabled-p)
:enable (menu-bar-non-minibuffer-window-p)
:help "Read a directory, to operate on its files"))
(define-key menu-bar-file-menu [open-file]
- '(menu-item "Open File..." find-file-existing
+ '(menu-item "Open File..." menu-find-file-existing
:enable (menu-bar-non-minibuffer-window-p)
:help "Read an existing file into an Emacs buffer"))
(define-key menu-bar-file-menu [new-file]
;; might inadvertently click that button.
;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit")
(tool-bar-add-item-from-menu 'find-file "new")
- (tool-bar-add-item-from-menu 'find-file-existing "open")
+ (tool-bar-add-item-from-menu 'menu-find-file-existing "open")
(tool-bar-add-item-from-menu 'dired "diropen")
(tool-bar-add-item-from-menu 'kill-this-buffer "close")
(tool-bar-add-item-from-menu 'save-buffer "save" nil