]> git.eshelyaron.com Git - emacs.git/commitdiff
* help-fns.el (variable-at-point):
authorJuri Linkov <juri@jurta.org>
Thu, 16 Dec 2004 13:06:05 +0000 (13:06 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 16 Dec 2004 13:06:05 +0000 (13:06 +0000)
As a last resort try striping non-word prefixes and suffixes.

lisp/help-fns.el

index c06a7b1ee73aac1be69a388fbf2d364d3fe59ffc..125b18614a21b817dfa1f5f5f25fbaf8f215b769 100644 (file)
@@ -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