From 28a5932e745faee66ce7b23f4c102d29083519e7 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 11 Apr 2021 22:27:25 -0400 Subject: [PATCH] * lisp/vc/log-edit.el (log-edit-diff-function): Give non-nil default (log-edit-show-diff): Simplify accordingly. --- lisp/vc/log-edit.el | 7 +++---- 1 file 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." -- 2.39.2