]> git.eshelyaron.com Git - emacs.git/commitdiff
(add-log-current-defun): In Lisp, if we don't find a
authorRichard M. Stallman <rms@gnu.org>
Fri, 9 Feb 1996 19:09:22 +0000 (19:09 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 9 Feb 1996 19:09:22 +0000 (19:09 +0000)
real defun, return nil, not "".

lisp/add-log.el

index 07468ff1366f1e1cc580e3aa039938588f8a8231..0791fe1fe301d6b3b9cf65c3a5c9734cf7956948 100644 (file)
@@ -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))))