aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-12-16 13:06:05 +0000
committerJuri Linkov2004-12-16 13:06:05 +0000
commitf507d6a15348caaba4eac96182f6ca74a089659b (patch)
tree16f67d69fbf90c1170326f2e6b78b921e3d10ad3
parent918f2e56d9ab0bf94ea260aec9d224a20c80c44f (diff)
downloademacs-f507d6a15348caaba4eac96182f6ca74a089659b.tar.gz
emacs-f507d6a15348caaba4eac96182f6ca74a089659b.zip
* help-fns.el (variable-at-point):
As a last resort try striping non-word prefixes and suffixes.
-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."
478 (and (symbolp obj) (boundp obj) obj)))) 478 (and (symbolp obj) (boundp obj) obj))))
479 (error nil)) 479 (error nil))
480 (let* ((str (find-tag-default)) 480 (let* ((str (find-tag-default))
481 (obj (if str (intern str)))) 481 (sym (if str (intern-soft str))))
482 (and (symbolp obj) (boundp obj) obj)) 482 (if (and sym (boundp sym))
483 sym
484 (save-match-data
485 (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
486 (setq sym (intern-soft (match-string 1 str)))
487 (and (boundp sym) sym)))))
483 0)) 488 0))
484 489
485;;;###autoload 490;;;###autoload