annotate lisp/mh-e/mh-print.el @ 65980:4520ae2624f2

* mh-init.el (mh-image-load-path): New function that adds the path to the MH-E images to the image-load-path or load-path depending on the version of Emacs. * mh-customize.el: Call mh-image-load-path just before mh-tool-bar-define so that the toolbar images can be found. * mh-customize.el (mh-invisible-header-fields-internal) (mh-invisible-header-fields-internal): Add Received-SPF header and X-Gmail- prefixes seen from Gmail. Jeffrey C Honig <jch@honig.net> * mh-customize.el (mh-customize): Use customization group mh-e. * mh-e.el (desktop-buffer-mode-handlers): Only add to this list if the variable exists. Not present pre-version 22. (Version, mh-version): Added +cvs to version. * mh-unit.el (mh-unit): Changed lm-verify test to Emacs 22. * Makefile: Incorporated ideas from Clemens Fruhwirth to generalize mh-loaddefs.el to make it work for both GNU Emacs and XEmacs. (EMACS_OPTIONS, XEMACS_OPTIONS): Use double-dash for all long options. (EMACS_LOADDEFS_COOKIE): New variable for generate-autoload-cookie setting. Obsoletes XEMACS_LOADDEFS_COOKIE. (EMACS_EXPORT_MH_LOADDEFS): New variable for GNU Emacs commands to rebuild mh-loaddefs.el. (XEMACS_EXPORT_MH_LOADDEFS): New variable for XEmacs commands to rebuild mh-loaddefs.el. Obsoletes XEMACS_LOADDEFS_FILE and XEMACS_LOADDEFS_PKG_NAME. (MH-E-LOADDEFS-SRC): New variable which is set to $(MH-E-SRC) on GNU Emacs, and adds $(MH-E-XEMACS-SRC) on XEmacs. (all): Modify EMACS_EXPORT_MH_LOADDEFS and MH-E-LOADDEFS-SRC on XEMacs. (mh-loaddefs.el): Now depends on $(MH-E-LOADDEFS-SRC) and has generic compile command that works on both GNU Emacs XEmacs. (xemacs): Depend on autoloads instead of deleted loaddefs-xemacs. (loaddefs-xemacs): Deleted. * mh-comp.el (mh-font-lock-field-data): Fix a bug where the function would return t but match-data was being set to nil (closes SF #1241017). Satyaki Das <satyaki@theforce.stanford.edu>. * mh-comp.el (mh-insert-auto-fields): Inset identity regardless of whether one was already set, since if one used a default identity it would never be overridden. Peter S Galbraith <psg@debian.org> * mh-init.el (mh-path): Use customization group mh-e. Thanks to Peter Whaite for these patches (closes SF #1213716). * mh-mime.el (mh-compose-forward): Only use mh-sent-from-msg as a default message if it's a number (as is done elsewhere). Otherwise, an error is thrown if this function is called from a draft created by mh-forward since this variable is a list. Also added a space after the "Messages [%s]:" prompt. * mh-mime.el (mh-compose-forward): Allow insertion of multiple forwarded messages by range (including sequences). For the sent folder the default message presented is the sent message. For other folders, the default message is "cur", if it exists. Jeffrey C Honig <jch@honig.net>
author Bill Wohler <wohler@newt.com>
date Mon, 10 Oct 2005 16:37:54 +0000
parents 7d93d4615f9d
children 8a6d017601ce 5e2d3828e89f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
1 ;;; mh-print.el --- MH-E printing support
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
2
65980
4520ae2624f2 * mh-init.el (mh-image-load-path): New function that adds the path to
Bill Wohler <wohler@newt.com>
parents: 65609
diff changeset
3 ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
4
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
5 ;; Author: Jeffrey C Honig <jch@honig.net>
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
6 ;; Maintainer: Bill Wohler <wohler@newt.com>
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
7 ;; Keywords: mail
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
8 ;; See: mh-e.el
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
9
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
10 ;; This file is part of GNU Emacs.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
11
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
12 ;; GNU Emacs is free software; you can redistribute it and/or modify
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
13 ;; it under the terms of the GNU General Public License as published by
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
14 ;; the Free Software Foundation; either version 2, or (at your option)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
15 ;; any later version.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
16
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
17 ;; GNU Emacs is distributed in the hope that it will be useful,
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
20 ;; GNU General Public License for more details.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
21
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
22 ;; You should have received a copy of the GNU General Public License
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 62847
diff changeset
25 ;; Boston, MA 02110-1301, USA.
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
26
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
27 ;;; Commentary:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
28 ;; Pp Print to lpr | Default inline settings
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
29 ;; Pf Print to file | Generate a postscript file
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
30 ;; Ps Print show buffer | Fails if no show buffer
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
31 ;;
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
32 ;; PA Toggle inline/attachments
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
33 ;; PC Toggle color
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
34 ;; PF Toggle faces
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
35
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
36 ;;; Change Log:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
37
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
38 ;;; Code:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
39
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
40 (eval-when-compile (require 'mh-acros))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
41 (mh-require-cl)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
42 (require 'ps-print)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
43 (require 'mh-utils)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
44 (require 'mh-funcs)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
45 (eval-when-compile (require 'mh-seq))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
46
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
47 (defvar mh-ps-print-mime nil
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
48 "Control printing of MIME parts.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
49 The three possible states are:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
50 1. nil to not print inline parts
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
51 2. t to print inline parts
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
52 3. non-zero to print inline parts and attachments")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
53
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
54 (defvar mh-ps-print-color-option ps-print-color-p
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
55 "MH-E's version of `\\[ps-print-color-p]'.")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
56
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
57 (defvar mh-ps-print-func 'ps-spool-buffer-with-faces
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
58 "Function to use to spool a buffer.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
59 Sensible choices are the functions `ps-spool-buffer' and
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
60 `ps-spool-buffer-with-faces'.")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
61
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
62 ;; XXX - If buffer is already being displayed, use that buffer
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
63 ;; XXX - What about showing MIME content?
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
64 ;; XXX - Default print buffer is bogus
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
65 (defun mh-ps-spool-buffer (buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
66 "Send BUFFER to printer queue."
65595
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
67 (message "mh-ps-spool-buffer %s" buffer)
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
68 (save-excursion
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
69 (set-buffer buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
70 (let ((ps-print-color-p mh-ps-print-color-option)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
71 (ps-left-header
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
72 (list
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
73 (concat "("
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
74 (mh-get-header-field "Subject:") ")")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
75 (concat "("
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
76 (mh-get-header-field "From:") ")")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
77 (ps-right-header
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
78 (list
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
79 "/pagenumberstring load"
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
80 (concat "("
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
81 (mh-get-header-field "Date:") ")"))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
82 (funcall mh-ps-print-func))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
83
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
84 (defun mh-ps-spool-a-msg (msg buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
85 "Print MSG.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
86 First the message is decoded in BUFFER before the results are sent to the
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
87 printer."
65595
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
88 (message "mh-ps-spool-a-msg msg %s buffer %s"
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
89 msg buffer)
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
90 (let ((mh-show-buffer mh-show-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
91 (folder mh-current-folder)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
92 ;; The following is commented out because
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
93 ;; `clean-message-header-flag' isn't used anywhere. I
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
94 ;; commented rather than deleted in case somebody had some
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
95 ;; future plans for it. --SY.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
96 ;(clean-message-header-flag mh-clean-message-header-flag)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
97 )
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
98 (unwind-protect
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
99 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
100 (setq mh-show-buffer buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
101 (save-excursion
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
102 ;;
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
103 ;; XXX - Use setting of mh-ps-print-mime
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
104 ;;
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
105 (mh-display-msg msg folder)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
106 (mh-ps-spool-buffer mh-show-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
107 (kill-buffer mh-show-buffer))))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
108
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
109 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
110 (defun mh-ps-print-msg (range)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
111 "Print the messages in RANGE.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
112
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
113 Check the documentation of `mh-interactive-range' to see how RANGE is read in
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
114 interactive use."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
115 (interactive (list (mh-interactive-range "Print")))
65595
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
116 (message "mh-ps-print-msg range %s keys %s"
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
117 range (this-command-keys))
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
118 (mh-iterate-on-range msg range
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
119 (let ((buffer (get-buffer-create mh-temp-buffer)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
120 (unwind-protect
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
121 (mh-ps-spool-a-msg msg buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
122 (kill-buffer buffer)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
123 (mh-notate nil mh-note-printed mh-cmd-note))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
124 (ps-despool nil))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
125
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
126 (defun mh-ps-print-preprint (prefix-arg)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
127 "Replacement for `ps-print-preprint'.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
128 The original function does not handle the fact that MH folders are directories
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
129 nicely, when generating the default file name. This function works around
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
130 that. The function is passed the interactive PREFIX-ARG."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
131 (let ((buffer-file-name (format "/tmp/%s" (substring (buffer-name) 1))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
132 (ps-print-preprint prefix-arg)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
133
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
134 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
135 (defun mh-ps-print-msg-file (file range)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
136 "Print to FILE the messages in RANGE.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
137
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
138 Check the documentation of `mh-interactive-range' to see how RANGE is read in
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
139 interactive use."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
140 (interactive (list
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
141 (mh-ps-print-preprint 1)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
142 (mh-interactive-range "Print")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
143 (mh-iterate-on-range msg range
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
144 (let ((buffer (get-buffer-create mh-temp-buffer)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
145 (unwind-protect
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
146 (mh-ps-spool-a-msg msg buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
147 (kill-buffer buffer)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
148 (mh-notate nil mh-note-printed mh-cmd-note))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
149 (ps-despool file))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
150
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
151 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
152 (defun mh-ps-print-msg-show (file)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
153 "Print current show buffer to FILE."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
154 (interactive (list (mh-ps-print-preprint current-prefix-arg)))
65595
8e711c68e4ff message format spec fixes, commit 14, this should be final commit
Deepak Goel <deego@gnufans.org>
parents: 64085
diff changeset
155 (message "mh-ps-print-msg-show file %s keys %s mh-show-buffer %s"
65609
7d93d4615f9d (mh-ps-print-msg-show): Fix misplaced parenthesis in previous change.
Juanma Barranquero <lekktu@gmail.com>
parents: 65595
diff changeset
156 file (this-command-keys) mh-show-buffer)
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
157 (let ((msg (mh-get-msg-num t))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
158 (folder mh-current-folder)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
159 (show-buffer mh-show-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
160 (show-window (get-buffer-window mh-show-buffer)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
161 (if (and show-buffer show-window)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
162 (mh-in-show-buffer (show-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
163 (if (equal (mh-msg-filename msg folder) buffer-file-name)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
164 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
165 (mh-ps-spool-buffer show-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
166 (ps-despool file))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
167 (message "Current message is not being shown(1).")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
168 (message "Current message is not being shown(2)."))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
169
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
170 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
171 (defun mh-ps-print-toggle-faces ()
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
172 "Toggle whether printing is done with faces or not."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
173 (interactive)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
174 (if (eq mh-ps-print-func 'ps-spool-buffer-with-faces)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
175 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
176 (setq mh-ps-print-func 'ps-spool-buffer)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
177 (message "Printing without faces"))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
178 (setq mh-ps-print-func 'ps-spool-buffer-with-faces)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
179 (message "Printing with faces")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
180
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
181 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
182 (defun mh-ps-print-toggle-color ()
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
183 "Toggle whether color is used in printing messages."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
184 (interactive)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
185 (if (eq mh-ps-print-color-option nil)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
186 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
187 (setq mh-ps-print-color-option 'black-white)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
188 (message "Colors will be printed as black & white."))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
189 (if (eq mh-ps-print-color-option 'black-white)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
190 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
191 (setq mh-ps-print-color-option t)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
192 (message "Colors will be printed."))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
193 (setq mh-ps-print-color-option nil)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
194 (message "Colors will not be printed."))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
195
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
196 ;;; XXX: Check option 3. Documentation doesn't sound right.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
197 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
198 (defun mh-ps-print-toggle-mime ()
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
199 "Cycle through available choices on how MIME parts should be printed.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
200 The available settings are:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
201 1. Print only inline MIME parts.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
202 2. Print all MIME parts.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
203 3. Print no MIME parts."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
204 (interactive)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
205 (if (eq mh-ps-print-mime nil)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
206 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
207 (setq mh-ps-print-mime t)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
208 (message "Inline parts will be printed, attachments will not be printed."))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
209 (if (eq mh-ps-print-mime t)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
210 (progn
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
211 (setq mh-ps-print-mime 1)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
212 (message "Both Inline parts and attachments will be printed."))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
213 (setq mh-ps-print-mime nil)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
214 (message "Neither inline parts nor attachments will be printed."))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
215
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
216 ;;; Old non-PS based printing
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
217 ;;;###mh-autoload
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
218 (defun mh-print-msg (range)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
219 "Print RANGE on printer.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
220
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
221 Check the documentation of `mh-interactive-range' to see how RANGE is read in
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
222 interactive use.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
223
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
224 The variable `mh-lpr-command-format' is used to generate the print command.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
225 The messages are formatted by mhl. See the variable `mhl-formfile'."
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
226 (interactive (list (mh-interactive-range "Print")))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
227 (message "Printing...")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
228 (let (msgs)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
229 ;; Gather message numbers and add them to "printed" sequence.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
230 (mh-iterate-on-range msg range
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
231 (mh-add-msgs-to-seq msg 'printed t)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
232 (mh-notate nil mh-note-printed mh-cmd-note)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
233 (push msg msgs))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
234 (setq msgs (nreverse msgs))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
235 ;; Print scan listing if we have more than one message.
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
236 (if (> (length msgs) 1)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
237 (let* ((msgs-string
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
238 (mapconcat 'identity (mh-list-to-string
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
239 (mh-coalesce-msg-list msgs)) " "))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
240 (lpr-command
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
241 (format mh-lpr-command-format
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
242 (cond ((listp range)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
243 (format "Folder: %s, Messages: %s"
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
244 mh-current-folder msgs-string))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
245 ((symbolp range)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
246 (format "Folder: %s, Sequence: %s"
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
247 mh-current-folder range)))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
248 (scan-command
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
249 (format "scan %s | %s" msgs-string lpr-command)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
250 (if mh-print-background-flag
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
251 (mh-exec-cmd-daemon shell-file-name nil "-c" scan-command)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
252 (call-process shell-file-name nil nil nil "-c" scan-command))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
253 ;; Print the messages
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
254 (dolist (msg msgs)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
255 (let* ((mhl-command (format "%s %s %s"
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
256 (expand-file-name "mhl" mh-lib-progs)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
257 (if mhl-formfile
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
258 (format " -form %s" mhl-formfile)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
259 "")
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
260 (mh-msg-filename msg)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
261 (lpr-command
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
262 (format mh-lpr-command-format
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
263 (format "%s/%s" mh-current-folder msg)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
264 (print-command
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
265 (format "%s | %s" mhl-command lpr-command)))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
266 (if mh-print-background-flag
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
267 (mh-exec-cmd-daemon shell-file-name nil "-c" print-command)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
268 (call-process shell-file-name nil nil nil "-c" print-command)))))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
269 (message "Printing...done"))
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
270
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
271 (provide 'mh-print)
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
272
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
273 ;;; Local Variables:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
274 ;;; indent-tabs-mode: nil
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
275 ;;; sentence-end-double-space: nil
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
276 ;;; End:
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
277
56677
5aafbbdd005f Add arch taglines
Miles Bader <miles@gnu.org>
parents: 56676
diff changeset
278 ;; arch-tag: 8d84d50b-2a49-4d0d-b51e-ba9c9b6fc679
56676
db6d7638a259 Upgraded to MH-E version 7.4.80.
Bill Wohler <wohler@newt.com>
parents:
diff changeset
279 ;;; mh-print.el ends here