]> code.delx.au - gnu-emacs/commitdiff
* thingatpt.el (end-of-sexp): Use syntax-after.
authorLeo Liu <sdl.web@gmail.com>
Thu, 14 Mar 2013 14:16:00 +0000 (22:16 +0800)
committerLeo Liu <sdl.web@gmail.com>
Thu, 14 Mar 2013 14:16:00 +0000 (22:16 +0800)
lisp/ChangeLog
lisp/thingatpt.el

index 85d0d5e9c39af0767413ce58231696a33cd374d6..993d9789bad7be8984d5876e961e8588823c9f51 100644 (file)
@@ -1,6 +1,6 @@
 2013-03-14  Leo Liu  <sdl.web@gmail.com>
 
-       * thingatpt.el (end-of-sexp): Fix bug#13952.
+       * thingatpt.el (end-of-sexp): Fix bug#13952.  Use syntax-after.
 
 2013-03-11  Glenn Morris  <rgm@gnu.org>
 
index 4fd9e2e83b2b2535b55880a543db7a2717c173c8..8c45659ee4a299838678d971f5d900f8b9afeca4 100644 (file)
@@ -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)