aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1992-10-06 05:12:54 +0000
committerRichard M. Stallman <[email protected]>1992-10-06 05:12:54 +0000
commit90e2359039d97550ac72b2804580d448964b98cc (patch)
treecff260fb86cec031a9e853014cf1270023a22fa5
parent19a36ec6dcfbb35734f4f048afdaba3cff94356d (diff)
(add-log-current-defun): Catch errors checking for DEFUN.
-rw-r--r--lisp/add-log.el16
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/add-log.el b/lisp/add-log.el
index c0f0bf8d38..3400d93d98 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -273,13 +273,15 @@ Has a preference of looking backwards."
(forward-line -1))
;; See if this is using the DEFUN macro used in Emacs,
;; or the DEFUN macro used by the C library.
- (if (and (save-excursion
- (forward-line 1)
- (backward-sexp 1)
- (beginning-of-line)
- (setq tem (point))
- (looking-at "DEFUN\\b"))
- (>= location tem))
+ (if (condition-case nil
+ (and (save-excursion
+ (forward-line 1)
+ (backward-sexp 1)
+ (beginning-of-line)
+ (setq tem (point))
+ (looking-at "DEFUN\\b"))
+ (>= location tem))
+ (error nil))
(progn
(goto-char tem)
(down-list 1)