aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-12-16 13:05:37 +0000
committerJuri Linkov2004-12-16 13:05:37 +0000
commit918f2e56d9ab0bf94ea260aec9d224a20c80c44f (patch)
treebea506d250f8f5da9e27142bf91ec43013acec51
parent8270a848c898e19a5f46eb2ea79b71645562e0cd (diff)
downloademacs-918f2e56d9ab0bf94ea260aec9d224a20c80c44f.tar.gz
emacs-918f2e56d9ab0bf94ea260aec9d224a20c80c44f.zip
* help.el (function-called-at-point):
As a last resort try striping non-word prefixes and suffixes.
-rw-r--r--lisp/help.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 5ec9b1f5299..992a9b85f4b 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -267,8 +267,13 @@ If that doesn't give a function, return nil."
267 (and (symbolp obj) (fboundp obj) obj)))) 267 (and (symbolp obj) (fboundp obj) obj))))
268 (error nil)))) 268 (error nil))))
269 (let* ((str (find-tag-default)) 269 (let* ((str (find-tag-default))
270 (obj (if str (intern str)))) 270 (sym (if str (intern-soft str))))
271 (and (symbolp obj) (fboundp obj) obj)))) 271 (if (and sym (fboundp sym))
272 sym
273 (save-match-data
274 (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
275 (setq sym (intern-soft (match-string 1 str)))
276 (and (fboundp sym) sym)))))))
272 277
273 278
274;;; `User' help functions 279;;; `User' help functions