aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa1999-12-15 00:38:58 +0000
committerKenichi Handa1999-12-15 00:38:58 +0000
commit9d4d60c169ef4c9b1769a710cf8a74c964521856 (patch)
treee1f93852cd1a4ea1247ca45f7040e23ea748d952
parentd0da93b3a1c4a3751fefcb085e88c1ee70128a79 (diff)
downloademacs-9d4d60c169ef4c9b1769a710cf8a74c964521856.tar.gz
emacs-9d4d60c169ef4c9b1769a710cf8a74c964521856.zip
(ps-plot-region): Handle new composition.
-rw-r--r--lisp/ps-print.el23
1 files changed, 19 insertions, 4 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 1f68b6e46eb..6a62ffec180 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -4709,7 +4709,16 @@ EndDSCPage\n")
4709 (if (re-search-forward ps-control-or-escape-regexp to t) 4709 (if (re-search-forward ps-control-or-escape-regexp to t)
4710 ;; region with some control characters or some multi-byte characters 4710 ;; region with some control characters or some multi-byte characters
4711 (let* ((match-point (match-beginning 0)) 4711 (let* ((match-point (match-beginning 0))
4712 (match (char-after match-point))) 4712 (match (char-after match-point))
4713 (composition (find-composition from (1+ match-point))))
4714 (if composition
4715 (if (and (nth 2 composition)
4716 (<= (car composition) match-point))
4717 (progn
4718 (setq match-point (car composition)
4719 match 0)
4720 (goto-char (nth 1 composition)))
4721 (setq composition nil)))
4713 (when (< from match-point) 4722 (when (< from match-point)
4714 (ps-mule-set-ascii-font) 4723 (ps-mule-set-ascii-font)
4715 (ps-plot 'ps-basic-plot-string from match-point bg-color)) 4724 (ps-plot 'ps-basic-plot-string from match-point bg-color))
@@ -4734,13 +4743,19 @@ EndDSCPage\n")
4734 (= ps-height-remaining ps-print-height)) 4743 (= ps-height-remaining ps-print-height))
4735 (ps-next-page))) 4744 (ps-next-page)))
4736 4745
4746 (composition ; a composite sequence
4747 (ps-plot 'ps-mule-plot-composition match-point (point) bg-color))
4748
4749 ; characters from ^@ to ^_ and
4737 ((> match 255) ; a multi-byte character 4750 ((> match 255) ; a multi-byte character
4738 (let ((charset (char-charset match))) 4751 (let* ((charset (char-charset match))
4752 (composition (find-composition match-point to))
4753 (stop (if (nth 2 composition) (car composition) to)))
4739 (or (eq charset 'composition) 4754 (or (eq charset 'composition)
4740 (while (eq (charset-after) charset) 4755 (while (and (< (point) stop) (eq (charset-after) charset))
4741 (forward-char 1))) 4756 (forward-char 1)))
4742 (ps-plot 'ps-mule-plot-string match-point (point) bg-color))) 4757 (ps-plot 'ps-mule-plot-string match-point (point) bg-color)))
4743 ; characters from ^@ to ^_ and 4758
4744 (t ; characters from 127 to 255 4759 (t ; characters from 127 to 255
4745 (ps-control-character match))) 4760 (ps-control-character match)))
4746 (setq from (point))) 4761 (setq from (point)))