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

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

[elpa] externals/mct 233f3215ad 2/2: Update documentation regarding mct-


From: ELPA Syncer
Subject: [elpa] externals/mct 233f3215ad 2/2: Update documentation regarding mct-avy.el
Date: Sat, 19 Mar 2022 01:57:40 -0400 (EDT)

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

    Update documentation regarding mct-avy.el
---
 README.org | 51 +++++++++++++++++++++++++++++++++------------------
 1 file changed, 33 insertions(+), 18 deletions(-)

diff --git a/README.org b/README.org
index 8246bbfe7b..8bc96d944d 100644
--- a/README.org
+++ b/README.org
@@ -879,6 +879,21 @@ And with more options:
 ;; Optionally use MCT for in-buffer completion (though `corfu' is a
 ;; better option).
 (mct-region-mode 1)
+
+;;; Integration with Oleh Krehel's `avy' package
+(require 'mct-avy)
+
+(dolist (map (list mct-minibuffer-local-completion-map
+                   mct-minibuffer-completion-list-map))
+  (define-key map (kbd "C-,") #'mct-avy-embark-act)
+  (define-key map (kbd "C-.") #'mct-avy-choose-completion-exit)
+  (define-key map (kbd "C-;") #'mct-avy-choose-completion-dwim))
+
+;; If you are using `mct-region-mode':
+(dolist (map (list mct-region-completion-list-map
+                   mct-region-buffer-map))
+  (define-key map (kbd "C-,") #'mct-avy-embark-act)
+  (define-key map (kbd "C-.") #'mct-avy-region-choose-completion))
 #+end_src
 
 Other useful extras from the Emacs source code (read their doc strings):
@@ -959,8 +974,8 @@ Other useful extras from the Emacs source code (read their 
doc strings):
 [ Part of {{{development-version}}} ]
 
 The MCT code repository contains an =extensions= directory.  Any file
-found there is considered highly experimental.  The target audience is
-developers or users who wish to help find bugs.
+found there is considered experimental.  The target audience is
+developers or users who can tolerate the occasional bug.
 
 ** MCT and Avy
 :PROPERTIES:
@@ -974,10 +989,20 @@ The MCT =extensions= directory contains the =mct-avy.el= 
file.  It
 integrates MCT with the =avy= package to choose completion candidates
 using the latter's mode of interaction.  The commands it defines are:
 
-+ ~mct-avy-choose-completion-exit~.
-+ ~mct-avy-choose-completion-dwim~.
-+ ~mct-avy-choose-completion-jump~.
-+ ~mct-avy-region-choose-completion~.
+#+findex: mct-avy-choose-completion-exit
++ ~mct-avy-choose-completion-exit~
+
+#+findex: mct-avy-choose-completion-dwim
++ ~mct-avy-choose-completion-dwim~
+
+#+findex: mct-avy-choose-completion-jump
++ ~mct-avy-choose-completion-jump~
+
+#+findex: mct-avy-region-choose-completion
++ ~mct-avy-region-choose-completion~
+
+#+findex: mct-avy-embark-act
++ ~mct-avy-embark-act~
 
 Their respective doc strings describe their functionality.
 
@@ -988,26 +1013,16 @@ like this:
 (dolist (map (list mct-minibuffer-local-completion-map
                    mct-minibuffer-completion-list-map))
   (define-key map (kbd "C-;") #'mct-avy-choose-completion-exit)
+  (define-key map (kbd "C-,") #'mct-avy-embark-act)
   (define-key map (kbd "M-;") #'mct-avy-choose-completion-dwim))
 
 ;; If you are using `mct-region-mode':
 (dolist (map (list mct-region-completion-list-map
                    mct-region-buffer-map))
+  (define-key map (kbd "C-,") #'mct-avy-embark-act)
   (define-key map (kbd "C-;") #'mct-avy-region-choose-completion))
 #+end_src
 
-At the heart of the package is the function ~mct-avy-choose~ which
-provides the minimal necessary glue code.  Use it to extend the
-functionality on offer.  For example, here is how to call ~embark-act~
-on the candidate (requires the =embark= package):
-
-#+begin_src emacs-lisp
-(defun my-mct-avy-embark-act ()
-  "Use Avy to run `embark-act' on candidate."
-  (interactive)
-  (mct-avy--choose #'embark-act))
-#+end_src
-
 =mct-avy.el= is inspired by Omar AntolĂ­n Camarena's
 =avy-embark-collect.el=.  The ~mct-avy-choose~ function borrows code
 and/or ideas from that libary: <https://github.com/oantolin/embark/>.



reply via email to

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