From 947b27432d908de7be6fc7a260b1b53931b1167d Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Fri, 9 Feb 1996 19:09:22 +0000 Subject: [PATCH] (add-log-current-defun): In Lisp, if we don't find a real defun, return nil, not "". --- lisp/add-log.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)))) -- 2.39.2