Mercurial > emacs
comparison lisp/mail/rmailsum.el @ 3198:18612999f80c
(rmail-new-summary): Set rmail-summary-buffer
to nil at beginning; set it for real after summary is set up.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 28 May 1993 04:44:55 +0000 |
parents | eb6ae6faff24 |
children | 31390246a7a2 |
comparison
equal
deleted
inserted
replaced
3197:0d180fefccc6 | 3198:18612999f80c |
---|---|
127 (if (eq major-mode 'rmail-summary-mode) | 127 (if (eq major-mode 'rmail-summary-mode) |
128 (progn | 128 (progn |
129 (setq was-in-summary t) | 129 (setq was-in-summary t) |
130 (set-buffer rmail-buffer))) | 130 (set-buffer rmail-buffer))) |
131 ;; Find its summary buffer, or make one. | 131 ;; Find its summary buffer, or make one. |
132 (or (and rmail-summary-buffer | 132 (setq sumbuf |
133 (buffer-name rmail-summary-buffer)) | 133 (if (and rmail-summary-buffer |
134 (setq rmail-summary-buffer | 134 (buffer-name rmail-summary-buffer)) |
135 (generate-new-buffer (concat (buffer-name) "-summary")))) | 135 rmail-summary-buffer |
136 (setq sumbuf rmail-summary-buffer) | 136 (generate-new-buffer (concat (buffer-name) "-summary")))) |
137 (setq mesg rmail-current-message) | 137 (setq mesg rmail-current-message) |
138 (setq foo mesg) | |
139 ;; Filter the messages; make or get their summary lines. | 138 ;; Filter the messages; make or get their summary lines. |
140 (let ((summary-msgs ()) | 139 (let ((summary-msgs ()) |
141 (new-summary-line-count 0)) | 140 (new-summary-line-count 0)) |
142 (let ((msgnum 1) | 141 (let ((msgnum 1) |
143 (buffer-read-only nil)) | 142 (buffer-read-only nil)) |
151 (setq summary-msgs | 150 (setq summary-msgs |
152 (cons (cons msgnum (rmail-make-summary-line msgnum)) | 151 (cons (cons msgnum (rmail-make-summary-line msgnum)) |
153 summary-msgs))) | 152 summary-msgs))) |
154 (setq msgnum (1+ msgnum))) | 153 (setq msgnum (1+ msgnum))) |
155 (setq summary-msgs (nreverse summary-msgs))))) | 154 (setq summary-msgs (nreverse summary-msgs))))) |
156 (let ((rbuf (current-buffer)) | 155 ;; Temporarily, while summary buffer is unfinished, |
157 (total rmail-total-messages)) | 156 ;; we "don't have" a summary. |
158 (set-buffer sumbuf) | 157 (setq rmail-summary-buffer nil) |
159 ;; Set up the summary buffer's contents. | 158 (save-excursion |
160 (let ((buffer-read-only nil)) | 159 (let ((rbuf (current-buffer)) |
161 (erase-buffer) | 160 (total rmail-total-messages)) |
162 (while summary-msgs | 161 (set-buffer sumbuf) |
163 (princ (cdr (car summary-msgs)) sumbuf) | 162 ;; Set up the summary buffer's contents. |
164 (setq summary-msgs (cdr summary-msgs))) | 163 (let ((buffer-read-only nil)) |
165 (goto-char (point-min))) | 164 (erase-buffer) |
166 ;; Set up the rest of its state and local variables. | 165 (while summary-msgs |
167 (setq buffer-read-only t) | 166 (princ (cdr (car summary-msgs)) sumbuf) |
168 (rmail-summary-mode) | 167 (setq summary-msgs (cdr summary-msgs))) |
169 (make-local-variable 'minor-mode-alist) | 168 (goto-char (point-min))) |
170 (setq minor-mode-alist (list ": " description)) | 169 ;; Set up the rest of its state and local variables. |
171 (setq rmail-buffer rbuf | 170 (setq buffer-read-only t) |
172 rmail-summary-redo redo-form | 171 (rmail-summary-mode) |
173 rmail-total-messages total)))) | 172 (make-local-variable 'minor-mode-alist) |
173 (setq minor-mode-alist (list ": " description)) | |
174 (setq rmail-buffer rbuf | |
175 rmail-summary-redo redo-form | |
176 rmail-total-messages total)))) | |
177 (setq rmail-summary-buffer sumbuf)) | |
174 ;; Now display the summary buffer and go to the right place in it. | 178 ;; Now display the summary buffer and go to the right place in it. |
175 (or was-in-summary | 179 (or was-in-summary |
176 (pop-to-buffer sumbuf)) | 180 (pop-to-buffer sumbuf)) |
177 (rmail-summary-goto-msg mesg t t) | 181 (rmail-summary-goto-msg mesg t t) |
178 (message "Computing summary lines...done"))) | 182 (message "Computing summary lines...done"))) |