SL Baur <steve(a)xemacs.org> writes:
 This is *not* theoretical discussion.  We have source code for all
of
 this and there is *no excuse* for not reading source code when it is
 available. 
So I did. A patch that makes the new ps-print work for me on XEmacs as
at least good as the current one[1] is attached below.
Even the Zebra stripes work.
 it as I initially suggested.  Attempt to bytecompile it with a
no-Mule
 XEmacs (or even a Mule XEmacs 21.1 for that matter) and look at where
 and how things break. 
Do you mean that it breaks during bytecompiling? I didn't try  that
yet. I also fail to see how that is relevant for the packaging.
[I just tried bytecompiling. Nothing special happened]
Off course getting the Mule characters to actually print correctly is
something completely different. However I think ps-print (and
X-symbol) are very special in needing so much information.
I fail to see how that hurts keeping a no-mule version.
 Envision other FSF lisp code being modified
 along the same lines. 
I think there is a lot of hope if everything is done this way. The
Mule stuff is nicely isolated off into its own files. The only gripe I
have that we still need to convince Handa san and Tomihiko to not use
this APEL style compatibility stuff.
Footnotes: 
[1]  i.e. the faces don't always come out right. Same as with the
current version/
Here is the patch. It is ugly and needs some cond's and if's, but if works.
diff -u /u/users/vroonhof/scratch/xemacs/ps-print.el.handa
/u/users/vroonhof/scratch/xemacs/ps-print.el
--- /u/users/vroonhof/scratch/xemacs/ps-print.el.handa	Wed Jun 30 13:23:50 1999
+++ /u/users/vroonhof/scratch/xemacs/ps-print.el	Wed Jun 30 13:23:50 1999
@@ -406,6 +406,8 @@
 ;; Control And 8-bit Characters
 ;; ----------------------------
 ;;
