From 64ca55b1593fff8cfffab89c51d7e92c1a68dc27 Mon Sep 17 00:00:00 2001 From: Tej Chajed Date: Thu, 25 Aug 2016 14:02:04 -0400 Subject: Ensure PG overlays have pg-span property (#98) --- generic/pg-response.el | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'generic') diff --git a/generic/pg-response.el b/generic/pg-response.el index b0cf217d..46c7e1b5 100644 --- a/generic/pg-response.el +++ b/generic/pg-response.el @@ -393,23 +393,23 @@ Returns non-nil if response buffer was cleared." (t (let (start end) (with-current-buffer proof-response-buffer - (setq buffer-read-only nil) - ;; da: I've moved newline before the string itself, to match - ;; the other cases when messages are inserted and to cope - ;; with warnings after delayed output (non newline terminated). - (goto-char (point-max)) - ;; insert a newline before the new message unless the - ;; buffer is empty or proof-script-insert-newlines is nil - (unless (or (not proof-script-insert-newlines) - (eq (point-min) (point-max))) - (newline)) - (setq start (point)) - (insert str) - (unless (bolp) (newline)) - (when face - (overlay-put - (make-overlay start (point-max)) - 'face face)) + (setq buffer-read-only nil) + ;; da: I've moved newline before the string itself, to match + ;; the other cases when messages are inserted and to cope + ;; with warnings after delayed output (non newline terminated). + (goto-char (point-max)) + ;; insert a newline before the new message unless the + ;; buffer is empty or proof-script-insert-newlines is nil + (unless (or (not proof-script-insert-newlines) + (eq (point-min) (point-max))) + (newline)) + (setq start (point)) + (insert str) + (unless (bolp) (newline)) + (when face + (overlay-put + (span-make start (point-max)) + 'face face)) (setq buffer-read-only t) (set-buffer-modified-p nil)))))) -- cgit v1.2.3