Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0bded065
Commit
0bded065
authored
May 24, 2003
by
Andreas Schwab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(insert-directory): Preserve CR in a file name.
parent
58f99379
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
lisp/files.el
lisp/files.el
+7
-1
No files found.
lisp/files.el
View file @
0bded065
...
...
@@ -4304,6 +4304,7 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
file-name-coding-system
default-file-name-coding-system
'undecided
))
coding-no-eol
val
pos
)
(
when
(
and
enable-multibyte-characters
(
not
(
memq
(
coding-system-base
coding
)
...
...
@@ -4314,6 +4315,8 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
(
setq
coding
(
detect-coding-region
beg
(
point
)
t
)))
(
if
(
not
(
eq
(
coding-system-base
coding
)
'undecided
))
(
save-restriction
(
setq
coding-no-eol
(
coding-system-change-eol-conversion
coding
'unix
))
(
narrow-to-region
beg
(
point
))
(
goto-char
(
point-min
))
(
while
(
not
(
eobp
))
...
...
@@ -4321,7 +4324,10 @@ If WILDCARD, it also runs the shell specified by `shell-file-name'."
val
(
get-text-property
(
point
)
'dired-filename
))
(
goto-char
(
next-single-property-change
(
point
)
'dired-filename
nil
(
point-max
)))
(
decode-coding-region
pos
(
point
)
coding
)
;; Force no eol conversion on a file name, so
;; that CR is preserved.
(
decode-coding-region
pos
(
point
)
(
if
val
coding-no-eol
coding
))
(
if
val
(
put-text-property
pos
(
point
)
'dired-filename
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