summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-04-02 00:07:11 -0700
committerGlenn Morris <rgm@gnu.org>2014-04-02 00:07:11 -0700
commit0b908bf2ef8a755cc61425e181f8272e52bc5aaa (patch)
tree264e25a626c91fa878a1d264d9cedf815d476f63
parent9c8b0aa042be6b3c5955f855d0d08ae6beaffd06 (diff)
downloademacs-0b908bf2ef8a755cc61425e181f8272e52bc5aaa.tar.gz
Small codes update for revert-buffer-function no longer being nil by default
* lisp/menu-bar.el (menu-bar-file-menu): * lisp/vc/ediff.el (ediff-current-file): Update for revert-buffer-function no longer being nil by default.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/menu-bar.el7
-rw-r--r--lisp/vc/ediff.el6
3 files changed, 13 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0bfc080f8ec..b1c35a78937 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
2014-04-02 Glenn Morris <rgm@gnu.org>
+ * menu-bar.el (menu-bar-file-menu):
+ * vc/ediff.el (ediff-current-file):
+ Update for revert-buffer-function no longer being nil by default.
+
* simple.el (command-execute): Respect nil disabled-command-function.
2014-04-01 Nicolas Richard <theonewiththeevillook@yahoo.fr>
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 0e12c976af0..84df6922749 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -149,8 +149,11 @@
:help "Recover edits from a crashed session"))
(bindings--define-key menu [revert-buffer]
'(menu-item "Revert Buffer" revert-buffer
- :enable (or revert-buffer-function
- revert-buffer-insert-file-contents-function
+ :enable (or (not (eq revert-buffer-function
+ 'revert-buffer--default))
+ (not (eq
+ revert-buffer-insert-file-contents-function
+ 'revert-buffer-insert-file-contents--default-function))
(and buffer-file-number
(or (buffer-modified-p)
(not (verify-visited-file-modtime
diff --git a/lisp/vc/ediff.el b/lisp/vc/ediff.el
index d8abe89d17b..927a3ba7fb6 100644
--- a/lisp/vc/ediff.el
+++ b/lisp/vc/ediff.el
@@ -367,8 +367,10 @@ deleted."
This command can be used instead of `revert-buffer'. If there is
nothing to revert then this command fails."
(interactive)
- (unless (or revert-buffer-function
- revert-buffer-insert-file-contents-function
+ ;; This duplicates code from menu-bar.el.
+ (unless (or (not (eq revert-buffer-function 'revert-buffer--default))
+ (not (eq revert-buffer-insert-file-contents-function
+ 'revert-buffer-insert-file-contents--default-function))
(and buffer-file-number
(or (buffer-modified-p)
(not (verify-visited-file-modtime