diff options
| author | Richard M. Stallman | 2002-09-10 16:49:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-09-10 16:49:47 +0000 |
| commit | c90a10faa90317c43df7a31cefb96274a9c1b526 (patch) | |
| tree | 5203241c911377bbae75be518564a7c1b13ff053 | |
| parent | 0b9e474953bbf5b9168821b7f86cf2a349aae511 (diff) | |
| download | emacs-c90a10faa90317c43df7a31cefb96274a9c1b526.tar.gz emacs-c90a10faa90317c43df7a31cefb96274a9c1b526.zip | |
(ps-printer-name-option): Doc fix.
Adjust ps-postscript-code-directory setting. XEmacs
version check was adjusted.
(ps-print-version): New version number (6.5.6).
(ps-print-color-p, ps-page-dimensions-database): Autoload var.
(ps-print-code, ps-print-preprint-region): Adjust code.
| -rw-r--r-- | lisp/ps-print.el | 66 |
1 files changed, 44 insertions, 22 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index d9f8db977ee..54fbf2d6c85 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -10,12 +10,12 @@ | |||
| 10 | ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) | 10 | ;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
| 11 | ;; Vinicius Jose Latorre <vinicius@cpqd.com.br> | 11 | ;; Vinicius Jose Latorre <vinicius@cpqd.com.br> |
| 12 | ;; Keywords: wp, print, PostScript | 12 | ;; Keywords: wp, print, PostScript |
| 13 | ;; Time-stamp: <2001/09/17 14:50:19 vinicius> | 13 | ;; Time-stamp: <2002/09/06 20:11:00 vinicius> |
| 14 | ;; Version: 6.5.5 | 14 | ;; Version: 6.5.6 |
| 15 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 15 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ |
| 16 | 16 | ||
| 17 | (defconst ps-print-version "6.5.5" | 17 | (defconst ps-print-version "6.5.6" |
| 18 | "ps-print.el, v 6.5.5 <2001/09/17 vinicius> | 18 | "ps-print.el, v 6.5.6 <2002/09/06 vinicius> |
| 19 | 19 | ||
| 20 | Vinicius's last change version -- this file may have been edited as part of | 20 | Vinicius's last change version -- this file may have been edited as part of |
| 21 | Emacs without changes to the version number. When reporting bugs, please also | 21 | Emacs without changes to the version number. When reporting bugs, please also |
| @@ -1507,7 +1507,14 @@ Please send all bug fixes and enhancements to | |||
| 1507 | (defconst ps-windows-system | 1507 | (defconst ps-windows-system |
| 1508 | (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt))) | 1508 | (memq system-type '(emx win32 w32 mswindows ms-dos windows-nt))) |
| 1509 | (defconst ps-lp-system | 1509 | (defconst ps-lp-system |
| 1510 | (memq system-type '(usg-unix-v dgux hpux irix)))) | 1510 | (memq system-type '(usg-unix-v dgux hpux irix))) |
| 1511 | |||
| 1512 | |||
| 1513 | (defvar ps-print-emacs-type | ||
| 1514 | (cond ((string-match "XEmacs" emacs-version) 'xemacs) | ||
| 1515 | ((string-match "Lucid" emacs-version) 'lucid) | ||
| 1516 | ((string-match "Epoch" emacs-version) 'epoch) | ||
| 1517 | (t 'emacs)))) | ||
| 1511 | 1518 | ||
| 1512 | 1519 | ||
| 1513 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1520 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| @@ -1735,10 +1742,11 @@ the string \"/D:\". | |||
| 1735 | 1742 | ||
| 1736 | For any other printing utility, see its documentation. | 1743 | For any other printing utility, see its documentation. |
| 1737 | 1744 | ||
| 1738 | Set this to \"\" or nil, if the utility given by `ps-lpr-command' needs an empty | 1745 | Set this to \"\" or nil, if the utility given by `ps-lpr-command' |
| 1739 | printer name option. | 1746 | needs an empty printer name option--that is, pass the printer name |
| 1747 | with no special option preceding it. | ||
| 1740 | 1748 | ||
| 1741 | Any other value is treated as nil, that is, an empty printer name option. | 1749 | Any value that is not a string is treated as nil. |
| 1742 | 1750 | ||
| 1743 | This variable is used only when `ps-printer-name' is a non-empty string." | 1751 | This variable is used only when `ps-printer-name' is a non-empty string." |
| 1744 | :type '(choice :menu-tag "Printer Name Option" | 1752 | :type '(choice :menu-tag "Printer Name Option" |
| @@ -1808,6 +1816,7 @@ If it's nil, automatic feeding takes place." | |||
| 1808 | ;; B4 10.125 inch x 14.33 inch | 1816 | ;; B4 10.125 inch x 14.33 inch |
| 1809 | ;; B5 7.16 inch x 10.125 inch | 1817 | ;; B5 7.16 inch x 10.125 inch |
| 1810 | 1818 | ||
| 1819 | ;;;###autoload | ||
| 1811 | (defcustom ps-page-dimensions-database | 1820 | (defcustom ps-page-dimensions-database |
| 1812 | (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") | 1821 | (list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4") |
| 1813 | (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") | 1822 | (list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3") |
| @@ -2853,6 +2862,9 @@ uses the fonts resident in your printer." | |||
| 2853 | ;;; Colors | 2862 | ;;; Colors |
| 2854 | 2863 | ||
| 2855 | ;; Printing color requires x-color-values. | 2864 | ;; Printing color requires x-color-values. |
| 2865 | ;; XEmacs change: Need autoload for the "Options->Printing->Color Printing" | ||
| 2866 | ;; widget to work. | ||
| 2867 | ;;;###autoload | ||
| 2856 | (defcustom ps-print-color-p | 2868 | (defcustom ps-print-color-p |
| 2857 | (or (and (fboundp 'color-values) ; Emacs | 2869 | (or (and (fboundp 'color-values) ; Emacs |
| 2858 | (ps-e-color-values "Green")) | 2870 | (ps-e-color-values "Green")) |
| @@ -3137,9 +3149,16 @@ It's like the very first character of buffer (or region) is ^L (\\014)." | |||
| 3137 | :group 'ps-print-headers) | 3149 | :group 'ps-print-headers) |
| 3138 | 3150 | ||
| 3139 | (defcustom ps-postscript-code-directory | 3151 | (defcustom ps-postscript-code-directory |
| 3140 | (or (and (fboundp 'locate-data-directory) ; xemacs | 3152 | (or (cond |
| 3141 | (locate-data-directory "ps-print")) | 3153 | ((eq ps-print-emacs-type 'emacs) ; emacs |
| 3142 | data-directory) ; emacs | 3154 | data-directory) |
| 3155 | ((fboundp 'locate-data-directory) ; emacsens (xemacs, etc.) | ||
| 3156 | (locate-data-directory "ps-print")) | ||
| 3157 | ((boundp 'data-directory) ; emacsens (xemacs, etc.) | ||
| 3158 | data-directory) | ||
| 3159 | (t ; don't know what to do | ||
| 3160 | nil)) | ||
| 3161 | (error "ps-postscript-code-directory isn't set properly")) | ||
| 3143 | "*Directory where it's located the PostScript prologue file used by ps-print. | 3162 | "*Directory where it's located the PostScript prologue file used by ps-print. |
| 3144 | By default, this directory is the same as in the variable `data-directory'." | 3163 | By default, this directory is the same as in the variable `data-directory'." |
| 3145 | :type 'directory | 3164 | :type 'directory |
| @@ -3520,9 +3539,9 @@ generated is: | |||
| 3520 | 3539 | ||
| 3521 | If `ps-prefix-quote' is nil, it's set to t after generating string." | 3540 | If `ps-prefix-quote' is nil, it's set to t after generating string." |
| 3522 | (cond | 3541 | (cond |
| 3523 | ((null elt) "") | ||
| 3524 | ((stringp elt) elt) | 3542 | ((stringp elt) elt) |
| 3525 | (t | 3543 | ((and (consp elt) (integerp (car elt)) |
| 3544 | (symbolp (cdr elt)) (boundp (cdr elt))) | ||
| 3526 | (let* ((col (car elt)) | 3545 | (let* ((col (car elt)) |
| 3527 | (sym (cdr elt)) | 3546 | (sym (cdr elt)) |
| 3528 | (key (symbol-name sym)) | 3547 | (key (symbol-name sym)) |
| @@ -3540,6 +3559,7 @@ If `ps-prefix-quote' is nil, it's set to t after generating string." | |||
| 3540 | ((eq val t) "t") | 3559 | ((eq val t) "t") |
| 3541 | ((or (symbolp val) (listp val)) (format "'%S" val)) | 3560 | ((or (symbolp val) (listp val)) (format "'%S" val)) |
| 3542 | (t (format "%S" val)))))) | 3561 | (t (format "%S" val)))))) |
| 3562 | (t "") | ||
| 3543 | )) | 3563 | )) |
| 3544 | 3564 | ||
| 3545 | 3565 | ||
| @@ -3597,14 +3617,10 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." | |||
| 3597 | 3617 | ||
| 3598 | 3618 | ||
| 3599 | (eval-and-compile | 3619 | (eval-and-compile |
| 3600 | (defvar ps-print-emacs-type | ||
| 3601 | (cond ((string-match "XEmacs" emacs-version) 'xemacs) | ||
| 3602 | ((string-match "Lucid" emacs-version) 'lucid) | ||
| 3603 | ((string-match "Epoch" emacs-version) 'epoch) | ||
| 3604 | (t 'emacs))) | ||
| 3605 | |||
| 3606 | (if (memq ps-print-emacs-type '(lucid xemacs)) | 3620 | (if (memq ps-print-emacs-type '(lucid xemacs)) |
| 3607 | (if (< emacs-minor-version 12) | 3621 | ;; XEmacs change: Need to check for emacs-major-version too. |
| 3622 | (if (or (< emacs-major-version 19) | ||
| 3623 | (and (= emacs-major-version 19) (< emacs-minor-version 12))) | ||
| 3608 | (setq ps-print-color-p nil)) | 3624 | (setq ps-print-color-p nil)) |
| 3609 | (require 'faces)) ; face-font, face-underline-p, | 3625 | (require 'faces)) ; face-font, face-underline-p, |
| 3610 | ; x-font-regexp | 3626 | ; x-font-regexp |
| @@ -3614,7 +3630,10 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'." | |||
| 3614 | ;; can handle colors. | 3630 | ;; can handle colors. |
| 3615 | ;; This function is not yet implemented for GNU emacs. | 3631 | ;; This function is not yet implemented for GNU emacs. |
| 3616 | (cond ((and (eq ps-print-emacs-type 'xemacs) | 3632 | (cond ((and (eq ps-print-emacs-type 'xemacs) |
| 3617 | (>= emacs-minor-version 12)) ; xemacs | 3633 | ;; XEmacs change: Need to check for emacs-major-version too. |
| 3634 | (or (> emacs-major-version 19) | ||
| 3635 | (and (= emacs-major-version 19) | ||
| 3636 | (>= emacs-minor-version 12)))) ; xemacs >= 19.12 | ||
| 3618 | (defun ps-color-device () | 3637 | (defun ps-color-device () |
| 3619 | (eq (ps-x-device-class) 'color))) | 3638 | (eq (ps-x-device-class) 'color))) |
| 3620 | 3639 | ||
| @@ -4411,7 +4430,10 @@ page-height == ((floor print-height ((th + ls) * zh)) * ((th + ls) * zh)) - th | |||
| 4411 | 4430 | ||
| 4412 | 4431 | ||
| 4413 | (defun ps-print-preprint-region (prefix-arg) | 4432 | (defun ps-print-preprint-region (prefix-arg) |
| 4414 | (or mark-active | 4433 | (or (and (fboundp 'mark-active) |
| 4434 | (mark-active)) | ||
| 4435 | (and (fboundp 'region-active-p) | ||
| 4436 | (region-active-p)) | ||
| 4415 | (error "The mark is not set now")) | 4437 | (error "The mark is not set now")) |
| 4416 | (list (point) (mark) (ps-print-preprint prefix-arg))) | 4438 | (list (point) (mark) (ps-print-preprint prefix-arg))) |
| 4417 | 4439 | ||