all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Ergus <spacibba@aol.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Question about dir-locals c-mode.
Date: Sun, 08 Nov 2020 12:58:53 -0500	[thread overview]
Message-ID: <jwv361j4twa.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20201108161635.xri5oez4zarynl3b@Ergus> (Ergus's message of "Sun,  8 Nov 2020 17:16:35 +0100")

>>> (c++-mode . (...Long...))
>>> (c-mode . (...Long...))
>>FWIW, I had sent a patch to CC-mode to introduce a parent mode shared by
>>c-mode, c++-mode, and objc-mode, but Alan didn't like the idea.
> :( There is the c-mode-common-hook I was actually expecting that there
> should be something like c-mode-common. Somehow it seems intuitive for
> me. Some packages like irony have actually some hacks to go around this
> too.

Note that `c-mode-common-hook` is not just common to C-like languages
but applies to all modes using the CC-mode framework, which includes
java-mode, awk-mode, php-mode, sieve-mode, and various others.  So it
risks being "too common" for the kind of usage you describe (and yes, my
patch had two parent modes: one common to C, C++, and ObjC, and another
one on top common to all CC-mode derivatives).


        Stefan




      reply	other threads:[~2020-11-08 17:58 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 ` Question about dir-locals c-mode Ergus
2020-11-08  6:22   ` 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 [this message]

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=jwv361j4twa.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    --cc=spacibba@aol.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 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.