1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-17 17:58:46 +00:00

* help.el (function-called-at-point):

As a last resort try striping non-word prefixes and suffixes.
This commit is contained in:
Juri Linkov 2004-12-16 13:05:37 +00:00
parent 8270a848c8
commit 918f2e56d9

View File

@ -267,8 +267,13 @@ If that doesn't give a function, return nil."
(and (symbolp obj) (fboundp obj) obj))))
(error nil))))
(let* ((str (find-tag-default))
(obj (if str (intern str))))
(and (symbolp obj) (fboundp obj) obj))))
(sym (if str (intern-soft str))))
(if (and sym (fboundp sym))
sym
(save-match-data
(when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
(setq sym (intern-soft (match-string 1 str)))
(and (fboundp sym) sym)))))))
;;; `User' help functions