all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* c++-mode vs. c-mode
@ 2005-08-09 13:14 Rancier, Jeff
  2005-08-09 13:47 ` J. David Boyd
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Rancier, Jeff @ 2005-08-09 13:14 UTC (permalink / raw)


Is there a simple way to have c++-mode behave (or inherit) my customizations
for c-mode?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++-mode vs. c-mode
  2005-08-09 13:14 c++-mode vs. c-mode Rancier, Jeff
@ 2005-08-09 13:47 ` J. David Boyd
  2005-08-09 16:42 ` Kevin Rodgers
  2005-08-09 18:12 ` Eli Zaretskii
  2 siblings, 0 replies; 4+ messages in thread
From: J. David Boyd @ 2005-08-09 13:47 UTC (permalink / raw)


"Rancier, Jeff" <Jeff.Rancier@Sensis.com> writes:

> Is there a simple way to have c++-mode behave (or inherit) my customizations
> for c-mode?


If you really mean that you don't care about c++-mode per-se, but would be
happy with working on c++ code in c-mode, one way would be to add a construct
into your .emacs like this:

(setq auto-mode-alist
      (append '(("\\.C$"  . c-mode)
                ("\\.cc$" . c-mode)
                ("\\.hh$" . c-mode)
                ("\\.c$"  . c-mode)
                ("\\.h$"  . c-mode))
              auto-mode-alist))


to force c++ code to be edited in c-mode.


Dave in Largo, FL

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++-mode vs. c-mode
  2005-08-09 13:14 c++-mode vs. c-mode Rancier, Jeff
  2005-08-09 13:47 ` J. David Boyd
@ 2005-08-09 16:42 ` Kevin Rodgers
  2005-08-09 18:12 ` Eli Zaretskii
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Rodgers @ 2005-08-09 16:42 UTC (permalink / raw)


Rancier, Jeff wrote:
> Is there a simple way to have c++-mode behave (or inherit) my customizations
> for c-mode?

Put your customizations in a c-mode-common-hook function, or if you
don't want those customizations affecting Objective-C, Java, etc.
buffers: (add-hook 'c++-mode-hook (lambda () (run-hooks 'c-mode-hook)))

-- 
Kevin Rodgers

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++-mode vs. c-mode
  2005-08-09 13:14 c++-mode vs. c-mode Rancier, Jeff
  2005-08-09 13:47 ` J. David Boyd
  2005-08-09 16:42 ` Kevin Rodgers
@ 2005-08-09 18:12 ` Eli Zaretskii
  2 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2005-08-09 18:12 UTC (permalink / raw)


> From: "Rancier, Jeff" <Jeff.Rancier@Sensis.com>
> Date: Tue, 9 Aug 2005 09:14:37 -0400 
> 
> Is there a simple way to have c++-mode behave (or inherit) my customizations
> for c-mode?

What customizations are those, and how did you set things up to
activate them?

If you activate them from c++-mode-hook, one solution is to activate
them from c-mode-common-hook instead.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-08-09 18:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-09 13:14 c++-mode vs. c-mode Rancier, Jeff
2005-08-09 13:47 ` J. David Boyd
2005-08-09 16:42 ` Kevin Rodgers
2005-08-09 18:12 ` Eli Zaretskii

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.