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
bd3ac67e
Commit
bd3ac67e
authored
Dec 30, 1998
by
Eli Zaretskii
Browse files
(prefer-coding-system): If the argument requires specific EOL conversion
type, make the default coding systems use that.
parent
e58883dd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lisp/international/mule-cmds.el
lisp/international/mule-cmds.el
+11
-2
No files found.
lisp/international/mule-cmds.el
View file @
bd3ac67e
...
...
@@ -238,6 +238,9 @@ This also sets the following values:
o default value for the command `set-terminal-coding-system' (not on MSDOS)
o default value for the command `set-keyboard-coding-system'
If CODING-SYSTEM specifies a certain type of EOL conversion, the coding
systems set by this function will use that type of EOL conversion.
This command does not change the default value of terminal coding system
for MS-DOS terminal, because DOS terminals only support a single coding
system, and Emacs automatically sets the default to that coding system at
...
...
@@ -246,7 +249,8 @@ startup."
(
if
(
not
(
and
coding-system
(
coding-system-p
coding-system
)))
(
error
"Invalid coding system `%s'"
coding-system
))
(
let
((
coding-category
(
coding-system-category
coding-system
))
(
base
(
coding-system-base
coding-system
)))
(
base
(
coding-system-base
coding-system
))
(
eol-type
(
coding-system-eol-type
coding-system
)))
(
if
(
not
coding-category
)
;; CODING-SYSTEM is no-conversion or undecided.
(
error
"Can't prefer the coding system `%s'"
coding-system
))
...
...
@@ -260,7 +264,12 @@ startup."
(
if
(
and
base
(
interactive-p
))
(
message
"Highest priority is set to %s (base of %s)"
base
coding-system
))
(
set-default-coding-systems
(
or
base
coding-system
))))
;; If they asked for specific EOL conversion, honor that.
(
if
(
memq
eol-type
'
(
0
1
2
unix
dos
mac
))
(
setq
coding-system
(
coding-system-change-eol-conversion
base
eol-type
))
(
setq
coding-system
base
))
(
set-default-coding-systems
coding-system
)))
(
defun
find-coding-systems-region-subset-p
(
list1
list2
)
"Return non-nil if all elements in LIST1 are included in LIST2.
...
...
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