changeset 17589:4dca74d70b49

(quoted-insert-character-offset): New variable. (quoted-insert): Convert characters 0200 - 0377 to 04200 - 04377, so that users get the same results they are used to.
author Richard M. Stallman <rms@gnu.org>
date Mon, 28 Apr 1997 12:47:24 +0000
parents 0054114145ca
children e378f2cbb2f4
files lisp/simple.el
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/simple.el	Mon Apr 28 11:25:26 1997 +0000
+++ b/lisp/simple.el	Mon Apr 28 12:47:24 1997 +0000
@@ -139,6 +139,9 @@
     (indent-to col 0)
     (goto-char pos)))
 
+(defvar quoted-insert-character-offset 2048
+  "Offset added by \\[quoted-insert] to character codes 0200 and above.")
+
 (defun quoted-insert (arg)
   "Read next input character and insert it.
 This is useful for inserting control characters.
@@ -157,6 +160,12 @@
 		      (eq overwrite-mode 'overwrite-mode-binary))
 		  (read-quoted-char)
 		(read-char))))
+    ;; Assume character codes 0200 - 0377 stand for 
+    ;; European characters in Latin-1, and convert them
+    ;; to Emacs characters.
+    (and enable-multibyte-characters
+	 (>= char ?\200)
+	 (setq char (+ quoted-insert-character-offset char)))
     (if (> arg 0)
 	(if (eq overwrite-mode 'overwrite-mode-binary)
 	    (delete-char arg)))