]> code.delx.au - gnu-emacs-elpa/commitdiff
Use read-kbd-macro instead of kbd as a function.
authorJorgen Schaefer <contact@jorgenschaefer.de>
Sat, 20 Sep 2014 20:08:41 +0000 (22:08 +0200)
committerJorgen Schaefer <contact@jorgenschaefer.de>
Sat, 20 Sep 2014 20:08:41 +0000 (22:08 +0200)
In Emacs 24.1 and 24.2, kbd was a macro and not a function,
so that a call like (kbd (format ...)) would fail. Use
read-kbd-macro instead, which works for all Emacsen in 24.x.

company.el

index fdf09f7709df2e6352c4991d0cd622c86fb79652..c47c72e4b20d1c05b85acc758ff4c9cd48d8e39c 100644 (file)
@@ -627,7 +627,7 @@ asynchronous call into synchronous.")
     (define-key keymap "\C-s" 'company-search-candidates)
     (define-key keymap "\C-\M-s" 'company-filter-candidates)
     (dotimes (i 10)
-      (define-key keymap (kbd (format "M-%d" i)) 'company-complete-number))
+      (define-key keymap (read-kbd-macro (format "M-%d" i)) 'company-complete-number))
      keymap)
   "Keymap that is enabled during an active completion.")