aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1997-04-28 12:47:24 +0000
committerRichard M. Stallman <[email protected]>1997-04-28 12:47:24 +0000
commit4f5881961a0c50a94070a422e992c437c406f6e1 (patch)
tree0390c1e5097e452ee48cb2ca2793c10c386f72c3 /lisp/simple.el
parent055e7bf2d2915b8c2d74c07e5f8cbdef15b3a600 (diff)
(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.
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el9
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index f77de7427f..540d2f2f76 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -139,6 +139,9 @@ With arg N, insert N newlines."
(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 @@ this function useful in editing binary files."
(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)))