bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#3372: 23.0.94; Wrong input of umlauts in table mode


From: Kenichi Handa
Subject: bug#3372: 23.0.94; Wrong input of umlauts in table mode
Date: Mon, 25 May 2009 16:45:01 +0900

In article <87octhln0v.fsf@tum.de>, Uwe Siart <uwe.siart@tum.de> writes:

> When I try to enter german umlauts (ä,ö,ü) in table mode I get octal sequences
> instead. Typing »ä« results in display of »\344« etc. Everything is fine when
> table mode is off.

The attached patch will fix that bug.

---
Kenichi Handa
handa@m17n.org

--- table.el.~1.39.~    2009-01-09 13:19:13.000000000 +0900
+++ table.el    2009-05-25 16:43:03.000000000 +0900
@@ -3943,7 +3943,7 @@
 (defun *table--cell-self-insert-command ()
   "Table cell version of `self-insert-command'."
   (interactive "*")
-  (let ((char (table--unibyte-char-to-multibyte last-command-event)))
+  (let ((char last-command-event))
     (if (eq buffer-undo-list t) nil
       (if (not (eq last-command this-command))
          (setq table-cell-self-insert-command-count 0)
@@ -4048,7 +4048,7 @@
 (defun *table--cell-quoted-insert (arg)
   "Table cell version of `quoted-insert'."
   (interactive "*p")
-  (let ((char (table--unibyte-char-to-multibyte (read-quoted-char))))
+  (let ((char (read-quoted-char)))
     (while (> arg 0)
       (table--cell-insert-char char nil)
       (setq arg (1- arg)))))
@@ -4349,19 +4349,6 @@
            (cdr (symbol-value (cdr prompt-history)))))
   (car (symbol-value (cdr prompt-history))))
 
-(defun table--unibyte-char-to-multibyte (char)
-  "Convert CHAR by `unibyte-char-to-multibyte' when possible and necessary."
-  ;; This part is take from `quoted-insert'.
-  ;; Assume character codes 0240 - 0377 stand for characters in some
-  ;; single-byte character set, and convert them to Emacs
-  ;; characters.
-  (if (and enable-multibyte-characters
-          (fboundp 'unibyte-char-to-multibyte)
-          (>= char ?\240)
-          (<= char ?\377))
-      (unibyte-char-to-multibyte char)
-    char))
-
 (defun table--buffer-substring-and-trim (beg end)
   "Extract buffer substring and remove blanks from front and the rear of it."
   (save-excursion





reply via email to

[Prev in Thread] Current Thread [Next in Thread]