comparison lisp/add-log.el @ 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 1aea52712a31
children e5cb5060bb51
comparison
equal deleted inserted replaced
1350:b74d9663f9a6 1351:e7bc20e1b2b9
271 (while (and (not (bobp)) 271 (while (and (not (bobp))
272 (looking-at "[ \t\n]")) 272 (looking-at "[ \t\n]"))
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)
286 (if (= (char-after (point)) ?\") 288 (if (= (char-after (point)) ?\")
287 (progn 289 (progn