* Re: ruler-mode.el fix following whitespace cleanup
[not found] <3E26CE2100B182E5@mel-rta6.wanadoo.fr>
@ 2003-02-04 17:09 ` Benjamin Riefenstahl
2003-02-04 17:36 ` Juanma Barranquero
2003-02-04 17:38 ` Werner LEMBERG
1 sibling, 1 reply; 16+ messages in thread
From: Benjamin Riefenstahl @ 2003-02-04 17:09 UTC (permalink / raw)
Cc: emacs-devel
Hi David,
"David PONCE" <David.Ponce@wanadoo.fr> writes:
> The following patch reintroduces the whitespace character needed
> after ?\ , that recent whitespace cleanup removed.
How about adding a comment there, so this can't happen again, like
(defcustom ruler-mode-margins-char ?\ ;; comment to protect space char
so long, benny
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 17:09 ` ruler-mode.el fix following whitespace cleanup Benjamin Riefenstahl
@ 2003-02-04 17:36 ` Juanma Barranquero
2003-02-04 23:19 ` Kim F. Storm
0 siblings, 1 reply; 16+ messages in thread
From: Juanma Barranquero @ 2003-02-04 17:36 UTC (permalink / raw)
Cc: emacs-devel
On 04 Feb 2003 18:09:14 +0100, Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> wrote:
> How about adding a comment there, so this can't happen again, like
>
> (defcustom ruler-mode-margins-char ?\ ;; comment to protect space char
That's exactly what I've done in the two cases found so far
(ruler-mode.el and international/character.el).
/L/e/k/t/u
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
[not found] <3E26CE2100B182E5@mel-rta6.wanadoo.fr>
2003-02-04 17:09 ` ruler-mode.el fix following whitespace cleanup Benjamin Riefenstahl
@ 2003-02-04 17:38 ` Werner LEMBERG
2003-02-04 18:10 ` Luc Teirlinck
1 sibling, 1 reply; 16+ messages in thread
From: Werner LEMBERG @ 2003-02-04 17:38 UTC (permalink / raw)
Cc: emacs-devel
> The following patch reintroduces the whitespace character needed after
> ?\ , that recent whitespace cleanup removed.
Is there any reason why this whitespace can't be protected with a
trailing comment character? I strongly suggest to put that into the
`Lisp Style Manual', if such a thing exists.
Werner
Index: ruler-mode.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/ruler-mode.el,v
retrieving revision 1.11
diff -c -r1.11 ruler-mode.el
*** ruler-mode.el 4 Feb 2003 12:01:41 -0000 1.11
--- ruler-mode.el 4 Feb 2003 16:36:34 -0000
***************
*** 179,185 ****
(integer :tag "Integer char value"
:validate ruler-mode-character-validate)))
! (defcustom ruler-mode-margins-char ?\
"*Character used in margin areas."
:group 'ruler-mode
:type '(choice
--- 179,185 ----
(integer :tag "Integer char value"
:validate ruler-mode-character-validate)))
! (defcustom ruler-mode-margins-char ?\ ;
"*Character used in margin areas."
:group 'ruler-mode
:type '(choice
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 17:38 ` Werner LEMBERG
@ 2003-02-04 18:10 ` Luc Teirlinck
2003-02-04 18:37 ` Luc Teirlinck
2003-02-06 2:42 ` Richard Stallman
0 siblings, 2 replies; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-04 18:10 UTC (permalink / raw)
Cc: emacs-devel
Werner Lemberg wrote:
> The following patch reintroduces the whitespace character needed after
> ?\ , that recent whitespace cleanup removed.
Is there any reason why this whitespace can't be protected with a
trailing comment character? I strongly suggest to put that into the
`Lisp Style Manual', if such a thing exists.
Are we absolutely sure that trailing whitespace within a string is
never meaningful? `;' has no special meaning within a string and
M-x delete-trailing-whitespace, as well as C-j, delete trailing
whitespace within strings, just like any other place.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 18:10 ` Luc Teirlinck
@ 2003-02-04 18:37 ` Luc Teirlinck
2003-02-06 2:42 ` Richard Stallman
1 sibling, 0 replies; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-04 18:37 UTC (permalink / raw)
Cc: emacs-devel
>From my previous message:
Are we absolutely sure that trailing whitespace within a string is
never meaningful?
maybe if the situation arose, one could replace:
"Beware! Trailing whitespace follows!
Second line."
By:
"Beware! Trailing whitespace follows! \
Second line."
or (might look relatively nicer):
"Beware! Trailing whitespace follows! \n\
Second line."
and escape the wrath of M-x delete-trailing-whitespace that way.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:19 ` Kim F. Storm
@ 2003-02-04 23:10 ` Luc Teirlinck
2003-02-04 23:25 ` Luc Teirlinck
2003-02-04 23:20 ` Juanma Barranquero
2003-02-05 11:56 ` Benjamin Riefenstahl
2 siblings, 1 reply; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-04 23:10 UTC (permalink / raw)
Cc: emacs-devel
Kim Storm wrote:
Doesn't this approach have the risk that the space is accidentally
replaced by a TAB?
(Meant is ?\ ;)
Yes if you leave multiple spaces there, but what if you leave only
one? Also the risk is already there without the `;'. If you leave
more trailing whitespace than needed, you run this risk, no matter
what. (Unless I misunderstanding something.)
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 17:36 ` Juanma Barranquero
@ 2003-02-04 23:19 ` Kim F. Storm
2003-02-04 23:10 ` Luc Teirlinck
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: Kim F. Storm @ 2003-02-04 23:19 UTC (permalink / raw)
Cc: emacs-devel
Juanma Barranquero <lektu@terra.es> writes:
> On 04 Feb 2003 18:09:14 +0100, Benjamin Riefenstahl <Benjamin.Riefenstahl@epost.de> wrote:
>
> > How about adding a comment there, so this can't happen again, like
> >
> > (defcustom ruler-mode-margins-char ?\ ;; comment to protect space char
>
> That's exactly what I've done in the two cases found so far
> (ruler-mode.el and international/character.el).
Doesn't this approach have the risk that the space is accidentally
replaced by a TAB?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:19 ` Kim F. Storm
2003-02-04 23:10 ` Luc Teirlinck
@ 2003-02-04 23:20 ` Juanma Barranquero
2003-02-05 6:21 ` Eli Zaretskii
2003-02-05 11:56 ` Benjamin Riefenstahl
2 siblings, 1 reply; 16+ messages in thread
From: Juanma Barranquero @ 2003-02-04 23:20 UTC (permalink / raw)
On 05 Feb 2003 00:19:39 +0100
storm@cua.dk (Kim F. Storm) wrote:
> Doesn't this approach have the risk that the space is accidentally
> replaced by a TAB?
I hadn't thought of it, because I never use tabs in my files if I can
avoid it (makefiles being the obvious exception :)
I suppose if that happens we'll have to find another way.
--
Juanma Barranquero <lektu@terra.es>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:10 ` Luc Teirlinck
@ 2003-02-04 23:25 ` Luc Teirlinck
2003-02-05 0:37 ` Luc Teirlinck
0 siblings, 1 reply; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-04 23:25 UTC (permalink / raw)
Cc: storm
>From my previous message:
Yes if you leave multiple spaces there, but what if you leave only
one?
Never mind, now I understand. C-M-q and there we go. Yes, this is a
real problem.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:25 ` Luc Teirlinck
@ 2003-02-05 0:37 ` Luc Teirlinck
0 siblings, 0 replies; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-05 0:37 UTC (permalink / raw)
Cc: storm
>From my previous message:
Never mind, now I understand. C-M-q and there we go. Yes, this is a
real problem.
After all no, if you use ;; does the doubling up not prevent
reindentation? Which means that ?\ ;; should be safe (or not?). That
might put the comment in an unconventional place, but it is obvious
why it is where it is, anyway.
But I like the ?\_ suggestion too. It would not only be clearer but
help prevent all kinds of accidents with accidental tabification.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:20 ` Juanma Barranquero
@ 2003-02-05 6:21 ` Eli Zaretskii
2003-02-05 9:37 ` Juanma Barranquero
0 siblings, 1 reply; 16+ messages in thread
From: Eli Zaretskii @ 2003-02-05 6:21 UTC (permalink / raw)
Cc: emacs-devel
On Wed, 5 Feb 2003, Juanma Barranquero wrote:
> I never use tabs in my files if I can avoid it (makefiles being the
> obvious exception :)
You mean, you have indent-tabs-mode set to nil? Because if you do, any
reindentation you do on a block of code will change the whitespace there
to something that many developers (and the GNU standards, AFAIK) consider
as non-canonical whitespace usage. This could mean another round of
gratuitous whitespace-only changes ;-)
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-05 6:21 ` Eli Zaretskii
@ 2003-02-05 9:37 ` Juanma Barranquero
2003-02-05 15:35 ` Eli Zaretskii
0 siblings, 1 reply; 16+ messages in thread
From: Juanma Barranquero @ 2003-02-05 9:37 UTC (permalink / raw)
Cc: emacs-devel
On Wed, 5 Feb 2003 08:21:33 +0200 (IST), Eli Zaretskii <eliz@is.elta.co.il> wrote:
> You mean, you have indent-tabs-mode set to nil?
Yes
> Because if you do, any
> reindentation you do on a block of code will change the whitespace there
> to something that many developers (and the GNU standards, AFAIK) consider
> as non-canonical whitespace usage.
I've found nothing about spaces vs. tabs at http://www.gnu.org/prep/standards.html,
but I'm prepared to believe I've missed it :)
Anyway, I rarely, if ever, do a reident in Emacs code; so the only
places affected are the lines I directly change. I'll look for a way to
set it conditionally on the file not being under subversion's CVS
control, though.
FWIW: Of the 254,095 lines of elisp code in lisp/ and subdirs, 68,836
start with a tab (~ 27%), while 7,745 start with 8+ spaces (~ 3%). I
refuse to believe those 7,745 lines are all my work :)
> This could mean another round of
> gratuitous whitespace-only changes ;-)
Ouch. But I'm not going to push for a widespread switch to spaces-only
files, even if I find it more sensible ;)
/L/e/k/t/u
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 23:19 ` Kim F. Storm
2003-02-04 23:10 ` Luc Teirlinck
2003-02-04 23:20 ` Juanma Barranquero
@ 2003-02-05 11:56 ` Benjamin Riefenstahl
2003-02-05 15:04 ` Luc Teirlinck
2 siblings, 1 reply; 16+ messages in thread
From: Benjamin Riefenstahl @ 2003-02-05 11:56 UTC (permalink / raw)
Cc: emacs-devel
Hi Kim,
storm@cua.dk (Kim F. Storm) writes:
> Doesn't this approach have the risk that the space is accidentally
> replaced by a TAB?
That issue is related, but it's a completely different problem, isn't
it? I mean it's not introduced by the comment.
so long, benny
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-05 11:56 ` Benjamin Riefenstahl
@ 2003-02-05 15:04 ` Luc Teirlinck
0 siblings, 0 replies; 16+ messages in thread
From: Luc Teirlinck @ 2003-02-05 15:04 UTC (permalink / raw)
Cc: storm
Benjamin Riefenstahl wrote:
storm@cua.dk (Kim F. Storm) writes:
> Doesn't this approach have the risk that the space is accidentally
> replaced by a TAB?
That issue is related, but it's a completely different problem, isn't
it? I mean it's not introduced by the comment.
It is introduced by the comment, if you leave more than one space, or
will be introduced by re-indentation, if you use only one `;'.
I believe that ?\ ;; is safe. (But I could be overlooking something.)
However, the tabification problem is indeed a lot broader than the
trailing ?\ -problem.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-05 9:37 ` Juanma Barranquero
@ 2003-02-05 15:35 ` Eli Zaretskii
0 siblings, 0 replies; 16+ messages in thread
From: Eli Zaretskii @ 2003-02-05 15:35 UTC (permalink / raw)
Cc: emacs-devel
> Date: Wed, 05 Feb 2003 10:37:15 +0100
> From: Juanma Barranquero <lektu@terra.es>
>
> > Because if you do, any
> > reindentation you do on a block of code will change the whitespace there
> > to something that many developers (and the GNU standards, AFAIK) consider
> > as non-canonical whitespace usage.
>
> I've found nothing about spaces vs. tabs at
> http://www.gnu.org/prep/standards.html
I was drawing conclusions from the default Emacs behavior ;-)
I will let Richard give the definitive ruling on this.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: ruler-mode.el fix following whitespace cleanup
2003-02-04 18:10 ` Luc Teirlinck
2003-02-04 18:37 ` Luc Teirlinck
@ 2003-02-06 2:42 ` Richard Stallman
1 sibling, 0 replies; 16+ messages in thread
From: Richard Stallman @ 2003-02-06 2:42 UTC (permalink / raw)
Cc: emacs-devel
Are we absolutely sure that trailing whitespace within a string is
never meaningful?
It seems unlikely that spaces before a newline in a string
are ever meaningful.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2003-02-06 2:42 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <3E26CE2100B182E5@mel-rta6.wanadoo.fr>
2003-02-04 17:09 ` ruler-mode.el fix following whitespace cleanup Benjamin Riefenstahl
2003-02-04 17:36 ` Juanma Barranquero
2003-02-04 23:19 ` Kim F. Storm
2003-02-04 23:10 ` Luc Teirlinck
2003-02-04 23:25 ` Luc Teirlinck
2003-02-05 0:37 ` Luc Teirlinck
2003-02-04 23:20 ` Juanma Barranquero
2003-02-05 6:21 ` Eli Zaretskii
2003-02-05 9:37 ` Juanma Barranquero
2003-02-05 15:35 ` Eli Zaretskii
2003-02-05 11:56 ` Benjamin Riefenstahl
2003-02-05 15:04 ` Luc Teirlinck
2003-02-04 17:38 ` Werner LEMBERG
2003-02-04 18:10 ` Luc Teirlinck
2003-02-04 18:37 ` Luc Teirlinck
2003-02-06 2:42 ` Richard Stallman
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.