emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Tree-sitter doc question


From: Drew Adams
Subject: RE: [External] : Re: Tree-sitter doc question
Date: Thu, 8 Dec 2022 17:01:24 +0000

>>> 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 via email to

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