diff options
Diffstat (limited to 'lisp/ecomplete.el')
-rw-r--r-- | lisp/ecomplete.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/ecomplete.el b/lisp/ecomplete.el index 2197d9512de..3f0d21c2305 100644 --- a/lisp/ecomplete.el +++ b/lisp/ecomplete.el @@ -168,13 +168,15 @@ matches." nil) (setq highlight (ecomplete-highlight-match-line matches line)) (let ((local-map (make-sparse-keymap)) + (prev-func (lambda () (setq line (max (1- line) 0)))) + (next-func (lambda () (setq line (min (1+ line) max-lines)))) selected) (define-key local-map (kbd "RET") (lambda () (setq selected (nth line (split-string matches "\n"))))) - (define-key local-map (kbd "M-n") - (lambda () (setq line (min (1+ line) max-lines)))) - (define-key local-map (kbd "M-p") - (lambda () (setq line (max (1- line) 0)))) + (define-key local-map (kbd "M-n") next-func) + (define-key local-map (kbd "<down>") next-func) + (define-key local-map (kbd "M-p") prev-func) + (define-key local-map (kbd "<up>") prev-func) (let ((overriding-local-map local-map)) (while (and (null selected) (setq command (read-key-sequence highlight)) |