annotate lisp/mh-e/mh-gnus.el @ 57329:52649ba67540

(Info-history, Info-toc): Fix Info headers. (Info-toc): Narrow buffer before Info-fontify-node. (Info-build-toc): Don't check for special Info file names. Set main-file to nil if Info-find-file returns a symbol.
author Juri Linkov <juri@jurta.org>
date Tue, 05 Oct 2004 04:23:17 +0000
parents e9a6cbc8ca5e
children 4f4f410e6fe8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1 ;;; mh-gnus.el --- Make MH-E compatible with installed version of Gnus.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
3 ;; Copyright (C) 2003, 2004 Free Software Foundation, Inc.
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
4
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
5 ;; Author: Satyaki Das <satyaki@theforce.stanford.edu>
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Keywords: mail
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; See: mh-e.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
9
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; any later version.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
25 ;; Boston, MA 02111-1307, USA.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
26
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
27 ;;; Commentary:
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
29 ;;; Change Log:
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
30
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
31 ;;; Code:
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33 (load "mm-decode" t t) ; Non-fatal dependency
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
34 (load "mm-uu" t t) ; Non-fatal dependency
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35 (load "mailcap" t t) ; Non-fatal dependency
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36 (load "smiley" t t) ; Non-fatal dependency
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
37 (load "mailabbrev" t t)
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
38
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39 (defmacro mh-defun-compat (function arg-list &rest body)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40 "This is a macro to define functions which are not defined.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
41 It is used for Gnus utility functions which were added recently. If FUNCTION
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42 is not defined then it is defined to have argument list, ARG-LIST and body,
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
43 BODY."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44 (let ((defined-p (fboundp function)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 (unless defined-p
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46 `(defun ,function ,arg-list ,@body))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
47 (put 'mh-defun-compat 'lisp-indent-function 'defun)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
49 (defmacro mh-defmacro-compat (function arg-list &rest body)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
50 "This is a macro to define functions which are not defined.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
51 It is used for Gnus utility functions which were added recently. If FUNCTION
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
52 is not defined then it is defined to have argument list, ARG-LIST and body,
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
53 BODY."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
54 (let ((defined-p (fboundp function)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
55 (unless defined-p
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
56 `(defmacro ,function ,arg-list ,@body))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
57 (put 'mh-defmacro-compat 'lisp-indent-function 'defun)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
58
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
59 ;; Copy of original function from gnus-util.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
60 (mh-defun-compat gnus-local-map-property (map)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
61 "Return a list suitable for a text property list specifying keymap MAP."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
62 (cond (mh-xemacs-flag (list 'keymap map))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
63 ((>= emacs-major-version 21) (list 'keymap map))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
64 (t (list 'local-map map))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 ;; Copy of original function from mm-decode.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
67 (mh-defun-compat mm-merge-handles (handles1 handles2)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68 (append (if (listp (car handles1)) handles1 (list handles1))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69 (if (listp (car handles2)) handles2 (list handles2))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71 ;; Copy of function from mm-decode.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
72 (mh-defun-compat mm-set-handle-multipart-parameter (handle parameter value)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
73 ;; HANDLE could be a CTL.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
74 (if handle
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75 (put-text-property 0 (length (car handle)) parameter value
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76 (car handle))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
78 ;; Copy of function from mm-view.el
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
79 (mh-defun-compat mm-inline-text-vcard (handle)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
80 (let (buffer-read-only)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
81 (mm-insert-inline
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
82 handle
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
83 (concat "\n-- \n"
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
84 (ignore-errors
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
85 (if (fboundp 'vcard-pretty-print)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
86 (vcard-pretty-print (mm-get-part handle))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
87 (vcard-format-string
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
88 (vcard-parse-string (mm-get-part handle)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
89 'vcard-standard-filter))))))))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
90
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
91 ;; Function from mm-decode.el used in PGP messages. Just define it with older
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
92 ;; gnus to avoid compiler warning.
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
93 (mh-defun-compat mm-possibly-verify-or-decrypt (parts ctl)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
94 nil)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
95
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
96 ;; Copy of original macro is in mm-decode.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
97 (mh-defmacro-compat mm-handle-multipart-ctl-parameter (handle parameter)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
98 `(get-text-property 0 ,parameter (car ,handle)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
99
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
100 ;; Copy of original function in mm-decode.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
101 (mh-defun-compat mm-readable-p (handle)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
102 "Say whether the content of HANDLE is readable."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
103 (and (< (with-current-buffer (mm-handle-buffer handle)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
104 (buffer-size)) 10000)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
105 (mm-with-unibyte-buffer
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
106 (mm-insert-part handle)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
107 (and (eq (mm-body-7-or-8) '7bit)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
108 (not (mm-long-lines-p 76))))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
109
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
110 ;; Copy of original function in mm-bodies.el
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
111 (mh-defun-compat mm-long-lines-p (length)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
112 "Say whether any of the lines in the buffer is longer than LENGTH."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
113 (save-excursion
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
114 (goto-char (point-min))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
115 (end-of-line)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
116 (while (and (not (eobp))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
117 (not (> (current-column) length)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
118 (forward-line 1)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
119 (end-of-line))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
120 (and (> (current-column) length)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
121 (current-column))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
122
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
123 (mh-defun-compat mm-keep-viewer-alive-p (handle)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
124 ;; Released Gnus doesn't keep handles associated with externally displayed
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
125 ;; MIME parts. So this will always return nil.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
126 nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
127
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
128 (mh-defun-compat mm-destroy-parts (list)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
129 "Older emacs don't have this function."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
130 nil)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
131
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
132 ;;; This is mm-save-part from gnus 5.10 since that function in emacs21.2 is
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
133 ;;; buggy (the args to read-file-name are incorrect). When all supported
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
134 ;;; versions of Emacs come with at least Gnus 5.10, we can delete this
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
135 ;;; function and rename calls to mh-mm-save-part to mm-save-part.
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
136 (defun mh-mm-save-part (handle)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
137 "Write HANDLE to a file."
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
138 (let ((name (mail-content-type-get (mm-handle-type handle) 'name))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
139 (filename (mail-content-type-get
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
140 (mm-handle-disposition handle) 'filename))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
141 file)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
142 (when filename
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
143 (setq filename (file-name-nondirectory filename)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
144 (setq file (read-file-name "Save MIME part to: "
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
145 (or mm-default-directory
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
146 default-directory)
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
147 nil nil (or filename name "")))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
148 (setq mm-default-directory (file-name-directory file))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
149 (and (or (not (file-exists-p file))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
150 (yes-or-no-p (format "File %s already exists; overwrite? "
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
151 file)))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
152 (mm-save-part-to-file handle file))))
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
153
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
154 (defun mh-mm-text-html-renderer ()
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
155 "Find the renderer gnus is using to display text/html MIME parts."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
156 (or (and (boundp 'mm-inline-text-html-renderer) mm-inline-text-html-renderer)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
157 (and (boundp 'mm-text-html-renderer) mm-text-html-renderer)))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
158
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
159 (defun mh-mail-abbrev-make-syntax-table ()
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
160 "Call `mail-abbrev-make-syntax-table' if available."
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
161 (when (fboundp 'mail-abbrev-make-syntax-table)
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
162 (mail-abbrev-make-syntax-table)))
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
163
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
164 (provide 'mh-gnus)
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
165
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
166 ;;; Local Variables:
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
167 ;;; no-byte-compile: t
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
168 ;;; no-update-autoloads: t
56673
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
169 ;;; indent-tabs-mode: nil
e9a6cbc8ca5e Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents: 56409
diff changeset
170 ;;; sentence-end-double-space: nil
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
171 ;;; End:
56409
e6932c8dd59b Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents: 56406
diff changeset
172
e6932c8dd59b Changes from arch/CVS synchronization
Miles Bader <miles@gnu.org>
parents: 56406
diff changeset
173 ;; arch-tag: 1e3638af-cad3-4c69-8427-bc8eb6e5e4fa
56406
d36b00b98db0 Upgraded to MH-E version 7.4.4.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
174 ;;; mh-gnus.el ends here