buffer is modfied, cancel the writing.
+2007-12-27 Kenichi Handa <handa@ni.aist.go.jp>
+
+ * international/mule-cmds.el (select-safe-coding-system): When a
+ buffer is modfied, cancel the writing.
+
2007-12-26 Eric S. Raymond <esr@snark.thyrsus.com>
* log-view.el: Add Subversion and Mercurial log format samples.
(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.
%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)