Mercurial > emacs
annotate lisp/gnus/gnus-eform.el @ 68129:6f5da26b0df1
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-690
Merge from gnus--rel--5.10
Patches applied:
* gnus--rel--5.10 (patch 174-181)
- Update from CVS
- Update from CVS: texi/gnus.texi (RSS): Addition.
2006-01-10 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnrss.el (nnrss-wash-html-in-text-plain-parts): New variable.
(nnrss-request-article): Render text/plain parts as HTML.
* lisp/gnus/gnus-art.el (gnus-article-wash-html-with-w3m): No need to narrow
the buffer.
2006-01-08 Reiner Steib <Reiner.Steib@gmx.de>
* lisp/gnus/gnus-cus.el (gnus-group-parameters): Sync posting-style with
custom definition of `gnus-posting-styles'.
* lisp/gnus/gnus-start.el (gnus-gnus-to-quick-newsrc-format): Bind
print-circle. Suggested by Kalle Olavi Niemitalo <kon@iki.fi>.
2006-01-05 Reiner Steib <Reiner.Steib@gmx.de>
* lisp/gnus/gnus-group.el (gnus-useful-groups): Use Gmane for ding. Use
nntp for bug archive.
2006-01-05 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnrss.el (nnrss-request-article): Fix the way to fill text/plain
parts.
(nnrss-normalize-date): New function converts ISO 8601 date into
RFC822 style. Suggested by Mark Plaksin <happy@mcplaksin.org>.
(nnrss-check-group): Use it.
2006-01-03 Rodrigo Ventura <yoda@isr.ist.utl.pt> (tiny change)
* lisp/gnus/gnus-xmas.el (gnus-xmas-group-startup-message): Typo
gnus-splash-face -> gnus-splash. Fixes starting from a TTY in
XEmacs.
2006-01-01 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-sum.el (gnus-summary-work-articles): Remove useless `min'.
* lisp/gnus/nnrss.el (nnrss-fetch): Make it fail gracefully when it can't
fetch a feed. Suggested by Mark Plaksin <happy@mcplaksin.org>.
(nnrss-insert-w3): Ditto.
2005-12-21 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnrss.el (nnrss-request-article): Fix last change; fill
text/plain parts.
2005-12-20 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/nnrss.el (nnrss-request-article): Replace <br />s with newlines
in text/plain part.
(nnrss-check-group): Don't add excessive newline to dc:subject.
2005-12-19 Katsumi Yamaoka <yamaoka@jpl.org>
* lisp/gnus/gnus-art.el (gnus-article-delete-text-of-type): Enable it to
remove MIME buttons associated with multipart/alternative parts.
(gnus-mime-display-alternative): Tag buttons using `article-type'
text property.
* lisp/gnus/gnus-msg.el (gnus-copy-article-buffer): Remove MIME buttons
associated with multipart/alternative parts.
2005-12-19 Mark Plaksin <happy@mcplaksin.org> (tiny change)
* lisp/gnus/nnrss.el (nnrss-check-group): Put the RSS dc:subject in the
article.
2005-12-18 Lars Magne Ingebrigtsen <larsi@gnus.org>
* lisp/gnus/dns.el (query-dns): Make sure we check the buffer size before
removing tcp headers.
2006-01-10 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (RSS): Document nnrss-wash-html-in-text-plain-parts.
2006-01-06 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (RSS): Addition.
2005-12-22 Katsumi Yamaoka <yamaoka@jpl.org>
* man/gnus.texi (Summary Post Commands): Fix function bound to `S O p'.
2005-12-19 Katsumi Yamaoka <yamaoka@jpl.org>
* man/emacs-mime.texi (Display Customization): Add setting example to
mm-discouraged-alternatives.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 11 Jan 2006 02:03:24 +0000 |
parents | fafd692d1e40 |
children | 1077b8039c32 2d92f5c9d6ae |
rev | line source |
---|---|
17493 | 1 ;;; gnus-eform.el --- a mode for editing forms for Gnus |
64754
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
2 |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
3 ;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
fafd692d1e40
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64085
diff
changeset
|
4 ;; 2005 Free Software Foundation, Inc. |
17493 | 5 |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
6 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> |
17493 | 7 ;; Keywords: news |
8 | |
9 ;; This file is part of GNU Emacs. | |
10 | |
11 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
12 ;; it under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
64085 | 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
24 ;; Boston, MA 02110-1301, USA. | |
17493 | 25 |
26 ;;; Commentary: | |
27 | |
28 ;;; Code: | |
29 | |
30 (require 'gnus) | |
31 (require 'gnus-win) | |
32 | |
33 ;;; | |
34 ;;; Editing forms | |
35 ;;; | |
36 | |
37 (defgroup gnus-edit-form nil | |
38 "A mode for editing forms." | |
39 :group 'gnus) | |
40 | |
41 (defcustom gnus-edit-form-mode-hook nil | |
42 "Hook run in `gnus-edit-form-mode' buffers." | |
43 :group 'gnus-edit-form | |
44 :type 'hook) | |
45 | |
46 (defcustom gnus-edit-form-menu-hook nil | |
47 "Hook run when creating menus in `gnus-edit-form-mode' buffers." | |
48 :group 'gnus-edit-form | |
49 :type 'hook) | |
50 | |
51 ;;; Internal variables | |
52 | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
53 (defvar gnus-edit-form-buffer "*Gnus edit form*") |
17493 | 54 (defvar gnus-edit-form-done-function nil) |
55 | |
56 (defvar gnus-edit-form-mode-map nil) | |
57 (unless gnus-edit-form-mode-map | |
31716
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
58 (setq gnus-edit-form-mode-map (make-sparse-keymap)) |
9968f55ad26e
Update to emacs-21-branch of the Gnus CVS repository.
Gerd Moellmann <gerd@gnu.org>
parents:
24357
diff
changeset
|
59 (set-keymap-parent gnus-edit-form-mode-map emacs-lisp-mode-map) |
17493 | 60 (gnus-define-keys gnus-edit-form-mode-map |
61 "\C-c\C-c" gnus-edit-form-done | |
62 "\C-c\C-k" gnus-edit-form-exit)) | |
63 | |
64 (defun gnus-edit-form-make-menu-bar () | |
65 (unless (boundp 'gnus-edit-form-menu) | |
66 (easy-menu-define | |
67 gnus-edit-form-menu gnus-edit-form-mode-map "" | |
68 '("Edit Form" | |
69 ["Exit and save changes" gnus-edit-form-done t] | |
70 ["Exit" gnus-edit-form-exit t])) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
71 (gnus-run-hooks 'gnus-edit-form-menu-hook))) |
17493 | 72 |
73 (defun gnus-edit-form-mode () | |
74 "Major mode for editing forms. | |
75 It is a slightly enhanced emacs-lisp-mode. | |
76 | |
77 \\{gnus-edit-form-mode-map}" | |
78 (interactive) | |
79 (when (gnus-visual-p 'group-menu 'menu) | |
80 (gnus-edit-form-make-menu-bar)) | |
81 (kill-all-local-variables) | |
82 (setq major-mode 'gnus-edit-form-mode) | |
83 (setq mode-name "Edit Form") | |
84 (use-local-map gnus-edit-form-mode-map) | |
85 (make-local-variable 'gnus-edit-form-done-function) | |
86 (make-local-variable 'gnus-prev-winconf) | |
62890
4b7fa3ee8e9e
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-336
Miles Bader <miles@gnu.org>
parents:
56927
diff
changeset
|
87 (gnus-run-mode-hooks 'gnus-edit-form-mode-hook)) |
17493 | 88 |
89 (defun gnus-edit-form (form documentation exit-func) | |
90 "Edit FORM in a new buffer. | |
91 Call EXIT-FUNC on exit. Display DOCUMENTATION in the beginning | |
92 of the buffer." | |
93 (let ((winconf (current-window-configuration))) | |
24357
15fc6acbae7a
Upgrading to Gnus 5.7; see ChangeLog
Lars Magne Ingebrigtsen <larsi@gnus.org>
parents:
17493
diff
changeset
|
94 (set-buffer (gnus-get-buffer-create gnus-edit-form-buffer)) |
17493 | 95 (gnus-configure-windows 'edit-form) |
96 (gnus-edit-form-mode) | |
97 (setq gnus-prev-winconf winconf) | |
98 (setq gnus-edit-form-done-function exit-func) | |
99 (erase-buffer) | |
100 (insert documentation) | |
101 (unless (bolp) | |
102 (insert "\n")) | |
103 (goto-char (point-min)) | |
104 (while (not (eobp)) | |
105 (insert ";;; ") | |
106 (forward-line 1)) | |
107 (insert ";; Type `C-c C-c' after you've finished editing.\n") | |
108 (insert "\n") | |
109 (let ((p (point))) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
110 (gnus-pp form) |
17493 | 111 (insert "\n") |
112 (goto-char p)))) | |
113 | |
114 (defun gnus-edit-form-done () | |
115 "Update changes and kill the current buffer." | |
116 (interactive) | |
117 (goto-char (point-min)) | |
56927
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
118 (let ((form (condition-case nil |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
119 (read (current-buffer)) |
55fd4f77387a
Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-523
Miles Bader <miles@gnu.org>
parents:
52401
diff
changeset
|
120 (end-of-file nil))) |
17493 | 121 (func gnus-edit-form-done-function)) |
122 (gnus-edit-form-exit) | |
123 (funcall func form))) | |
124 | |
125 (defun gnus-edit-form-exit () | |
126 "Kill the current buffer." | |
127 (interactive) | |
128 (let ((winconf gnus-prev-winconf)) | |
129 (kill-buffer (current-buffer)) | |
130 (set-window-configuration winconf))) | |
131 | |
132 (provide 'gnus-eform) | |
133 | |
52401 | 134 ;;; arch-tag: ef50678c-2c28-49ef-affc-e53b3b2c0bf6 |
17493 | 135 ;;; gnus-eform.el ends here |