aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2021-05-29 07:38:00 +0200
committerLars Ingebrigtsen2021-05-29 07:38:00 +0200
commit22520811e2054df1d7a61691faa2c203bf3bbda0 (patch)
tree78d3ecc8f30f634728c7043a6b15119e0a1f4d01
parent30c09a16744ccc108689c66b283c1c7b6abe010c (diff)
downloademacs-22520811e2054df1d7a61691faa2c203bf3bbda0.tar.gz
emacs-22520811e2054df1d7a61691faa2c203bf3bbda0.zip
Fix folding of non-ASCII lines when printing to Postscript
* lisp/ps-mule.el (ps-mule-plot-string): Fix folding of non-ASCII Latin-1 lines (bug#17758).
-rw-r--r--lisp/ps-mule.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index a8b5210e965..ab8af40628a 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -673,7 +673,7 @@ the sequence."
673 (not (vectorp (aref (nth 2 composition) 0)))) 673 (not (vectorp (aref (nth 2 composition) 0))))
674 (car composition) 674 (car composition)
675 to)) 675 to))
676 (ascii-or-latin-1 "[\000-\377]+") 676 (ascii-or-latin-1 "[\000-ΓΏ]+")
677 (run-width 0) 677 (run-width 0)
678 (endpos nil) 678 (endpos nil)
679 (font-spec-table (aref ps-mule-font-spec-tables 679 (font-spec-table (aref ps-mule-font-spec-tables
@@ -699,6 +699,7 @@ the sequence."
699 (setq composition (find-composition (point) to nil t)) 699 (setq composition (find-composition (point) to nil t))
700 (setq stop (if composition (car composition) to))))) 700 (setq stop (if composition (car composition) to)))))
701 701
702 ;; We fold lines that contain ASCII or Latin-1.
702 ((looking-at ascii-or-latin-1) 703 ((looking-at ascii-or-latin-1)
703 (let ((nchars (- (min (match-end 0) stop) (point)))) 704 (let ((nchars (- (min (match-end 0) stop) (point))))
704 (setq width (* average-width nchars)) 705 (setq width (* average-width nchars))
@@ -710,6 +711,7 @@ the sequence."
710 (setq run-width (+ run-width width)) 711 (setq run-width (+ run-width width))
711 (forward-char nchars)))) 712 (forward-char nchars))))
712 713
714 ;; Don't fold other lines. (But why?)
713 (t 715 (t
714 (while (and (< (point) stop) (not endpos)) 716 (while (and (< (point) stop) (not endpos))
715 (setq width (char-width (following-char))) 717 (setq width (char-width (following-char)))