Mercurial > emacs
comparison lisp/ps-print.el @ 91086:5843af4ba940
Error if ps-lpr-switches is not a list.
author | Vinicius Jose Latorre <viniciusjl@ig.com.br> |
---|---|
date | Sun, 11 Nov 2007 14:14:30 +0000 |
parents | 880960b70474 |
children | 4545186b2d4c |
comparison
equal
deleted
inserted
replaced
91085:880960b70474 | 91086:5843af4ba940 |
---|---|
1478 | 1478 |
1479 | 1479 |
1480 ;; Load XEmacs/Emacs definitions | 1480 ;; Load XEmacs/Emacs definitions |
1481 (eval-and-compile (require 'ps-def)) | 1481 (eval-and-compile (require 'ps-def)) |
1482 | 1482 |
1483 (defun ps-face-background-name (face) | |
1484 (if (featurep 'xemacs) | |
1485 (ps-xemacs-color-name (face-background face)) | |
1486 (face-background face nil t))) | |
1487 | 1483 |
1488 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1484 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
1489 ;; User Variables: | 1485 ;; User Variables: |
1490 | 1486 |
1491 | 1487 |
5829 ps-basic-plot-string-function 'ps-basic-plot-string | 5825 ps-basic-plot-string-function 'ps-basic-plot-string |
5830 ps-encode-header-string-function nil) | 5826 ps-encode-header-string-function nil) |
5831 ;; initialize page dimensions | 5827 ;; initialize page dimensions |
5832 (ps-get-page-dimensions) | 5828 (ps-get-page-dimensions) |
5833 ;; final check | 5829 ;; final check |
5830 (unless (listp ps-lpr-switches) | |
5831 (error "`ps-lpr-switches' value should be a list.")) | |
5834 (and ps-color-p | 5832 (and ps-color-p |
5835 (equal ps-default-background ps-default-foreground) | 5833 (equal ps-default-background ps-default-foreground) |
5836 (error | 5834 (error |
5837 (concat | 5835 (concat |
5838 "`ps-default-fg' and `ps-default-bg' have the same color.\n" | 5836 "`ps-default-fg' and `ps-default-bg' have the same color.\n" |
6512 (let* ((coding-system-for-write 'raw-text-unix) | 6510 (let* ((coding-system-for-write 'raw-text-unix) |
6513 (ps-printer-name (or ps-printer-name | 6511 (ps-printer-name (or ps-printer-name |
6514 (and (boundp 'printer-name) | 6512 (and (boundp 'printer-name) |
6515 (symbol-value 'printer-name)))) | 6513 (symbol-value 'printer-name)))) |
6516 (ps-lpr-switches | 6514 (ps-lpr-switches |
6517 (append (if (listp ps-lpr-switches) | 6515 (append ps-lpr-switches |
6518 ps-lpr-switches | |
6519 (list ps-lpr-switches)) | |
6520 (and (stringp ps-printer-name) | 6516 (and (stringp ps-printer-name) |
6521 (string< "" ps-printer-name) | 6517 (string< "" ps-printer-name) |
6522 (list (concat | 6518 (list (concat |
6523 (and (stringp ps-printer-name-option) | 6519 (and (stringp ps-printer-name-option) |
6524 ps-printer-name-option) | 6520 ps-printer-name-option) |