Mercurial > emacs
comparison lisp/ps-print.el @ 84877:0cff28bd3f6b
(ps-background, ps-begin-file, ps-build-reference-face-lists):
Use `mapc' rather than `mapcar'.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Tue, 25 Sep 2007 11:12:22 +0000 |
parents | 1c18e395fd3e |
children | f17129d066f0 |
comparison
equal
deleted
inserted
replaced
84876:0755bdd211b9 | 84877:0cff28bd3f6b |
---|---|
5026 ps-print-background-image)) | 5026 ps-print-background-image)) |
5027 | 5027 |
5028 | 5028 |
5029 (defun ps-background (page-number) | 5029 (defun ps-background (page-number) |
5030 (let (has-local-background) | 5030 (let (has-local-background) |
5031 (mapcar #'(lambda (range) | 5031 (mapc #'(lambda (range) |
5032 (and (<= (aref range 0) page-number) | 5032 (and (<= (aref range 0) page-number) |
5033 (<= page-number (aref range 1)) | 5033 (<= page-number (aref range 1)) |
5034 (if has-local-background | 5034 (if has-local-background |
5035 (ps-output (aref range 2)) | 5035 (ps-output (aref range 2)) |
5036 (setq has-local-background t) | 5036 (setq has-local-background t) |
5037 (ps-output "/printLocalBackground{\n" | 5037 (ps-output "/printLocalBackground{\n" |
5038 (aref range 2))))) | 5038 (aref range 2))))) |
5039 ps-background-pages) | 5039 ps-background-pages) |
5040 (and has-local-background (ps-output "}def\n")))) | 5040 (and has-local-background (ps-output "}def\n")))) |
5041 | 5041 |
5042 | 5042 |
5043 ;; Return a list of the distinct elements of LIST. | 5043 ;; Return a list of the distinct elements of LIST. |
5044 ;; Elements are compared with `equal'. | 5044 ;; Elements are compared with `equal'. |
5670 (setq ps-background-all-pages (nreverse ps-background-all-pages) | 5670 (setq ps-background-all-pages (nreverse ps-background-all-pages) |
5671 ps-background-pages (nreverse ps-background-pages)) | 5671 ps-background-pages (nreverse ps-background-pages)) |
5672 | 5672 |
5673 (ps-output "\n" ps-print-prologue-1 | 5673 (ps-output "\n" ps-print-prologue-1 |
5674 "\n/printGlobalBackground{\n") | 5674 "\n/printGlobalBackground{\n") |
5675 (mapcar 'ps-output ps-background-all-pages) | 5675 (mapc 'ps-output ps-background-all-pages) |
5676 (ps-output | 5676 (ps-output |
5677 "}def\n/printLocalBackground{\n}def\n" | 5677 "}def\n/printLocalBackground{\n}def\n" |
5678 "\n%%EndProlog\n\n%%BeginSetup\n" | 5678 "\n%%EndProlog\n\n%%BeginSetup\n" |
5679 "\n%%IncludeResource: font Times-Roman" | 5679 "\n%%IncludeResource: font Times-Roman" |
5680 "\n%%IncludeResource: font Times-Italic" | 5680 "\n%%IncludeResource: font Times-Italic" |
6457 ;; `font-lock-face-attributes' (obsolete stuff) | 6457 ;; `font-lock-face-attributes' (obsolete stuff) |
6458 (ps-font-lock-face-attributes) | 6458 (ps-font-lock-face-attributes) |
6459 ;; Now, rebuild reference face lists | 6459 ;; Now, rebuild reference face lists |
6460 (setq ps-print-face-alist nil) | 6460 (setq ps-print-face-alist nil) |
6461 (if ps-auto-font-detect | 6461 (if ps-auto-font-detect |
6462 (mapcar 'ps-map-face (face-list)) | 6462 (mapc 'ps-map-face (face-list)) |
6463 (mapcar 'ps-set-face-bold ps-bold-faces) | 6463 (mapc 'ps-set-face-bold ps-bold-faces) |
6464 (mapcar 'ps-set-face-italic ps-italic-faces) | 6464 (mapc 'ps-set-face-italic ps-italic-faces) |
6465 (mapcar 'ps-set-face-underline ps-underlined-faces)) | 6465 (mapc 'ps-set-face-underline ps-underlined-faces)) |
6466 (setq ps-build-face-reference nil)) | 6466 (setq ps-build-face-reference nil)) |
6467 | 6467 |
6468 | 6468 |
6469 (defun ps-set-face-bold (face) | 6469 (defun ps-set-face-bold (face) |
6470 (ps-set-face-attribute face 1)) | 6470 (ps-set-face-attribute face 1)) |