[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/objed 410a425 29/34: Refactor isearch handling and add
From: |
Stefan Monnier |
Subject: |
[elpa] externals/objed 410a425 29/34: Refactor isearch handling and add missing commands |
Date: |
Mon, 15 Mar 2021 22:21:12 -0400 (EDT) |
branch: externals/objed
commit 410a4256b61f880167eed919e6064fcb85c7cbcf
Author: Clemens Radermacher <clemera@posteo.net>
Commit: Clemens Radermacher <clemera@posteo.net>
Refactor isearch handling and add missing commands
---
objed.el | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/objed.el b/objed.el
index 3b77313..b586aa6 100644
--- a/objed.el
+++ b/objed.el
@@ -301,9 +301,18 @@ This option holds the number of times `objed-last' can
be used to restore previous states."
:type 'integer)
+(defvar objed--isearch-cmds
+ '(isearch-forward
+ isearch-forward-regexp
+ isearch-forward-symbol
+ isearch-backward
+ isearch-backward-regexp
+ isearch-forward-symbol-at-point
+ isearch-forward-word)
+ "Isearch commands known to objed.")
(defcustom objed-keeper-commands
- '(save-buffer
+ `(save-buffer
read-only-mode
undo
undo-only
@@ -315,11 +324,7 @@ be used to restore previous states."
kmacro-start-macro-or-insert-counter
kmacro-end-or-call-macro
kmacro-call-macro
- isearch-forward
- isearch-forward-regexp
- isearch-forward-symbol
- isearch-backward
- isearch-backward-regexp
+ ,@objed--isearch-cmds
)
"Regular Emacs commands which should not exit modal edit state.
@@ -327,6 +332,8 @@ When regular commands are executed `objed' will exit its
editing
state. Commands added to this list wont do that."
:type '(repeat function))
+
+
(defcustom objed-cursor-color "#e52b50"
"Cursor color to use when `objed' is active."
:type 'color)
@@ -1506,11 +1513,7 @@ one of `objed-keeper-commands'."
objed--with-allow-input
(and this-command
;; those are handled on exit in objed--reset--objed-buffer
- (not (memq this-command '(isearch-forward
- isearch-forward-regexp
- isearch-forward-symbol
- isearch-backward
- isearch-backward-regexp)))
+ (not (memq this-command objed--isearch-cmds))
(or (memq this-command objed-keeper-commands)
(assq this-command objed-cmd-alist))
(prog1 #'ignore
@@ -3976,11 +3979,7 @@ Reset and reinitilize objed if appropriate."
(kill-local-variable setting))))
(remove-hook 'pre-command-hook 'objed--push-state t)
- (when (and (memq this-command '(isearch-forward
- isearch-forward-regexp
- isearch-forward-symbol
- isearch-backward
- isearch-backward-regexp))
+ (when (and (memq this-command objed--isearch-cmds)
(memq this-command objed-keeper-commands))
(add-hook 'isearch-mode-end-hook #'objed-reactivate-after-isearch))
- [elpa] externals/objed a2bd06b 15/34: Autoload dired-jump, (continued)
- [elpa] externals/objed a2bd06b 15/34: Autoload dired-jump, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 56d3906 21/34: Drop obsolete avy--process function, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 9d2ad56 25/34: Fix undo for objed-comment-duplicate, Stefan Monnier, 2021/03/15
- [elpa] externals/objed f4e7cab 24/34: Also allow prefix syntax for objed-include-backward, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 70f9fb5 34/34: Add notice for paused development, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 0f75d33 32/34: Fix compiler warnings, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 9f7f6e5 23/34: Improve include commands to also cover punctuation and constituents, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 2287436 19/34: Include possible active region when acting on multiple objects, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 9f565e4 30/34: Make transposing objects work with active region, Stefan Monnier, 2021/03/15
- [elpa] externals/objed e93dda7 33/34: Require cl-lib in all files, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 410a425 29/34: Refactor isearch handling and add missing commands,
Stefan Monnier <=
- [elpa] externals/objed 8dc1770 01/34: Stay on at boundary for M-[/] (Fix #68), Stefan Monnier, 2021/03/15
- [elpa] externals/objed 31c5ded 03/34: Add separate option for auto init behavior on buffer change, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 9bb3513 04/34: Fix differing initialization conditions, Stefan Monnier, 2021/03/15
- [elpa] externals/objed e046331 07/34: Implemented objed-local-mode (#72), Stefan Monnier, 2021/03/15
- [elpa] externals/objed e89d8da 06/34: Fix bytecompile and linting errors, Stefan Monnier, 2021/03/15
- [elpa] externals/objed f5ddab2 08/34: Update objed-exit-op: Check range was passed, Stefan Monnier, 2021/03/15
- [elpa] externals/objed e871e0f 11/34: Mention changes of public interface, Stefan Monnier, 2021/03/15
- [elpa] externals/objed ae47cf6 10/34: Ensure to never shrink on expansion for objed-beg/end-of-block, Stefan Monnier, 2021/03/15
- [elpa] externals/objed f45cddb 09/34: Restructure note about out of date keybindings, Stefan Monnier, 2021/03/15
- [elpa] externals/objed 2224691 12/34: Make note about changes more prominent, Stefan Monnier, 2021/03/15