/[emacs]/emacs/lisp/ps-mule.el
ViewVC logotype

Diff of /emacs/lisp/ps-mule.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30.2.3 by miles, Sat Sep 4 09:24:35 2004 UTC revision 1.30.2.4 by miles, Sat Sep 4 09:26:22 2004 UTC
# Line 213  Any other value is treated as nil." Line 213  Any other value is treated as nil."
213                   (const bdf-font-except-latin) (const :tag "nil" nil))                   (const bdf-font-except-latin) (const :tag "nil" nil))
214    :group 'ps-print-font)    :group 'ps-print-font)
215    
   
 (eval-and-compile  
   ;; For Emacs 20.2 and the earlier version.  
   (if (and (boundp 'mule-version)  
            (not (string< (symbol-value 'mule-version) "4.0")))  
       ;; mule package is loaded  
       (progn  
         (defalias 'ps-mule-next-point '1+)  
         (defalias 'ps-mule-chars-in-string 'length)  
         (defalias 'ps-mule-string-char 'aref)  
         (defsubst ps-mule-next-index (str i) (1+ i)))  
     ;; mule package isn't loaded or mule version lesser than 4.0  
     (defun ps-mule-next-point (arg)  
       (save-excursion (goto-char arg) (forward-char 1) (point)))  
     (defun ps-mule-chars-in-string (string)  
       (/ (length string)  
          (charset-bytes (char-charset (string-to-char string)))))  
     (defun ps-mule-string-char (string idx)  
       (string-to-char (substring string idx)))  
     (defun ps-mule-next-index (string i)  
       (+ i (charset-bytes (char-charset (string-to-char string)))))  
     )  
   ;; For Emacs 20.4 and the earlier version.  
   (if (and (boundp 'mule-version)  
            (string< (symbol-value 'mule-version) "5.0"))  
       ;; mule package is loaded and mule version is lesser than 5.0  
       (progn  
         (defun encode-composition-rule (rule)  
           (if (= (car rule) 4) (setcar rule 10))  
           (if (= (cdr rule) 4) (setcdr rule 10))  
           (+ (* (car rule) 12) (cdr rule)))  
         (defun find-composition (pos &rest ignore)  
           (let ((ch (char-after pos)))  
             (and ch (eq (char-charset ch) 'composition)  
                  (let ((components (decompose-composite-char ch 'vector t)))  
                    (list pos (ps-mule-next-point pos) components  
                          (integerp (aref components 1)) nil  
                          (char-width ch)))))))  
     ;; mule package isn't loaded  
     (or (fboundp 'encode-composition-rule)  
         (defun encode-composition-rule (rule)  
           130))  
     (or (fboundp 'find-composition)  
         (defun find-composition (pos &rest ignore)  
           nil))  
     ))  
   
216  (defvar ps-mule-font-info-database  (defvar ps-mule-font-info-database
217    nil    nil
218    "Alist of charsets with the corresponding font information.    "Alist of charsets with the corresponding font information.
# Line 847  the sequence." Line 800  the sequence."
800                  run-width)))                  run-width)))
801      ;; We assume that all characters in this range have the same width.      ;; We assume that all characters in this range have the same width.
802      (setq char-width (* char-width (charset-width ps-mule-current-charset)))      (setq char-width (* char-width (charset-width ps-mule-current-charset)))
803      (let ((run-width (* (chars-in-region from to) char-width)))      (let ((run-width (* (abs (- from to)) char-width)))
804        (if (> run-width ps-width-remaining)        (if (> run-width ps-width-remaining)
805            (cons (min to            (cons (min to
806                       (save-excursion                       (save-excursion

Legend:
Removed from v.1.30.2.3  
changed lines
  Added in v.1.30.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26