* bug#36143: [PATCH] Fix typo in src/keyboard.c
@ 2019-06-09 3:16 Stefan Kangas
2019-06-09 6:26 ` Eli Zaretskii
[not found] ` <handler.36143.D36143.156006163211770.notifdone@debbugs.gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Stefan Kangas @ 2019-06-09 3:16 UTC (permalink / raw)
To: 36143
[-- Attachment #1: Type: text/plain, Size: 50 bytes --]
Please see attached patch.
Thanks,
Stefan Kangas
[-- Attachment #2: 0001-src-keyboard.c-tool_bar_items-Fix-typo.patch --]
[-- Type: application/octet-stream, Size: 929 bytes --]
From 94db8f399056f758438cb686191316b32bc01121 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 9 Jun 2019 05:02:39 +0200
Subject: [PATCH] ; * src/keyboard.c (tool_bar_items): Fix typo.
---
src/keyboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/keyboard.c b/src/keyboard.c
index 0c269d6422..39d81daac0 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7969,7 +7969,7 @@ tool_bar_items (Lisp_Object reuse, int *nitems)
{
/* No, so use major and minor mode keymaps and keymap property.
Note that tool-bar bindings in the local-map and keymap
- properties may not work reliable, as they are only
+ properties may not work reliably, as they are only
recognized when the tool-bar (or mode-line) is updated,
which does not normally happen after every command. */
ptrdiff_t nminor = current_minor_maps (NULL, &tmaps);
--
2.21.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* bug#36143: [PATCH] Fix typo in src/keyboard.c
2019-06-09 3:16 bug#36143: [PATCH] Fix typo in src/keyboard.c Stefan Kangas
@ 2019-06-09 6:26 ` Eli Zaretskii
2019-06-09 8:00 ` Stefan Kangas
[not found] ` <handler.36143.D36143.156006163211770.notifdone@debbugs.gnu.org>
1 sibling, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-06-09 6:26 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 36143-done
> From: Stefan Kangas <stefan@marxist.se>
> Date: Sun, 9 Jun 2019 05:16:28 +0200
>
> Please see attached patch.
Thanks, I pushed it.
However, it looks like your local settings make Emacs untabify C
sources, so in your patch as posted a TAB was converted into spaces,
unlike the indentation around the line you changed (I fixed that
before committing). Please in the future be sure to edit the Emacs
sources without such local settings; we only prefer spaces to TABs in
Lisp sources, see .dir-locals.el in the repository.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36143: [PATCH] Fix typo in src/keyboard.c
2019-06-09 6:26 ` Eli Zaretskii
@ 2019-06-09 8:00 ` Stefan Kangas
0 siblings, 0 replies; 6+ messages in thread
From: Stefan Kangas @ 2019-06-09 8:00 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 36143-done
Eli Zaretskii <eliz@gnu.org> writes:
> Thanks, I pushed it.
>
> [...] Please in the future be sure to edit the Emacs
> sources without such local settings; we only prefer spaces to TABs in
> Lisp sources, see .dir-locals.el in the repository.
Got it, thank you for taking care of it and installing it.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36143: [PATCH] Fix typo in src/keyboard.c)
[not found] ` <handler.36143.D36143.156006163211770.notifdone@debbugs.gnu.org>
@ 2019-06-09 13:20 ` Noam Postavsky
2019-06-09 13:56 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Noam Postavsky @ 2019-06-09 13:20 UTC (permalink / raw)
To: 36143; +Cc: Stefan Kangas
> However, it looks like your local settings make Emacs untabify C
> sources, so in your patch as posted a TAB was converted into spaces,
> unlike the indentation around the line you changed (I fixed that
> before committing). Please in the future be sure to edit the Emacs
> sources without such local settings; we only prefer spaces to TABs in
> Lisp sources, see .dir-locals.el in the repository.
Oh, I also didn't realize C sources were supposed to be TABified. Maybe
.dir-locals.el should have an explicit (indent-tabs-mode . t) setting
under c-mode? Especially since with GNU indent style,
indent-tabs-mode=t results in a file which mixes tabs and spaces, so
it's not obvious that the tabs are really intentional.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36143: [PATCH] Fix typo in src/keyboard.c)
2019-06-09 13:20 ` bug#36143: [PATCH] Fix typo in src/keyboard.c) Noam Postavsky
@ 2019-06-09 13:56 ` Eli Zaretskii
2019-06-09 14:07 ` Noam Postavsky
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2019-06-09 13:56 UTC (permalink / raw)
To: Noam Postavsky; +Cc: 36143, stefan
> From: Noam Postavsky <npostavs@gmail.com>
> Date: Sun, 09 Jun 2019 09:20:52 -0400
> Cc: , Stefan Kangas <stefan@marxist.se>
>
> Oh, I also didn't realize C sources were supposed to be TABified. Maybe
> .dir-locals.el should have an explicit (indent-tabs-mode . t) setting
> under c-mode?
It'd be fine with me, but maybe others will object.
I think it's okay to indent new C code with spaces, but when a few
lines are modified in an otherwise TAB-indented block, that makes the
source unaligned when reindented, so IMO should be avoided. And in
this case, it was even more extreme: a line was modified only very
slightly, so changing whitespace for only that single line was IMO
gross.
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#36143: [PATCH] Fix typo in src/keyboard.c)
2019-06-09 13:56 ` Eli Zaretskii
@ 2019-06-09 14:07 ` Noam Postavsky
0 siblings, 0 replies; 6+ messages in thread
From: Noam Postavsky @ 2019-06-09 14:07 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: stefan, 36143
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Noam Postavsky <npostavs@gmail.com>
>> Date: Sun, 09 Jun 2019 09:20:52 -0400
>> Cc: , Stefan Kangas <stefan@marxist.se>
>>
>> Oh, I also didn't realize C sources were supposed to be TABified. Maybe
>> .dir-locals.el should have an explicit (indent-tabs-mode . t) setting
>> under c-mode?
> I think it's okay to indent new C code with spaces,
Oh, in that case the current .dir-locals.el (i.e., no explicit
indent-tabs-mode setting for c-mode) is okay. And I don't really want
to open up the TABs vs spaces debate, so let's leave it as is.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-06-09 14:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-09 3:16 bug#36143: [PATCH] Fix typo in src/keyboard.c Stefan Kangas
2019-06-09 6:26 ` Eli Zaretskii
2019-06-09 8:00 ` Stefan Kangas
[not found] ` <handler.36143.D36143.156006163211770.notifdone@debbugs.gnu.org>
2019-06-09 13:20 ` bug#36143: [PATCH] Fix typo in src/keyboard.c) Noam Postavsky
2019-06-09 13:56 ` Eli Zaretskii
2019-06-09 14:07 ` Noam Postavsky
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).