aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1992-10-06 05:12:54 +0000
committerRichard M. Stallman1992-10-06 05:12:54 +0000
commit90e2359039d97550ac72b2804580d448964b98cc (patch)
treecff260fb86cec031a9e853014cf1270023a22fa5
parent19a36ec6dcfbb35734f4f048afdaba3cff94356d (diff)
downloademacs-90e2359039d97550ac72b2804580d448964b98cc.tar.gz
emacs-90e2359039d97550ac72b2804580d448964b98cc.zip
(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 c0f0bf8d38d..3400d93d985 100644
--- a/lisp/add-log.el
+++ b/lisp/add-log.el
@@ -273,13 +273,15 @@ Has a preference of looking backwards."
273 (forward-line -1)) 273 (forward-line -1))
274 ;; See if this is using the DEFUN macro used in Emacs, 274 ;; See if this is using the DEFUN macro used in Emacs,
275 ;; or the DEFUN macro used by the C library. 275 ;; or the DEFUN macro used by the C library.
276 (if (and (save-excursion 276 (if (condition-case nil
277 (forward-line 1) 277 (and (save-excursion
278 (backward-sexp 1) 278 (forward-line 1)
279 (beginning-of-line) 279 (backward-sexp 1)
280 (setq tem (point)) 280 (beginning-of-line)
281 (looking-at "DEFUN\\b")) 281 (setq tem (point))
282 (>= location tem)) 282 (looking-at "DEFUN\\b"))
283 (>= location tem))
284 (error nil))
283 (progn 285 (progn
284 (goto-char tem) 286 (goto-char tem)
285 (down-list 1) 287 (down-list 1)