[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Advice needed on modeline customization hack...
From: |
Eli Zaretskii |
Subject: |
Re: Advice needed on modeline customization hack... |
Date: |
Mon, 17 Apr 2017 09:00:24 +0300 |
> Date: Sun, 16 Apr 2017 18:57:40 -0400
> From: "Perry E. Metzger" <address@hidden>
> Cc: Stefan Monnier <address@hidden>, address@hidden
>
> Attached is an improved patch, including documentation changes.
Thanks. Allow me a few comments below.
> Comments solicited. I'm not fond of the name
> "column-number-mode-starts-from-zero" by the way.
How about column-number-indicator-zero-based instead?
> address@hidden column-number-mode-starts-from-zero
> + In Column Number mode, the displayed column number begins at zero at
> +the start of a line. If you would prefer for the displayed column
> +number to begin at one, you may set
> address@hidden to @code{nil}.
The first sentence is ambiguous with the current bidirectional
display, because "start of line" is ambiguous. I suggest to use the
wording with which we describe current-column:
... the displayed column number counts from 0 at the left margin of
the window.
I also think that using digits 0 and 1 is better than using the words,
but that's my personal preference, so if you feel strongly about using
words, I won't object.
Also, please leave 2 spaces between sentences, as we use the US
English conventions in our documentation.
> @item %c
> -The current column number of point.
> +The current column number of point, starting from zero.
> +
> address@hidden %C
> +The current column number of point, starting from one.
I think "zero-based" and "one-based" is better. Or maybe include a
more detailed description of how the column is counted.
Please also add a NEWS entry about this new option.
> diff --git a/lisp/simple.el b/lisp/simple.el
> index 5f70adedc4..821880b1f3 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -7198,6 +7198,10 @@ column-number-mode
> If called from Lisp, enable the mode if ARG is omitted or nil."
> :global t :group 'mode-line)
>
> +(defvar column-number-mode-starts-from-zero t
> + "When set to true, Column Number mode displays columns starting from zero.
> +Otherwise, displayed column numbers start from one.")
This should be a defcustom, not defvar. I think it's best to have it
in xdisp.c, where the feature is implemented, in which case you should
add the necessary stuff to cus-start.el to allow its customization by
Custom.
What about the required change to mode_line_update_needed?
- Re: Advice needed on modeline customization hack..., (continued)
- Re: Advice needed on modeline customization hack..., Stefan Monnier, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- Re: Advice needed on modeline customization hack..., Clément Pit-Claudel, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- Re: Advice needed on modeline customization hack..., Clément Pit-Claudel, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- RE: Advice needed on modeline customization hack..., Drew Adams, 2017/04/16
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/16
- Re: Advice needed on modeline customization hack...,
Eli Zaretskii <=
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17
- Re: Advice needed on modeline customization hack..., Eli Zaretskii, 2017/04/17
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17
- Re: Advice needed on modeline customization hack..., Eli Zaretskii, 2017/04/17
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17
- Re: Advice needed on modeline customization hack..., Eli Zaretskii, 2017/04/17
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17
- Re: Advice needed on modeline customization hack..., Noam Postavsky, 2017/04/17
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17
- Re: Advice needed on modeline customization hack..., Perry E. Metzger, 2017/04/17