* bug#12199: c-guess doesn't guess indent-tabs-mode
@ 2012-08-14 7:20 Johan Walles
2019-10-30 23:28 ` Stefan Kangas
2021-06-01 7:35 ` Lars Ingebrigtsen
0 siblings, 2 replies; 5+ messages in thread
From: Johan Walles @ 2012-08-14 7:20 UTC (permalink / raw)
To: 12199
Package: emacs
Version: 24.1.1
Hi Emacsers!
c-guess seems not to guess the correct value for indent-tabs-mode.
Try this:
1. Set indent-tabs-mode to nil.
2. Load a C file indented with tabs.
3. c-guess
4. Do describe-variable on indent-tabs-mode
Current result:
"Its value is nil"
Expected result:
"Its value is t" (since c-guess should have noticed that tabs are used
for indentation)
Note:
In my case this makes c-guess much less useful than it could have
been, since I work on both tab and space indented files.
Regards //Johan
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#12199: c-guess doesn't guess indent-tabs-mode
2012-08-14 7:20 bug#12199: c-guess doesn't guess indent-tabs-mode Johan Walles
@ 2019-10-30 23:28 ` Stefan Kangas
2021-06-01 7:35 ` Lars Ingebrigtsen
1 sibling, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2019-10-30 23:28 UTC (permalink / raw)
To: Johan Walles; +Cc: 12199
found 12199 26.1
thanks
Johan Walles <johan.walles@gmail.com> writes:
> Package: emacs
> Version: 24.1.1
>
> Hi Emacsers!
>
> c-guess seems not to guess the correct value for indent-tabs-mode.
>
> Try this:
> 1. Set indent-tabs-mode to nil.
> 2. Load a C file indented with tabs.
> 3. c-guess
> 4. Do describe-variable on indent-tabs-mode
>
> Current result:
> "Its value is nil"
>
> Expected result:
> "Its value is t" (since c-guess should have noticed that tabs are used
> for indentation)
>
> Note:
> In my case this makes c-guess much less useful than it could have
> been, since I work on both tab and space indented files.
>
> Regards //Johan
I can reproduce this on Emacs 26.1. I'm not sure if this is a bug or a
feature request.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#12199: c-guess doesn't guess indent-tabs-mode
2012-08-14 7:20 bug#12199: c-guess doesn't guess indent-tabs-mode Johan Walles
2019-10-30 23:28 ` Stefan Kangas
@ 2021-06-01 7:35 ` Lars Ingebrigtsen
2021-06-01 12:01 ` Eli Zaretskii
1 sibling, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-01 7:35 UTC (permalink / raw)
To: Johan Walles; +Cc: Alan Mackenzie, 12199
[-- Attachment #1: Type: text/plain, Size: 587 bytes --]
Johan Walles <johan.walles@gmail.com> writes:
> Try this:
> 1. Set indent-tabs-mode to nil.
> 2. Load a C file indented with tabs.
> 3. c-guess
> 4. Do describe-variable on indent-tabs-mode
>
> Current result:
> "Its value is nil"
>
> Expected result:
> "Its value is t" (since c-guess should have noticed that tabs are used
> for indentation)
This still seems to be the case in Emacs 28.
I've included my test file here. Perhaps Alan has some insights here?
(Added to the CCs.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: indent.c --]
[-- Type: text/x-csrc, Size: 28 bytes --]
main () {
foo();
bar();
}
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#12199: c-guess doesn't guess indent-tabs-mode
2021-06-01 7:35 ` Lars Ingebrigtsen
@ 2021-06-01 12:01 ` Eli Zaretskii
2021-06-02 5:13 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-06-01 12:01 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: acm, 12199, johan.walles
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 01 Jun 2021 09:35:19 +0200
> Cc: Alan Mackenzie <acm@muc.de>, 12199@debbugs.gnu.org
>
> > Try this:
> > 1. Set indent-tabs-mode to nil.
> > 2. Load a C file indented with tabs.
> > 3. c-guess
> > 4. Do describe-variable on indent-tabs-mode
> >
> > Current result:
> > "Its value is nil"
> >
> > Expected result:
> > "Its value is t" (since c-guess should have noticed that tabs are used
> > for indentation)
>
> This still seems to be the case in Emacs 28.
>
> I've included my test file here. Perhaps Alan has some insights here?
> (Added to the CCs.)
AFAICT, c-guess.el doesn't try to guess the value of indent-tabs-mode,
it only guesses indentation parameters specific to CC Mode.
IOW, this feature, if it belongs to c-guess.el, was never implemented.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#12199: c-guess doesn't guess indent-tabs-mode
2021-06-01 12:01 ` Eli Zaretskii
@ 2021-06-02 5:13 ` Lars Ingebrigtsen
0 siblings, 0 replies; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-06-02 5:13 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: acm, 12199, johan.walles
Eli Zaretskii <eliz@gnu.org> writes:
> AFAICT, c-guess.el doesn't try to guess the value of indent-tabs-mode,
> it only guesses indentation parameters specific to CC Mode.
Ah, right. And looking more closely at that file, it doesn't talk about
indent-tabs-mode at all, so I guess this bug report it mistaken. (But
as you say, it could possibly be a new feature.)
But c-guess works as documented here, I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-06-02 5:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-14 7:20 bug#12199: c-guess doesn't guess indent-tabs-mode Johan Walles
2019-10-30 23:28 ` Stefan Kangas
2021-06-01 7:35 ` Lars Ingebrigtsen
2021-06-01 12:01 ` Eli Zaretskii
2021-06-02 5:13 ` Lars Ingebrigtsen
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.