* lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function
This commit is contained in:
parent
5a4f58f7ee
commit
5bd25c095e
1 changed files with 13 additions and 11 deletions
24
lisp/help.el
24
lisp/help.el
|
@ -265,17 +265,19 @@ If that doesn't give a function, return nil."
|
|||
(condition-case ()
|
||||
(save-excursion
|
||||
(save-restriction
|
||||
(narrow-to-region (max (point-min)
|
||||
(- (point) 1000)) (point-max))
|
||||
;; Move up to surrounding paren, then after the open.
|
||||
(backward-up-list 1)
|
||||
(forward-char 1)
|
||||
;; If there is space here, this is probably something
|
||||
;; other than a real Lisp function call, so ignore it.
|
||||
(if (looking-at "[ \t]")
|
||||
(error "Probably not a Lisp function call"))
|
||||
(let ((obj (read (current-buffer))))
|
||||
(and (symbolp obj) (fboundp obj) obj))))
|
||||
(let ((forward-sexp-function nil)) ;Use elisp-mode's value
|
||||
(narrow-to-region (max (point-min)
|
||||
(- (point) 1000))
|
||||
(point-max))
|
||||
;; Move up to surrounding paren, then after the open.
|
||||
(backward-up-list 1)
|
||||
(forward-char 1)
|
||||
;; If there is space here, this is probably something
|
||||
;; other than a real Lisp function call, so ignore it.
|
||||
(if (looking-at "[ \t]")
|
||||
(error "Probably not a Lisp function call"))
|
||||
(let ((obj (read (current-buffer))))
|
||||
(and (symbolp obj) (fboundp obj) obj)))))
|
||||
(error nil))
|
||||
(let* ((str (find-tag-default))
|
||||
(sym (if str (intern-soft str))))
|
||||
|
|
Loading…
Add table
Reference in a new issue