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
ce136481
Commit
ce136481
authored
Sep 11, 1997
by
Richard M. Stallman
Browse files
(hexlify-buffer): Bind coding-system-for-write to
raw-text with eol-type derived from the buffer-file-coding-system.
parent
ca6e03c2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
lisp/hexl.el
lisp/hexl.el
+12
-2
No files found.
lisp/hexl.el
View file @
ce136481
...
...
@@ -579,7 +579,17 @@ This discards the buffer's undo information."
(
setq
buffer-undo-list
nil
)
(
let
((
binary-process-output
nil
)
; for Ms-Dos
(
binary-process-input
buffer-file-type
)
(
coding-system-for-write
'no-conversion
)
;; If the buffer was read with EOL conversions, be sure to use the
;; same conversions when passing the region to the `hexl' program.
(
coding-system-for-write
(
let
((
eol-type
(
coding-system-eol-type
buffer-file-coding-system
)))
(
cond
((
eq
eol-type
1
)
'raw-text-dos
)
((
eq
eol-type
2
)
'raw-text-mac
)
((
eq
eol-type
0
)
'raw-text-unix
)
(
t
'no-conversion
))))
(
buffer-undo-list
t
))
(
shell-command-on-region
(
point-min
)
(
point-max
)
hexlify-command
t
)))
...
...
@@ -593,7 +603,7 @@ This discards the buffer's undo information."
(
setq
buffer-undo-list
nil
)
(
let
((
binary-process-output
buffer-file-type
)
; for Ms-Dos
(
binary-process-input
nil
)
(
coding-system-for-read
'
no-conversion
)
(
coding-system-for-read
'
raw-text
)
(
buffer-undo-list
t
))
(
shell-command-on-region
(
point-min
)
(
point-max
)
dehexlify-command
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