(add-log-current-defun): Catch errors checking for DEFUN.
This commit is contained in:
parent
19a36ec6dc
commit
90e2359039
1 changed files with 9 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue