aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2006-12-01 13:13:19 +0000
committerVinicius Jose Latorre2006-12-01 13:13:19 +0000
commit4abc74e836f5bbc8503558f967d8ff72bda0b902 (patch)
treee2565a0566f66370270f450b8543f7878201fe61
parent1dccd4544e4a818ee8824ef5c3168f6e3478862a (diff)
downloademacs-4abc74e836f5bbc8503558f967d8ff72bda0b902.tar.gz
emacs-4abc74e836f5bbc8503558f967d8ff72bda0b902.zip
Eliminate Emacs 20 & 21 compatibility.
-rw-r--r--lisp/ChangeLog8
-rw-r--r--lisp/ps-mule.el29
-rw-r--r--lisp/ps-print.el44
3 files changed, 17 insertions, 64 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 75641d716bb..f626725e117 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,11 @@
12006-12-01 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * ps-mule.el: Eliminate Emacs 20 compatibility.
4
5 * ps-print.el : Eliminate Emacs 20 & 21 compatibility.
6 (ps-print-version): New Version 6.7.
7 (ps-print-quote): Replace '?\ ' by '?\s'.
8
12006-11-30 Juanma Barranquero <lekktu@gmail.com> 92006-11-30 Juanma Barranquero <lekktu@gmail.com>
2 10
3 * hexl.el (hexl-goto-address, hexl-forward-char, hexl-forward-short) 11 * hexl.el (hexl-goto-address, hexl-forward-char, hexl-forward-short)
diff --git a/lisp/ps-mule.el b/lisp/ps-mule.el
index 5d2e3be573f..f67b54e28dc 100644
--- a/lisp/ps-mule.el
+++ b/lisp/ps-mule.el
@@ -163,34 +163,7 @@
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
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index 27f727d743f..8512c2c962c 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -10,12 +10,12 @@
10;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters) 10;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters)
11;; Vinicius Jose Latorre <viniciusjl@ig.com.br> 11;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
12;; Keywords: wp, print, PostScript 12;; Keywords: wp, print, PostScript
13;; Time-stamp: <2005/06/27 00:57:22 vinicius> 13;; Time-stamp: <2006/12/01 09:59:01 vinicius>
14;; Version: 6.6.7 14;; Version: 6.7
15;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre 15;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
16 16
17(defconst ps-print-version "6.6.7" 17(defconst ps-print-version "6.7"
18 "ps-print.el, v 6.6.7 <2005/06/27 vinicius> 18 "ps-print.el, v 6.7 <2006/12/01 vinicius>
19 19
20Vinicius's last change version -- this file may have been edited as part of 20Vinicius's last change version -- this file may have been edited as part of
21Emacs without changes to the version number. When reporting bugs, please also 21Emacs without changes to the version number. When reporting bugs, please also
@@ -1332,7 +1332,7 @@ Please send all bug fixes and enhancements to
1332;; 1332;;
1333;; Faces are always treated as opaque. 1333;; Faces are always treated as opaque.
1334;; 1334;;
1335;; Epoch, Lucid and Emacs 19 not supported. At all. 1335;; Epoch, Lucid and Emacs 21 not supported. At all.
1336;; 1336;;
1337;; Fixed-pitch fonts work better for line folding, but are not required. 1337;; Fixed-pitch fonts work better for line folding, but are not required.
1338;; 1338;;
@@ -1459,31 +1459,11 @@ Please send all bug fixes and enhancements to
1459 (error "`ps-print' doesn't support Epoch")) 1459 (error "`ps-print' doesn't support Epoch"))
1460 (t 1460 (t
1461 (unless (and (boundp 'emacs-major-version) 1461 (unless (and (boundp 'emacs-major-version)
1462 (> emacs-major-version 19)) 1462 (>= emacs-major-version 22))
1463 (error "`ps-print' only supports Emacs 20 and higher")) 1463 (error "`ps-print' only supports Emacs 22 and higher"))
1464 'emacs)))) 1464 'emacs))))
1465 1465
1466 1466
1467;; For Emacs 20.2 and the earlier version.
1468
1469(or (fboundp 'set-buffer-multibyte)
1470 (defun set-buffer-multibyte (arg)
1471 (setq enable-multibyte-characters arg)))
1472
1473(or (fboundp 'string-as-unibyte)
1474 (defun string-as-unibyte (arg) arg))
1475
1476(or (fboundp 'string-as-multibyte)
1477 (defun string-as-multibyte (arg) arg))
1478
1479(or (fboundp 'char-charset)
1480 (defun char-charset (arg) 'ascii))
1481
1482(or (fboundp 'charset-after)
1483 (defun charset-after (&optional arg)
1484 (char-charset (char-after arg))))
1485
1486
1487;; GNU Emacs 1467;; GNU Emacs
1488(or (fboundp 'line-beginning-position) 1468(or (fboundp 'line-beginning-position)
1489 (defun line-beginning-position (&optional n) 1469 (defun line-beginning-position (&optional n)
@@ -1545,12 +1525,6 @@ Please send all bug fixes and enhancements to
1545 (defun ps-face-background-name (face) 1525 (defun ps-face-background-name (face)
1546 (ps-xemacs-color-name (face-background face))) 1526 (ps-xemacs-color-name (face-background face)))
1547 ) 1527 )
1548 ((<= emacs-major-version 21) ; emacs 20 & 21
1549 (defvar mark-active nil)
1550 (defun ps-mark-active-p ()
1551 mark-active)
1552 (defalias 'ps-face-foreground-name 'face-foreground)
1553 (defalias 'ps-face-background-name 'face-background))
1554 (t ; emacs 22 or higher 1528 (t ; emacs 22 or higher
1555 (defvar mark-active nil) 1529 (defvar mark-active nil)
1556 (defun ps-mark-active-p () 1530 (defun ps-mark-active-p ()
@@ -3766,9 +3740,7 @@ If `ps-prefix-quote' is nil, it's set to t after generating string."
3766 "(setq ") 3740 "(setq ")
3767 key 3741 key
3768 (if (> col len) 3742 (if (> col len)
3769 ;; to keep compatibility with Emacs 20 & 21: 3743 (make-string (- col len) ?\s)
3770 ;; DO NOT REPLACE `?\ ' BY `?\s'
3771 (make-string (- col len) ?\ )
3772 " ") 3744 " ")
3773 (ps-value-string val)))) 3745 (ps-value-string val))))
3774 (t "") 3746 (t "")