From 918f2e56d9ab0bf94ea260aec9d224a20c80c44f Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 16 Dec 2004 13:05:37 +0000 Subject: [PATCH] * help.el (function-called-at-point): As a last resort try striping non-word prefixes and suffixes. --- lisp/help.el | 9 +++++++-- 1 file 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." (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 -- 2.39.2