(epa--temp-buffer-show-function): Set buffer-read-only here.
authorueno <ueno>
Fri, 26 May 2006 11:19:12 +0000 (11:19 +0000)
committerueno <ueno>
Fri, 26 May 2006 11:19:12 +0000 (11:19 +0000)
epa.el

diff --git a/epa.el b/epa.el
index d60d2c1..43de23f 100644 (file)
--- a/epa.el
+++ b/epa.el
@@ -229,7 +229,7 @@ the separate window."
 
 (defun epa--temp-buffer-show-function (buffer)
   (save-selected-window
-    (let ((window (or (get-buffer-window epa-info-buffer)
+    (let ((window (or (get-buffer-window buffer)
                      (progn
                        (select-window (get-largest-window))
                        (split-window-vertically)))))
@@ -241,7 +241,9 @@ the separate window."
       (let ((height (window-height)))
        (if (> height epa-info-window-height)
            (shrink-window (- height epa-info-window-height)))
-       (set-window-start window (point-min))))))
+       (set-window-start window (point-min)))
+      (with-current-buffer buffer
+       (setq buffer-read-only t)))))
 
 (defun epa-display-verify-result (verify-result)
   (if epa-popup-info-window