From c8d6d636a89caa3646d4ca55e9910c4c31f52806 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Tue, 10 Apr 2001 14:48:42 +0000 Subject: [PATCH] (completion-list-mode-finish): New function. (toplevel): Add completion-list-mode-finish to temp-buffer-show-hook. --- lisp/ChangeLog | 4 ++++ lisp/simple.el | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index abe4be937b2..c41630731d4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2001-04-10 Gerd Moellmann + * simple.el (completion-list-mode-finish): New function. + (toplevel): Add completion-list-mode-finish to + temp-buffer-show-hook. + * language/european.el ("Polish"): Change sample text. From: jsbien@mimuw.edu.pl (Janusz S. Bie,Bq(B). diff --git a/lisp/simple.el b/lisp/simple.el index 9d2d78a8f44..367bc2465fe 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3720,6 +3720,14 @@ Use \\\\[mouse-choose-completion] to select one\ (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 -- 2.39.5