Abolish obsolete alias `char-columns'.
[elisp/apel.git] / emu-mule.el
index 2ecb877..ebcdba4 100644 (file)
@@ -3,6 +3,7 @@
 ;; Copyright (C) 1995,1996,1997,1998 MORIOKA Tomohiko
 
 ;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;;         Katsumi Yamaoka <yamaoka@jpl.org>
 ;; Keywords: emulation, compatibility, Mule
 
 ;; This file is part of emu.
 ;;; @ binary access
 ;;;
 
-(defun insert-binary-file-contents-literally
-  (filename &optional visit beg end replace)
+(defun insert-file-contents-as-binary (filename
+                                      &optional visit beg end replace)
+  "Like `insert-file-contents', q.v., but don't code and format conversion.
+Like `insert-file-contents-literary', but it allows find-file-hooks,
+automatic uncompression, etc.
+
+Namely this function ensures that only format decoding and character
+code conversion will not take place."
+  (let (mc-flag
+       (file-coding-system *noconv*))
+    (insert-file-contents filename visit beg end replace)
+    ))
+
+(defalias 'insert-binary-file-contents 'insert-file-contents-as-binary)
+(make-obsolete 'insert-binary-file-contents 'insert-file-contents-as-binary)
+
+(defun insert-binary-file-contents-literally (filename
+                                             &optional visit beg end replace)
   "Like `insert-file-contents-literally', q.v., but don't code conversion.
 A buffer may be modified in several ways after reading into the buffer due
 to advanced Emacs features, such as file-name-handlers, format decoding,
@@ -152,14 +169,6 @@ find-file-hooks, etc.
     (insert-file-contents-literally filename visit beg end replace)
     ))
 
-(defun insert-binary-file-contents
-  (filename &optional visit beg end replace)
-  "Like `insert-file-contents', q.v., but don't code and format conversion."
-  (let (mc-flag
-       (file-coding-system *noconv*))
-    (insert-file-contents filename visit beg end replace)
-    ))
-
 (if running-emacs-19_29-or-later
     ;; for MULE 2.3 based on Emacs 19.34.
     (defun write-region-as-binary (start end filename
@@ -308,9 +317,16 @@ It must be symbol.")
 
 (defalias 'char-charset 'char-leading-char)
 
-(defalias 'char-length 'char-bytes)
+(defmacro char-next-index (char index)
+  "Return index of character succeeding CHAR whose index is INDEX."
+  (` (+ index (char-bytes char))))
+
+;;; @@ obsoleted aliases
+;;;
+;;; You should not use them.
 
-(defalias 'char-columns 'char-width)
+(defalias 'char-length 'char-bytes)
+;;(defalias 'char-columns 'char-width)
 
 
 ;;; @ string