rearrangement.
[elisp/apel.git] / emu-e20_2.el
index 3781a81..023b2f4 100644 (file)
 
 ;;; Code:
 
+;;; @ buffer representation
+;;;
+
+(defsubst-maybe set-buffer-multibyte (flag)
+  "Set the multibyte flag of the current buffer to FLAG.
+If FLAG is t, this makes the buffer a multibyte buffer.
+If FLAG is nil, this makes the buffer a single-byte buffer.
+The buffer contents remain unchanged as a sequence of bytes
+but the contents viewed as characters do change.
+\[Emacs 20.3 emulating function]"
+  (setq enable-multibyte-characters flag)
+  )
+
+
 ;;; @ character
 ;;;
 
@@ -35,7 +49,7 @@
 
 (defmacro char-next-index (char index)
   "Return index of character succeeding CHAR whose index is INDEX."
-  `(+ index (char-bytes char)))
+  `(+ ,index (char-bytes ,char)))
 
 
 ;;; @ string
 
 (defalias 'string-to-int-list 'string-to-char-list)
 
+(defun looking-at-as-unibyte (regexp)
+  "Like `looking-at', but string is regarded as unibyte sequence."
+  (let (enable-multibyte-characters)
+    (looking-at regexp)
+    ))
+
 ;;; @@ obsoleted aliases
 ;;;
 ;;; You should not use them.