From e91b8e7ef70db2b88e71ddbe7e1e61f8b37af0e2 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 12 Oct 1995 17:56:17 +0000 Subject: [PATCH] (variable-at-point, function-called-at-point): Fix revious changes. --- lisp/help.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/lisp/help.el b/lisp/help.el index 48192073baf..bcd646c1281 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -445,9 +445,10 @@ C-w print information on absence of warranty for GNU Emacs." (error nil)) (condition-case () (save-excursion - (and (or (eq (char-syntax (preceding-char)) ?_) - (eq (char-syntax (preceding-char)) ?w)) - (forward-sexp -1)) + (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))) @@ -542,9 +543,10 @@ C-w print information on absence of warranty for GNU Emacs." (defun variable-at-point () (condition-case () (save-excursion - (and (or (eq (char-syntax (preceding-char)) ?_) - (eq (char-syntax (preceding-char)) ?w)) - (forward-sexp -1)) + (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))) -- 2.39.2