Fix bug in --eval reply message from server
authorJohan Bockgård <bojohan@gnu.org>
Thu, 18 Aug 2016 19:25:11 +0000 (21:25 +0200)
committerJohan Bockgård <bojohan@gnu.org>
Thu, 18 Aug 2016 19:29:48 +0000 (21:29 +0200)
* lisp/server.el (server-reply-print): Fix check for truncated quote
sequence at end of message. Problem reported in:
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00101.html

lisp/server.el

index e4cf43125700ebab1e5988779325b5afc7e658a8..53009849e2545aa19a2062ff0b7105f1318cd419 100644 (file)
@@ -784,7 +784,7 @@ This handles splitting the command if it would be bigger than
       ;; We have to split the string
       (setq part (substring qtext 0 (- server-msg-size (length prefix) 1)))
       ;; Don't split in the middle of a quote sequence
-      (if (string-match "\\(^\\|[^&]\\)\\(&&\\)+$" part)
+      (if (string-match "\\(^\\|[^&]\\)&\\(&&\\)*$" part)
          ;; There is an uneven number of & at the end
          (setq part (substring part 0 -1)))
       (setq qtext (substring qtext (length part)))