# HG changeset patch # User Richard M. Stallman # Date 718348374 0 # Node ID e7bc20e1b2b9820c19821c242bbbdbea11255453 # Parent b74d9663f9a63b6c5d871f6f8be77aabe3efcb8f (add-log-current-defun): Catch errors checking for DEFUN. diff -r b74d9663f9a6 -r e7bc20e1b2b9 lisp/add-log.el --- 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)