1 |
;;; ps-mule.el --- provide multi-byte character facility to ps-print |
;;; ps-mule.el --- provide multi-byte character facility to ps-print |
2 |
|
|
3 |
;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 |
4 |
|
;; Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> |
;; Author: Vinicius Jose Latorre <vinicius@cpqd.com.br> |
7 |
;; Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
;; Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
8 |
;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters) |
9 |
;; Vinicius Jose Latorre <vinicius@cpqd.com.br> |
;; Vinicius Jose Latorre <vinicius@cpqd.com.br> |
10 |
;; Keywords: wp, print, PostScript, multibyte, mule |
;; Keywords: wp, print, PostScript, multibyte, mule |
11 |
;; Time-stamp: <2001/08/15 15:34:11 vinicius> |
;; Time-stamp: <2003/05/14 22:19:41 vinicius> |
12 |
|
|
13 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
14 |
|
|
1440 |
;;;###autoload |
;;;###autoload |
1441 |
(defun ps-mule-header-string-charsets () |
(defun ps-mule-header-string-charsets () |
1442 |
"Return a list of character sets that appears in header strings." |
"Return a list of character sets that appears in header strings." |
1443 |
(let ((str "")) |
(let* ((str (ps-header-footer-string)) |
1444 |
(when ps-print-header |
(len (length str)) |
1445 |
(let ((tail (list ps-left-header ps-right-header))) |
(i 0) |
1446 |
(while tail |
charset-list) |
1447 |
;; Simulate what is done by ps-generate-header-line to get a |
(while (< i len) |
1448 |
;; string to plot. |
(let ((charset (char-charset (aref str i)))) |
1449 |
(let ((count 0) |
(setq i (1+ i)) |
1450 |
(tmp (car tail))) |
(or (eq charset 'ascii) |
1451 |
(setq tail (cdr tail)) |
(memq charset charset-list) |
1452 |
(while (and tmp (< count ps-header-lines)) |
(setq charset-list (cons charset charset-list))))) |
1453 |
(let ((elt (car tmp))) |
charset-list)) |
|
(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))) |
|
1454 |
|
|
1455 |
;;;###autoload |
;;;###autoload |
1456 |
(defun ps-mule-begin-job (from to) |
(defun ps-mule-begin-job (from to) |