comparison lisp/ps-mule.el @ 74351:b51283822ec9

Eliminate Emacs 20 & 21 compatibility.
author Vinicius Jose Latorre <viniciusjl@ig.com.br>
date Fri, 01 Dec 2006 13:10:34 +0000
parents 78c65b1a07f6
children 8c9e156de392
comparison
equal deleted inserted replaced
74350:501f287c0352 74351:b51283822ec9
161 multibyte))) 161 multibyte)))
162 (or (fboundp 'string-make-multibyte) 162 (or (fboundp 'string-make-multibyte)
163 (defalias 'string-make-multibyte 'copy-sequence)) 163 (defalias 'string-make-multibyte 'copy-sequence))
164 (or (fboundp 'encode-char) 164 (or (fboundp 'encode-char)
165 (defun encode-char (ch ccs) 165 (defun encode-char (ch ccs)
166 ch)) 166 ch)))
167
168 ;; For Emacs 20 compatibility
169 (if (and (boundp 'mule-version)
170 (string< (symbol-value 'mule-version) "5.0"))
171 ;; mule package is loaded and mule version is lesser than 5.0
172 (progn
173 (or (fboundp 'encode-composition-rule)
174 (defun encode-composition-rule (rule)
175 (if (= (car rule) 4) (setcar rule 10))
176 (if (= (cdr rule) 4) (setcdr rule 10))
177 (+ (* (car rule) 12) (cdr rule))))
178 (or (fboundp 'find-composition)
179 (defun find-composition (pos &rest ignore)
180 (let ((ch (char-after pos)))
181 (and ch (eq (char-charset ch) 'composition)
182 (let ((components (decompose-composite-char ch 'vector t)))
183 (list pos (ps-mule-next-point pos) components
184 (integerp (aref components 1)) nil
185 (char-width ch))))))))
186 ;; mule package isn't loaded
187 (or (fboundp 'encode-composition-rule)
188 (defun encode-composition-rule (rule)
189 130))
190 (or (fboundp 'find-composition)
191 (defun find-composition (pos &rest ignore)
192 nil))
193 ))
194 167
195 168
196 ;;;###autoload 169 ;;;###autoload
197 (defcustom ps-multibyte-buffer nil 170 (defcustom ps-multibyte-buffer nil
198 "*Specifies the multi-byte buffer handling. 171 "*Specifies the multi-byte buffer handling.