[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: *.ino files as c mode?
From: |
Omar Polo |
Subject: |
Re: *.ino files as c mode? |
Date: |
Thu, 03 Dec 2020 12:13:05 +0100 |
User-agent: |
mu4e 1.4.13; emacs 27.1 |
tomas@tuxteam.de writes:
> On Thu, Dec 03, 2020 at 02:20:50AM -0800, John Conover wrote:
>> Possible to set c mode for *.ino files?
>
> Most easily you can add the association ".ino" => c-mode to your
> variable `auto-mode-alist', perhaps in your init file. The left
> hand side of the association is a regular expression which has
> to match the file names; in this case, perhaps something like
> "\\.ino\\'". Something like
>
> (add-to-list 'auto-mode-alist c-mode)
>
> in your init file might do.
I believe you wanted to write
(add-to-list 'auto-mode-alist '("\\.ino\\'" . c-mode))
> Alternatively, you could put something like
>
> /* -*- mode: c -*- */
>
> somewhere at the top of your files.
>
> For all the other possibilities and their ramifications, see
> "23.3 Choosing File Modes" in the manual; in the Interwebs
> here [1].
>
> Cheers
>
> [1]
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html
>
> - t