Mercurial > emacs
comparison lisp/gnus/gnus-eform.el @ 91085:880960b70474
Merge from emacs--devo--0
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-283
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 11 Nov 2007 00:56:44 +0000 |
parents | f55f9811f5d7 a3c27999decb |
children | 606f2d163a64 |
comparison
equal
deleted
inserted
replaced
91084:a4347a111894 | 91085:880960b70474 |
---|---|
84 (use-local-map gnus-edit-form-mode-map) | 84 (use-local-map gnus-edit-form-mode-map) |
85 (make-local-variable 'gnus-edit-form-done-function) | 85 (make-local-variable 'gnus-edit-form-done-function) |
86 (make-local-variable 'gnus-prev-winconf) | 86 (make-local-variable 'gnus-prev-winconf) |
87 (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) | 87 (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) |
88 | 88 |
89 (defun gnus-edit-form (form documentation exit-func) | 89 (defun gnus-edit-form (form documentation exit-func &optional layout) |
90 "Edit FORM in a new buffer. | 90 "Edit FORM in a new buffer. |
91 Call EXIT-FUNC on exit. Display DOCUMENTATION in the beginning | 91 Call EXIT-FUNC on exit. Display DOCUMENTATION in the beginning |
92 of the buffer." | 92 of the buffer. |
93 The optional LAYOUT overrides the `edit-form' window layout." | |
93 (let ((winconf (current-window-configuration))) | 94 (let ((winconf (current-window-configuration))) |
94 (set-buffer (gnus-get-buffer-create gnus-edit-form-buffer)) | 95 (set-buffer (gnus-get-buffer-create gnus-edit-form-buffer)) |
95 (gnus-configure-windows 'edit-form) | 96 (gnus-configure-windows (or layout 'edit-form)) |
96 (gnus-edit-form-mode) | 97 (gnus-edit-form-mode) |
97 (setq gnus-prev-winconf winconf) | 98 (setq gnus-prev-winconf winconf) |
98 (setq gnus-edit-form-done-function exit-func) | 99 (setq gnus-edit-form-done-function exit-func) |
99 (erase-buffer) | 100 (erase-buffer) |
100 (insert documentation) | 101 (insert documentation) |