summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2021-04-11 22:27:25 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2021-04-11 22:27:25 -0400
commit28a5932e745faee66ce7b23f4c102d29083519e7 (patch)
tree95b0caf1e5b8e94dcf32495f85c0559f5b9ba422
parent4315a0bb267e8fca16552001e3ab897f69ef8d70 (diff)
downloademacs-28a5932e745faee66ce7b23f4c102d29083519e7.tar.gz
emacs-28a5932e745faee66ce7b23f4c102d29083519e7.tar.bz2
emacs-28a5932e745faee66ce7b23f4c102d29083519e7.zip
* lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil default
(log-edit-show-diff): Simplify accordingly.
-rw-r--r--lisp/vc/log-edit.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index 56b31662210..eabbaba32c0 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -191,7 +191,8 @@ when this variable is set to nil.")
(defconst log-edit-files-buf "*log-edit-files*")
(defvar log-edit-initial-files nil)
(defvar log-edit-callback nil)
-(defvar log-edit-diff-function nil)
+(defvar log-edit-diff-function
+ (lambda () (error "Diff functionality has not been setup")))
(defvar log-edit-listfun nil)
(defvar log-edit-parent-buffer nil)
@@ -659,9 +660,7 @@ Also saves its contents in the comment history and hides
(defun log-edit-show-diff ()
"Show the diff for the files to be committed."
(interactive)
- (if (functionp log-edit-diff-function)
- (funcall log-edit-diff-function)
- (error "Diff functionality has not been setup")))
+ (funcall log-edit-diff-function))
(defun log-edit-show-files ()
"Show the list of files to be committed."