(add-log-current-defun): Catch errors checking for DEFUN.

This commit is contained in:
Richard M. Stallman 1992-10-06 05:12:54 +00:00
parent 19a36ec6dc
commit 90e2359039

View file

@ -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)