From: Richard M. Stallman Date: Sat, 14 Oct 1995 00:39:58 +0000 (+0000) Subject: (variable-at-point, function-called-at-point): X-Git-Tag: emacs-19.34~2651 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=914a48d0f0579bf6c08f5aa3bd391717820270d8;p=emacs.git (variable-at-point, function-called-at-point): Switch temporarily to emacs-lisp-mode-syntax-table. --- diff --git a/lisp/help.el b/lisp/help.el index bcd646c1281..d81e433f755 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -444,14 +444,18 @@ C-w print information on absence of warranty for GNU Emacs." (and (symbolp obj) (fboundp obj) obj)))) (error nil)) (condition-case () - (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) (fboundp obj) obj))) + (let ((stab (syntax-table))) + (unwind-protect + (save-excursion + (set-syntax-table emacs-lisp-mode-syntax-table) + (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) (fboundp obj) obj))) + (set-syntax-table stab))) (error nil)))) (defun describe-function-find-file (function) @@ -542,14 +546,18 @@ C-w print information on absence of warranty for GNU Emacs." (defun variable-at-point () (condition-case () - (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))) + (let ((stab (syntax-table))) + (unwind-protect + (save-excursion + (set-syntax-table emacs-lisp-mode-syntax-table) + (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))) + (set-syntax-table stab))) (error nil))) (defun describe-variable (variable)