diff options
| author | Juri Linkov | 2004-09-02 16:37:22 +0000 |
|---|---|---|
| committer | Juri Linkov | 2004-09-02 16:37:22 +0000 |
| commit | cc3064a5e99d3aa5bebb1713a1a275e67c0c33c1 (patch) | |
| tree | a2be2088f090b38010a5f848cecf40ebe50a052a | |
| parent | 542e904c45959b990146846094519e799e7a5711 (diff) | |
| download | emacs-cc3064a5e99d3aa5bebb1713a1a275e67c0c33c1.tar.gz emacs-cc3064a5e99d3aa5bebb1713a1a275e67c0c33c1.zip | |
(variable-at-point): Try `find-tag-default' when other methods failed.
| -rw-r--r-- | lisp/help-fns.el | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index e534c6998a7..d193ad344f5 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -461,18 +461,21 @@ face (according to `face-differs-from-default-p')." | |||
| 461 | (defun variable-at-point () | 461 | (defun variable-at-point () |
| 462 | "Return the bound variable symbol found around point. | 462 | "Return the bound variable symbol found around point. |
| 463 | Return 0 if there is no such symbol." | 463 | Return 0 if there is no such symbol." |
| 464 | (condition-case () | 464 | (or (condition-case () |
| 465 | (with-syntax-table emacs-lisp-mode-syntax-table | 465 | (with-syntax-table emacs-lisp-mode-syntax-table |
| 466 | (save-excursion | 466 | (save-excursion |
| 467 | (or (not (zerop (skip-syntax-backward "_w"))) | 467 | (or (not (zerop (skip-syntax-backward "_w"))) |
| 468 | (eq (char-syntax (following-char)) ?w) | 468 | (eq (char-syntax (following-char)) ?w) |
| 469 | (eq (char-syntax (following-char)) ?_) | 469 | (eq (char-syntax (following-char)) ?_) |
| 470 | (forward-sexp -1)) | 470 | (forward-sexp -1)) |
| 471 | (skip-chars-forward "'") | 471 | (skip-chars-forward "'") |
| 472 | (let ((obj (read (current-buffer)))) | 472 | (let ((obj (read (current-buffer)))) |
| 473 | (or (and (symbolp obj) (boundp obj) obj) | 473 | (and (symbolp obj) (boundp obj) obj)))) |
| 474 | 0)))) | 474 | (error nil)) |
| 475 | (error 0))) | 475 | (let* ((str (find-tag-default)) |
| 476 | (obj (if str (read str)))) | ||
| 477 | (and (symbolp obj) (boundp obj) obj)) | ||
| 478 | 0)) | ||
| 476 | 479 | ||
| 477 | ;;;###autoload | 480 | ;;;###autoload |
| 478 | (defun describe-variable (variable &optional buffer) | 481 | (defun describe-variable (variable &optional buffer) |