GNU bug report logs - #29339
27.0.50; CC-mode doesn't know about .mm and .M suffixes for Objective-C++

Previous Next

Packages: cc-mode, emacs;

Reported by: Philipp <p.stephani2 <at> gmail.com>

Date: Fri, 17 Nov 2017 13:38:01 UTC

Severity: wishlist

Merged with 2732

Found in version 27.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Alan Mackenzie <acm <at> muc.de>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 29339 <at> debbugs.gnu.org
Subject: bug#29339: 27.0.50; CC-mode doesn't know about .mm and .M suffixes for Objective-C++
Date: Fri, 22 Dec 2017 12:56:57 +0000
Hello, Philipp.

On Thu, Dec 21, 2017 at 19:22:05 +0000, Philipp Stephani wrote:
> Alan Mackenzie <acm <at> muc.de> schrieb am Fr., 17. Nov. 2017 um 20:00 Uhr:

> > In article <mailman.3878.1510925890.27995.bug-gnu-emacs <at> gnu.org> you
> > wrote:

> > > GCC uses .mm or .M for Objective-C++,
> > > cf. https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Overall-Options.html.
> > > However, neither `auto-mode-alist' nor `cc-other-file-alist' contain
> > > these file extensions.

> > I don't think there's an Objective-C++ mode out there in the wild.  So
> > what existing mode should be used for *.mm and *.M?  Is that mode a good
> > enough fit to be able, in good conscience, to use it for Obj-C++?


> According to https://www.emacswiki.org/emacs/ObjectiveCMode#toc2 objc-mode
> is the most appropriate mode for now, until a true objc++-mode is added.

That only answers the first question, not the second.  If we put .M and
.mm into CC Mode or auto-mode-alist in Emacs, that implies some sort of
commitment to support the language (Objective-C++).  If Objective-C Mode
already almost supports it properly, that is one thing, but if the match
is less good, it could involve a lot of work.

From what I can gather, Objective-C++ is a bit of a mixture between
Objective-C and C++, much as its name implies.  Do these individual
facets fit together (from a CC Mode point of view) without clashing too
much?  According to Wikipedia, the language is not formerly defined in
any standard.  What, then, is the language?

Do you know of anybody working on an Objective-C++ Mode?

-- 
Alan Mackenzie (Nuremberg, Germany).




This bug report was last modified 3 years and 356 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.