[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36472: 27.0.50; Convey information by showing line numbers using dif
From: |
Dmitry Gutov |
Subject: |
bug#36472: 27.0.50; Convey information by showing line numbers using different colors? |
Date: |
Tue, 2 Jul 2019 18:49:38 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.1 |
On 02.07.2019 18:38, Eli Zaretskii wrote:
I don't understand: who would need to look up overlays? And how will
"it" know that it needs to look up overlays?
The function that diff-hl would add to the said hook. So it will know.
IOW, I don't think I understand the API you had in mind. You
originally said "a hook", which implies the display engine would call
a hook variable, but now it sounds like you had something else in
mind.
Something like:
(defvar display-line-number-renderers-functions nil
"The line number (a string) is mapped through all of the functions in
this list, in turn. Each receives it as an argument, and then the return
value is used. The functions are called in the buffer for which the line
numbers are displayed, at the beginning of a line which corresponds to
the given number.")
(add-hook 'display-line-number-renderers 'diff-hl-line-number-renderer)
(defun diff-hl-line-number-renderer (line-number-string)
(cl-case (get-text-property (point) 'diff-hl-indicator-type)
...)
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Dmitry Gutov, 2019/07/02
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Eli Zaretskii, 2019/07/02
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Dmitry Gutov, 2019/07/02
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Eli Zaretskii, 2019/07/02
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?,
Dmitry Gutov <=
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Eli Zaretskii, 2019/07/02
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Dmitry Gutov, 2019/07/03
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Eli Zaretskii, 2019/07/03
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Dmitry Gutov, 2019/07/07
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Eli Zaretskii, 2019/07/08
- bug#36472: 27.0.50; Convey information by showing line numbers using different colors?, Dmitry Gutov, 2019/07/15