summaryrefslogtreecommitdiffstats
path: root/.emacs.d/lisp/bandali-essentials.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/lisp/bandali-essentials.el')
-rw-r--r--.emacs.d/lisp/bandali-essentials.el18
1 files changed, 9 insertions, 9 deletions
diff --git a/.emacs.d/lisp/bandali-essentials.el b/.emacs.d/lisp/bandali-essentials.el
index e7024af..27e1836 100644
--- a/.emacs.d/lisp/bandali-essentials.el
+++ b/.emacs.d/lisp/bandali-essentials.el
@@ -364,16 +364,16 @@
;; `version'
(b/keymap-global-set "C-c e v" #'emacs-version)
-;; Add prompt indicator to `completing-read-multiple'.
+;; Prompt indicator for `completing-read-multiple' for older Emacsen.
;; https://bugs.gnu.org/76028
-(defun crm-indicator (args)
- (cons (format "[CRM%s] %s"
- (replace-regexp-in-string
- "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
- crm-separator)
- (car args))
- (cdr args)))
-(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
+(when (< emacs-major-version 31)
+ (advice-add
+ #'completing-read-multiple :filter-args
+ (lambda (args)
+ (cons (format "[CRM%s] %s"
+ (string-replace "[ \t]*" "" crm-separator)
+ (car args))
+ (cdr args)))))
(with-eval-after-load 'vertico
(setopt