(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)))
(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)))