From: Richard M. Stallman Date: Tue, 10 Oct 1995 20:03:31 +0000 (+0000) Subject: (function-called-at-point, variable-at-point): X-Git-Tag: emacs-19.34~2690 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=da16d59923508785ad12e1aca61e70af8bbf8cd7;p=emacs.git (function-called-at-point, variable-at-point): Don't back up if we start at the beginning of a symbol. --- diff --git a/lisp/help.el b/lisp/help.el index f9a689bf081..48192073baf 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -445,7 +445,9 @@ C-w print information on absence of warranty for GNU Emacs." (error nil)) (condition-case () (save-excursion - (forward-sexp -1) + (and (or (eq (char-syntax (preceding-char)) ?_) + (eq (char-syntax (preceding-char)) ?w)) + (forward-sexp -1)) (skip-chars-forward "'") (let ((obj (read (current-buffer)))) (and (symbolp obj) (fboundp obj) obj))) @@ -540,7 +542,9 @@ C-w print information on absence of warranty for GNU Emacs." (defun variable-at-point () (condition-case () (save-excursion - (forward-sexp -1) + (and (or (eq (char-syntax (preceding-char)) ?_) + (eq (char-syntax (preceding-char)) ?w)) + (forward-sexp -1)) (skip-chars-forward "'") (let ((obj (read (current-buffer)))) (and (symbolp obj) (boundp obj) obj)))