# HG changeset patch # User Juri Linkov # Date 1103202365 0 # Node ID 3a6978b560e9e4407a41a250aea1f3341ff2c867 # Parent 1a8bbdcb009f62f7e2d707a1a0bf78b58a33097b * help-fns.el (variable-at-point): As a last resort try striping non-word prefixes and suffixes. diff -r 1a8bbdcb009f -r 3a6978b560e9 lisp/help-fns.el --- 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