branch: master commit 6f31d91cf383eb6977431d6edde5d0f4fc440d8d Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
[el-search] Allow to work without installing key bindings Change the default value of 'el-search-use-transient-map' to t. Make "el-search" an alias for "el-search-pattern" for better discoverability. Bump version to 1.8.9. (el-search-use-transient-map): Enable by default. (el-search-install-shift-bindings): Disable 'el-search-use-transient-map'. (el-search): New autoloaded alias for 'el-search-pattern'. --- packages/el-search/el-search.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el index 8652b15..ff2a289 100644 --- a/packages/el-search/el-search.el +++ b/packages/el-search/el-search.el @@ -7,7 +7,7 @@ ;; Created: 29 Jul 2015 ;; Keywords: lisp ;; Compatibility: GNU Emacs 25 -;; Version: 1.8.8 +;; Version: 1.8.9 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0")) @@ -559,7 +559,7 @@ following cases from the prompt." (const :tag "On" t) (const :tag "Ask" ask))) -(defvar el-search-use-transient-map nil +(defvar el-search-use-transient-map t "Whether el-search should make commands repeatable." ;; I originally wanted to make commands repeatable by looking at the ;; command keys. But that got overly complicated: It interfered with @@ -1847,6 +1847,7 @@ active search it is recommended to advice this function." ;;;###autoload (defun el-search-install-shift-bindings () (interactive) + (setq el-search-use-transient-map nil) (el-search-loop-over-bindings #'el-search-shift-bindings-bind-function) (define-key el-search-basic-transient-map [C-S-next] #'el-search-scroll-down) (define-key el-search-basic-transient-map [C-S-prior] #'el-search-scroll-up)) @@ -2706,6 +2707,9 @@ See `el-search-defined-patterns' for a list of defined patterns." (lambda (search) (setf (alist-get 'is-single-buffer (el-search-object-properties search)) t)) 'from-here)))) +;;;###autoload +(defalias 'el-search #'el-search-pattern) + (defmacro el-search--unless-no-buffer-match (&rest body) "Execute BODY unless no match for current search in current buffer. In this case, ignore BODY and emit a message saying \"No matches\".