aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2004-09-08 07:22:26 +0000
committerKenichi Handa2004-09-08 07:22:26 +0000
commitc52da52ac5a697e2ead060c41dfa61415851d50e (patch)
treed0666d54f59a37a1c6041268959b8dccfb31d8d2
parent59a2dac080b1c1bbd3f55f3b2095344c2f5f82fb (diff)
downloademacs-c52da52ac5a697e2ead060c41dfa61415851d50e.tar.gz
emacs-c52da52ac5a697e2ead060c41dfa61415851d50e.zip
Fix old function calls (ps-mule-chars-in-string ->
length, ps-mule-string-char -> aref, ps-mule-next-index -> 1+, ps-mule-next-point -> 1+).
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/ps-mule.el18
2 files changed, 17 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d06f94a9a14..15817deab50 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12004-09-08 Kenichi Handa <handa@m17n.org>
2
3 * ps-mule.el: Fix old function calls (ps-mule-chars-in-string ->
4 length, ps-mule-string-char -> aref, ps-mule-next-index -> 1+,
5 ps-mule-next-point -> 1+).
6
7 * composite.el (encode-composition-rule): Add autoload cooky.
8
12004-09-07 Luc Teirlinck <teirllm@auburn.edu> 92004-09-07 Luc Teirlinck <teirllm@auburn.edu>
2 10
3 * format.el (buffer-auto-save-file-format): Make it permanent local. 11 * format.el (buffer-auto-save-file-format): Make it permanent local.
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index fe9d7350398..ec7b3b22fca 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -418,21 +418,21 @@ See also `ps-mule-font-info-database-bdf'.")
418 418
419(defun ps-mule-encode-bit (string delta) 419(defun ps-mule-encode-bit (string delta)
420 (let* ((dim (charset-dimension (char-charset (string-to-char string)))) 420 (let* ((dim (charset-dimension (char-charset (string-to-char string))))
421 (len (* (ps-mule-chars-in-string string) dim)) 421 (len (* (length string) dim))
422 (str (make-string len 0)) 422 (str (make-string len 0))
423 (i 0) 423 (i 0)
424 (j 0)) 424 (j 0))
425 (if (= dim 1) 425 (if (= dim 1)
426 (while (< j len) 426 (while (< j len)
427 (aset str j 427 (aset str j
428 (+ (nth 1 (split-char (ps-mule-string-char string i))) delta)) 428 (+ (nth 1 (split-char (aref string i))) delta))
429 (setq i (ps-mule-next-index string i) 429 (setq i (1+ i)
430 j (1+ j))) 430 j (1+ j)))
431 (while (< j len) 431 (while (< j len)
432 (let ((split (split-char (ps-mule-string-char string i)))) 432 (let ((split (split-char (aref string i))))
433 (aset str j (+ (nth 1 split) delta)) 433 (aset str j (+ (nth 1 split) delta))
434 (aset str (1+ j) (+ (nth 2 split) delta)) 434 (aset str (1+ j) (+ (nth 2 split) delta))
435 (setq i (ps-mule-next-index string i) 435 (setq i (1+ i)
436 j (+ j 2))))) 436 j (+ j 2)))))
437 str)) 437 str))
438 438
@@ -468,13 +468,13 @@ See also `ps-mule-font-info-database-bdf'.")
468 468
469;; Special encoding for mule-unicode-* characters. 469;; Special encoding for mule-unicode-* characters.
470(defun ps-mule-encode-ucs2 (string) 470(defun ps-mule-encode-ucs2 (string)
471 (let* ((len (ps-mule-chars-in-string string)) 471 (let* ((len (length string))
472 (str (make-string (* 2 len) 0)) 472 (str (make-string (* 2 len) 0))
473 (i 0) 473 (i 0)
474 (j 0) 474 (j 0)
475 ch hi lo) 475 ch hi lo)
476 (while (< i len) 476 (while (< i len)
477 (setq ch (encode-char (ps-mule-string-char string i) 'ucs) 477 (setq ch (encode-char (aref string i) 'ucs)
478 hi (lsh ch -8) 478 hi (lsh ch -8)
479 lo (logand ch 255)) 479 lo (logand ch 255))
480 (aset str j hi) 480 (aset str j hi)
@@ -796,7 +796,7 @@ the sequence."
796 (cons from ps-width-remaining) 796 (cons from ps-width-remaining)
797 (cons (if composition 797 (cons (if composition
798 (nth 1 composition) 798 (nth 1 composition)
799 (ps-mule-next-point from)) 799 (1+ from))
800 run-width))) 800 run-width)))
801 ;; We assume that all characters in this range have the same width. 801 ;; We assume that all characters in this range have the same width.
802 (setq char-width (* char-width (charset-width ps-mule-current-charset))) 802 (setq char-width (* char-width (charset-width ps-mule-current-charset)))
@@ -849,7 +849,7 @@ the sequence."
849 849
850 ;; This case is obsolete for Emacs 21. 850 ;; This case is obsolete for Emacs 21.
851 ((eq ps-mule-current-charset 'composition) 851 ((eq ps-mule-current-charset 'composition)
852 (ps-mule-plot-composition from (ps-mule-next-point from) bg-color)) 852 (ps-mule-plot-composition from (1+ from) bg-color))
853 853
854 (t 854 (t
855 ;; No way to print this charset. Just show a vacant box of an 855 ;; No way to print this charset. Just show a vacant box of an