all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Heime <heimeborgia@protonmail.com>
Cc: Heime via Users list for the GNU Emacs text editor
	<help-gnu-emacs@gnu.org>
Subject: Re: Iinteractive function allowing multiple inputs
Date: Tue, 10 Dec 2024 10:12:12 +0300	[thread overview]
Message-ID: <Z1fpzHGbuvpsyL8L@lco2> (raw)
In-Reply-To: <wEH4KBrSh-YpaIYUJEEnxoswdv1AZmjkhmGnjHBGiRdFu5sWSNEykoYIXi14XRGiBo14-1sioeyJu6ss5fhoowtJJwGnxkwhiKxRYFhMk8M=@protonmail.com>

* Heime <heimeborgia@protonmail.com> [2024-12-10 02:48]:
> Consider the following.  The value of company-backends should
> be a list.   Would (list (mapcar #'intern backends-seltr))
> give a list to the function argument?

(defun cbackends (actm-seqr)
  "Set value for `company-backends' for `company-mode'.
Allowing multiple selectors using comma-separated."
  (interactive
    (let* ( (cseq '("company-dabbrev" "company-dabbrev-code" "company-keywords"
                    "company-capf" "company-yasnippet" "company-files"))

            (backends-seltr
                (completing-read-multiple
                  "Backends Multi-Seltr (comma-separated): "
                  cseq nil t)))

      (list (mapcar #'intern backends-seltr))))

    ;; Convert selected backends to symbols and set them
    (setq company-backends actm-seqr) )

Well done!

So far I see the above function works well and sets `company-backends'. But I do not use `company', so I do not know if it was set correctly.

-- 
Jean Louis



  reply	other threads:[~2024-12-10  7:12 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 18:40 Iinteractive function allowing multiple inputs Heime via Users list for the GNU Emacs text editor
2024-12-09 20:43 ` Jean Louis
2024-12-09 20:48   ` Heime via Users list for the GNU Emacs text editor
2024-12-09 21:02     ` Heime via Users list for the GNU Emacs text editor
2024-12-09 21:11       ` Jean Louis
2024-12-09 21:06     ` Jean Louis
2024-12-09 21:14       ` Heime via Users list for the GNU Emacs text editor
2024-12-09 21:20         ` Jean Louis
2024-12-09 21:42           ` Heime via Users list for the GNU Emacs text editor
2024-12-09 21:46             ` Heime via Users list for the GNU Emacs text editor
2024-12-09 23:05               ` Jean Louis
2024-12-09 23:47                 ` Heime via Users list for the GNU Emacs text editor
2024-12-10  7:12                   ` Jean Louis [this message]
2024-12-09 21:23   ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-09 23:08     ` Jean Louis
2024-12-09 23:39       ` Heime via Users list for the GNU Emacs text editor

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

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

  git send-email \
    --in-reply-to=Z1fpzHGbuvpsyL8L@lco2 \
    --to=bugs@gnu.support \
    --cc=heimeborgia@protonmail.com \
    --cc=help-gnu-emacs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.