emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r105868: ecomplete.el (ecomplete-disp


From: Katsumi Yamaoka
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r105868: ecomplete.el (ecomplete-display-matches): Intercept key sequence from terminal as well.
Date: Wed, 21 Sep 2011 12:23:49 +0000
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 105868
author: Kan-Ru Chen <address@hidden>
committer: Katsumi Yamaoka <address@hidden>
branch nick: trunk
timestamp: Wed 2011-09-21 12:23:49 +0000
message:
  ecomplete.el (ecomplete-display-matches): Intercept key sequence from 
terminal as well.
modified:
  lisp/gnus/ChangeLog
  lisp/gnus/ecomplete.el
=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2011-09-21 02:13:03 +0000
+++ b/lisp/gnus/ChangeLog       2011-09-21 12:23:49 +0000
@@ -1,3 +1,8 @@
+2011-09-13  Kan-Ru Chen  <address@hidden>
+
+       * ecomplete.el (ecomplete-display-matches): Intercept key sequence from
+       terminal as well.
+
 2011-09-21  Katsumi Yamaoka  <address@hidden>
 
        * mm-view.el (mm-display-inline-fontify): Don't run doc-view-mode

=== modified file 'lisp/gnus/ecomplete.el'
--- a/lisp/gnus/ecomplete.el    2011-01-26 08:36:39 +0000
+++ b/lisp/gnus/ecomplete.el    2011-09-21 12:23:49 +0000
@@ -123,14 +123,15 @@
            (message "%s" matches)
            nil)
        (setq highlight (ecomplete-highlight-match-line matches line))
-       (while (not (memq (setq command (read-event highlight)) '(? return)))
+       (while (not (member (setq command (read-key-sequence-vector highlight))
+                           '([? ] [return] [?\r] [?\n] [?\C-g])))
          (cond
-          ((eq command ?\M-n)
+          ((member command '([27 ?n] [?\M-n]))
            (setq line (min (1+ line) max-lines)))
-          ((eq command ?\M-p)
+          ((member command '([27 ?p] [?\M-p]))
            (setq line (max (1- line) 0))))
          (setq highlight (ecomplete-highlight-match-line matches line)))
-       (when (eq command 'return)
+       (when (member command '([return] [?\r] [?\n]))
          (nth line (split-string matches "\n")))))))
 
 (defun ecomplete-highlight-match-line (matches line)


reply via email to

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