1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-16 17:19:41 +00:00

(occur-1): Set `buffer-read-only' and the buffer-modified flag before running

`occur-hook' to protect against unintentional buffer switches that can lead to
data loss.
This commit is contained in:
Juanma Barranquero 2005-06-24 02:41:36 +00:00
parent b93e3c3ba1
commit 8346425e35
2 changed files with 12 additions and 6 deletions

View File

@ -1,13 +1,19 @@
2005-06-24 Juanma Barranquero <lekktu@gmail.com>
* replace.el (occur-1): Set `buffer-read-only' and the
buffer-modified flag before running `occur-hook' to protect
against unintentional buffer switches that can lead to data loss.
2005-06-24 Nick Roberts <nickrob@snap.net.nz>
* progmodes/gud.el (gud-tooltip-print-command): Indent properly.
(gud-gdb-marker-filter): Use font-lock-warning-face for any
initial error.
* progmodes/gdb-ui.el (gdb-send): Remove warning face from errors
after fresh input.
(gdb-var-create-handler): Put name of expression in quotes.
2005-06-23 Luc Teirlinck <teirllm@auburn.edu>
* emacs-lisp/ring.el (ring-elements): Make it return a list of the
@ -532,7 +538,7 @@
* progmodes/gdb-ui.el (menu): Re-order menu items.
(gdb-tooltip-print): Respect tooltip-use-echo-area.
* progmodes/gud.el (tooltip-use-echo-area): Remove alias.
Define in tooltip.el.
(gud-tooltip-process-output): Respect tooltip-use-echo-area.

View File

@ -1001,9 +1001,9 @@ See also `multi-occur'."
(display-buffer occur-buf)
(setq next-error-last-buffer occur-buf))
(kill-buffer occur-buf)))
(run-hooks 'occur-hook))
(setq buffer-read-only t)
(set-buffer-modified-p nil))))
(setq buffer-read-only t)
(set-buffer-modified-p nil)
(run-hooks 'occur-hook)))))
(defun occur-engine-add-prefix (lines)
(mapcar