* thingatpt.el (end-of-sexp): Fix bug#13952.
authorLeo Liu <sdl.web@gmail.com>
Thu, 14 Mar 2013 11:48:05 +0000 (19:48 +0800)
committerLeo Liu <sdl.web@gmail.com>
Thu, 14 Mar 2013 11:48:05 +0000 (19:48 +0800)
lisp/ChangeLog
lisp/thingatpt.el

index b853399..85d0d5e 100644 (file)
@@ -1,3 +1,7 @@
+2013-03-14  Leo Liu  <sdl.web@gmail.com>
+
+       * thingatpt.el (end-of-sexp): Fix bug#13952.
+
 2013-03-11  Glenn Morris  <rgm@gnu.org>
 
        * Version 24.3 released.
index e1e3e8e..4fd9e2e 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 (char-syntax (char-after))))
+  (let ((char-syntax (and (char-after) (char-syntax (char-after)))))
     (if (or (eq char-syntax ?\))
            (and (eq char-syntax ?\") (in-string-p)))
        (forward-char 1)