comparison lisp/mh-e/mh-print.el @ 67758:6b063593fdad

Follow Emacs coding conventions. Use default setting of emacs-lisp-docstring-fill-column which is 65.
author Bill Wohler <wohler@newt.com>
date Fri, 23 Dec 2005 07:40:40 +0000
parents 3a8785724cca
children 03bac2d0a4aa
comparison
equal deleted inserted replaced
67757:488b4dbc7482 67758:6b063593fdad
45 nil - Do not print colors. 45 nil - Do not print colors.
46 t - Print colors. 46 t - Print colors.
47 black-white - Print colors on black/white printer. 47 black-white - Print colors on black/white printer.
48 See also `ps-black-white-faces'. 48 See also `ps-black-white-faces'.
49 49
50 Any other value is treated as t. This variable is initialized from 50 Any other value is treated as t. This variable is initialized
51 `ps-print-color-p'.") 51 from `ps-print-color-p'.")
52 52
53 (defvar mh-ps-print-func 'ps-spool-buffer-with-faces 53 (defvar mh-ps-print-func 'ps-spool-buffer-with-faces
54 "Function to use to spool a buffer. 54 "Function to use to spool a buffer.
55 55
56 Sensible choices are the functions `ps-spool-buffer' and 56 Sensible choices are the functions `ps-spool-buffer' and
106 106
107 ;;;###mh-autoload 107 ;;;###mh-autoload
108 (defun mh-ps-print-msg (range) 108 (defun mh-ps-print-msg (range)
109 "Print RANGE\\<mh-folder-mode-map>. 109 "Print RANGE\\<mh-folder-mode-map>.
110 110
111 Check the documentation of `mh-interactive-range' to see how RANGE is read in 111 Check the documentation of `mh-interactive-range' to see how RANGE is
112 interactive use. 112 read in interactive use.
113 113
114 This command will print inline text attachments but will not decrypt messages. 114 This command will print inline text attachments but will not decrypt
115 However, when a message is displayed in an MH-Show buffer, then that buffer is 115 messages. However, when a message is displayed in an MH-Show buffer,
116 used verbatim for printing with the caveat that only text attachments, if 116 then that buffer is used verbatim for printing with the caveat that
117 opened inline, are printed. Therefore, encrypted messages can be printed by 117 only text attachments, if opened inline, are printed. Therefore,
118 showing and decrypting them first. 118 encrypted messages can be printed by showing and decrypting them
119 119 first.
120 MH-E uses the \"ps-print\" package to do the printing, so you can customize 120
121 the printing further by going to the `ps-print' customization group. This 121 MH-E uses the \"ps-print\" package to do the printing, so you can
122 command does not use the options `mh-lpr-command-format' or 122 customize the printing further by going to the `ps-print'
123 `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] 123 customization group. This command does not use the options
124 and \\[mh-ps-print-toggle-faces]." 124 `mh-lpr-command-format' or `mh-print-background-flag'. See also the
125 commands \\[mh-ps-print-toggle-color] and
126 \\[mh-ps-print-toggle-faces]."
125 (interactive (list (mh-interactive-range "Print"))) 127 (interactive (list (mh-interactive-range "Print")))
126 (mh-ps-print-range range nil)) 128 (mh-ps-print-range range nil))
127 129
128 ;;;###mh-autoload 130 ;;;###mh-autoload
129 (defun mh-ps-print-msg-file (range file) 131 (defun mh-ps-print-msg-file (range file)
130 "Print RANGE to FILE\\<mh-folder-mode-map>. 132 "Print RANGE to FILE\\<mh-folder-mode-map>.
131 133
132 Check the documentation of `mh-interactive-range' to see how RANGE is read in 134 Check the documentation of `mh-interactive-range' to see how RANGE is
133 interactive use. 135 read in interactive use.
134 136
135 This command will print inline text attachments but will not decrypt messages. 137 This command will print inline text attachments but will not decrypt
136 However, when a message is displayed in an MH-Show buffer, then that buffer is 138 messages. However, when a message is displayed in an MH-Show buffer,
137 used verbatim for printing with the caveat that only text attachments, if 139 then that buffer is used verbatim for printing with the caveat that
138 opened inline, are printed. Therefore, encrypted messages can be printed by 140 only text attachments, if opened inline, are printed. Therefore,
139 showing and decrypting them first. 141 encrypted messages can be printed by showing and decrypting them
140 142 first.
141 MH-E uses the \"ps-print\" package to do the printing, so you can customize 143
142 the printing further by going to the `ps-print' customization group. This 144 MH-E uses the \"ps-print\" package to do the printing, so you can
143 command does not use the options `mh-lpr-command-format' or 145 customize the printing further by going to the `ps-print'
144 `mh-print-background-flag'. See also the commands \\[mh-ps-print-toggle-color] 146 customization group. This command does not use the options
145 and \\[mh-ps-print-toggle-faces]." 147 `mh-lpr-command-format' or `mh-print-background-flag'. See also the
148 commands \\[mh-ps-print-toggle-color] and
149 \\[mh-ps-print-toggle-faces]."
146 (interactive (list (mh-interactive-range "Print") (mh-ps-print-preprint 1))) 150 (interactive (list (mh-interactive-range "Print") (mh-ps-print-preprint 1)))
147 (mh-ps-print-range range file)) 151 (mh-ps-print-range range file))
148 152
149 ;;;###mh-autoload 153 ;;;###mh-autoload
150 (defun mh-ps-print-toggle-faces () 154 (defun mh-ps-print-toggle-faces ()
151 "Toggle whether printing is done with faces or not. 155 "Toggle whether printing is done with faces or not.
152 156
153 When faces are enabled, the printed message will look very similar to the 157 When faces are enabled, the printed message will look very
154 message in the MH-Show buffer." 158 similar to the message in the MH-Show buffer."
155 (interactive) 159 (interactive)
156 (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces) 160 (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces)
157 (progn 161 (progn
158 (setq mh-ps-print-func 'ps-spool-buffer) 162 (setq mh-ps-print-func 'ps-spool-buffer)
159 (message "Printing without faces")) 163 (message "Printing without faces"))
162 166
163 ;;;###mh-autoload 167 ;;;###mh-autoload
164 (defun mh-ps-print-toggle-color () 168 (defun mh-ps-print-toggle-color ()
165 "Toggle whether color is used in printing messages. 169 "Toggle whether color is used in printing messages.
166 170
167 Colors are emulated on black-and-white printers with shades of gray. This 171 Colors are emulated on black-and-white printers with shades of
168 might produce illegible output, even if your screen colors only use shades of 172 gray. This might produce illegible output, even if your screen
169 gray. If this is the case, try using this command to toggle between color, no 173 colors only use shades of gray. If this is the case, try using
170 color, and a black and white representation of the colors and see which works 174 this command to toggle between color, no color, and a black and
171 best. You change this setting permanently by customizing the option 175 white representation of the colors and see which works best. You
176 change this setting permanently by customizing the option
172 `ps-print-color-p'." 177 `ps-print-color-p'."
173
174 (interactive) 178 (interactive)
175 (if (eq mh-ps-print-color-option nil) 179 (if (eq mh-ps-print-color-option nil)
176 (progn 180 (progn
177 (setq mh-ps-print-color-option 'black-white) 181 (setq mh-ps-print-color-option 'black-white)
178 (message "Colors will be printed as black & white")) 182 (message "Colors will be printed as black & white"))
186 ;; Old non-PS based printing 190 ;; Old non-PS based printing
187 ;;;###mh-autoload 191 ;;;###mh-autoload
188 (defun mh-print-msg (range) 192 (defun mh-print-msg (range)
189 "Print RANGE the old fashioned way\\<mh-folder-mode-map>. 193 "Print RANGE the old fashioned way\\<mh-folder-mode-map>.
190 194
191 The message is formatted with \"mhl\" (see option `mh-mhl-format-file') and 195 The message is formatted with \"mhl\" (see option
192 printed with the \"lpr\" command (see option `mh-lpr-command-format'). 196 `mh-mhl-format-file') and printed with the \"lpr\" command (see
193 197 option `mh-lpr-command-format').
194 Check the documentation of `mh-interactive-range' to see how RANGE is read in 198
195 interactive use. 199 Check the documentation of `mh-interactive-range' to see how
200 RANGE is read in interactive use.
196 201
197 Consider using \\[mh-ps-print-msg] instead." 202 Consider using \\[mh-ps-print-msg] instead."
198 (interactive (list (mh-interactive-range "Print"))) 203 (interactive (list (mh-interactive-range "Print")))
199 (message "Printing...") 204 (message "Printing...")
200 (let (msgs) 205 (let (msgs)