Mercurial > emacs
comparison lisp/add-log.el @ 27281:8afd998ab3b2
(add-log-current-defun): Handle user-defined
add-log-current-function returning nil,
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 11 Jan 2000 15:39:48 +0000 |
parents | 300415d17473 |
children | ed290e5a5b17 |
comparison
equal
deleted
inserted
replaced
27280:99ca347cf9c5 | 27281:8afd998ab3b2 |
---|---|
589 | 589 |
590 Has a preference of looking backwards." | 590 Has a preference of looking backwards." |
591 (condition-case nil | 591 (condition-case nil |
592 (save-excursion | 592 (save-excursion |
593 (let ((location (point))) | 593 (let ((location (point))) |
594 (cond ((functionp add-log-current-defun-function) | 594 (cond ((and (functionp add-log-current-defun-function) |
595 (funcall add-log-current-defun-function)) | 595 (funcall add-log-current-defun-function))) |
596 ((memq major-mode add-log-lisp-like-modes) | 596 ((memq major-mode add-log-lisp-like-modes) |
597 ;; If we are now precisely at the beginning of a defun, | 597 ;; If we are now precisely at the beginning of a defun, |
598 ;; make sure beginning-of-defun finds that one | 598 ;; make sure beginning-of-defun finds that one |
599 ;; rather than the previous one. | 599 ;; rather than the previous one. |
600 (or (eobp) (forward-char 1)) | 600 (or (eobp) (forward-char 1)) |