changeset 58992:1a8bbdcb009f

* help.el (function-called-at-point): As a last resort try striping non-word prefixes and suffixes.
author Juri Linkov <juri@jurta.org>
date Thu, 16 Dec 2004 13:05:37 +0000
parents 2e946184b557
children 3a6978b560e9
files lisp/help.el
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/help.el	Thu Dec 16 07:19:20 2004 +0000
+++ b/lisp/help.el	Thu Dec 16 13:05:37 2004 +0000
@@ -267,8 +267,13 @@
 		      (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