[Top][All Lists]

[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?

Attachment: 0001-Add-minor-mode-interface-for-display-line-numbers.patch
Description: minor mode

reply via email to

[Prev in Thread] Current Thread [Next in Thread]