Mercurial > emacs
changeset 58993:3a6978b560e9
* help-fns.el (variable-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:06:05 +0000 |
parents | 1a8bbdcb009f |
children | 720c9b9bf376 |
files | lisp/help-fns.el |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/help-fns.el Thu Dec 16 13:05:37 2004 +0000 +++ b/lisp/help-fns.el Thu Dec 16 13:06:05 2004 +0000 @@ -478,8 +478,13 @@ (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