From: Leo Liu Date: Thu, 14 Mar 2013 14:16:00 +0000 (+0800) Subject: * thingatpt.el (end-of-sexp): Use syntax-after. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1943^2~35 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=95b43468a4958795cee5e7bd232239c5f61d2475;p=emacs.git * thingatpt.el (end-of-sexp): Use syntax-after. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 85d0d5e9c39..993d9789bad 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,6 @@ 2013-03-14 Leo Liu - * thingatpt.el (end-of-sexp): Fix bug#13952. + * thingatpt.el (end-of-sexp): Fix bug#13952. Use syntax-after. 2013-03-11 Glenn Morris diff --git a/lisp/thingatpt.el b/lisp/thingatpt.el index 4fd9e2e83b2..8c45659ee4a 100644 --- a/lisp/thingatpt.el +++ b/lisp/thingatpt.el @@ -182,7 +182,7 @@ The bounds of THING are determined by `bounds-of-thing-at-point'." (defun end-of-sexp () "Move point to the end of the current sexp. \[This is an internal function.]" - (let ((char-syntax (and (char-after) (char-syntax (char-after))))) + (let ((char-syntax (syntax-after (point)))) (if (or (eq char-syntax ?\)) (and (eq char-syntax ?\") (in-string-p))) (forward-char 1)