Mercurial > emacs
changeset 21800:d4b4f44ce8da
(ps-remove-duplicates): New function.
(ps-begin-file): Use it.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Tue, 28 Apr 1998 13:50:24 +0000 |
parents | 7a44b61e263b |
children | 4e224c003b52 |
files | lisp/ps-print.el |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ps-print.el Tue Apr 28 09:35:07 1998 +0000 +++ b/lisp/ps-print.el Tue Apr 28 13:50:24 1998 +0000 @@ -3142,6 +3142,16 @@ (and has-local-background (ps-output "} def\n")))) +;; Return a list of the distinct elements of LIST. +;; Elements are compared with `equal'. +(defun ps-remove-duplicates (list) + (let (new (tail list)) + (while tail + (or (member (car tail) new) + (setq new (cons (car tail) new))) + (setq tail (cdr tail))) + (nreverse new))) + (defun ps-begin-file () (ps-get-page-dimensions) (setq ps-showline-count (if ps-printing-region (car ps-printing-region) 1) @@ -3161,11 +3171,10 @@ (if ps-landscape-mode "Landscape" "Portrait") "\n%% DocumentFonts: Times-Roman Times-Italic " (mapconcat 'identity - (remove-duplicates + (ps-remove-duplicates (append (ps-fonts 'ps-font-for-text) (list (ps-font 'ps-font-for-header 'normal) - (ps-font 'ps-font-for-header 'bold))) - :test 'equal) + (ps-font 'ps-font-for-header 'bold)))) " ") "\n%%Pages: (atend)\n" "%%EndComments\n\n")