Mercurial > emacs
diff lisp/help-fns.el @ 95601:0f9baaf9427f
* help.el (function-called-at-point):
* help-fns.el (variable-at-point): Use emacs-lisp-mode-syntax-table
even when calling find-tag-default.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 06 Jun 2008 20:02:42 +0000 |
parents | f4d291b9de49 |
children | a5fc76bb12d1 |
line wrap: on
line diff
--- a/lisp/help-fns.el Fri Jun 06 18:04:20 2008 +0000 +++ b/lisp/help-fns.el Fri Jun 06 20:02:42 2008 +0000 @@ -443,8 +443,8 @@ "Return the bound variable symbol found at or before point. Return 0 if there is no such symbol. If ANY-SYMBOL is non-nil, don't insist the symbol be bound." - (or (condition-case () - (with-syntax-table emacs-lisp-mode-syntax-table + (with-syntax-table emacs-lisp-mode-syntax-table + (or (condition-case () (save-excursion (or (not (zerop (skip-syntax-backward "_w"))) (eq (char-syntax (following-char)) ?w) @@ -452,17 +452,17 @@ (forward-sexp -1)) (skip-chars-forward "'") (let ((obj (read (current-buffer)))) - (and (symbolp obj) (boundp obj) obj)))) - (error nil)) - (let* ((str (find-tag-default)) - (sym (if str (intern-soft str)))) - (if (and sym (or any-symbol (boundp sym))) - sym - (save-match-data - (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) - (setq sym (intern-soft (match-string 1 str))) - (and (or any-symbol (boundp sym)) sym))))) - 0)) + (and (symbolp obj) (boundp obj) obj))) + (error nil)) + (let* ((str (find-tag-default)) + (sym (if str (intern-soft str)))) + (if (and sym (or any-symbol (boundp sym))) + sym + (save-match-data + (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) + (setq sym (intern-soft (match-string 1 str))) + (and (or any-symbol (boundp sym)) sym))))) + 0))) (defun describe-variable-custom-version-info (variable) (let ((custom-version (get variable 'custom-version))