• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +refs:ps +refs:prefix +refs:quote

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.
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
164 ;; (setq pr-ps-name 'lps_06b)
165 ;; (setq pr-ps-printer-alist
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
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
349 ;; pr-despool-ps-print
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.
406 ;; `*-ps-print' send PostScript directly to printer or use
420 ;; `pr-ps-buffer-using-ghostscript'
423 ;; `pr-ps-file-print'
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)
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.
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'.
750 ;; in `pr-ps-printer-alist' variable (see it for documentation).
800 ;; See also `ps-even-or-odd-pages'.
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
908 ;; (setq pr-ps-name 'lps_06b)
909 ;; (setq pr-ps-printer-alist
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'.
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")
1058 (defun make-temp-file (prefix &optional dir-flag suffix)
1080 (expand-file-name prefix temporary-file-directory)))
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)))
1178 :prefix "pr-"
1186 ps-windows-system)
1227 (if (or pr-cygwin-system ps-windows-system)
1333 (ps-windows-system "PRN")
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)))
1509 `pr-ps-name' variable setting and for menu selection.
1601 forget to quote symbols and constant lists.
1607 '(ps-landscape-mode . nil)
1608 '(ps-spool-duplex . t)
1651 (setq pr-ps-printer-alist
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-"
1771 "*Specify PostScript temporary file name prefix.
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'."
2018 (ps-article-author ps-article-subject)
2025 (ps-article-author ps-article-subject)
2032 (ps-article-subject ps-article-author buffer-name)
2039 (ps-article-subject ps-article-author buffer-name)
2046 (ps-article-subject ps-article-author gnus-newsgroup-name)
2053 (ps-article-subject ps-article-author gnus-newsgroup-name)
2060 (ps-info-node ps-info-file)
2067 (ps-article-subject ps-article-author buffer-name)
2131 `ps-header-lines' value.
2135 uses `ps-left-header' value.
2139 uses `ps-right-header' value.
2156 forget to quote symbols and constant lists.
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.
2336 forget to quote symbols and constant lists.
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
2557 forget to quote symbols and constant lists.
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'
2694 (list (regexp-quote pr-buffer-name) ; ignore printing interface buffer
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'.")
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
2985 :style toggle :selected ps-print-header
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
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)])
3047 ["ps-print" ps-print-customize t]
3051 ["ps-print" pr-show-ps-setup t]
3107 "ps-print-buffer-faces" "ps-print-region-faces"
3108 "ps-print-buffer" "ps-print-region"))
3125 (global-set-key `[,pr-print-key] 'pr-ps-fast-fire)
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)
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'.
3263 in `pr-ps-printer-alist' variable (see it for documentation).
3313 See also `ps-even-or-odd-pages'.
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
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).
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)
3619 file name regexp for matching and, when you use a prefix argument (C-u), the
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)
3645 file name regexp for matching and, when you use a prefix argument (C-u), the
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
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)
3671 file name regexp for matching and, when you use a prefix argument (C-u), the
3683 (interactive (pr-interactive-ps-dir-args (pr-prompt "PS print dir")))
3684 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
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)
3699 file name regexp for matching and, when you use a prefix argument (C-u), the
3711 (interactive (pr-interactive-ps-dir-args
3713 (pr-set-ps-dir-args 'n-up 'dir 'file-regexp 'filename
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)
3725 prefix argument (C-u), the command prompts the user for a file name, and saves
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)
3744 prefix argument (C-u), the command prompts the user for a file name, and saves
3753 (pr-ps-mode-using-ghostscript n-up filename)
3754 (pr-ps-using-ghostscript (pr-region-active-symbol) n-up filename
3759 (defun pr-ps-buffer-print (n-up &optional filename)
3763 prefix argument (C-u), the command prompts the user for a file name, and saves
3772 (pr-ps-mode-print n-up filename)
3773 (pr-ps-print (pr-region-active-symbol) n-up filename
3778 (defun pr-ps-buffer-ps-print (n-up &optional filename)
3784 prefix argument (C-u), the command prompts the user for a file name, and saves
3794 (pr-ps-mode-ps-print n-up filename))
3796 (pr-ps-using-ghostscript (pr-region-active-symbol) n-up filename
3799 (pr-ps-print (pr-region-active-symbol) n-up filename
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'."
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'."
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'."
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'."
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'."
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'."
3899 (pr-ps-mode-using-ghostscript n-up filename)
3900 (pr-ps-mode-print n-up filename)))
3994 Interactively, when you use a prefix argument (C-u), the command prompts the
4001 (interactive (list (ps-print-preprint current-prefix-arg)))
4002 (let ((file (pr-ps-file filename)))
4005 (pr-ps-file-preview file))))
4012 Interactively, when you use a prefix argument (C-u), the command prompts the
4019 (interactive (list (ps-print-preprint current-prefix-arg)))
4020 (let ((file (pr-ps-file filename)))
4023 (pr-ps-file-using-ghostscript file)
4031 Interactively, when you use a prefix argument (C-u), the command prompts the
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)
4051 Interactively, when you use a prefix argument (C-u), the command prompts the
4058 (interactive (list (ps-print-preprint current-prefix-arg)))
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)
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)
4134 (interactive (list (pr-ps-infile-preprint
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)
4148 PostScript file IFILENAME and, when you use a prefix argument (C-u), the
4163 (let ((outfile (pr-ps-utility-args 'n-up 'ifilename 'ofilename
4167 (pr-ps-utility-process n-up ifilename outfile)
4169 (pr-ps-file-ps-print outfile)
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
4437 current-prefix-arg))
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
4455 (pr-ps-buffer-ps-print
4471 Interactively, when you use a prefix argument (C-u), the command prompts the
4486 (interactive (list current-prefix-arg))
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)
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)
4663 ;; rmail (hacked from ps-print.el)
4674 (pr-ps-message-from-summary n-up filename header-list
4678 (defun pr-ps-message-from-summary (n-up filename header-list
4702 ;; gnus (hacked from ps-print.el)
4710 (pr-ps-message-from-summary n-up filename header-list
4721 ;; vm (hacked from ps-print.el)
4729 (pr-ps-message-from-summary n-up filename header-list
4743 (defun pr-ps-mode (n-up filename)
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)
4771 (let ((file (pr-ps-file filename))
4782 (pr-ps-file-print file)
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
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.")
4988 (list fun (list 'quote sym) nil (list 'quote entry) index)
4990 :selected (list 'eq var-sym (list 'quote sym)))))
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")
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"
5436 (pr-toggle 'ps-print-header "Print header"
5442 (pr-toggle 'ps-print-header-frame "Print header frame"
5488 (defun pr-region-active-string (prefix)
5489 (concat prefix
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)))
5577 (set outfile-sym (and current-prefix-arg
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))
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"))))
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)))
5789 (set filename-sym (and 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)
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)
6058 " ps-print v" ps-print-version)))
6105 (cons (list 'quote
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)
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))
6334 (pr-insert-toggle 'ps-print-upside-down " Upside-Down")
6336 (pr-insert-menu "Page Parity" 'ps-even-or-odd-pages
6338 (list 'quote
6350 (pr-insert-button #'(lambda (&rest ignore) (ps-print-customize))
6351 "ps-print" " ")
6359 (pr-insert-button 'pr-show-ps-setup "ps-print" " ")
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))))
6636 :value (eq ,var-sym (quote ,sym))
6638 (setq ,var-sym (quote ,sym))
6639 (pr-update-radio-button (quote ,var-sym)))))))
6668 'quote