summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-02-09 19:09:22 +0000
committerRichard M. Stallman <rms@gnu.org>1996-02-09 19:09:22 +0000
commit7986595f03d7934297a4e5434a51356a37da4ea6 (patch)
treee8c7a577d80aa28dbdacb12cc60857b2655a7734
parent60a77bfc3fe797a6b2346f0794aff9441b9f15e8 (diff)
downloademacs-7986595f03d7934297a4e5434a51356a37da4ea6.tar.gz
(add-log-current-defun): In Lisp, if we don't find a
real defun, return nil, not "".
-rw-r--r--lisp/add-log.el3
1 files changed, 2 insertions, 1 deletions
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))))