changeset 1351:e7bc20e1b2b9

(add-log-current-defun): Catch errors checking for DEFUN.
author Richard M. Stallman <rms@gnu.org>
date Tue, 06 Oct 1992 05:12:54 +0000
parents b74d9663f9a6
children a8623439066b
files lisp/add-log.el
diffstat 1 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/add-log.el	Tue Oct 06 05:09:37 1992 +0000
+++ b/lisp/add-log.el	Tue Oct 06 05:12:54 1992 +0000
@@ -273,13 +273,15 @@
 		       (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)