# HG changeset patch # User Juri Linkov # Date 1094143042 0 # Node ID 69c4e722e542ee03c6864f964e5497e47543c268 # Parent 96649ac41424eb41b40b4af0c6bb719791846434 (variable-at-point): Try `find-tag-default' when other methods failed. diff -r 96649ac41424 -r 69c4e722e542 lisp/help-fns.el --- a/lisp/help-fns.el Thu Sep 02 16:37:01 2004 +0000 +++ b/lisp/help-fns.el Thu Sep 02 16:37:22 2004 +0000 @@ -461,18 +461,21 @@ (defun variable-at-point () "Return the bound variable symbol found around point. Return 0 if there is no such symbol." - (condition-case () - (with-syntax-table emacs-lisp-mode-syntax-table - (save-excursion - (or (not (zerop (skip-syntax-backward "_w"))) - (eq (char-syntax (following-char)) ?w) - (eq (char-syntax (following-char)) ?_) - (forward-sexp -1)) - (skip-chars-forward "'") - (let ((obj (read (current-buffer)))) - (or (and (symbolp obj) (boundp obj) obj) - 0)))) - (error 0))) + (or (condition-case () + (with-syntax-table emacs-lisp-mode-syntax-table + (save-excursion + (or (not (zerop (skip-syntax-backward "_w"))) + (eq (char-syntax (following-char)) ?w) + (eq (char-syntax (following-char)) ?_) + (forward-sexp -1)) + (skip-chars-forward "'") + (let ((obj (read (current-buffer)))) + (and (symbolp obj) (boundp obj) obj)))) + (error nil)) + (let* ((str (find-tag-default)) + (obj (if str (read str)))) + (and (symbolp obj) (boundp obj) obj)) + 0)) ;;;###autoload (defun describe-variable (variable &optional buffer)