Commit f507d6a1 authored by Juri Linkov's avatar Juri Linkov
Browse files

* help-fns.el (variable-at-point):

As a last resort try striping non-word prefixes and suffixes.
parent 918f2e56
......@@ -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))
(when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str))
(setq sym (intern-soft (match-string 1 str)))
(and (boundp sym) sym)))))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment