summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-10-12 17:56:17 +0000
committerRichard M. Stallman <rms@gnu.org>1995-10-12 17:56:17 +0000
commitfaac3f1e1fc59b289099fae2604f0bc6010a74f7 (patch)
treea0f011fca1d496b3a90f2611034626e085774b33
parent5571ec1d2edfcb04249de652c0e644a6c225711a (diff)
downloademacs-faac3f1e1fc59b289099fae2604f0bc6010a74f7.tar.gz
(variable-at-point, function-called-at-point): Fix revious changes.
-rw-r--r--lisp/help.el14
1 files 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)))