[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Native line numbers landed on master
From: |
Alex |
Subject: |
Re: Native line numbers landed on master |
Date: |
Sun, 09 Jul 2017 16:56:23 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) |
Eli Zaretskii <address@hidden> writes:
>> From: Alex <address@hidden>
>> Cc: address@hidden
>> Date: Sat, 08 Jul 2017 16:38:44 -0600
>>
>> Why did you choose the name line-number-display-width over, e.g.,
>> display-line-number-width? It seems every other related variable has a
>> prefix of display-.
>
> Not every other one: the faces start with line-number.
>
> Is the name that bad? It sounded right at the time, but if others
> think it might confuse, we could rename it.
I think it's a little confusing, but it's not a huge deal.
>> P.S. I was thinking about how a minor mode for this should be
>> implemented. I attached a proof of concept, which includes a couple
>> extra variables to achieve line number width behaviour similar to
>> linum/nlinum. What do you think?
>
> Looks okay, although I'd drop the # part in the below:
>
> (add-hook 'pre-command-hook #'display-line-numbers-update-width nil t))
Is there a reason to drop it? I heard that the byte compiler uses #' to
check for existence of the function (and warns if it's not found), so it
seems like a nice default in these situations.
I've attached a patch below. I changed the menu bar to toggle the global
mode since the other toggles in the Show/Hide menu are also toggled
globally. Does it look alright for inclusion?
0001-Add-minor-mode-interface-for-display-line-numbers.patch
Description: minor mode
- Native line numbers landed on master, Eli Zaretskii, 2017/07/08
- Re: Native line numbers landed on master, martin rudalics, 2017/07/08
- Re: Native line numbers landed on master, Alex, 2017/07/08
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/09
- Re: Native line numbers landed on master,
Alex <=
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/10
- Re: Native line numbers landed on master, Alex, 2017/07/10
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/11
- Re: Native line numbers landed on master, Alex, 2017/07/11
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/12
- Re: Native line numbers landed on master, Alex, 2017/07/16
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/16
- Re: Native line numbers landed on master, Alex, 2017/07/16
- Re: Native line numbers landed on master, Eli Zaretskii, 2017/07/17
- Re: Native line numbers landed on master, Alex, 2017/07/17