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
cdec2ad7
Commit
cdec2ad7
authored
May 07, 2003
by
Juanma Barranquero
Browse files
(insert-file-contents-literally): Allow it to be called within a magic file name
handler.
parent
ad599c11
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
lisp/files.el
lisp/files.el
+11
-9
No files found.
lisp/files.el
View file @
cdec2ad7
...
...
@@ -803,7 +803,7 @@ use with M-x."
default-coding))
(setq from-coding (read-coding-system
(format "Recode filename %s from: " filename))))
;; We provide the default coding only when a user is going to
;; change the encoding not from the default coding.
(if (eq from-coding default-coding)
...
...
@@ -1412,15 +1412,17 @@ This function ensures that none of these modifications will take place."
(coding-system-for-read 'no-conversion)
(coding-system-for-write 'no-conversion)
(find-buffer-file-type-function
(
if
(
fboundp
'find-buffer-file-type
)
(
symbol-function
'find-buffer-file-type
)
nil
))
(
inhibit-file-name-handlers
'
(
jka-compr-handler
image-file-handler
))
(
inhibit-file-name-operation
'insert-file-contents
))
(if (fboundp 'find-buffer-file-type)
(symbol-function 'find-buffer-file-type)
nil))
(inhibit-file-name-handlers
(append '(jka-compr-handler image-file-handler)
inhibit-file-name-handlers))
(inhibit-file-name-operation 'insert-file-contents))
(unwind-protect
(
progn
(
fset
'find-buffer-file-type
(
lambda
(
filename
)
t
))
(
insert-file-contents
filename
visit
beg
end
replace
))
(progn
(fset 'find-buffer-file-type (lambda (filename) t))
(insert-file-contents filename visit beg end replace))
(if find-buffer-file-type-function
(fset 'find-buffer-file-type find-buffer-file-type-function)
(fmakunbound 'find-buffer-file-type)))))
...
...
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