Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-17

Replace embedded control characters with octal escapes

2005-02-24  Miles Bader  <miles@gnu.org>

   * lisp/international/mule.el (auto-coding-regexp-alist)
   (ctext-pre-write-conversion): Replace embedded control characters
   with octal escapes; this prevents diff from thinking the file is
   binary.
This commit is contained in:
Miles Bader 2005-02-24 01:36:41 +00:00
parent 1ff5649578
commit d8d9feaf6c
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,10 @@
2005-02-24 Miles Bader <miles@gnu.org>
* international/mule.el (auto-coding-regexp-alist)
(ctext-pre-write-conversion): Replace embedded control characters
with octal escapes; this prevents diff from thinking the file is
binary.
2005-02-12 Miles Bader <miles@gnu.org>
* version.el (emacs-version): Change to "23.0.0".

View file

@ -1482,7 +1482,7 @@ text, and convert it in the temporary buffer. Otherwise, convert in-place."
(save-excursion
(goto-char last-pos)
(insert (string-to-multibyte
(format "\e%%/%d%c%c%s"
(format "\e%%/%d%c%c%s\002"
noctets
(+ (/ len 128) 128)
(+ (% len 128) 128)
@ -1526,7 +1526,7 @@ and the contents of `file-coding-system-alist'."
(defcustom auto-coding-regexp-alist
'(("^BABYL OPTIONS:[ \t]*-\\*-[ \t]*rmail[ \t]*-\\*-" . no-conversion)
("\\`;ELC" . emacs-mule)) ; Emacs 20-compiled
("\\`;ELC\024\0\0\0" . emacs-mule)) ; Emacs 20-compiled
"Alist of patterns vs corresponding coding systems.
Each element looks like (REGEXP . CODING-SYSTEM).
A file whose first bytes match REGEXP is decoded by CODING-SYSTEM on reading.