* mode for preprocessed files
@ 2008-07-24 0:17 Dan Nicolaescu
2008-07-24 2:24 ` Stefan Monnier
2008-07-24 2:30 ` David De La Harpe Golden
0 siblings, 2 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2008-07-24 0:17 UTC (permalink / raw
To: emacs-devel
Currently C and C++ preprocessed files (.i and .ii, respectively) are
opened in fundamental mode.
Would anyone object if we would use c-mode and c++-mode for them by default?
I've been doing this locally for a long time without any problem.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 0:17 mode for preprocessed files Dan Nicolaescu
@ 2008-07-24 2:24 ` Stefan Monnier
2008-07-24 3:00 ` Dan Nicolaescu
2008-07-24 2:30 ` David De La Harpe Golden
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2008-07-24 2:24 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
> Currently C and C++ preprocessed files (.i and .ii, respectively) are
> opened in fundamental mode.
> Would anyone object if we would use c-mode and c++-mode for them by default?
> I've been doing this locally for a long time without any problem.
It might be OK, tho I wonder how often that's useful.
I.e. it's OK but put it way down the list, with a comment explaining why
.i and .ii are mapped to c-mode and c++-mode (it wouldn't have occurred
to me that those extensions are actually used for C and C++ files).
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 0:17 mode for preprocessed files Dan Nicolaescu
2008-07-24 2:24 ` Stefan Monnier
@ 2008-07-24 2:30 ` David De La Harpe Golden
1 sibling, 0 replies; 8+ messages in thread
From: David De La Harpe Golden @ 2008-07-24 2:30 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
Dan Nicolaescu wrote:
> Currently C and C++ preprocessed files (.i and .ii, respectively) are
> opened in fundamental mode.
>
Well, it's what gcc -save-temps uses...
> Would anyone object if we would use c-mode and c++-mode for them by default?
> I've been doing this locally for a long time without any problem.
>
FWIW, I still use .i, just out of habit, for asm includes, though
I guess that's not widespread anymore (was standard on Amiga), and I
should probably stop or one day I'll gcc -save-temps something important
into oblivion...
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 2:24 ` Stefan Monnier
@ 2008-07-24 3:00 ` Dan Nicolaescu
2008-07-24 12:52 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2008-07-24 3:00 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > Currently C and C++ preprocessed files (.i and .ii, respectively) are
> > opened in fundamental mode.
>
> > Would anyone object if we would use c-mode and c++-mode for them by default?
> > I've been doing this locally for a long time without any problem.
>
> It might be OK, tho I wonder how often that's useful.
> I.e. it's OK but put it way down the list, with a comment explaining why
> .i and .ii are mapped to c-mode and c++-mode
Done. But the list is created using autoloads... BTW, wasn't there a
plan to avoid doing that?
> (it wouldn't have occurred
> to me that those extensions are actually used for C and C++ files).
They are the standard extensions that C/C++ compilers generate when you
tell them to save the preprocessed file. Compilers accept files with
those extensions without wondering what the language is.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 3:00 ` Dan Nicolaescu
@ 2008-07-24 12:52 ` Stefan Monnier
2008-07-24 14:14 ` Dan Nicolaescu
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Stefan Monnier @ 2008-07-24 12:52 UTC (permalink / raw
To: Dan Nicolaescu; +Cc: emacs-devel
>> (it wouldn't have occurred
>> to me that those extensions are actually used for C and C++ files).
> They are the standard extensions that C/C++ compilers generate when you
> tell them to save the preprocessed file.
I know, but in all my years of C coding, I've never seen this
"feature" used. I've seen things piped through cpp, but not saved to
a .i(i) file.
> Compilers accept files with
> those extensions without wondering what the language is.
Of course, they don't need to wonder if it might be something completely
different since the mere fact of passing such a file to the compiler
already tells the compiler that it's some kind of source file, so at
worst the compiler has to decide which of the compiler's supported
source languages is used. Emacs has to take into account whether such
extensions are used in completely different contexts.
Stefan
PS: the .i and .ii extensions are not in Debian's /etc/mime.types, for example.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 12:52 ` Stefan Monnier
@ 2008-07-24 14:14 ` Dan Nicolaescu
2008-07-24 21:09 ` Miles Bader
2008-07-24 22:05 ` Richard M Stallman
2 siblings, 0 replies; 8+ messages in thread
From: Dan Nicolaescu @ 2008-07-24 14:14 UTC (permalink / raw
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> (it wouldn't have occurred
> >> to me that those extensions are actually used for C and C++ files).
> > They are the standard extensions that C/C++ compilers generate when you
> > tell them to save the preprocessed file.
>
> I know, but in all my years of C coding, I've never seen this
> "feature" used. I've seen things piped through cpp, but not saved to
> a .i(i) file.
When working on the compiler preprocessed files are pretty much the
norm. Yes, compiler people are a small minority, but they make the
world go around ... :-)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 12:52 ` Stefan Monnier
2008-07-24 14:14 ` Dan Nicolaescu
@ 2008-07-24 21:09 ` Miles Bader
2008-07-24 22:05 ` Richard M Stallman
2 siblings, 0 replies; 8+ messages in thread
From: Miles Bader @ 2008-07-24 21:09 UTC (permalink / raw
To: Stefan Monnier; +Cc: Dan Nicolaescu, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> I know, but in all my years of C coding, I've never seen this
> "feature" used. I've seen things piped through cpp, but not saved to
> a .i(i) file.
Hmm, I've certainly run across .i for such, and indeed, I seem to use
that extension for my own preprocessed files in a few of my makefiles
where I have rules for making them.
No idea where I picked that up though.
-Miles
--
((lambda (x) (list x x)) (lambda (x) (list x x)))
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: mode for preprocessed files
2008-07-24 12:52 ` Stefan Monnier
2008-07-24 14:14 ` Dan Nicolaescu
2008-07-24 21:09 ` Miles Bader
@ 2008-07-24 22:05 ` Richard M Stallman
2 siblings, 0 replies; 8+ messages in thread
From: Richard M Stallman @ 2008-07-24 22:05 UTC (permalink / raw
To: Stefan Monnier; +Cc: dann, emacs-devel
I have occasionally saved CPP output in files for the purpose of
debugging GCC. I don't think I ever used the extension .i for it, but
if there is such a convention now I suppose I would follow it.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-07-24 22:05 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-24 0:17 mode for preprocessed files Dan Nicolaescu
2008-07-24 2:24 ` Stefan Monnier
2008-07-24 3:00 ` Dan Nicolaescu
2008-07-24 12:52 ` Stefan Monnier
2008-07-24 14:14 ` Dan Nicolaescu
2008-07-24 21:09 ` Miles Bader
2008-07-24 22:05 ` Richard M Stallman
2008-07-24 2:30 ` David De La Harpe Golden
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.