changeset 63874:56e33caef84f

(occur-1): Do not set the `buffer-read-only' and modified flags for the occur buffer when no matches are found, because the buffer has already been deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Thu, 30 Jun 2005 13:01:26 +0000
parents cf8b4d09b958
children ede5ae2b2e2e
files lisp/replace.el
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/replace.el	Thu Jun 30 05:31:53 2005 +0000
+++ b/lisp/replace.el	Thu Jun 30 13:01:26 2005 +0000
@@ -1045,10 +1045,10 @@
 	  (if (> count 0)
 	      (progn
 		(display-buffer occur-buf)
-		(setq next-error-last-buffer occur-buf))
+		(setq next-error-last-buffer occur-buf)
+                (setq buffer-read-only t)
+                (set-buffer-modified-p nil))
 	    (kill-buffer occur-buf)))
-        (setq buffer-read-only t)
-        (set-buffer-modified-p nil)
 	(run-hooks 'occur-hook)))))
 
 (defun occur-engine-add-prefix (lines)