summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2004-12-16 13:06:05 +0000
committerJuri Linkov <juri@jurta.org>2004-12-16 13:06:05 +0000
commit49c81cfc0184fbc5274516a2e7b53f71a6f7e3c6 (patch)
treef26387f2f51ca8b921f400f2b70b9a6f52acf17f /lisp
parent537b3a14d6f7072d13fff0aae9baec3425fbf9c6 (diff)
downloademacs-49c81cfc0184fbc5274516a2e7b53f71a6f7e3c6.tar.gz
* help-fns.el (variable-at-point):
As a last resort try striping non-word prefixes and suffixes.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/help-fns.el9
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index c06a7b1ee73..125b18614a2 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -478,8 +478,13 @@ Return 0 if there is no such symbol."
(and (symbolp obj) (boundp obj) obj))))
(error nil))
(let* ((str (find-tag-default))
- (obj (if str (intern str))))
- (and (symbolp obj) (boundp obj) obj))
+ (sym (if str (intern-soft str))))
+ (if (and sym (boundp sym))
+ sym
+ (save-match-data
+ (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
+ (setq sym (intern-soft (match-string 1 str)))
+ (and (boundp sym) sym)))))
0))
;;;###autoload