From aa705642e7a9754b1f6c954fa4e19da5b54928df Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 11 Jan 2000 15:40:41 +0000 Subject: [PATCH] (add-log-current-defun): Handle user-defined add-log-current-function returning nil, --- lisp/ChangeLog | 7 +++++-- lisp/add-log.el | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 51a7a2145d2..8a54f7959f4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,7 +1,10 @@ -2000-01-11 Sun Jari Aalto +2000-01-11 Jari Aalto + * add-log.el (add-log-current-defun): Handle user-defined + add-log-current-function returning nil, + * add-log.el (add-change-log-entry): Insert version number - if having found a current function. + if having found a current function * add-log.el (add-log-current-defun): Call `add-log-current-defun-function'. Try matches at level 0 and diff --git a/lisp/add-log.el b/lisp/add-log.el index bb911904ad6..92ee80a4f70 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -591,8 +591,8 @@ Has a preference of looking backwards." (condition-case nil (save-excursion (let ((location (point))) - (cond ((functionp add-log-current-defun-function) - (funcall add-log-current-defun-function)) + (cond ((and (functionp add-log-current-defun-function) + (funcall add-log-current-defun-function))) ((memq major-mode add-log-lisp-like-modes) ;; If we are now precisely at the beginning of a defun, ;; make sure beginning-of-defun finds that one -- 2.39.5