summaryrefslogtreecommitdiff
path: root/lisp/ps-mule.el
diff options
context:
space:
mode:
authorVinicius Jose Latorre <viniciusjl@ig.com.br>2003-05-15 02:32:03 +0000
committerVinicius Jose Latorre <viniciusjl@ig.com.br>2003-05-15 02:32:03 +0000
commitedf0b0c5ec4e028cee93a763a6246c22f62d2d81 (patch)
tree347db0fdc2ca7461c3dd65fc697513ec4b5fcb86 /lisp/ps-mule.el
parentc55b5fadffbde743eec765c0df4f162089b2627a (diff)
downloademacs-edf0b0c5ec4e028cee93a763a6246c22f62d2d81.tar.gz
Avoid unnecessary calls to funs in header and footer variables
Diffstat (limited to 'lisp/ps-mule.el')
-rw-r--r--lisp/ps-mule.el46
1 files changed, 14 insertions, 32 deletions
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index 7bb9f6145a7..a20853959be 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -1,13 +1,14 @@
;;; ps-mule.el --- provide multi-byte character facility to ps-print
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003
+;; Free Software Foundation, Inc.
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Vinicius Jose Latorre <vinicius@cpqd.com.br>
;; Keywords: wp, print, PostScript, multibyte, mule
-;; Time-stamp: <2001/08/15 15:34:11 vinicius>
+;; Time-stamp: <2003/05/14 22:19:41 vinicius>
;; This file is part of GNU Emacs.
@@ -1439,36 +1440,17 @@ FONTTAG should be a string \"/h0\" or \"/h1\"."
;;;###autoload
(defun ps-mule-header-string-charsets ()
"Return a list of character sets that appears in header strings."
- (let ((str ""))
- (when ps-print-header
- (let ((tail (list ps-left-header ps-right-header)))
- (while tail
- ;; Simulate what is done by ps-generate-header-line to get a
- ;; string to plot.
- (let ((count 0)
- (tmp (car tail)))
- (setq tail (cdr tail))
- (while (and tmp (< count ps-header-lines))
- (let ((elt (car tmp)))
- (setq tmp (cdr tmp)
- count (1+ count)
- str (concat str
- (cond ((stringp elt) elt)
- ((and (symbolp elt) (fboundp elt))
- (funcall elt))
- ((and (symbolp elt) (boundp elt))
- (symbol-value elt))
- (t ""))))))))))
- (let ((len (length str))
- (i 0)
- charset-list)
- (while (< i len)
- (let ((charset (char-charset (aref str i))))
- (setq i (1+ i))
- (or (eq charset 'ascii)
- (memq charset charset-list)
- (setq charset-list (cons charset charset-list)))))
- charset-list)))
+ (let* ((str (ps-header-footer-string))
+ (len (length str))
+ (i 0)
+ charset-list)
+ (while (< i len)
+ (let ((charset (char-charset (aref str i))))
+ (setq i (1+ i))
+ (or (eq charset 'ascii)
+ (memq charset charset-list)
+ (setq charset-list (cons charset charset-list)))))
+ charset-list))
;;;###autoload
(defun ps-mule-begin-job (from to)