+;; #### This doesn't work yet for us. JV/XEmacs
+;; 
 ;; The variable `ps-print-control-characters' specifies whether you want to see
 ;; a printable form for control and 8-bit characters, that is, instead of
 ;; sending, for example, a ^D (\004) to printer, it is sent the string "^D".
@@ -955,10 +957,11 @@
 	  (make-variable-buffer-local 'enable-multibyte-characters)
 	(defun charset-after (&optional arg)
 	  (char-charset (char-after arg))))
-      (defun set-buffer-multibyte (arg)
-	(setq enable-multibyte-characters arg))
-      (defun string-as-unibyte (arg) arg)
-      (defun string-as-multibyte (arg) arg)
+; No Handa San this kind of stuff is bad.      
+;      (defun set-buffer-multibyte (arg)
+;	(setq enable-multibyte-characters arg))
+;      (defun string-as-unibyte (arg) arg)
+;      (defun string-as-multibyte (arg) arg)
       (defun line-beginning-position ()
 	(save-excursion (beginning-of-line) (point)))
       (defun line-end-position ()
@@ -1485,11 +1488,8 @@
      (avg-char-width . 5.67027))
     ;; got no bold and no italic for the next ones
     (Symbol
-     (fonts (normal . "Symbol"))
-     (size . 10.0)
-     (line-height . 13.03)
-     (space-width . 2.5)
-     (avg-char-width . 3.24324))
+     "Symbol" "Symbol" "Symbol" "Symbol"
+     10.0 13.03 2.5     3.24324)
     (Zapf-Dingbats
      (fonts (normal . "Zapf-Dingbats"))
      (size . 10.0)
@@ -3176,7 +3176,7 @@
 (defun ps-output-string-prim (string)
   (insert "(")				;insert start-string delimiter
   (save-excursion			;insert string
-    (insert (string-as-unibyte string)))
+    (insert string)) ; (string-as-unibyte string)))
   ;; Find and quote special characters as necessary for PS
   ;; This skips everything except control chars, non-ASCII chars, (, ) and \.
   (while (progn (skip-chars-forward " -'*-[]-~") (not (eobp)))
@@ -3587,10 +3587,10 @@
 	ps-header-title-font-size-internal
 	(ps-get-font-size 'ps-header-title-font-size)
 	ps-control-or-escape-regexp
-	(cond ((eq ps-print-control-characters '8-bit)
-	       (string-as-unibyte "[\000-\037\177-\377]"))
-	      ((eq ps-print-control-characters 'control-8-bit)
-	       (string-as-unibyte "[\000-\037\177-\237]"))
+	(cond ;; ((eq ps-print-control-characters '8-bit)
+	      ;; (string-as-unibyte "[\000-\037\177-\377]"))
+	      ;; ((eq ps-print-control-characters 'control-8-bit)
+	      ;; (string-as-unibyte "[\000-\037\177-\237]"))
 	      ((eq ps-print-control-characters 'control)
 	       "[\000-\037\177]")
 	      (t "[\t\n\f]"))))
@@ -3648,7 +3648,8 @@
   (ps-set-font  ps-current-font)
   (ps-set-bg    ps-current-bg)
   (ps-set-color ps-current-color)
-  (ps-mule-begin-page))
+  ; (ps-mule-begin-page)
+  )
 
 (defun ps-end-page ()
   (ps-output "EndPage\nEndDSCPage\n"))
@@ -3689,7 +3690,7 @@
 				       (ps-avg-char-width 'ps-font-for-text)))
 	 (to (car wrappoint))
 	 (string (buffer-substring-no-properties from to)))
-    (ps-mule-prepare-ascii-font string)
+;;    (ps-mule-prepare-ascii-font string)
     (ps-output-string string)
     (ps-output " S\n")
     wrappoint))
@@ -3781,7 +3782,7 @@
 	  (let* ((match-point (match-beginning 0))
 		 (match (char-after match-point)))
 	    (when (< from match-point)
-	      (ps-mule-set-ascii-font)
+	      ;; (ps-mule-set-ascii-font)
 	      (ps-plot 'ps-basic-plot-string from match-point bg-color))
 	    (cond
 	     ((= match ?\t)		; tab
@@ -3789,7 +3790,7 @@
 		(forward-char -1)
 		(setq from (+ linestart (current-column)))
 		(when (re-search-forward "[ \t]+" to t)
-		  (ps-mule-set-ascii-font)
+		  ;; (s-mule-set-ascii-font)
 		  (ps-plot 'ps-basic-plot-whitespace
 			   from (+ linestart (current-column))
 			   bg-color))))
@@ -3804,18 +3805,19 @@
 		       (= ps-height-remaining ps-print-height))
 		  (ps-next-page)))
 
-	     ((> match 255)		; a multi-byte character
-	      (let ((charset (char-charset match)))
-		(or (eq charset 'composition)
-		    (while (eq (charset-after) charset)
-		      (forward-char 1)))
-		(ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
+;	     ((> match 255)		; a multi-byte character
+;	      (let ((charset (char-charset match)))
+;		(or (eq charset 'composition)
+;		    (while (eq (charset-after) charset)
+;		      (forward-char 1)))
+;		(ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
 					; characters from ^@ to ^_ and
+	     
 	     (t				; characters from 127 to 255
 	      (ps-control-character match)))
 	    (setq from (point)))
 	;; region without control characters nor multi-byte characters
-	(ps-mule-set-ascii-font)
+;	(ps-mule-set-ascii-font)
 	(ps-plot 'ps-basic-plot-string from to bg-color)
 	(setq from to)))))
 
@@ -3848,7 +3850,7 @@
     (if (< (car wrappoint) to)
 	(ps-continue-line))
     (setq ps-width-remaining (- ps-width-remaining (* len char-width)))
-    (ps-mule-prepare-ascii-font str)
+;    (ps-mule-prepare-ascii-font str)
     (ps-output-string str)
     (ps-output " S\n")))
 
@@ -4208,7 +4210,7 @@
 	  (unwind-protect
 	      (progn
 		(set-buffer ps-spool-buffer)
-		(set-buffer-multibyte nil)
+		;; (set-buffer-multibyte nil)
 
 		;; Get a marker and make it point to the current end of the
 		;; buffer,  If an error occurs, we'll delete everything from
@@ -4224,8 +4226,9 @@
 		  (ps-begin-job)
 		  (when needs-begin-file
 		    (ps-begin-file)
-		    (ps-mule-initialize))
-		  (ps-mule-begin-job from to)
+		    ; (ps-mule-initialize)
+		    )
+		  ; (ps-mule-begin-job from to)
 		  (ps-begin-page))
 		(set-buffer ps-source-buffer)
 		(funcall genfunc from to)
@@ -4554,36 +4557,36 @@
 ;; To make this file smaller, some commands go in a separate file.
 ;; But autoload them here to make the separation invisible.
 
-(autoload 'ps-mule-prepare-ascii-font "ps-mule"
-  "Setup special ASCII font for STRING.
-STRING should contain only ASCII characters.")
+;(autoload 'ps-mule-prepare-ascii-font "ps-mule"
+;  "Setup special ASCII font for STRING.
+;STRING should contain only ASCII characters.")
 
-(autoload 'ps-mule-set-ascii-font     "ps-mule"
-  "Adjust current font if current charset is not ASCII.")
+;(autoload 'ps-mule-set-ascii-font     "ps-mule"
+;  "Adjust current font if current charset is not ASCII.")
 
-(autoload 'ps-mule-plot-string        "ps-mule"
-  "Generate PostScript code for ploting characters in the region FROM and TO.
+;(autoload 'ps-mule-plot-string        "ps-mule"
+;  "Generate PostScript code for ploting characters in the region FROM and TO.
 
-It is assumed that all characters in this region belong to the same charset.
+;It is assumed that all characters in this region belong to the same charset.
 
-Optional argument BG-COLOR specifies background color.
+;Optional argument BG-COLOR specifies background color.
 
-Returns the value:
+;Returns the value:
 
-	(ENDPOS . RUN-WIDTH)
+;	(ENDPOS . RUN-WIDTH)
 
-Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of
-the sequence.")
+;Where ENDPOS is the end position of the sequence and RUN-WIDTH is the width of
+;the sequence.")
 
-(autoload 'ps-mule-initialize         "ps-mule"
-  "Initialize global data for printing multi-byte characters.")
+;(autoload 'ps-mule-initialize         "ps-mule"
+;  "Initialize global data for printing multi-byte characters.")
 
-(autoload 'ps-mule-begin-job          "ps-mule"
-  "Start printing job for multi-byte chars between FROM and TO.
-This checks if all multi-byte characters in the region are printable or not.")
+;(autoload 'ps-mule-begin-job          "ps-mule"
+;  "Start printing job for multi-byte chars between FROM and TO.
+;This checks if all multi-byte characters in the region are printable or not.")
 
-(autoload 'ps-mule-begin-page         "ps-mule"
-  "Initialize multi-byte charset for printing current page.")
+;(autoload 'ps-mule-begin-page         "ps-mule"
+;  "Initialize multi-byte charset for printing current page.")
 
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-- 
Jan Vroonhof                    
http://www.math.ethz.ch/~vroonhof/
Mathematik,                               vroonhof @  math.ethz.ch
HG E16, ETH-Zentrum,                      Tel: +41-1-6325456/25154
Raemistrasse 101, CH-8092 Zuerich.              Fax: +41-1-6321085