unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Felix <felix.dick@web.de>, Juanma Barranquero <lekktu@gmail.com>
Cc: Stefan Kangas <stefankangas@gmail.com>,
	"emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: RE: [External] : Re: Tree-sitter doc question
Date: Thu, 8 Dec 2022 17:01:24 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488937267BD5C7757D823F3F31D9@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <87pmctsvrk.fsf@web.de>

>>> a.k.a.
>>> (add-to-list 'auto-mode-alist ("\\.[ch]\\'" . c-ts-mode))
>> a.k.a.
>> (push '("\\.[ch]\\'" . c-ts-mode) auto-mode-alist)
> 
> spoiled for choice, again!

Yes, but not if the first arg to `add-to-list'
is computed instead of just a quoted symbol.

(defun foo () (intern (concat "auto-" "mode-alist")))

(add-to-list (foo) ("\\.[ch]\\'" . c-ts-mode))




  reply	other threads:[~2022-12-08 17:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221208141247.36l2j3bxggslsykl.ref@Ergus>
2022-12-08 14:12 ` Tree-sitter doc question Ergus
2022-12-08 14:38   ` Eli Zaretskii
     [not found]     ` <20221208145246.3iq7ehnxdii5xgqq@Ergus>
2022-12-08 14:57       ` Eli Zaretskii
2022-12-08 15:08         ` Felix
2022-12-08 15:44           ` Eli Zaretskii
2022-12-08 16:05             ` Stefan Kangas
2022-12-08 16:24               ` Juanma Barranquero
2022-12-08 16:29                 ` Felix
2022-12-08 17:01                   ` Drew Adams [this message]
2022-12-08 17:39                   ` Eli Zaretskii
2022-12-08 17:35                 ` Eli Zaretskii
2022-12-08 17:43           ` Stefan Monnier

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=SJ0PR10MB5488937267BD5C7757D823F3F31D9@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=felix.dick@web.de \
    --cc=lekktu@gmail.com \
    --cc=stefankangas@gmail.com \
    /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).