• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.9.5/emacs-92/emacs/lisp/

Lines Matching +defs:ps +defs:print +defs:header

8 ;; Keywords: wp, print, PostScript
42 ;; With `printing' you can preview or print a PostScript file. You can also
43 ;; print a text file using PostScript, and preview or print buffers that use
51 ;; The `printing' menu replaces the usual print options in the menu bar.
65 ;; `printing' depends on ps-print package to generate PostScript files, to
67 ;; interface to ps-print package and it also provides some extra stuff.
69 ;; To download the latest ps-print package see
71 ;; Please, see README file for ps-print installation instructions.
75 ;; print-nt.el Frederic Corne <frederic.corne@erli.fr>
79 ;; PS-print for mail messages
81 ;; win32-ps-print.el Matthew O. Persico <mpersico@erols.com>
84 ;; ps-print-interface.el Volker Franz <volker.franz@tuebingen.mpg.de>
85 ;; Graphical front end for ps-print and previewing
109 ;; /usr/X11R6/bin/gv ("/home/user/example/file.ps")
116 ;; /usr/X11R6/bin/gv ("/home/user/example/file.ps")
130 ;; Then try to set the variables: `pr-ps-name', `pr-ps-printer-alist',
135 ;; typing C-h v pr-ps-name RET (for example) if you already loaded printing
159 ;; '((prt_06a "print" nil "/D:\\\\printers\\prt_06a")
164 ;; (setq pr-ps-name 'lps_06b)
165 ;; (setq pr-ps-printer-alist
166 ;; '((lps_06a "print" nil "/D:" "\\\\printers\\lps_06a")
167 ;; (lps_06b "print" nil nil "\\\\printers\\lps_06b")
168 ;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c")
189 ;; (setq pr-ps-name 'lps_06b)
190 ;; (setq pr-ps-printer-alist
201 ;; NOTE 2: The `printer-name' and `ps-printer-name' variables don't need to be
202 ;; set, as they are implicit set by `pr-ps-printer-alist' and
229 ;; 2. If you try to print a file and it seems that the file was printed, but
234 ;; 3. Don't try to print a dynamic buffer, that is, a buffer which is
235 ;; modifying while `printing' tries to print. Eventually you got an error
237 ;; another buffer and, then, print the file or the new static buffer.
243 ;; print /D:\\host\printer somefile.txt
248 ;; If the printer `\\host\printer' doesn't print the content of
261 ;; 5. You can use gsprint instead of ghostscript to print monochrome PostScript
263 ;; efficient than ghostscript to print monochrome PostScript.
265 ;; To print non-monochrome PostScript file, the efficiency of ghostscript
275 ;; (setq pr-ps-printer-alist
296 ;; See also documentation for `pr-ps-printer-alist'.
323 ;; pr-ps-directory-preview
324 ;; pr-ps-directory-using-ghostscript
325 ;; pr-ps-directory-print
326 ;; pr-ps-directory-ps-print
327 ;; pr-ps-buffer-preview
328 ;; pr-ps-buffer-using-ghostscript
329 ;; pr-ps-buffer-print
330 ;; pr-ps-buffer-ps-print
331 ;; pr-ps-region-preview
332 ;; pr-ps-region-using-ghostscript
333 ;; pr-ps-region-print
334 ;; pr-ps-region-ps-print
335 ;; pr-ps-mode-preview
336 ;; pr-ps-mode-using-ghostscript
337 ;; pr-ps-mode-print
338 ;; pr-ps-mode-ps-print
339 ;; pr-ps-file-preview
340 ;; pr-ps-file-up-preview
341 ;; pr-ps-file-using-ghostscript
342 ;; pr-ps-file-print
343 ;; pr-ps-file-ps-print
344 ;; pr-ps-file-up-ps-print
345 ;; pr-ps-fast-fire
348 ;; pr-despool-print
349 ;; pr-despool-ps-print
370 ;; pr-toggle-header
377 ;; pr-ps-name
379 ;; pr-ps-utility
380 ;; pr-show-ps-setup
389 ;; `pr-ps-name' interactively select a PostScript printer.
391 ;; `pr-ps-utility' interactively select a PostScript utility.
393 ;; `pr-ps-*' deal with PostScript code generation.
403 ;; `*-using-ghostscript' use ghostscript to print.
405 ;; `*-print' send PostScript directly to printer.
406 ;; `*-ps-print' send PostScript directly to printer or use
407 ;; ghostscript to print. It depends on
408 ;; `pr-print-using-ghostscript' option.
420 ;; `pr-ps-buffer-using-ghostscript'
421 ;; Use ghostscript to print a buffer.
423 ;; `pr-ps-file-print'
429 ;; So you can preview through ghostview, use ghostscript to print (if you don't
431 ;; generated by `ps-print' package.
441 ;; C-u M-x pr-ps-buffer-print RET
443 ;; The `pr-ps-buffer-print' command prompts you for a n-up printing number and
448 ;; generation, that is, with `pr-ps-*' and `pr-despool-*' commands. If
469 ;; (global-set-key [print] 'pr-ps-fast-fire)
470 ;; (global-set-key [M-print] 'pr-ps-mode-using-ghostscript)
471 ;; (global-set-key [S-print] 'pr-ps-mode-using-ghostscript)
472 ;; (global-set-key [C-print] 'pr-txt-fast-fire)
473 ;; (global-set-key [C-M-print] 'pr-txt-fast-fire)
477 ;; (global-set-key 'f22 'pr-ps-fast-fire)
478 ;; (global-set-key '(meta f22) 'pr-ps-mode-using-ghostscript)
479 ;; (global-set-key '(shift f22) 'pr-ps-mode-using-ghostscript)
486 ;; (global-set-key "\C-cbp" 'pr-ps-buffer-print)
487 ;; (global-set-key "\C-cbx" 'pr-ps-buffer-preview)
488 ;; (global-set-key "\C-cbb" 'pr-ps-buffer-using-ghostscript)
489 ;; (global-set-key "\C-crp" 'pr-ps-region-print)
490 ;; (global-set-key "\C-crx" 'pr-ps-region-preview)
491 ;; (global-set-key "\C-crr" 'pr-ps-region-using-ghostscript)
509 ;; `pr-ps-name' Specify a printer for printing a PostScript
512 ;; `pr-ps-printer-alist' Specify an alist for all PostScript printers.
517 ;; `pr-ps-temp-file' Specify PostScript temporary file name prefix.
534 ;; `pr-print-using-ghostscript' Non-nil means print using ghostscript.
536 ;; `pr-faces-p' Non-nil means print with face attributes.
540 ;; `pr-file-landscape' Non-nil means print PostScript file in
543 ;; `pr-file-duplex' Non-nil means print PostScript file in duplex
546 ;; `pr-file-tumble' Non-nil means print PostScript file in tumble
557 ;; `pr-ps-utility' Specify PostScript utility processing.
559 ;; `pr-ps-utility-alist' Specify an alist for PostScript utility
675 ;; 24 | Help | |ps-print| |( )Even Sheets|
722 ;; See `pr-ps-utility-alist' and `pr-setting-database' for
730 ;; `pr-ps-utility-alist'.
734 ;; print the PostScript file generated. It depends on option 18, if it's
738 ;; Also, if you already have a PostScript file you can print it. Instead
740 ;; temporarily the PostScript code generated in a buffer and print it
750 ;; in `pr-ps-printer-alist' variable (see it for documentation).
756 ;; buffer and you want to print them in a text printer, select this
764 ;; 5. If you want to print a directory, buffer, region or major mode in a
776 ;; 8. If you want to have a header in each page in your PostScript code,
779 ;; 9. If you want to draw a gaudy frame around the header, turn on this
780 ;; option. This option is enabled if print header is on (option 8).
798 ;; 15. With this option, you can choose if you want to print all pages, odd
800 ;; See also `ps-even-or-odd-pages'.
815 ;; print PostScript files. In GNU or Unix system, if ghostscript is set
823 ;; like `*-region*' commands, that is, `*-buffer*' commands will print
839 ;; more PostScript options in `ps-print' option. Or you can customize
843 ;; 23. Show current settings for `printing', `ps-print' or `lpr'.
867 ;; (setq pr-ps-name 'lps_06b)
868 ;; (setq pr-ps-printer-alist
879 ;; (setq pr-ps-utility 'mpage)
880 ;; (setq pr-ps-utility-alist
903 ;; '((prt_06a "print" nil "/D:\\\\printers\\prt_06a")
908 ;; (setq pr-ps-name 'lps_06b)
909 ;; (setq pr-ps-printer-alist
910 ;; '((lps_06a "print" nil "/D:" "\\\\printers\\lps_06a")
911 ;; (lps_06b "print" nil nil "\\\\printers\\lps_06b")
912 ;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c")
925 ;; (setq pr-ps-utility 'psnup)
926 ;; (setq pr-ps-utility-alist
939 ;; `pr-ps-utility-alist'.
961 ;; ps-print `http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage'
1000 ;; - ghostscript parameters for `pr-ps-printer-alist'.
1013 ;; - extra parameters for `pr-ps-printer-alist'.
1016 ;; Frederic Corne <frederic.corne@erli.fr> print-nt.el
1018 ;; Matthew O. Persico <mpersico@erols.com> win32-ps-print.el
1019 ;; Volker Franz <volker.franz@tuebingen.mpg.de> ps-print-interface.el
1029 (require 'ps-print)
1032 (and (string< ps-print-version "6.6.4")
1033 (error "`printing' requires `ps-print' package version 6.6.4 or later"))
1037 (and ps-windows-system (getenv "OSTYPE")
1149 (defun pr-ps-utility-custom-set (symbol value)
1156 (defun pr-ps-name-custom-set (symbol value)
1160 (pr-menu-set-ps-title value)))
1186 ps-windows-system)
1227 (if (or pr-cygwin-system ps-windows-system)
1243 mpage, print.exe, etc. See also `pr-command' function.
1333 (ps-windows-system "PRN")
1342 ;; '((prt_06a "print" nil "/D:\\\\printers\\prt_06a")
1368 The programs `print' and `nprint' (the standard print programs
1374 `print' for Windows system, `lp' for lp system and `lpr' for
1377 \"print\"
1401 . for print.exe
1423 '((prt_06a \"print\" nil \"/D:\\\\\\\\printers\\\\prt_06a\")
1431 * Information about the print command (print.exe)
1463 (defcustom pr-ps-name 'default
1466 This printer name symbol should be defined on `pr-ps-printer-alist' (see it for
1473 :set 'pr-ps-name-custom-set
1478 (defcustom pr-ps-printer-alist
1480 (cond (ps-windows-system nil)
1481 (ps-lp-system "-d")
1483 (or (getenv "PRINTER") (getenv "LPDEST") ps-printer-name)))
1491 ;; '((lps_06a "print" nil "/D:" "\\\\printers\\lps_06a")
1492 ;; (lps_06b "print" nil nil "\\\\printers\\lps_06b")
1493 ;; (lps_07c "print" nil "" "/D:\\\\printers\\lps_07c")
1509 `pr-ps-name' variable setting and for menu selection.
1521 The programs `print' and `nprint' (the standard print programs
1527 `print' for Windows system, `lp' for lp system and `lpr' for
1530 \"print\"
1560 . for print.exe
1581 . for print.exe or gsprint.exe
1607 '(ps-landscape-mode . nil)
1608 '(ps-spool-duplex . t)
1626 '((lps_06a \"print\" nil \"/D:\" \"\\\\\\\\printers\\\\lps_06a\")
1627 (lps_06b \"print\" nil nil \"\\\\\\\\printers\\\\lps_06b\")
1628 (lps_07c \"print\" nil \"\" \"/D:\\\\\\\\printers\\\\lps_07c\")
1640 You can use gsprint instead of ghostscript to print monochrome PostScript files
1642 than ghostscript to print monochrome PostScript.
1644 To print non-monochrome PostScript file, the efficiency of ghostscript is
1651 (setq pr-ps-printer-alist
1675 * GSPRINT - Ghostscript print to Windows printer
1684 * Information about the print command (print.exe)
1727 (const :tag "Landscape" ps-landscape-mode)
1728 (const :tag "Print Header" ps-print-header)
1729 (const :tag "Print Header Frame" ps-print-header-frame)
1730 (const :tag "Line Number" ps-line-number)
1731 (const :tag "Zebra Stripes" ps-zebra-stripes)
1732 (const :tag "Duplex" ps-spool-duplex)
1733 (const :tag "Tumble" ps-spool-tumble)
1734 (const :tag "Upside-Down" ps-print-upside-down)
1758 (cond (ps-windows-system "c:/temp")
1764 See also `pr-ps-temp-file' and `pr-file-modes'."
1770 (defcustom pr-ps-temp-file "prspool-"
1787 See also `pr-temp-dir' and `pr-ps-temp-file'."
1794 (if ps-windows-system
1836 (if ps-windows-system
1863 (if ps-windows-system
1906 (if ps-windows-system
1916 See also `pr-ps-printer-alist'."
1930 See also `pr-ps-printer-alist'."
1936 (defcustom pr-print-using-ghostscript nil
1937 "*Non-nil means print using ghostscript.
1940 ghostscript to print a PostScript file.
1950 "*Non-nil means print with face attributes."
1964 "*Non-nil means print PostScript file in landscape orientation."
1971 "*Non-nil means print PostScript file in duplex mode."
1978 "*Non-nil means print PostScript file in tumble mode.
1995 `*-region*' commands, that is, `*-buffer*' commands will print only the region
2007 `*-buffer*' commands will print the current buffer and `*-region*' commands
2008 will print the current region."
2016 pr-mh-lpr-1 pr-mh-print-1
2018 (ps-article-author ps-article-subject)
2023 pr-mh-lpr-2 pr-mh-print-2
2025 (ps-article-author ps-article-subject)
2030 pr-rmail-lpr pr-rmail-print
2032 (ps-article-subject ps-article-author buffer-name)
2037 pr-rmail-lpr pr-rmail-print
2039 (ps-article-subject ps-article-author buffer-name)
2044 pr-gnus-lpr pr-gnus-print
2046 (ps-article-subject ps-article-author gnus-newsgroup-name)
2051 pr-gnus-lpr pr-gnus-print
2053 (ps-article-subject ps-article-author gnus-newsgroup-name)
2058 pr-mode-lpr pr-mode-print
2060 (ps-info-node ps-info-file)
2065 pr-vm-lpr pr-vm-print
2067 (ps-article-subject ps-article-author buffer-name)
2118 and then call the function `pr-mode-print' which it's used to
2121 The `pr-mode-print' definition is:
2123 (pr-mode-print N-UP FILENAME HEADER-LIST &optional FROM TO)
2130 HEADER-LINES It's the number of header lines; if is nil, it uses
2131 `ps-header-lines' value.
2133 LEFT-HEADER It's the left header part, it's a list of string, variable
2135 uses `ps-left-header' value.
2137 RIGHT-HEADER It's the right header part, it's a list of string, variable
2139 uses `ps-right-header' value.
2162 '(ps-landscape-mode . nil)
2163 '(ps-spool-duplex . t)
2192 (const :tag "Landscape" ps-landscape-mode)
2193 (const :tag "Print Header" ps-print-header)
2194 (const :tag "Print Header Frame" ps-print-header-frame)
2195 (const :tag "Line Number" ps-line-number)
2196 (const :tag "Zebra Stripes" ps-zebra-stripes)
2197 (const :tag "Duplex" ps-spool-duplex)
2198 (const :tag "Tumble" ps-spool-tumble)
2199 (const :tag "Upside-Down" ps-print-upside-down)
2215 (defcustom pr-ps-utility 'mpage
2218 This utility symbol should be defined on `pr-ps-utility-alist' (see it for
2226 `pr-ps-utility-alist'."
2228 :set 'pr-ps-utility-custom-set
2233 (defcustom pr-ps-utility-alist
2258 `pr-ps-utility' variable setting and for menu selection.
2351 `pr-ps-utility-alist'.
2525 through `inherits-from:' (see `pr-ps-utility', `pr-mode-alist'
2526 and `pr-ps-printer-alist'), the variables pr-file-duplex and
2561 '(ps-landscape-mode . nil)
2562 '(ps-spool-duplex . t)
2582 (const :tag "Landscape" ps-landscape-mode)
2583 (const :tag "Print Header" ps-print-header)
2584 (const :tag "Print Header Frame" ps-print-header-frame)
2585 (const :tag "Line Number" ps-line-number)
2586 (const :tag "Zebra Stripes" ps-zebra-stripes)
2587 (const :tag "Duplex" ps-spool-duplex)
2588 (const :tag "Tumble" ps-spool-tumble)
2589 (const :tag "Upside-Down" ps-print-upside-down)
2664 Error: could not open \"c:\\temp\\prspool.ps\" for reading."
2676 It's used by `pr-ps-directory-preview', `pr-ps-directory-using-ghostscript',
2677 `pr-ps-directory-print', `pr-ps-directory-ps-print', `pr-printify-directory'
2735 (defvar pr-ps-command nil
2737 See `pr-ps-printer-alist'.")
2740 (defvar pr-ps-switches nil
2742 See `pr-ps-printer-alist'.")
2745 (defvar pr-ps-printer-switch nil
2747 See `pr-ps-printer-alist'.")
2750 (defvar pr-ps-printer nil
2752 See `pr-ps-printer-alist'.")
2797 (and pr-print-using-ghostscript (not pr-spool-p)))
2809 (and pr-auto-region (not zmacs-region-stays) (ps-mark-active-p))))
2837 ["1-up" (pr-ps-directory-preview 1 nil nil t) t]
2838 ["2-up" (pr-ps-directory-preview 2 nil nil t) t]
2839 ["4-up" (pr-ps-directory-preview 4 nil nil t) t]
2840 ["Other..." (pr-ps-directory-preview nil nil nil t)
2841 :keys "\\[pr-ps-buffer-preview]"])
2843 ["1-up" (pr-ps-buffer-preview 1 t) t]
2844 ["2-up" (pr-ps-buffer-preview 2 t) t]
2845 ["4-up" (pr-ps-buffer-preview 4 t) t]
2846 ["Other..." (pr-ps-buffer-preview nil t)
2847 :keys "\\[pr-ps-buffer-preview]"])
2848 ("Region" ,pr-:active (and (not pr-spool-p) (ps-mark-active-p))
2849 ["1-up" (pr-ps-region-preview 1 t) t]
2850 ["2-up" (pr-ps-region-preview 2 t) t]
2851 ["4-up" (pr-ps-region-preview 4 t) t]
2852 ["Other..." (pr-ps-region-preview nil t)
2853 :keys "\\[pr-ps-region-preview]"])
2855 ["1-up" (pr-ps-mode-preview 1 t) t]
2856 ["2-up" (pr-ps-mode-preview 2 t) t]
2857 ["4-up" (pr-ps-mode-preview 4 t) t]
2858 ["Other..." (pr-ps-mode-preview nil t)
2859 :keys "\\[pr-ps-mode-preview]"])
2861 ["No Preprocessing..." (call-interactively 'pr-ps-file-preview)
2862 :keys "\\[pr-ps-file-preview]"
2866 ["PostScript Utility" pr-update-menus :active pr-ps-utility-alist
2870 ["1-up..." (pr-ps-file-up-preview 1 t t) pr-ps-utility-alist]
2871 ["2-up..." (pr-ps-file-up-preview 2 t t) pr-ps-utility-alist]
2872 ["4-up..." (pr-ps-file-up-preview 4 t t) pr-ps-utility-alist]
2873 ["Other..." (pr-ps-file-up-preview nil t t)
2874 :keys "\\[pr-ps-file-up-preview]" :active pr-ps-utility-alist]
2880 :active pr-ps-utility-alist]
2885 :active pr-ps-utility-alist]
2890 :active (and pr-file-duplex pr-ps-utility-alist)])
2899 ["1-up" (pr-ps-directory-ps-print 1 nil nil t) t]
2900 ["2-up" (pr-ps-directory-ps-print 2 nil nil t) t]
2901 ["4-up" (pr-ps-directory-ps-print 4 nil nil t) t]
2902 ["Other..." (pr-ps-directory-ps-print nil nil nil t)
2903 :keys "\\[pr-ps-buffer-ps-print]"])
2905 ["1-up" (pr-ps-buffer-ps-print 1 t) t]
2906 ["2-up" (pr-ps-buffer-ps-print 2 t) t]
2907 ["4-up" (pr-ps-buffer-ps-print 4 t) t]
2908 ["Other..." (pr-ps-buffer-ps-print nil t)
2909 :keys "\\[pr-ps-buffer-ps-print]"])
2910 ("Region" ,pr-:active (ps-mark-active-p)
2911 ["1-up" (pr-ps-region-ps-print 1 t) t]
2912 ["2-up" (pr-ps-region-ps-print 2 t) t]
2913 ["4-up" (pr-ps-region-ps-print 4 t) t]
2914 ["Other..." (pr-ps-region-ps-print nil t)
2915 :keys "\\[pr-ps-region-ps-print]"])
2917 ["1-up" (pr-ps-mode-ps-print 1 t) t]
2918 ["2-up" (pr-ps-mode-ps-print 2 t) t]
2919 ["4-up" (pr-ps-mode-ps-print 4 t) t]
2920 ["Other..." (pr-ps-mode-ps-print nil t)
2921 :keys "\\[pr-ps-mode-ps-print]"])
2923 ["No Preprocessing..." (call-interactively 'pr-ps-file-ps-print)
2924 :keys "\\[pr-ps-file-ps-print]"
2928 ["PostScript Utility" pr-update-menus :active pr-ps-utility-alist
2932 ["1-up..." (pr-ps-file-up-ps-print 1 t t) pr-ps-utility-alist]
2933 ["2-up..." (pr-ps-file-up-ps-print 2 t t) pr-ps-utility-alist]
2934 ["4-up..." (pr-ps-file-up-ps-print 4 t t) pr-ps-utility-alist]
2935 ["Other..." (pr-ps-file-up-ps-print nil t t)
2936 :keys "\\[pr-ps-file-up-ps-print]" :active pr-ps-utility-alist]
2942 :active pr-ps-utility-alist]
2947 :active pr-ps-utility-alist]
2952 :active (and pr-file-duplex pr-ps-utility-alist)])
2953 ["Despool..." (call-interactively 'pr-despool-ps-print)
2954 :active pr-spool-p :keys "\\[pr-despool-ps-print]"
2958 :active pr-ps-printer-alist :included (pr-visible-p 'postscript)
2968 ["Region" pr-printify-region (ps-mark-active-p)])
2974 ["Region" pr-txt-region (ps-mark-active-p)]
2982 :style toggle :selected ps-landscape-mode
2984 ["Print Header" pr-toggle-header-menu
2985 :style toggle :selected ps-print-header
2987 ["Print Header Frame" pr-toggle-header-frame-menu
2988 :style toggle :selected ps-print-header-frame :active ps-print-header
2991 :style toggle :selected ps-line-number
2994 :style toggle :selected ps-zebra-stripes
2997 :style toggle :selected ps-spool-duplex
3000 :style toggle :selected ps-spool-tumble :active ps-spool-duplex
3003 :style toggle :selected ps-print-upside-down
3007 pr-:help "Select odd/even pages/sheets to print")
3009 :style radio :selected (eq ps-even-or-odd-pages nil)]
3011 :style radio :selected (eq ps-even-or-odd-pages 'even-page)]
3013 :style radio :selected (eq ps-even-or-odd-pages 'odd-page)]
3015 :style radio :selected (eq ps-even-or-odd-pages 'even-sheet)]
3017 :style radio :selected (eq ps-even-or-odd-pages 'odd-sheet)])
3030 :style toggle :selected pr-print-using-ghostscript
3047 ["ps-print" ps-print-customize t]
3051 ["ps-print" pr-show-ps-setup t]
3057 (defvar pr-menu-print-item "print"
3078 (setq pr-menu-print-item nil))
3084 ;; Replace existing "print" item by "Printing" item.
3086 ;; third... time, but "print" item exists only in the first load.
3090 (easy-menu-change '("tools") "Printing" pr-menu-spec pr-menu-print-item)
3091 (when pr-menu-print-item
3092 (easy-menu-remove-item nil '("tools") pr-menu-print-item)
3093 (setq pr-menu-print-item nil
3102 (pr-menu-print-item
3105 "print-buffer")
3106 (dolist (item '("print-buffer" "print-region"
3107 "ps-print-buffer-faces" "ps-print-region-faces"
3108 "ps-print-buffer" "ps-print-region"))
3110 (setq pr-menu-print-item nil
3122 (let ((pr-print-key (if (featurep 'xemacs)
3124 'print))) ; GNU Emacs
3125 (global-set-key `[,pr-print-key] 'pr-ps-fast-fire)
3126 ;; Well, M-print and S-print are used because in my keyboard S-print works
3127 ;; and M-print doesn't. But M-print can work in other keyboard.
3128 (global-set-key `[(meta ,pr-print-key)] 'pr-ps-mode-using-ghostscript)
3129 (global-set-key `[(shift ,pr-print-key)] 'pr-ps-mode-using-ghostscript)
3130 ;; Well, C-print and C-M-print are used because in my keyboard C-M-print works
3131 ;; and C-print doesn't. But C-print can work in other keyboard.
3132 (global-set-key `[(control ,pr-print-key)] 'pr-txt-fast-fire)
3133 (global-set-key `[(control meta ,pr-print-key)] 'pr-txt-fast-fire))
3138 ;;;(global-set-key "\C-cbp" 'pr-ps-buffer-print)
3139 ;;;(global-set-key "\C-cbx" 'pr-ps-buffer-preview)
3140 ;;;(global-set-key "\C-cbb" 'pr-ps-buffer-using-ghostscript)
3141 ;;;(global-set-key "\C-crp" 'pr-ps-region-print)
3142 ;;;(global-set-key "\C-crx" 'pr-ps-region-preview)
3143 ;;;(global-set-key "\C-crr" 'pr-ps-region-using-ghostscript)
3152 " ps-print.el version " ps-print-version
3190 24 | Help | |ps-print| |( )Even Sheets|
3235 See `pr-ps-utility-alist' and `pr-setting-database' for
3243 `pr-ps-utility-alist'.
3247 print the PostScript file generated. It depends on option 18, if it's
3251 Also, if you already have a PostScript file you can print it.
3253 save temporarily the PostScript code generated in a buffer and print it
3263 in `pr-ps-printer-alist' variable (see it for documentation).
3269 buffer and you want to print them in a text printer, select this
3277 5. If you want to print a directory, buffer, region or major mode in a
3289 8. If you want to have a header in each page in your PostScript code,
3292 9. If you want to draw a gaudy frame around the header, turn on this
3293 option. This option is enabled if print header is on (option 8).
3311 15. With this option, you can choose if you want to print all pages, odd
3313 See also `ps-even-or-odd-pages'.
3328 print PostScript files. In GNU or Unix system, if ghostscript is set
3336 like `*-region*' commands, that is, `*-buffer*' commands will print
3352 more PostScript options in `ps-print' option. Or you can customize
3356 23. Show current settings for `printing', `ps-print' or `lpr'.
3365 " ps-print.el version " ps-print-version
3379 Here you can choose to print/preview a buffer, a directory or a PostScript
3422 regexp means to print/preview all files in the directory.
3430 Specify an existent PostScript file to print/preview.
3434 See `pr-ps-utility-alist' and `pr-setting-database' for documentation.
3437 `pr-ps-utility-alist'.
3448 in `pr-ps-printer-alist' variable (see it for documentation).
3486 buffer and you want to print them in a text printer, select this
3495 To print a directory, buffer, region or major mode in a
3511 To have a header in each page in your PostScript code.
3514 To draw a gaudy frame around the header.
3539 like `*-region*' commands, that is, `*-buffer*' commands will print
3567 print PostScript files. In GNU or Unix system, if ghostscript is set
3571 To print all pages, odd pages, even pages, odd sheets or even sheets.
3572 See also `ps-even-or-odd-pages'.
3582 options in `ps-print' option. Or you can customize some `lpr' options for
3587 Show current settings for `printing', `ps-print' or `lpr'.
3615 (defun pr-ps-directory-preview (n-up dir file-regexp &optional filename)
3631 (interactive (pr-interactive-ps-dir-args (pr-prompt "PS preview dir")))
3632 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
3634 (setq filename (pr-ps-file filename))
3635 (pr-ps-file-list n-up dir file-regexp filename)
3637 (pr-ps-file-preview filename)))
3641 (defun pr-ps-directory-using-ghostscript (n-up dir file-regexp &optional filename)
3657 (interactive (pr-interactive-ps-dir-args (pr-prompt "PS print dir GS")))
3658 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
3659 (pr-prompt "PS print dir GS"))
3660 (let ((file (pr-ps-file filename)))
3661 (pr-ps-file-list n-up dir file-regexp file)
3662 (pr-ps-file-using-ghostscript file)
3667 (defun pr-ps-directory-print (n-up dir file-regexp &optional filename)
3683 (interactive (pr-interactive-ps-dir-args (pr-prompt "PS print dir")))
3684 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
3685 (pr-prompt "PS print dir"))
3686 (let ((file (pr-ps-file filename)))
3687 (pr-ps-file-list n-up dir file-regexp file)
3688 (pr-ps-file-print file)
3693 (defun pr-ps-directory-ps-print (n-up dir file-regexp &optional filename)
3696 It depends on `pr-print-using-ghostscript'.
3711 (interactive (pr-interactive-ps-dir-args
3712 (pr-prompt (pr-prompt-gs "PS print dir"))))
3713 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
3714 (pr-prompt (pr-prompt-gs "PS print dir")))
3716 (pr-ps-directory-using-ghostscript n-up dir file-regexp filename)
3717 (pr-ps-directory-print n-up dir file-regexp filename)))
3721 (defun pr-ps-buffer-preview (n-up &optional filename)
3734 (pr-ps-mode-preview n-up filename)
3735 (pr-ps-preview (pr-region-active-symbol) n-up filename
3740 (defun pr-ps-buffer-using-ghostscript (n-up &optional filename)
3751 (interactive (pr-interactive-n-up-file (pr-prompt "PS print GS")))
3753 (pr-ps-mode-using-ghostscript n-up filename)
3754 (pr-ps-using-ghostscript (pr-region-active-symbol) n-up filename
3755 (pr-region-active-string "PS print GS"))))
3759 (defun pr-ps-buffer-print (n-up &optional filename)
3770 (interactive (pr-interactive-n-up-file (pr-prompt "PS print")))
3772 (pr-ps-mode-print n-up filename)
3773 (pr-ps-print (pr-region-active-symbol) n-up filename
3774 (pr-region-active-string "PS print"))))
3778 (defun pr-ps-buffer-ps-print (n-up &optional filename)
3781 It depends on `pr-print-using-ghostscript'.
3792 (pr-prompt (pr-prompt-gs "PS print"))))
3794 (pr-ps-mode-ps-print n-up filename))
3796 (pr-ps-using-ghostscript (pr-region-active-symbol) n-up filename
3797 (pr-region-active-string "PS print GS")))
3799 (pr-ps-print (pr-region-active-symbol) n-up filename
3800 (pr-region-active-string "PS print")))))
3804 (defun pr-ps-region-preview (n-up &optional filename)
3807 See also `pr-ps-buffer-preview'."
3811 (pr-ps-mode-preview n-up filename))
3812 (pr-ps-preview 'region n-up filename "PS preview region")))
3816 (defun pr-ps-region-using-ghostscript (n-up &optional filename)
3819 See also `pr-ps-buffer-using-ghostscript'."
3820 (interactive (pr-interactive-n-up-file (pr-prompt-region "PS print GS")))
3823 (pr-ps-mode-using-ghostscript n-up filename))
3824 (pr-ps-using-ghostscript 'region n-up filename "PS print GS region")))
3828 (defun pr-ps-region-print (n-up &optional filename)
3831 See also `pr-ps-buffer-print'."
3832 (interactive (pr-interactive-n-up-file (pr-prompt-region "PS print")))
3835 (pr-ps-mode-print n-up filename))
3836 (pr-ps-print 'region n-up filename "PS print region")))
3840 (defun pr-ps-region-ps-print (n-up &optional filename)
3843 See also `pr-ps-buffer-ps-print'."
3845 (pr-prompt-region (pr-prompt-gs "PS print"))))
3848 (pr-ps-mode-ps-print n-up filename)))
3850 (pr-ps-using-ghostscript 'region n-up filename "PS print GS region"))
3852 (pr-ps-print 'region n-up filename "PS print region"))))
3856 (defun pr-ps-mode-preview (n-up &optional filename)
3859 See also `pr-ps-buffer-preview'."
3862 (let ((file (pr-ps-file filename)))
3863 (and (pr-ps-mode n-up file)
3865 (pr-ps-file-preview file))))
3869 (defun pr-ps-mode-using-ghostscript (n-up &optional filename)
3872 See also `pr-ps-buffer-using-ghostscript'."
3873 (interactive (pr-interactive-n-up-file "PS print GS mode"))
3874 (pr-set-n-up-and-filename 'n-up 'filename "PS print GS mode")
3875 (let ((file (pr-ps-file filename)))
3876 (when (and (pr-ps-mode n-up file)
3878 (pr-ps-file-using-ghostscript file)
3883 (defun pr-ps-mode-print (n-up &optional filename)
3886 See also `pr-ps-buffer-print'."
3887 (interactive (pr-interactive-n-up-file "PS print mode"))
3888 (pr-set-n-up-and-filename 'n-up 'filename "PS print mode")
3889 (pr-ps-mode n-up filename))
3893 (defun pr-ps-mode-ps-print (n-up &optional filename)
3896 See also `pr-ps-buffer-ps-print'."
3897 (interactive (pr-interactive-n-up-file (pr-prompt-gs "PS print mode")))
3899 (pr-ps-mode-using-ghostscript n-up filename)
3900 (pr-ps-mode-print n-up filename)))
3966 (pr-txt-print (point-min) (point-max)))))
3976 (pr-txt-print (point) (mark))))
4001 (interactive (list (ps-print-preprint current-prefix-arg)))
4002 (let ((file (pr-ps-file filename)))
4004 (pr-despool-print file)
4005 (pr-ps-file-preview file))))
4019 (interactive (list (ps-print-preprint current-prefix-arg)))
4020 (let ((file (pr-ps-file filename)))
4022 (pr-despool-print file)
4023 (pr-ps-file-using-ghostscript file)
4028 (defun pr-despool-print (&optional filename)
4038 (interactive (list (ps-print-preprint current-prefix-arg)))
4040 (let ((ps-lpr-command (pr-command pr-ps-command))
4041 (ps-lpr-switches pr-ps-switches)
4042 (ps-printer-name-option pr-ps-printer-switch)
4043 (ps-printer-name pr-ps-printer))
4044 (ps-despool filename))))
4048 (defun pr-despool-ps-print (&optional filename)
4049 "Send the spooled PostScript to the printer or use ghostscript to print it.
4058 (interactive (list (ps-print-preprint current-prefix-arg)))
4059 (if pr-print-using-ghostscript
4061 (pr-despool-print filename)))
4065 (defun pr-ps-file-preview (filename)
4067 (interactive (list (pr-ps-infile-preprint "Preview ")))
4073 (defun pr-ps-file-up-preview (n-up ifilename &optional ofilename)
4076 (let ((outfile (pr-ps-utility-args 'n-up 'ifilename 'ofilename
4078 (pr-ps-utility-process n-up ifilename outfile)
4079 (pr-ps-file-preview outfile)))
4083 (defun pr-ps-file-using-ghostscript (filename)
4085 (interactive (list (pr-ps-infile-preprint "Print preview ")))
4098 (pr-ps-file-print tempfile)
4104 (defun pr-ps-file-print (filename)
4106 (interactive (list (pr-ps-infile-preprint "Print ")))
4110 (if (string= pr-ps-command "")
4112 (let ((ps-spool-buffer (get-buffer-create ps-spool-buffer-name)))
4114 (set-buffer ps-spool-buffer)
4117 (pr-despool-print))
4118 ;; use `pr-ps-command' to print
4120 pr-ps-command
4121 (pr-switches-string pr-ps-switches "pr-ps-switches")
4122 (if (string-match "cp" pr-ps-command)
4125 (concat pr-ps-printer-switch pr-ps-printer))
4127 (list (concat pr-ps-printer-switch pr-ps-printer)
4132 (defun pr-ps-file-ps-print (filename)
4133 "Send PostScript file FILENAME to printer or use ghostscript to print it."
4134 (interactive (list (pr-ps-infile-preprint
4135 (if pr-print-using-ghostscript
4138 (if pr-print-using-ghostscript
4139 (pr-ps-file-using-ghostscript filename)
4140 (pr-ps-file-print filename)))
4144 (defun pr-ps-file-up-ps-print (n-up ifilename &optional ofilename)
4160 (if pr-print-using-ghostscript
4161 "PS print GS"
4162 "PS print")))
4163 (let ((outfile (pr-ps-utility-args 'n-up 'ifilename 'ofilename
4164 (if pr-print-using-ghostscript
4165 "PS print GS "
4166 "PS print "))))
4167 (pr-ps-utility-process n-up ifilename outfile)
4169 (pr-ps-file-ps-print outfile)
4268 (defun pr-toggle-header ()
4269 "Toggle printing header."
4271 (pr-toggle-header-menu t))
4275 (defun pr-toggle-header-frame ()
4276 "Toggle printing header frame."
4278 (pr-toggle-header-frame-menu t))
4324 (defun pr-ps-name ()
4327 (pr-menu-set-ps-title
4329 pr-ps-printer-alist pr-ps-name)))
4342 (defun pr-ps-utility ()
4347 pr-ps-utility-alist pr-ps-utility)))
4351 (defun pr-show-ps-setup (&rest ignore)
4352 "Show current ps-print settings."
4354 (pr-show-setup (ps-setup) "*PS Setup*"))
4376 (defun pr-ps-fast-fire (n-up &optional select)
4382 printed using `pr-ps-mode-ps-print'.
4387 M-x pr-ps-fast-fire RET
4391 C-u M-x pr-ps-fast-fire RET
4392 C-u 0 M-x pr-ps-fast-fire RET
4397 C-u 1 M-x pr-ps-fast-fire RET
4402 C-u 2 M-x pr-ps-fast-fire RET
4427 If it's a symbol which it's defined in `pr-ps-printer-alist', it's the new
4436 (interactive (list (pr-interactive-n-up (pr-prompt-gs "PS print fast"))
4443 (pr-ps-name))
4445 (assq select pr-ps-printer-alist))
4446 (pr-menu-set-ps-title select))
4449 (pr-ps-name))
4451 (setq filename (pr-ps-outfile-preprint
4452 (if pr-print-using-ghostscript
4455 (pr-ps-buffer-ps-print
4511 (let (ps-prefix-quote)
4513 #'ps-print-quote
4517 (ps-comment-string "emacs-version " emacs-version)
4518 (ps-comment-string "pr-txt-command " pr-txt-command)
4519 (ps-comment-string "pr-txt-switches "
4521 (ps-comment-string "pr-txt-printer " pr-txt-printer)
4522 (ps-comment-string "pr-ps-command " pr-ps-command)
4523 (ps-comment-string "pr-ps-switches "
4524 (pr-switches-string pr-ps-switches "pr-ps-switches"))
4525 (ps-comment-string "pr-ps-printer-switch" pr-ps-printer-switch)
4526 (ps-comment-string "pr-ps-printer " pr-ps-printer)
4527 (ps-comment-string "pr-cygwin-system " pr-cygwin-system)
4528 (ps-comment-string "ps-windows-system " ps-windows-system)
4529 (ps-comment-string "ps-lp-system " ps-lp-system)
4537 '(20 . pr-ps-name)
4538 '(20 . pr-ps-printer-alist)
4541 '(20 . pr-ps-temp-file)
4552 '(27 . pr-print-using-ghostscript)
4561 '(20 . pr-ps-utility)
4562 '(20 . pr-ps-utility-alist)
4590 (let (ps-prefix-quote)
4592 #'ps-print-quote
4595 (ps-comment-string "emacs-version" emacs-version)
4602 '(25 . print-region-function)
4603 '(25 . lpr-page-header-program)
4604 '(25 . lpr-page-header-switches)
4640 (defun pr-mh-print-1 (n-up filename header-list)
4645 (pr-mode-print n-up filename header-list (point)))))
4648 (defun pr-mh-lpr-1 (header-list)
4653 (pr-mode-lpr header-list (point)))))
4656 (defalias 'pr-mh-print-2 'pr-mode-print)
4663 ;; rmail (hacked from ps-print.el)
4666 (defun pr-rmail-lpr (header-list)
4668 (pr-lpr-message-from-summary header-list
4672 (defun pr-rmail-print (n-up filename header-list)
4674 (pr-ps-message-from-summary n-up filename header-list
4678 (defun pr-ps-message-from-summary (n-up filename header-list
4687 (pr-mode-print n-up filename header-list)))))
4690 (defun pr-lpr-message-from-summary (header-list summary-buffer summary-default)
4698 (pr-mode-lpr header-list)))))
4702 ;; gnus (hacked from ps-print.el)
4708 (defun pr-gnus-print (n-up filename header-list)
4710 (pr-ps-message-from-summary n-up filename header-list
4714 (defun pr-gnus-lpr (header-list)
4716 (pr-lpr-message-from-summary header-list
4721 ;; vm (hacked from ps-print.el)
4727 (defun pr-vm-print (n-up filename header-list)
4729 (pr-ps-message-from-summary n-up filename header-list
4733 (defun pr-vm-lpr (header-list)
4735 (pr-lpr-message-from-summary header-list
4743 (defun pr-ps-mode (n-up filename)
4744 "If current major mode is declared, print it in PostScript."
4755 (defmacro pr-local-variable (header-list &rest body)
4757 (let ((ps-header-lines (or (nth 0 ,header-list) ps-header-lines))
4758 (ps-left-header (or (nth 1 ,header-list) ps-left-header))
4759 (ps-right-header (or (nth 2 ,header-list) ps-right-header))
4760 ps-razzle-dazzle)
4761 (let ((local-var-list (pr-eval-local-alist (nthcdr 4 ,header-list))))
4763 (and (nth 3 ,header-list)
4767 (defun pr-mode-print (n-up filename header-list &optional from to)
4770 header-list
4771 (let ((file (pr-ps-file filename))
4782 (pr-ps-file-print file)
4786 (defun pr-mode-lpr (header-list &optional from to)
4789 header-list
4790 (pr-txt-print (cond (from)
4861 (ps-windows-system
4944 If FORCE is non-nil, update menus doesn't matter if `pr-ps-printer-alist',
4945 `pr-txt-printer-alist' or `pr-ps-utility-alist' were modified or not;
4946 otherwise, update PostScript printer menu iff `pr-ps-printer-menu-modified' is
4948 non-nil, and update PostScript File menus iff `pr-ps-utility-menu-modified' is
4953 (if pr-menu-print-item ; since v6.8.4
4959 (pr-update-var 'pr-ps-name pr-ps-printer-alist)
4961 (pr-update-var 'pr-ps-utility pr-ps-utility-alist)
4965 (defvar pr-ps-printer-menu-modified t
4966 "Non-nil means `pr-ps-printer-alist' was modified and we need to update menu.")
4969 (defvar pr-ps-utility-menu-modified t
4970 "Non-nil means `pr-ps-utility-alist' was modified and we need to update menu.")
5000 (defvar pr-ps-name-old "PostScript Printers")
5002 (defvar pr-ps-utility-old "PostScript Utility")
5007 (pr-menu-alist pr-ps-printer-alist
5008 'pr-ps-name
5009 'pr-menu-set-ps-title
5011 'pr-ps-printer-menu-modified
5013 pr-ps-name-old
5023 (let ((save-var pr-ps-utility-menu-modified))
5024 (pr-menu-alist pr-ps-utility-alist
5025 'pr-ps-utility
5030 pr-ps-utility-old
5032 (pr-menu-alist pr-ps-utility-alist
5033 'pr-ps-utility
5036 'pr-ps-utility-menu-modified
5038 pr-ps-utility-old
5040 (pr-even-or-odd-pages ps-even-or-odd-pages force))
5062 (defun pr-menu-set-ps-title (value &optional item entry index)
5064 'pr-ps-name-old)
5065 (pr-ps-set-printer value)
5082 (list "Printing" "PostScript Print" "File" pr-ps-utility-old)
5085 (list "Printing" "PostScript Preview" "File" pr-ps-utility-old)
5087 (setq pr-ps-utility-old newname)))
5088 (pr-ps-set-utility value)
5096 (setq ps-even-or-odd-pages value)
5107 (pr-menu-alist pr-ps-printer-alist
5108 'pr-ps-name
5109 'pr-menu-set-ps-title
5111 'pr-ps-printer-menu-modified
5123 (let ((save-var pr-ps-utility-menu-modified))
5124 (pr-menu-alist pr-ps-utility-alist
5125 'pr-ps-utility
5132 (pr-menu-alist pr-ps-utility-alist
5133 'pr-ps-utility
5136 'pr-ps-utility-menu-modified
5140 (pr-even-or-odd-pages ps-even-or-odd-pages force))
5182 (defun pr-menu-set-ps-title (value &optional item entry index)
5186 (pr-ps-set-printer value)
5212 (pr-ps-set-utility value)
5220 (setq ps-even-or-odd-pages value)
5225 (defun pr-ps-set-utility (value)
5226 (let ((item (cdr (assq value pr-ps-utility-alist))))
5229 "Invalid PostScript utility name `%s' for variable `pr-ps-utility'"
5231 (setq pr-ps-utility value)
5236 (defun pr-ps-set-printer (value)
5237 (let ((ps (cdr (assq value pr-ps-printer-alist))))
5238 (or ps
5240 "Invalid PostScript printer name `%s' for variable `pr-ps-name'"
5242 (setq pr-ps-name value
5243 pr-ps-command (pr-dosify-file-name (nth 0 ps))
5244 pr-ps-switches (nth 1 ps)
5245 pr-ps-printer-switch (nth 2 ps)
5246 pr-ps-printer (nth 3 ps))
5247 (or (stringp pr-ps-command)
5248 (setq pr-ps-command
5249 (cond (ps-windows-system "print")
5250 (ps-lp-system "lp")
5253 (or (stringp pr-ps-printer-switch)
5254 (setq pr-ps-printer-switch
5255 (cond (ps-windows-system "/D:")
5256 (ps-lp-system "-d")
5259 (pr-eval-alist (nthcdr 4 ps)))
5274 (cond (ps-windows-system "print")
5275 (ps-lp-system "lp")
5382 (pr-toggle 'pr-print-using-ghostscript "Printing using ghostscript"
5400 (pr-toggle 'ps-spool-duplex "Printing duplex"
5406 (pr-toggle 'ps-spool-tumble "Tumble"
5412 (pr-toggle 'ps-landscape-mode "Landscape"
5418 (pr-toggle 'ps-print-upside-down "Upside-Down"
5424 (pr-toggle 'ps-line-number "Line number"
5430 (pr-toggle 'ps-zebra-stripes "Zebra stripe"
5434 (defun pr-toggle-header-menu (&optional no-menu)
5436 (pr-toggle 'ps-print-header "Print header"
5440 (defun pr-toggle-header-frame-menu (&optional no-menu)
5442 (pr-toggle 'ps-print-header-frame "Print header frame"
5498 (print-help-return-message)))
5522 (defun pr-ps-outfile-preprint (&optional mess)
5544 (defun pr-ps-infile-preprint (&optional mess)
5564 (defun pr-ps-utility-args (n-up-sym infile-sym outfile-sym prompt)
5571 (set infile-sym (pr-ps-infile-preprint prompt)))
5578 (pr-ps-outfile-preprint prompt))))
5581 (pr-ps-file (symbol-value outfile-sym)))
5584 (defun pr-ps-utility-process (n-up infile outfile)
5588 (setq item (cdr (assq pr-ps-utility pr-ps-utility-alist)))
5591 "pr-ps-utility-alist entry")
5593 "pr-ps-utility-alist entry")
5595 (format (nth 2 item) ps-paper-type))
5649 (defun pr-txt-print (from to)
5666 (ps-flatten-list ; dynamic evaluation
5667 (mapcar 'ps-eval-switch switches)))
5670 (defun pr-ps-preview (kind n-up filename mess)
5672 (let ((file (pr-ps-file filename)))
5674 (or pr-spool-p (pr-ps-file-preview file))))
5677 (defun pr-ps-using-ghostscript (kind n-up filename mess)
5679 (let ((file (pr-ps-file filename)))
5682 (pr-ps-file-using-ghostscript file)
5686 (defun pr-ps-print (kind n-up filename mess)
5688 (let ((file (pr-ps-file filename)))
5691 (pr-ps-file-print file)
5695 (defun pr-ps-file (&optional filename)
5699 (expand-file-name pr-ps-temp-file pr-temp-dir))
5700 nil ".ps"))))
5725 (fmt-prompt (concat "%s[" mess "] Directory to print: "))
5743 (pr-f-read-string (format "[%s] File regexp to print: " mess) "" nil ""))
5754 (defun pr-interactive-ps-dir-args (mess)
5764 (ps-print-preprint current-prefix-arg))))
5773 (ps-print-preprint current-prefix-arg))))
5781 (pr-ps-infile-preprint (concat mess " "))
5783 (ps-print-preprint current-prefix-arg)))
5790 (ps-print-preprint current-prefix-arg))))
5812 (defun pr-set-ps-dir-args (n-up-sym dir-sym regexp-sym filename-sym mess)
5824 (find-buffer-visiting (if ps-windows-system
5870 (defun pr-ps-file-list (n-up dir file-regexp filename)
5876 (pr-ps-mode n-up filename)
5879 (pr-despool-print filename)))
5884 (let ((ps-n-up-printing n-up)
5885 (ps-spool-config (and (eq ps-spool-config 'setpagedevice)
5893 (ps-spool-buffer-with-faces))
5895 (ps-spool-region-with-faces (or from (point))
5900 (ps-print-buffer-with-faces filename))
5902 (ps-print-region-with-faces (or from (point))
5909 (ps-spool-buffer))
5911 (ps-spool-region (or from (point)) (or to (mark))))
5915 (ps-print-buffer filename))
5917 (ps-print-region (or from (point)) (or to (mark)) filename))
5940 (ps-windows-system 'windows)
5977 (if ps-windows-system
5997 ;; Printing Interface (inspired on ps-print-interface.el)
6011 (defvar pr-i-ps-as-is t)
6015 (defvar pr-i-ps-file "")
6019 (defvar pr-i-ps-send 'printer)
6045 pr-i-region (ps-mark-active-p)
6050 (put 'pr-i-ps-send 'pr-widget-list nil)
6056 ;; header
6058 " ps-print v" ps-print-version)))
6114 (setq pr-i-region (ps-mark-active-p)
6125 (ps-mark-active-p))))
6199 pr-i-ps-file)
6201 (pr-insert-menu "PostScript Utility" 'pr-ps-utility
6202 (pr-choice-alist pr-ps-utility-alist)
6206 (pr-insert-toggle 'pr-i-ps-as-is " No Preprocessing"))
6213 (pr-insert-menu "PostScript Printer" 'pr-ps-name
6214 (pr-choice-alist pr-ps-printer-alist))
6231 (pr-insert-button 'pr-interface-ps-print "Print" " ")
6234 (pr-insert-radio-button 'pr-i-ps-send 'printer)
6237 (pr-insert-radio-button 'pr-i-ps-send 'file)
6278 (pr-insert-button 'pr-interface-txt-print "Print" " ")
6285 (pr-insert-checkbox "\n\n " 'ps-landscape-mode
6287 (setq ps-landscape-mode (not ps-landscape-mode)
6288 pr-file-landscape ps-landscape-mode))
6294 (pr-insert-toggle 'ps-print-header " Print Header ")
6298 (pr-insert-toggle 'ps-print-header-frame " Print Header Frame ")
6302 (pr-insert-toggle 'ps-line-number " Line Number\n ")
6305 (pr-insert-toggle 'ps-zebra-stripes " Zebra Stripes")
6317 'ps-spool-duplex
6319 (setq ps-spool-duplex (not ps-spool-duplex)
6320 pr-file-duplex ps-spool-duplex))
6326 'ps-spool-tumble
6328 (setq ps-spool-tumble (not ps-spool-tumble)
6329 pr-file-tumble ps-spool-tumble))
6331 (pr-insert-toggle 'pr-print-using-ghostscript " Print via Ghostscript\n ")
6334 (pr-insert-toggle 'ps-print-upside-down " Upside-Down")
6336 (pr-insert-menu "Page Parity" 'ps-even-or-odd-pages
6350 (pr-insert-button #'(lambda (&rest ignore) (ps-print-customize))
6351 "ps-print" " ")
6359 (pr-insert-button 'pr-show-ps-setup "ps-print" " ")
6399 (defun pr-interface-txt-print (&rest ignore)
6456 (defun pr-interface-ps-print (&rest ignore)
6457 "Print using ps-print package."
6459 (pr-interface-ps 'pr-despool-ps-print 'pr-ps-directory-ps-print
6460 'pr-ps-file-ps-print 'pr-ps-file-up-ps-print
6461 'pr-ps-region-ps-print 'pr-ps-mode-ps-print
6462 'pr-ps-buffer-ps-print))
6468 (pr-interface-ps 'pr-despool-preview 'pr-ps-directory-preview
6469 'pr-ps-file-preview 'pr-ps-file-up-preview
6470 'pr-ps-region-preview 'pr-ps-mode-preview
6471 'pr-ps-buffer-preview))
6474 (defun pr-interface-ps (ps-despool ps-directory ps-file ps-file-up ps-region
6475 ps-mode ps-buffer)
6477 (let ((outfile (or (and (eq pr-i-process 'file) pr-i-ps-as-is)
6478 (pr-i-ps-send))))
6482 (funcall ps-despool outfile))
6488 (funcall ps-directory
6491 (cond ((or (file-directory-p pr-i-ps-file)
6492 (not (file-readable-p pr-i-ps-file)))
6494 (pr-i-ps-as-is
6496 (funcall ps-file pr-i-ps-file)))
6499 (funcall ps-file-up pr-i-n-up pr-i-ps-file outfile)))
6505 (funcall ps-region pr-i-n-up outfile)))
6508 (funcall ps-mode pr-i-n-up outfile)))
6511 (funcall ps-buffer pr-i-n-up outfile)))
6522 (defun pr-i-ps-send ()
6523 (cond ((eq pr-i-ps-send 'printer)
6525 ((not (eq pr-i-ps-send 'file))
6526 (error "Internal error: `pr-i-ps-send' = %S" pr-i-ps-send))
6561 (setq pr-i-ps-file file))))