[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/engine-mode 4f2abf66d9 53/71: Ensure that local keymaps ar
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/engine-mode 4f2abf66d9 53/71: Ensure that local keymaps aren't propagated |
Date: |
Wed, 21 Dec 2022 09:59:16 -0500 (EST) |
branch: elpa/engine-mode
commit 4f2abf66d9c9bbe606a7270af9dfaf4199da5f71
Author: Harry R. Schwartz <hello@harryrschwartz.com>
Commit: Harry R. Schwartz <hello@harryrschwartz.com>
Ensure that local keymaps aren't propagated
To quote from @Ambrevar's issue:
> When point is on a thing that has a local keymap property, the local
keymap is
> transferred to the prompt when prompting the initial value. This can
> potentially break engine.el.
>
> Example recipe:
>
> (defun break-message ()
> (error "broken"))
>
> (defun break ()
> (let ((map (make-sparse-keymap)))
> (define-key map (kbd "<return>") 'break-message)
> (add-text-properties
> (point-min) (+ 10 (point-min))
> `(local-map ,map))))
>
> Now call the above in a buffer that starts with foo bar, place the point
on
> foo, call on engine search and press M-n. From there, you won't be able to
> press enter.
This fix ensures that the properties of `thing-at-point` won't be
propagated to
the prompt.
Nice catch, @Ambrevar, and thanks again! Fixes #43.
---
engine-mode.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/engine-mode.el b/engine-mode.el
index e9b274fd53..21c014cf39 100644
--- a/engine-mode.el
+++ b/engine-mode.el
@@ -93,7 +93,7 @@ Defaults to `nil' which means to go with
`browse-url-browser-function'."
(format "Search %s (%s): " (capitalize engine-name) default-word)))
(defun engine/prompted-search-term (engine-name)
- (let ((current-word (or (thing-at-point 'symbol) "")))
+ (let ((current-word (or (thing-at-point 'symbol 'no-properties) "")))
(read-string (engine/search-prompt engine-name current-word)
nil nil current-word)))
- [nongnu] elpa/engine-mode 75bca85a18 10/71: minor tweaks, (continued)
- [nongnu] elpa/engine-mode 75bca85a18 10/71: minor tweaks, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode bd2ea005b3 11/71: add a docstring for the defengine macro, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode c73489f15b 22/71: Add README documentation for custom docstrings, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 449c09afe5 26/71: Nest prefixed keymaps correctly, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode e44d23f6c9 28/71: Add melpa-stable badge to README, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode c37373e36c 06/71: requiring engine-mode, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 98020c5c8f 30/71: Update README text around Chrome script, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 96b3488a6d 54/71: Bump version to 2.1.1, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 30a361b27f 71/71: Remove the rfcs search engine from the docs, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode e99f205873 57/71: Document a definition of the Qwant search engine, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 4f2abf66d9 53/71: Ensure that local keymaps aren't propagated,
ELPA Syncer <=
- [nongnu] elpa/engine-mode d99f9b4ab2 63/71: Prevent browse-url-browser-function shadowing, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 7617af1c21 04/71: avoid multiple-evaluation issue for engine-name, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode b84d806f75 07/71: fix documentation typo, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode b804a5d6c8 13/71: use symbol under point as the default search term, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 3d4d39f29c 16/71: License under GPLv3, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 243d046914 35/71: make engine-mode keybinding prefix customizable, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 2c327f1785 24/71: Set engine-specific browsers, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 244610231f 34/71: Include a MELPA badge on the README, ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 59f1d463fa 39/71: Fix rebind key conflict., ELPA Syncer, 2022/12/21
- [nongnu] elpa/engine-mode 224919b648 29/71: Corrected Project Gutenberg URL., ELPA Syncer, 2022/12/21