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
f262b5b8
Commit
f262b5b8
authored
Jan 10, 2008
by
Juanma Barranquero
Browse files
(select-safe-coding-system): When a buffer is modified, cancel the writing.
parent
eaf7efe9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
lisp/international/mule-cmds.el
lisp/international/mule-cmds.el
+3
-0
No files found.
lisp/international/mule-cmds.el
View file @
f262b5b8
...
...
@@ -966,6 +966,7 @@ It is highly recommended to fix it before writing to a file."
(let ((codings (find-coding-systems-region from to))
(coding-system nil)
(tick (if (not (stringp from)) (buffer-modified-tick)))
safe rejected unsafe)
(if (eq (car codings) 'undecided)
;; Any coding system is ok.
...
...
@@ -1030,6 +1031,8 @@ It is highly recommended to fix it before writing to a file."
%s
specified
by
file
contents.
Really
save
(
else
edit
coding
cookies
\
and
try
again
)
?
" coding-system auto-cs))
(error "
Save
aborted
"))))
(when (and tick (/= tick (buffer-modified-tick)))
(error "
Cancelled
because
the
buffer
was
modified
"))
coding-system)))
(setq select-safe-coding-system-function 'select-safe-coding-system)
...
...
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