unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Ergus <spacibba@aol.com>
To: help-gnu-emacs@gnu.org
Subject: Question about dir-locals c-mode.
Date: Sun, 8 Nov 2020 00:50:56 +0100	[thread overview]
Message-ID: <20201107235056.5lwabkhbflx2gc6o@Ergus> (raw)
In-Reply-To: 20201107235056.5lwabkhbflx2gc6o.ref@Ergus

Hi:

This is probably a basic question, but I don't find any reference.

I have a .dir-locals.el file a bit long because the project implied is a
bit special regarding indentation. The problem is that the project is
either C and C++ code and the indentation in both cases is retty much
the same; but other files like python, bash or makefiles require
different indentation.

I am wondering if it is possible in the dir-locals to set a
configuration either for C and C++ without repeating myself.

Up to now I have:

(c++-mode . (...Long...))
(c-mode . (...Long...))

But everytime I update the C config I have to copy and paste in the
other...

is it possible to do something equivalent to:

((or c-mode c++-mode) . (...Long...))

Thanks in advance,
Ergus



       reply	other threads:[~2020-11-07 23:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20201107235056.5lwabkhbflx2gc6o.ref@Ergus>
2020-11-07 23:50 ` Ergus [this message]
2020-11-08  6:22   ` Question about dir-locals c-mode Jean Louis
2020-11-08 13:39   ` Daniel Martín
2020-11-08 14:50   ` Stefan Monnier
2020-11-08 16:16     ` Ergus
2020-11-08 17:58       ` 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=20201107235056.5lwabkhbflx2gc6o@Ergus \
    --to=spacibba@aol.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.
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).