From 7a98d821239358928ccdf05eeecd2e906a2ca6cf Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Fri, 15 Sep 2000 20:28:56 +0000 Subject: [PATCH] (menu-bar-files-menu): Disable ``Save'' if current buffer has no file name. --- lisp/ChangeLog | 5 +++++ lisp/menu-bar.el | 1 + 2 files changed, 6 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 330d405369f..d0299991a99 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-09-15 Gerd Moellmann + + * menu-bar.el (menu-bar-files-menu): Disable ``Save'' if + current buffer has no file name. + 2000-09-15 Dave Love * strokes.el: Sync with maintainer's current version with changes diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 744ff2a5513..4cbfda6b978 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -152,6 +152,7 @@ A large number or nil slows down menu responsiveness." (define-key menu-bar-files-menu [save-buffer] '(menu-item "Save (current buffer)" save-buffer :enable (and (buffer-modified-p) + (buffer-file-name) (not (window-minibuffer-p (frame-selected-window menu-updating-frame)))) :help "Save current buffer to its file")) -- 2.39.2