Subject: Re: bug#20690: 25.0.50; query-replace: incorrect history when replacing the NUL character.

From: Juri Linkov <[email-masked]>
Date: Tue, 23 Jun 2015 01:59:54 +0300

> +(defun query-replace--split-string (string)
> +  "Split string STRING at a character with property `separator'"
> +  (let* ((length (length string))
> +         (split-pos (text-property-any 0 length 'separator t string)))
> +    (if (not split-pos)
> +        string
> +      (cl-assert (not (text-property-any (1+ split-pos) length 'separator t string)))
> +      (cons (substring-no-properties string 0 split-pos)
> +            (substring-no-properties string (1+ split-pos) length)))))

Thanks to cl-assert it signaled an error with ‘M-% a RET RET C-g M-% M-p C-e z RET’
so I fixed it in 1b1b6644c8cb27539ca99e97ef2f352f411c06d8.