[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/engine-mode 117a9c0cbc 52/71: Use kbd to convert :keybindi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/engine-mode 117a9c0cbc 52/71: Use kbd to convert :keybinding correctly |
Date: |
Wed, 21 Dec 2022 09:59:16 -0500 (EST) |
branch: elpa/engine-mode
commit 117a9c0cbc1ff8ade7f17cd40d1d2f5eb24f51a3
Author: Harry R. Schwartz <hello@harryrschwartz.com>
Commit: Harry R. Schwartz <hello@harryrschwartz.com>
Use kbd to convert :keybinding correctly
Previously, assigning `:keybinding` to `"a b"` would bind the associated
engine
to `C-x / a SPC b`. That `SPC` in there? Not really optimal.
This commit wraps the `:keybinding` argument with a call to `kbd`, so
spaces,
for example, will be correctly interpreted.
Closes #41.
---
README.md | 3 ++-
engine-mode.el | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
index 3d0d2f941d..5374f982c8 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,8 @@ will take the selected region (or prompt for input, if no
region is selected)
and search GitHub for it, displaying the results in your default browser.
The `defengine` macro can also take an optional key combination, prefixed with
-`engine/keymap-prefix` (which defaults to "C-x /"):
+`engine/keymap-prefix` (which defaults to "C-x /"). That keybinding will be
+wrapped in a call to `kbd`.
```emacs
(defengine duckduckgo
diff --git a/engine-mode.el b/engine-mode.el
index e68346979c..e9b274fd53 100644
--- a/engine-mode.el
+++ b/engine-mode.el
@@ -122,7 +122,7 @@ Defaults to `nil' which means to go with
`browse-url-browser-function'."
(defun engine/bind-key (engine-name keybinding)
(when keybinding
- `(define-key engine-mode-prefixed-map ,keybinding
+ `(define-key engine-mode-prefixed-map (kbd ,keybinding)
(quote ,(engine/function-name engine-name)))))
;;;###autoload
- [nongnu] elpa/engine-mode 408932727b 49/71: display the default word in prompt if available, (continued)
- [nongnu] elpa/engine-mode 408932727b 49/71: display the default word in prompt if available, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode a978c58675 68/71: Add .elpaignore for NonGNU ELPA, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode fd5a235b2c 51/71: Format with the same search-term many times in a search-engine-url, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode a1b3e4fb71 33/71: Include animated gif demo, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode c68054af30 02/71: update package commentary, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 07a5196be8 36/71: Update README with the new prefix `C-x /`, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 16ad9403df 40/71: Load cl-lib instead of cl.el for using cl-defmacro, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 5d6c6495b3 37/71: Bump verion number to 2.0.0 in comment header, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 4a9cc581df 17/71: Add keymap to engine-mode docstring, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode fbb23e7b1f 45/71: Bump version to 2.1.0, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 117a9c0cbc 52/71: Use kbd to convert :keybinding correctly,
ELPA Syncer <=
- [nongnu] elpa/engine-mode a5f1ae2b08 70/71: Bump version to 2.2.1, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode a8e7bd3afb 60/71: Fix documentation for browse-url-browser-function, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode b6fafabc68 65/71: Better docstrings, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 5704591830 64/71: Document binding keymaps with use-package, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 673f9f49a3 59/71: Declare defengine indentation, ELPA Syncer, 2022/12/21