unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriel <gabriel376@hotmail.com>
To: emacs-devel@gnu.org
Subject: Re: [GNU ELPA] New package proposal: aggressive-completion.el
Date: Sat, 03 Apr 2021 17:02:06 -0300	[thread overview]
Message-ID: <CH2PR01MB5879496309A1F6FE30BACA7D8B799@CH2PR01MB5879.prod.exchangelabs.com> (raw)
In-Reply-To: <87o8evok58.fsf@gnu.org> (Tassilo Horn's message of "Sat, 03 Apr 2021 09:53:50 +0200")

FWIW, this is something I have in my init.el. It ain't much, but it's
honest work. Just 'emacs -q', 'M-x eval-buffer' and have fun.

;;;;;;;;;;;;;;;;;
  (defun auto-completion-list--setup ()
    "Setup minibuffer for `auto-completion-mode'."
    (when minibuffer-completion-table
      (add-hook 'after-change-functions 'auto-completion-list--display-completions nil t)
      (minibuffer-completion-help)))

  (defun auto-completion-list--display-completions (beg end len)
    "Display completions."
    (minibuffer-completion-help))

  (defun auto-completion-list--complete ()
    "Complete the minibuffer contents."
    (interactive)
    (minibuffer-complete)
    (minibuffer-completion-help))

  (defun turn-on-auto-completion-list-mode ()
    "Turn on `auto-completion-list-mode'."
    (add-hook 'minibuffer-setup-hook 'auto-completion-list--setup)
    (define-key minibuffer-local-must-match-map (kbd "<tab>") 'auto-completion-list--complete)
    (define-key minibuffer-local-must-match-map (kbd "SPC") 'auto-completion-list--complete)
    (define-key minibuffer-local-completion-map (kbd "<tab>") 'auto-completion-list--complete)
    (define-key minibuffer-local-completion-map (kbd "SPC") 'auto-completion-list--complete))

  (defun turn-off-auto-completion-list-mode ()
    "Turn off `auto-completion-list-mode'."
    (remove-hook 'minibuffer-setup-hook 'auto-completion-list-setup)
    (define-key minibuffer-local-must-match-map (kbd "<tab>") 'minibuffer-complete)
    (define-key minibuffer-local-must-match-map (kbd "SPC") 'minibuffer-complete-word)
    (define-key minibuffer-local-completion-map (kbd "<tab>") 'minibuffer-complete)
    (define-key minibuffer-local-completion-map (kbd "SPC") 'minibuffer-complete-word))

  (define-minor-mode auto-completion-list-mode
    "Toggle `auto-completion-list-mode'."
    :init-value t
    :global t
    (if auto-completion-list-mode
        (turn-on-auto-completion-list-mode)
      (turn-off-auto-completion-list-mode)))

  (auto-completion-list-mode 1)
;;;;;;;;;;;;;;;;;



      parent reply	other threads:[~2021-04-03 20:02 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-03  7:53 [GNU ELPA] New package proposal: aggressive-completion.el Tassilo Horn
2021-04-03  8:37 ` Tassilo Horn
2021-04-03  9:11 ` Manuel Uberti
2021-04-03  9:42   ` Tassilo Horn
2021-04-03 10:14     ` Jean Louis
2021-04-03 11:17     ` Jean Louis
2021-04-03 10:07   ` Jean Louis
2021-04-03  9:36 ` Jean Louis
2021-04-03 10:03   ` Tassilo Horn
2021-04-03 10:19     ` Jean Louis
2021-04-03 10:24       ` Tassilo Horn
2021-04-04 13:53     ` Basil L. Contovounesios
2021-04-04 19:05       ` Tassilo Horn
2021-04-04 20:12         ` T.V Raman
2021-04-05  7:01           ` Tassilo Horn
2021-04-05 14:21             ` T.V Raman
2021-04-04 20:26         ` Stefan Monnier
2021-04-05  7:17           ` Tassilo Horn
2021-04-03  9:49 ` Jean Louis
2021-04-03 10:05   ` Tassilo Horn
2021-04-03 11:53 ` Philip Kaludercic
2021-04-03 11:55 ` Philip Kaludercic
2021-04-03 13:43   ` Tassilo Horn
2021-04-03 17:22     ` [GNU ELPA] New package proposal: aggressive-completion.El Philip Kaludercic
2021-04-03 18:03       ` Tassilo Horn
2021-04-03 14:04 ` [GNU ELPA] New package proposal: aggressive-completion.el Stefan Monnier
2021-04-03 18:29   ` Tassilo Horn
2021-04-03 19:30     ` Tassilo Horn
2021-04-03 21:01       ` Stefan Monnier
2021-04-03 20:02 ` Gabriel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CH2PR01MB5879496309A1F6FE30BACA7D8B799@CH2PR01MB5879.prod.exchangelabs.com \
    --to=gabriel376@hotmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).