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
50c29104
Commit
50c29104
authored
Jan 16, 2001
by
Kenichi Handa
Browse files
(transform-make-coding-system-args): New function.
(make-coding-system): Accept XEmacs style arguments.
parent
1c8102ff
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletion
+45
-1
lisp/ChangeLog
lisp/ChangeLog
+2
-1
lisp/international/mule.el
lisp/international/mule.el
+43
-0
No files found.
lisp/ChangeLog
View file @
50c29104
...
...
@@ -3,7 +3,8 @@
* international/mule.el (decode-char): Fix conditions.
(encode-char): Handle eight-bit-control too.
(transform-make-coding-system-args): New function.
(make-coding-system): Accept XEmacs style arguments.
(make-coding-system): Accept XEmacs style arguments for CCL base
coding system.
2001-01-15 Gerd Moellmann <gerd@gnu.org>
...
...
lisp/international/mule.el
View file @
50c29104
...
...
@@ -620,6 +620,33 @@ formats (e.g. iso-latin-1-unix, koi8-r-dos)."
(setq i (1+ i)))
subsidiaries))
(defun transform-make-coding-system-args (name type &optional doc-string props)
"
For
internal
use
only.
Transform
XEmacs
style
args
for
`
make-coding-system
'
to
Emacs
style.
Value
is
a
list
of
transformed
arguments.
"
(let ((mnemonic (string-to-char (or (plist-get props 'mnemonic) "
?
")))
(eol-type (plist-get props 'eol-type))
properties tmp)
(cond
((eq eol-type 'lf) (setq eol-type 'unix))
((eq eol-type 'crlf) (setq eol-type 'dos))
((eq eol-type 'cr) (setq eol-type 'mac)))
(if (setq tmp (plist-get props 'post-read-conversion))
(setq properties (plist-put properties 'post-read-conversion tmp)))
(if (setq tmp (plist-get props 'pre-write-conversion))
(setq properties (plist-put properties 'pre-write-conversion tmp)))
(cond
((eq type 'ccl)
`(,name 4
,mnemonic
,doc-string
(,(plist-get props 'decode) . ,(plist-get props 'encode))
,properties
,eol-type))
(t
(error "
Unsupported
XEmacs
style
arguments
for
make-coding-style:
%S
"
`(,name ,type ,doc-string ,props))))))
(defun make-coding-system (coding-system type mnemonic doc-string
&optional
flags
...
...
@@ -714,6 +741,22 @@ treated as a compiled CCL code.
2.
If
PROPERTIES
is
just
a
list
of
character
sets,
the
list
is
set
as
a
value
of
`
safe-charsets
'
in
PLIST.
"
;; For compatiblity with XEmacs, we check the type of TYPE. If it
;; is a symbol, perhaps, this fucntion is called with arguments of
;; XEmacs style. Here, try to transform that kind of arguments to
;; Emacs style.
(if (symbolp type)
(let ((args (transform-make-coding-system-args coding-system type
mnemonic doc-string)))
(setq coding-system (car args)
type (nth 1 nargs)
mnemonic (nth 2 args)
doc-string (nth 3 args)
flags (nth 4 args)
properties (nth 5 args)
eol-type (nth 6 args))))
;; Set a value of `coding-system' property.
(let ((coding-spec (make-vector 5 nil))
(no-initial-designation 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