(message-display-completion-list): New function.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 26 Oct 2005 01:51:04 +0000 (01:51 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Wed, 26 Oct 2005 01:51:04 +0000 (01:51 +0000)
(message-expand-group): Use it; make sure the Completions buffer is modifiable.

lisp/ChangeLog
lisp/message.el

index 13ed8a4..5b797b5 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-26  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * message.el (message-display-completion-list): New function.
+       (message-expand-group): Use it; make sure the Completions buffer
+       is modifiable.
+
 2005-10-23  Chong Yidong  <cyd@stupidchicken.com>
 
        * gnus-sum.el (gnus-ignored-from-addresses): Handle case where
index 04e5d60..f9927b1 100644 (file)
@@ -6778,6 +6778,17 @@ those headers."
                 (lookup-key global-map "\t")
                 'indent-relative))))
 
+(eval-and-compile
+  (condition-case nil
+      (with-temp-buffer
+       (let ((standard-output (current-buffer)))
+         (eval '(display-completion-list nil "")))
+       (defalias 'message-display-completion-list 'display-completion-list))
+    (error ;; Don't use `wrong-number-of-arguments' here because of XEmacs.
+     (defun message-display-completion-list (completions &optional ignore)
+       "Display the list of completions, COMPLETIONS, using `standard-output'."
+       (display-completion-list completions)))))
+
 (defun message-expand-group ()
   "Expand the group name under point."
   (let* ((b (save-excursion
@@ -6816,7 +6827,9 @@ those headers."
          (let ((buffer-read-only nil))
            (erase-buffer)
            (let ((standard-output (current-buffer)))
-             (display-completion-list (sort completions 'string<) string))
+             (message-display-completion-list (sort completions 'string<)
+                                              string))
+           (setq buffer-read-only nil)
            (goto-char (point-min))
            (delete-region (point) (progn (forward-line 3) (point))))))))))