From: Richard M. Stallman Date: Fri, 9 Feb 1996 19:09:22 +0000 (+0000) Subject: (add-log-current-defun): In Lisp, if we don't find a X-Git-Tag: emacs-19.34~1332 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=947b27432d908de7be6fc7a260b1b53931b1167d;p=emacs.git (add-log-current-defun): In Lisp, if we don't find a real defun, return nil, not "". --- diff --git a/lisp/add-log.el b/lisp/add-log.el index 07468ff1366..0791fe1fe30 100644 --- a/lisp/add-log.el +++ b/lisp/add-log.el @@ -340,7 +340,8 @@ Has a preference of looking backwards." (or (eobp) (forward-char 1)) (beginning-of-defun) ;; Make sure we are really inside the defun found, not after it. - (if (and (progn (end-of-defun) + (if (and (looking-at "\\s(") + (progn (end-of-defun) (< location (point))) (progn (forward-sexp -1) (>= location (point))))