diff options
| author | Eli Zaretskii | 1998-04-28 13:50:24 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 1998-04-28 13:50:24 +0000 |
| commit | 0140c6007b26bb13428eb16c5f8c3c94e38fb1a1 (patch) | |
| tree | 0819f25459c08868fd5b81898442b2c2b5159819 /lisp | |
| parent | c1a2f60a9caa4b6a19a5499a207e80a1bc3b1e3d (diff) | |
| download | emacs-0140c6007b26bb13428eb16c5f8c3c94e38fb1a1.tar.gz emacs-0140c6007b26bb13428eb16c5f8c3c94e38fb1a1.zip | |
(ps-remove-duplicates): New function.
(ps-begin-file): Use it.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ps-print.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el index e0f292cd06c..212c10b1977 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el | |||
| @@ -3142,6 +3142,16 @@ page-height == bm + print-height + tm - ho - hh | |||
| 3142 | (and has-local-background (ps-output "} def\n")))) | 3142 | (and has-local-background (ps-output "} def\n")))) |
| 3143 | 3143 | ||
| 3144 | 3144 | ||
| 3145 | ;; Return a list of the distinct elements of LIST. | ||
| 3146 | ;; Elements are compared with `equal'. | ||
| 3147 | (defun ps-remove-duplicates (list) | ||
| 3148 | (let (new (tail list)) | ||
| 3149 | (while tail | ||
| 3150 | (or (member (car tail) new) | ||
| 3151 | (setq new (cons (car tail) new))) | ||
| 3152 | (setq tail (cdr tail))) | ||
| 3153 | (nreverse new))) | ||
| 3154 | |||
| 3145 | (defun ps-begin-file () | 3155 | (defun ps-begin-file () |
| 3146 | (ps-get-page-dimensions) | 3156 | (ps-get-page-dimensions) |
| 3147 | (setq ps-showline-count (if ps-printing-region (car ps-printing-region) 1) | 3157 | (setq ps-showline-count (if ps-printing-region (car ps-printing-region) 1) |
| @@ -3161,11 +3171,10 @@ page-height == bm + print-height + tm - ho - hh | |||
| 3161 | (if ps-landscape-mode "Landscape" "Portrait") | 3171 | (if ps-landscape-mode "Landscape" "Portrait") |
| 3162 | "\n%% DocumentFonts: Times-Roman Times-Italic " | 3172 | "\n%% DocumentFonts: Times-Roman Times-Italic " |
| 3163 | (mapconcat 'identity | 3173 | (mapconcat 'identity |
| 3164 | (remove-duplicates | 3174 | (ps-remove-duplicates |
| 3165 | (append (ps-fonts 'ps-font-for-text) | 3175 | (append (ps-fonts 'ps-font-for-text) |
| 3166 | (list (ps-font 'ps-font-for-header 'normal) | 3176 | (list (ps-font 'ps-font-for-header 'normal) |
| 3167 | (ps-font 'ps-font-for-header 'bold))) | 3177 | (ps-font 'ps-font-for-header 'bold)))) |
| 3168 | :test 'equal) | ||
| 3169 | " ") | 3178 | " ") |
| 3170 | "\n%%Pages: (atend)\n" | 3179 | "\n%%Pages: (atend)\n" |
| 3171 | "%%EndComments\n\n") | 3180 | "%%EndComments\n\n") |