# HG changeset patch # User Richard M. Stallman # Date 813631198 0 # Node ID c2f17226381039174a361c296f6478c0cc9e69f2 # Parent 7a20f2bb5ac900829723c8106ac9b9284aa83d5c (variable-at-point, function-called-at-point): Switch temporarily to emacs-lisp-mode-syntax-table. diff -r 7a20f2bb5ac9 -r c2f172263810 lisp/help.el --- a/lisp/help.el Fri Oct 13 19:18:29 1995 +0000 +++ b/lisp/help.el Sat Oct 14 00:39:58 1995 +0000 @@ -444,14 +444,18 @@ (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 @@ (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)