From: Omar Polo <op@omarpolo.com>
To: tomas@tuxteam.de
Cc: help-gnu-emacs@gnu.org
Subject: Re: *.ino files as c mode?
Date: Thu, 03 Dec 2020 12:13:05 +0100 [thread overview]
Message-ID: <874kl387ni.fsf@omarpolo.com> (raw)
In-Reply-To: <20201203104123.GC7554@tuxteam.de>
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
next prev parent reply other threads:[~2020-12-03 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 10:20 *.ino files as c mode? John Conover
2020-12-03 10:25 ` Jean Louis
2020-12-03 10:31 ` Emanuel Berg via Users list for the GNU Emacs text editor
2020-12-03 10:41 ` tomas
2020-12-03 11:13 ` Omar Polo [this message]
2020-12-03 11:44 ` tomas
2020-12-03 17:28 ` Emanuel Berg 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=874kl387ni.fsf@omarpolo.com \
--to=op@omarpolo.com \
--cc=help-gnu-emacs@gnu.org \
--cc=tomas@tuxteam.de \
/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.