changeset 37300:76c94d3124d6

(completion-list-mode-finish): New function. (toplevel): Add completion-list-mode-finish to temp-buffer-show-hook.
author Gerd Moellmann <gerd@gnu.org>
date Tue, 10 Apr 2001 14:48:08 +0000
parents bf73da2bd00c
children 52b1a4dbe8f8
files lisp/simple.el
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Tue Apr 10 14:32:12 2001 +0000
+++ b/lisp/simple.el	Tue Apr 10 14:48:08 2001 +0000
@@ -3720,6 +3720,14 @@
   (setq completion-base-size nil)
   (run-hooks 'completion-list-mode-hook))
 
+(defun completion-list-mode-finish ()
+  "Finish setup of the completions buffer.
+Called from `temp-buffer-show-hook'."
+  (when (eq major-mode 'completion-list-mode)
+    (toggle-read-only 1)))
+
+(add-hook 'temp-buffer-show-hook 'completion-list-mode-finish)
+
 (defvar completion-setup-hook nil
   "Normal hook run at the end of setting up a completion list buffer.
 When this hook is run, the current buffer is the one in which the