1 |
;;; gnus-eform.el --- a mode for editing forms for Gnus |
;;; gnus-eform.el --- a mode for editing forms for Gnus |
2 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000 |
;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2004 |
3 |
;; Free Software Foundation, Inc. |
;; Free Software Foundation, Inc. |
4 |
|
|
5 |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
106 |
(insert ";; Type `C-c C-c' after you've finished editing.\n") |
(insert ";; Type `C-c C-c' after you've finished editing.\n") |
107 |
(insert "\n") |
(insert "\n") |
108 |
(let ((p (point))) |
(let ((p (point))) |
109 |
(pp form (current-buffer)) |
(gnus-pp form) |
110 |
(insert "\n") |
(insert "\n") |
111 |
(goto-char p)))) |
(goto-char p)))) |
112 |
|
|
114 |
"Update changes and kill the current buffer." |
"Update changes and kill the current buffer." |
115 |
(interactive) |
(interactive) |
116 |
(goto-char (point-min)) |
(goto-char (point-min)) |
117 |
(let ((form (read (current-buffer))) |
(let ((form (condition-case nil |
118 |
|
(read (current-buffer)) |
119 |
|
(end-of-file nil))) |
120 |
(func gnus-edit-form-done-function)) |
(func gnus-edit-form-done-function)) |
121 |
(gnus-edit-form-exit) |
(gnus-edit-form-exit) |
122 |
(funcall func form))) |
(funcall func form))) |