summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2005-06-24 02:41:36 +0000
committerJuanma Barranquero <lekktu@gmail.com>2005-06-24 02:41:36 +0000
commit8346425e35da3b44d5b5f0607740453946b37ec3 (patch)
tree658308daf78b495addd6a4f58761b21b557e2019
parentb93e3c3ba1644f5e746c7486bd609ba9fc7ec583 (diff)
downloademacs-8346425e35da3b44d5b5f0607740453946b37ec3.tar.gz
(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.
-rw-r--r--lisp/ChangeLog12
-rw-r--r--lisp/replace.el6
2 files changed, 12 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d850358c01e..f15073167a2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/replace.el b/lisp/replace.el
index d5ccd8723c2..2896ce133de 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -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