emacs-devel
[Top][All Lists]
Advanced

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

Re: 23.0.60; Cannot isearch for non-ascii chars with emacs -nw -Q


From: Kenichi Handa
Subject: Re: 23.0.60; Cannot isearch for non-ascii chars with emacs -nw -Q
Date: Thu, 28 Feb 2008 11:02:56 +0900
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)

In article <address@hidden>, Stefan Monnier <address@hidden> writes:

> > It seems that something is broken in isearch-x.el (although
> > unicode merge didn't change it).  I'm now investigating.

I found that when isearch-printing-char is called,
last-command-char is already what decoded by
encoded-kbd-mode.  But, when I wrote isearch-x.el,
last-command-char was the first byte of utf-8 sequence.  So,
isearch-x.el pushed back that byte in unread-command-events
and re-read the whole utf-8 sequence.

It seems that something in handling keyboard input has been
changed.  I've just installed the attached change.  Tassilo,
could you please try again with the latest code?

> > But, perhaps, it's time to implement the decoding of
> > keyboard input by C.  After multi-tty merge, we have the
> > function tty_read_avail_input.  I think that is the right
> > place to do that decoding.

> Now that we've moved the keyboard decoding to input-event-map,

Ah!  Is that the change I wrote above?

> I'm not sure what would be the benefit.  Of course, if we
> can just reuse C code and get rid of the encoded-kbd code,
> that's good.

Yes.  I think it can be done by adding less than 100 lines
of C code (mostly for handling meta-key) in
tty_read_avail_input and removing most of encoded-kb.el (we
still need the code of calling set-input-mode property).

---
Kenichi Handa
address@hidden

2008-02-28  Kenichi Handa  <address@hidden>

        * isearch.el (isearch-printing-char): Don't check
        keyboard-coding-system.  Call
        isearch-process-search-multibyte-characters only when
        current-input-method is non-nil.

Index: isearch.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -r1.312 -r1.313
--- isearch.el  25 Feb 2008 00:01:41 -0000      1.312
+++ isearch.el  28 Feb 2008 01:57:42 -0000      1.313
@@ -1842,15 +1842,9 @@
   (let ((char last-command-char))
     (if (= char ?\S-\ )
        (setq char ?\s))
-    (if (and enable-multibyte-characters
-            (>= char ?\200)
-            (<= char ?\377))
-       (if (keyboard-coding-system)
-           (isearch-process-search-multibyte-characters char)
-         (isearch-process-search-char (unibyte-char-to-multibyte char)))
-      (if current-input-method
-         (isearch-process-search-multibyte-characters char)
-       (isearch-process-search-char char)))))
+    (if current-input-method
+       (isearch-process-search-multibyte-characters char)
+      (isearch-process-search-char char))))
 
 (defun isearch-process-search-char (char)
   ;; * and ? are special in regexps when not preceded by \.




reply via email to

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