]> code.delx.au - gnu-emacs-elpa/commitdiff
company-search-map: Add company-complete-number bindings
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 1 Feb 2015 05:42:48 +0000 (07:42 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 1 Feb 2015 05:42:48 +0000 (07:42 +0200)
#292

NEWS.md
company.el

diff --git a/NEWS.md b/NEWS.md
index b65d06709d24ec91b93f8b707770bb6eb40524cc..0718b399a31720402a9a7c288aa3c7c68f8ae79f 100644 (file)
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,6 +3,7 @@
 ## Next
 
 * Better tracking of the current selection.
+* Pressing `M-0`...`M-9` works in the search mode.
 * Pressing `<up>` or `<down>` doesn't quit the search mode.
 
 ## 2015-01-23 (0.8.9)
index f7f8613af442352e496180684e5c69cab170c9bc..dcdc19d851ff6413be4a2bbd347019e60343c780 100644 (file)
@@ -1727,6 +1727,8 @@ from the rest of the back-ends in the group, if any, will be left at the end."
     (define-key keymap "\C-s" 'company-search-repeat-forward)
     (define-key keymap "\C-r" 'company-search-repeat-backward)
     (define-key keymap "\C-o" 'company-search-toggle-filtering)
+    (dotimes (i 10)
+      (define-key keymap (read-kbd-macro (format "M-%d" i)) 'company-complete-number))
     keymap)
   "Keymap used for incrementally searching the completion candidates.")