Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
4abc74e8
Commit
4abc74e8
authored
Dec 01, 2006
by
Vinicius Jose Latorre
Browse files
Eliminate Emacs 20 & 21 compatibility.
parent
1dccd454
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
64 deletions
+17
-64
lisp/ChangeLog
lisp/ChangeLog
+8
-0
lisp/ps-mule.el
lisp/ps-mule.el
+1
-28
lisp/ps-print.el
lisp/ps-print.el
+8
-36
No files found.
lisp/ChangeLog
View file @
4abc74e8
2006-12-01 Vinicius Jose Latorre <viniciusjl@ig.com.br>
* ps-mule.el: Eliminate Emacs 20 compatibility.
* ps-print.el : Eliminate Emacs 20 & 21 compatibility.
(ps-print-version): New Version 6.7.
(ps-print-quote): Replace '?\ ' by '?\s'.
2006-11-30 Juanma Barranquero <lekktu@gmail.com>
* hexl.el (hexl-goto-address, hexl-forward-char, hexl-forward-short)
lisp/ps-mule.el
View file @
4abc74e8
...
...
@@ -163,34 +163,7 @@
(
defalias
'string-make-multibyte
'copy-sequence
))
(
or
(
fboundp
'encode-char
)
(
defun
encode-char
(
ch
ccs
)
ch
))
;; For Emacs 20 compatibility
(
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
(
or
(
fboundp
'encode-composition-rule
)
(
defun
encode-composition-rule
(
rule
)
(
if
(
=
(
car
rule
)
4
)
(
setcar
rule
10
))
(
if
(
=
(
cdr
rule
)
4
)
(
setcdr
rule
10
))
(
+
(
*
(
car
rule
)
12
)
(
cdr
rule
))))
(
or
(
fboundp
'find-composition
)
(
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
))
))
ch
)))
;;;###autoload
...
...
lisp/ps-print.el
View file @
4abc74e8
...
...
@@ -10,12 +10,12 @@
;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters)
;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
;; Time-stamp: <200
5/06/27 00:57:22
vinicius>
;; Version:
6.
6.7
;; Time-stamp: <200
6/12/01 09:59:01
vinicius>
;; Version: 6.7
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
(defconst ps-print-version "6.
6.
7"
"ps-print.el, v
6.
6.7 <200
5/06/27
vinicius>
(defconst ps-print-version "6.7"
"ps-print.el, v 6.7 <200
6/12/01
vinicius>
Vinicius's last change version -- this file may have been edited as part of
Emacs without changes to the version number. When reporting bugs, please also
...
...
@@ -1332,7 +1332,7 @@ Please send all bug fixes and enhancements to
;;
;; Faces are always treated as opaque.
;;
;; Epoch, Lucid and Emacs 1
9
not supported. At all.
;; Epoch, Lucid and Emacs
2
1 not supported. At all.
;;
;; Fixed-pitch fonts work better for line folding, but are not required.
;;
...
...
@@ -1459,31 +1459,11 @@ Please send all bug fixes and enhancements to
(error "`ps-print' doesn't support Epoch"))
(t
(unless (and (boundp 'emacs-major-version)
(> emacs-major-version
19
))
(error "`ps-print' only supports Emacs 2
0
and higher"))
(>
=
emacs-major-version
22
))
(error "`ps-print' only supports Emacs 2
2
and higher"))
'emacs))))
;; For Emacs 20.2 and the earlier version.
(or (fboundp 'set-buffer-multibyte)
(defun set-buffer-multibyte (arg)
(setq enable-multibyte-characters arg)))
(or (fboundp 'string-as-unibyte)
(defun string-as-unibyte (arg) arg))
(or (fboundp 'string-as-multibyte)
(defun string-as-multibyte (arg) arg))
(or (fboundp 'char-charset)
(defun char-charset (arg) 'ascii))
(or (fboundp 'charset-after)
(defun charset-after (&optional arg)
(char-charset (char-after arg))))
;; GNU Emacs
(or (fboundp 'line-beginning-position)
(defun line-beginning-position (&optional n)
...
...
@@ -1545,12 +1525,6 @@ Please send all bug fixes and enhancements to
(defun ps-face-background-name (face)
(ps-xemacs-color-name (face-background face)))
)
((<= emacs-major-version 21) ; emacs 20 & 21
(defvar mark-active nil)
(defun ps-mark-active-p ()
mark-active)
(defalias 'ps-face-foreground-name 'face-foreground)
(defalias 'ps-face-background-name 'face-background))
(t ; emacs 22 or higher
(defvar mark-active nil)
(defun ps-mark-active-p ()
...
...
@@ -3766,9 +3740,7 @@ If `ps-prefix-quote' is nil, it's set to t after generating string."
"(setq ")
key
(if (> col len)
;; to keep compatibility with Emacs 20 & 21:
;; DO NOT REPLACE `?\ ' BY `?\s'
(make-string (- col len) ?\ )
(make-string (- col len) ?\s)
" ")
(ps-value-string val))))
(t "")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment