Mercurial > emacs
comparison lisp/mh-e/mh-gnus.el @ 66354:cf99ce27df54
* mh-comp.el (mh-letter-menu): Rename
mh-mhn-compose-external-compressed-tar to
mh-mh-compose-external-compressed-tar. Rename mh-mhn-compose-anon-ftp
to mh-mh-compose-anon-ftp. Rename mh-edit-mhn to mh-mh-to-mime. Rename
mh-mhn-directive-present-p to mh-mh-directive-present-p. Rename
mh-revert-mhn-edit to mh-mh-to-mime-undo. Rename
mh-gnus-pgp-support-flag to mh-pgp-support-flag. Rename
mh-compose-insertion value from 'mhn to 'mh.
(mh-insert-signature): Rename mh-mhn-directive-present-p to
mh-mh-directive-present-p.
(mh-send-letter): Rename mh-mhn-directive-present-p to
mh-mh-directive-present-p. Rename mh-edit-mhn to mh-mh-to-mime.
(mh-letter-mode-map): Rename mh-edit-mhn to mh-mh-to-mime. Rename
mh-mhn-compose-anon-ftp to mh-mh-compose-anon-ftp. Rename
mh-mhn-compose-external-compressed-tar to
mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit to
mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to
mh-mh-compose-external-type. Rename mh-mhn-compose-anon-ftp to
mh-mh-compose-anon-ftp. Rename mh-mhn-compose-external-compressed-tar
to mh-mh-compose-external-compressed-tar. Rename mh-revert-mhn-edit to
mh-mh-to-mime-undo. Rename mh-mhn-compose-external-type to
mh-mh-compose-external-type.
(mh-send-letter, mh-letter-mode-map): Rename mh-edit-mhn to
mh-mh-to-mime, mh-revert-mhn-edit to mh-mh-to-mime-undo.
(mh-reply, mh-yank-cur-msg, mh-insert-prefix-string): Rename
mh-yank-from-start-of-msg to mh-yank-behavior. (mh-letter-mode,
mh-to-field, mh-to-fcc, mh-insert-signature) (mh-check-whom,
mh-insert-auto-fields, mh-send-letter) (mh-insert-letter,
mh-yank-cur-msg, mh-insert-prefix-string) (mh-fully-kill-draft,
mh-open-line, mh-letter-complete) (mh-letter-complete-or-space,
mh-letter-confirm-address) (mh-letter-next-header-field-or-indent)
(mh-letter-previous-header-field)
(mh-letter-toggle-header-field-display): Sync docstrings with manual.
* mh-customize.el (mh-edit-mhn-hook): Rename to mh-mh-to-mime-hook.
(mh-yank-from-start-of-msg): Rename to mh-yank-behavior.
(mh-compose-insertion): Rename values from 'gnus and 'mhn to 'mh and
user-visible values from mhn and Gnus to MH and MML.
(mh-before-send-letter-hook): Added 'ispell-message option.
(mh-mml-method-default): Rename mh-gnus-pgp-support-flag to
mh-pgp-support-flag. (mh-compose-insertion,
mh-compose-space-does-completion-flag)
(mh-delete-yanked-msg-window-flag) (mh-extract-from-attribution-verb,
mh-ins-buf-prefix) (mh-letter-complete-function,
mh-letter-fill-column) (mh-mml-method-default, mh-signature-file-name)
(mh-signature-separator-flag, mh-x-face-file) (mh-yank-behavior,
mail-citation-hook)
(mh-before-send-letter-hook, mh-mh-to-mime-hook): Sync docstrings with
manual.
* mh-gnus.el (mml-minibuffer-read-disposition): New function provided
for Emacs 21 environments that lack it.
* mh-mime.el (mh-mml-query-cryptographic-method): Use default prompt
convention.
(mh-compose-forward): mh-mh-forward-message requires string arg.
(mh-minibuffer-read-type): New function.
(mh-mhn-args): Rename to mh-mh-to-mime-args.
(mh-mhn-compose-insertion): Rename to mh-mh-attach-file.
(mh-mhn-compose-forw): Rename to mh-mh-forward-message.
(mh-mhn-compose-type): Rename to mh-mh-compose-type.
(mh-mhn-compose-anon-ftp): Rename to mh-mh-compose-anon-ftp. Rename
mh-mhn-compose-external-type to mh-mh-compose-external-type.
(mh-mhn-compose-external-compressed-tar): Rename to
mh-mh-compose-external-compressed-tar. Rename
mh-mhn-compose-external-type to mh-mh-compose-external-type.
(mh-mhn-compose-external-type): Rename to mh-mh-compose-external-type.
(mh-edit-mhn): Rename to mh-mh-to-mime. Rename mh-mhn-args to
mh-mh-to-mime-args. Rename mh-edit-mhn-hook to mh-mh-to-mime-hook. Use
correct program in message.
(mh-mhn-directive-present-p): Rename to mh-mh-directive-present-p.
(mh-mml-directive-present-p): Rename to mh-mml-tag-present-p.
(mh-compose-forward, mh-mh-attach-file) (mh-mh-compose-anon-ftp,
mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-type,
mh-mh-forward-message)
(mh-mml-attach-file): Use mml-minibuffer-read-description,
mh-minibuffer-read-type.
(mh-mime-content-types): Moved comment about only being used in Emacs
20 to docstring.
(mh-mh-compose-external-type): Rename extra-param argument to
parameters. (mh-mml-to-mime, mh-secure-message)
(mh-mml-unsecure-message, mh-mime-display-part)
(mh-mime-display-single): Rename mh-gnus-pgp-support-flag to
mh-pgp-support-flag.
(mh-compose-insertion): Rename mh-mhn-compose-insertion to
mh-mh-attach-file.
(mh-compose-forward): Rename mh-mhn-compose-forw to
mh-mh-forward-message.
(mh-mhn-compose-insertion): Rename mh-mhn-compose-type to
mh-mh-compose-type. (mh-compose-insertion, mh-compose-forward,
mh-mh-to-mime-args) (mh-mh-attach-file, mh-mh-compose-type)
(mh-mh-compose-anon-ftp, mh-mh-compose-external-compressed-tar)
(mh-mh-compose-external-compressed-tar) (mh-mh-compose-external-type,
mh-mh-forward-message) (mh-mh-to-mime, mh-mh-quote-unescaped-sharp,
(mh-mh-to-mime-undo, mh-mh-directive-present-p, mh-mml-to-mime)
(mh-mml-attach-file, mh-secure-message, mh-mml-unsecure-message)
(mh-mml-secure-message-sign, mh-mml-secure-message-encrypt)
(mh-mml-directive-present-p, mh-destroy-postponed-handles)
(mh-display-smileys, mh-display-emphasis, mh-mime-save-parts): Sync
docstrings with manual.
* mh-utils.el (mh-gnus-pgp-support-flag): Rename to
mh-pgp-support-flag.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Sun, 23 Oct 2005 21:26:17 +0000 |
parents | 18a818a2ee7c |
children | 779be9915a30 |
comparison
equal
deleted
inserted
replaced
66353:e81cb0b6850a | 66354:cf99ce27df54 |
---|---|
54 (let ((defined-p (fboundp function))) | 54 (let ((defined-p (fboundp function))) |
55 (unless defined-p | 55 (unless defined-p |
56 `(defmacro ,function ,arg-list ,@body)))) | 56 `(defmacro ,function ,arg-list ,@body)))) |
57 (put 'mh-defmacro-compat 'lisp-indent-function 'defun) | 57 (put 'mh-defmacro-compat 'lisp-indent-function 'defun) |
58 | 58 |
59 ;; Copy of original function from gnus-util.el | 59 ;; Copy of original function from gnus-util.el. |
60 (mh-defun-compat gnus-local-map-property (map) | 60 (mh-defun-compat gnus-local-map-property (map) |
61 "Return a list suitable for a text property list specifying keymap MAP." | 61 "Return a list suitable for a text property list specifying keymap MAP." |
62 (cond (mh-xemacs-flag (list 'keymap map)) | 62 (cond (mh-xemacs-flag (list 'keymap map)) |
63 ((>= emacs-major-version 21) (list 'keymap map)) | 63 ((>= emacs-major-version 21) (list 'keymap map)) |
64 (t (list 'local-map map)))) | 64 (t (list 'local-map map)))) |
65 | 65 |
66 ;; Copy of original function from mm-decode.el | 66 ;; Copy of original function from mm-decode.el. |
67 (mh-defun-compat mm-merge-handles (handles1 handles2) | 67 (mh-defun-compat mm-merge-handles (handles1 handles2) |
68 (append (if (listp (car handles1)) handles1 (list handles1)) | 68 (append (if (listp (car handles1)) handles1 (list handles1)) |
69 (if (listp (car handles2)) handles2 (list handles2)))) | 69 (if (listp (car handles2)) handles2 (list handles2)))) |
70 | 70 |
71 ;; Copy of function from mm-decode.el | 71 ;; Copy of function from mm-decode.el. |
72 (mh-defun-compat mm-set-handle-multipart-parameter (handle parameter value) | 72 (mh-defun-compat mm-set-handle-multipart-parameter (handle parameter value) |
73 ;; HANDLE could be a CTL. | 73 ;; HANDLE could be a CTL. |
74 (if handle | 74 (if handle |
75 (put-text-property 0 (length (car handle)) parameter value | 75 (put-text-property 0 (length (car handle)) parameter value |
76 (car handle)))) | 76 (car handle)))) |
77 | 77 |
78 ;; Copy of function from mm-view.el | 78 ;; Copy of function from mm-view.el. |
79 (mh-defun-compat mm-inline-text-vcard (handle) | 79 (mh-defun-compat mm-inline-text-vcard (handle) |
80 (let (buffer-read-only) | 80 (let (buffer-read-only) |
81 (mm-insert-inline | 81 (mm-insert-inline |
82 handle | 82 handle |
83 (concat "\n-- \n" | 83 (concat "\n-- \n" |
87 (vcard-format-string | 87 (vcard-format-string |
88 (vcard-parse-string (mm-get-part handle) | 88 (vcard-parse-string (mm-get-part handle) |
89 'vcard-standard-filter)))))))) | 89 'vcard-standard-filter)))))))) |
90 | 90 |
91 ;; Function from mm-decode.el used in PGP messages. Just define it with older | 91 ;; Function from mm-decode.el used in PGP messages. Just define it with older |
92 ;; gnus to avoid compiler warning. | 92 ;; Gnus to avoid compiler warning. |
93 (mh-defun-compat mm-possibly-verify-or-decrypt (parts ctl) | 93 (mh-defun-compat mm-possibly-verify-or-decrypt (parts ctl) |
94 nil) | 94 nil) |
95 | 95 |
96 ;; Copy of original macro is in mm-decode.el | 96 ;; Copy of original macro is in mm-decode.el. |
97 (mh-defmacro-compat mm-handle-multipart-ctl-parameter (handle parameter) | 97 (mh-defmacro-compat mm-handle-multipart-ctl-parameter (handle parameter) |
98 `(get-text-property 0 ,parameter (car ,handle))) | 98 `(get-text-property 0 ,parameter (car ,handle))) |
99 | 99 |
100 ;; Copy of original function in mm-decode.el | 100 ;; Copy of original function in mm-decode.el. |
101 (mh-defun-compat mm-readable-p (handle) | 101 (mh-defun-compat mm-readable-p (handle) |
102 "Say whether the content of HANDLE is readable." | 102 "Say whether the content of HANDLE is readable." |
103 (and (< (with-current-buffer (mm-handle-buffer handle) | 103 (and (< (with-current-buffer (mm-handle-buffer handle) |
104 (buffer-size)) 10000) | 104 (buffer-size)) 10000) |
105 (mm-with-unibyte-buffer | 105 (mm-with-unibyte-buffer |
106 (mm-insert-part handle) | 106 (mm-insert-part handle) |
107 (and (eq (mm-body-7-or-8) '7bit) | 107 (and (eq (mm-body-7-or-8) '7bit) |
108 (not (mm-long-lines-p 76)))))) | 108 (not (mm-long-lines-p 76)))))) |
109 | 109 |
110 ;; Copy of original function in mm-bodies.el | 110 ;; Copy of original function in mm-bodies.el. |
111 (mh-defun-compat mm-long-lines-p (length) | 111 (mh-defun-compat mm-long-lines-p (length) |
112 "Say whether any of the lines in the buffer is longer than LENGTH." | 112 "Say whether any of the lines in the buffer is longer than LENGTH." |
113 (save-excursion | 113 (save-excursion |
114 (goto-char (point-min)) | 114 (goto-char (point-min)) |
115 (end-of-line) | 115 (end-of-line) |
124 ;; Released Gnus doesn't keep handles associated with externally displayed | 124 ;; Released Gnus doesn't keep handles associated with externally displayed |
125 ;; MIME parts. So this will always return nil. | 125 ;; MIME parts. So this will always return nil. |
126 nil) | 126 nil) |
127 | 127 |
128 (mh-defun-compat mm-destroy-parts (list) | 128 (mh-defun-compat mm-destroy-parts (list) |
129 "Older emacs don't have this function." | 129 "Older versions of Emacs don't have this function." |
130 nil) | 130 nil) |
131 | 131 |
132 ;;; This is mm-save-part from gnus 5.10 since that function in emacs21.2 is | 132 ;; Copy of original function in mml.el. |
133 (mh-defun-compat mml-minibuffer-read-disposition (type &optional default) | |
134 (unless default (setq default | |
135 (if (and (string-match "\\`text/" type) | |
136 (not (string-match "\\`text/rtf\\'" type))) | |
137 "inline" | |
138 "attachment"))) | |
139 (let ((disposition (completing-read | |
140 (format "Disposition (default %s): " default) | |
141 '(("attachment") ("inline") ("")) | |
142 nil t nil nil default))) | |
143 (if (not (equal disposition "")) | |
144 disposition | |
145 default))) | |
146 | |
147 ;;; This is mm-save-part from Gnus 5.10 since that function in emacs21.2 is | |
133 ;;; buggy (the args to read-file-name are incorrect). When all supported | 148 ;;; buggy (the args to read-file-name are incorrect). When all supported |
134 ;;; versions of Emacs come with at least Gnus 5.10, we can delete this | 149 ;;; versions of Emacs come with at least Gnus 5.10, we can delete this |
135 ;;; function and rename calls to mh-mm-save-part to mm-save-part. | 150 ;;; function and rename calls to mh-mm-save-part to mm-save-part. |
136 (defun mh-mm-save-part (handle) | 151 (defun mh-mm-save-part (handle) |
137 "Write HANDLE to a file." | 152 "Write HANDLE to a file." |
150 (yes-or-no-p (format "File %s already exists; overwrite? " | 165 (yes-or-no-p (format "File %s already exists; overwrite? " |
151 file))) | 166 file))) |
152 (mm-save-part-to-file handle file)))) | 167 (mm-save-part-to-file handle file)))) |
153 | 168 |
154 (defun mh-mm-text-html-renderer () | 169 (defun mh-mm-text-html-renderer () |
155 "Find the renderer gnus is using to display text/html MIME parts." | 170 "Find the renderer Gnus is using to display text/html MIME parts." |
156 (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer) | 171 (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer) |
157 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))) | 172 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer))) |
158 | 173 |
159 (defun mh-mail-abbrev-make-syntax-table () | 174 (defun mh-mail-abbrev-make-syntax-table () |
160 "Call `mail-abbrev-make-syntax-table' if available." | 175 "Call `mail-abbrev-make-syntax-table' if available." |