Commit d454552c authored by Martin Rudalics's avatar Martin Rudalics
Browse files

(find-library): Wrap search for library name in condition-case

to avoid reporting a scan-error.
parent 34a14ec9
2008-01-25 Martin Rudalics <rudalics@gmx.at>
* emacs-lisp/find-func.el (find-library): Wrap search for
library name in condition-case to avoid reporting a scan-error.
2008-01-25 Juanma Barranquero <lekktu@gmail.com>
* server.el (server-process-filter): Don't force
......
......@@ -200,11 +200,17 @@ TYPE should be nil to find a function, or `defvar' to find a variable."
(let* ((path (cons (or find-function-source-path load-path)
(find-library-suffixes)))
(def (if (eq (function-called-at-point) 'require)
(save-excursion
(backward-up-list)
(forward-char)
(backward-sexp -2)
(thing-at-point 'symbol))
;; `function-called-at-point' may return 'require
;; with `point' anywhere on this line. So wrap the
;; `save-excursion' below in a `condition-case' to
;; avoid reporting a scan-error here.
(condition-case nil
(save-excursion
(backward-up-list)
(forward-char)
(forward-sexp 2)
(thing-at-point 'symbol))
(error nil))
(thing-at-point 'symbol))))
(when def
(setq def (and (locate-file-completion def path 'test) def)))
......
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