From: Gerd Moellmann Date: Fri, 15 Sep 2000 20:28:56 +0000 (+0000) Subject: (menu-bar-files-menu): Disable ``Save'' if X-Git-Tag: emacs-pretest-21.0.90~1581 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7a98d821239358928ccdf05eeecd2e906a2ca6cf;p=emacs.git (menu-bar-files-menu): Disable ``Save'' if current buffer has no file name. --- 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"))