Mercurial > emacs
comparison lisp/international/mule-cmds.el @ 101791:b6da45c113db
(select-safe-coding-system): Use
buffer-chars-modified-tick instead of buffer-modified-tick.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 04 Feb 2009 07:44:03 +0000 |
parents | aa2338088b49 |
children | 822c5b674d12 |
comparison
equal
deleted
inserted
replaced
101790:e98ddfaefcae | 101791:b6da45c113db |
---|---|
973 (setcar elt (coding-system-change-eol-conversion | 973 (setcar elt (coding-system-change-eol-conversion |
974 (car elt) default-eol-type)))))) | 974 (car elt) default-eol-type)))))) |
975 | 975 |
976 (let ((codings (find-coding-systems-region from to)) | 976 (let ((codings (find-coding-systems-region from to)) |
977 (coding-system nil) | 977 (coding-system nil) |
978 (tick (if (not (stringp from)) (buffer-modified-tick))) | 978 (tick (if (not (stringp from)) (buffer-chars-modified-tick))) |
979 safe rejected unsafe) | 979 safe rejected unsafe) |
980 (if (eq (car codings) 'undecided) | 980 (if (eq (car codings) 'undecided) |
981 ;; Any coding system is ok. | 981 ;; Any coding system is ok. |
982 (setq coding-system (caar default-coding-system)) | 982 (setq coding-system (caar default-coding-system)) |
983 ;; Reverse the list so that elements are accumulated in safe, | 983 ;; Reverse the list so that elements are accumulated in safe, |
1039 (unless (yes-or-no-p | 1039 (unless (yes-or-no-p |
1040 (format "Selected encoding %s disagrees with \ | 1040 (format "Selected encoding %s disagrees with \ |
1041 %s specified by file contents. Really save (else edit coding cookies \ | 1041 %s specified by file contents. Really save (else edit coding cookies \ |
1042 and try again)? " coding-system auto-cs)) | 1042 and try again)? " coding-system auto-cs)) |
1043 (error "Save aborted")))) | 1043 (error "Save aborted")))) |
1044 (when (and tick (/= tick (buffer-modified-tick))) | 1044 (when (and tick (/= tick (buffer-chars-modified-tick))) |
1045 (error "Cancelled because the buffer was modified")) | 1045 (error "Cancelled because the buffer was modified")) |
1046 coding-system))) | 1046 coding-system))) |
1047 | 1047 |
1048 (setq select-safe-coding-system-function 'select-safe-coding-system) | 1048 (setq select-safe-coding-system-function 'select-safe-coding-system) |
1049 | 1049 |