[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 5bd25c0: * lisp/help.el (function-called-at-point):
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master 5bd25c0: * lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function |
Date: |
Wed, 1 May 2019 12:38:12 -0400 (EDT) |
branch: master
commit 5bd25c095eb7f7d148b47e6823c7eccd6416a693
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function
---
lisp/help.el | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/lisp/help.el b/lisp/help.el
index d1f4735..4dfe471 100644
--- a/lisp/help.el
+++ b/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))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 5bd25c0: * lisp/help.el (function-called-at-point): Use Elisp's forward-sexp-function,
Stefan Monnier <=