buffer when no matches are found, because the buffer has already been deleted.
2005-06-30 Juanma Barranquero <lekktu@gmail.com>
+ * replace.el (occur-1): When no matches are found, do not set the
+ `buffer-read-only' and modified flags for the occur buffer,
+ because it is deleted.
+
* emulation/cua-base.el (cua-check-pending-input)
(cua-repeat-replace-region, cua-mode, cua-debug)
(cua-auto-tabify-rectangles, cua-inhibit-cua-keys):
(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)