emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/mct 3fc43d268e 1/2: Tweak documentation about CRM indic


From: ELPA Syncer
Subject: [elpa] externals/mct 3fc43d268e 1/2: Tweak documentation about CRM indicator
Date: Sun, 24 Sep 2023 03:58:51 -0400 (EDT)

branch: externals/mct
commit 3fc43d268e5df143e21a78b3c2c89a004b7eb418
Author: Protesilaos Stavrou <info@protesilaos.com>
Commit: Protesilaos Stavrou <info@protesilaos.com>

    Tweak documentation about CRM indicator
---
 README.org | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/README.org b/README.org
index 0adfc93331..b2ee9099b1 100644
--- a/README.org
+++ b/README.org
@@ -917,13 +917,23 @@ nice usability enhancement, it is not specific to MCT and 
thus should
 not be part of =mct.el=.  Use this in your init file instead:
 
 #+begin_src emacs-lisp
-;; Copied from Daniel Mendler's `vertico' library:
-;; <https://github.com/minad/vertico>.
-(defun my-crm-indicator (args)
-  "Add prompt indicator to `completing-read-multiple' filter ARGS."
-  (cons (concat "[CRM] " (car args)) (cdr args)))
-
-(advice-add #'completing-read-multiple :filter-args #'my-crm-indicator)
+;; Add prompt indicator to `completing-read-multiple'.  We display
+;; [`completing-read-multiple': <separator>], e.g.,
+;; [`completing-read-multiple': ,] if the separator is a comma.  This
+;; is adapted from the README of the `vertico' package by Daniel
+;; Mendler.  I made some small tweaks to propertize the segments of
+;; the prompt.
+(defun crm-indicator (args)
+  (cons (format "[`crm-separator': %s]  %s"
+                (propertize
+                 (replace-regexp-in-string
+                  "\\`\\[.*?]\\*\\|\\[.*?]\\*\\'" ""
+                  crm-separator)
+                 'face 'error)
+                (car args))
+        (cdr args)))
+
+(advice-add #'completing-read-multiple :filter-args #'crm-indicator)
 #+end_src
 
 ** Ido-style navigation through directories



reply via email to

[Prev in Thread] Current Thread [Next in Thread]