GNU bug report logs - #28746
27.0.50; cc-mode should automatically detect Objective-C headers

Previous Next

Packages: emacs, cc-mode;

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

Date: Sun, 8 Oct 2017 14:16:01 UTC

Severity: wishlist

Found in version 27.0.50

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 28746 <at> debbugs.gnu.org, Alan Mackenzie <acm <at> muc.de>
Subject: bug#28746: 27.0.50; cc-mode should automatically detect Objective-C headers
Date: Thu, 04 Feb 2021 18:30:48 +0100
Philipp Stephani <p.stephani2 <at> gmail.com> writes:

> Philipp <p.stephani2 <at> gmail.com> schrieb am So., 8. Okt. 2017 um 16:16 Uhr:
>
>  Visit a file with a file name extension of .h and the following
>  contents:
>
>  @interface foo {
>  }
>  - (void)method;
>  @end
>
>  The buffer will be in c-mode, not objc-mode.

This is still the case in Emacs 28, as far as I can tell.

>  CC-Mode should automatically detect that this is an Objective-C
>  header and switch to objc-mode.  Probably searching for @interface or
>  @implementation should cover most cases.
>
> It seems like CC-Mode is already doing something similar with `c-or-c++-mode'.
> Probably that functionality should be extended to cover Objective-C (and
> Objective-C++?) as well. 

Sounds reasonable to me.  I've added Alan to the CCs.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 131 days ago.

Previous Next


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