Commit 2cc0b765 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(add-log-current-defun): Add condition-case around

the body, so at worst we return nil.
parent 81d478f3
...@@ -218,6 +218,7 @@ identifiers followed by `:' or `=', see variable ...@@ -218,6 +218,7 @@ identifiers followed by `:' or `=', see variable
`add-log-current-defun-header-regexp'. `add-log-current-defun-header-regexp'.
Has a preference of looking backwards." Has a preference of looking backwards."
(condition-case nil
(save-excursion (save-excursion
(let ((location (point))) (let ((location (point)))
(cond ((memq major-mode '(emacs-lisp-mode lisp-mode scheme-mode)) (cond ((memq major-mode '(emacs-lisp-mode lisp-mode scheme-mode))
...@@ -346,8 +347,8 @@ Has a preference of looking backwards." ...@@ -346,8 +347,8 @@ Has a preference of looking backwards."
(- (point) 10000) (- (point) 10000)
t) t)
(buffer-substring (match-beginning 1) (buffer-substring (match-beginning 1)
(match-end 1))))))))) (match-end 1))))))))
(error nil)))
(provide 'add-log) (provide 'add-log)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment