GNU bug report logs - #36361
'hl-line-range-function' as list of choice

Previous Next

Package: emacs;

Reported by: Sebastian Urban <mrsebastianurban <at> gmail.com>

Date: Mon, 24 Jun 2019 16:31:01 UTC

Severity: wishlist

Full log


Message #17 received at 36361 <at> debbugs.gnu.org (full text, mbox):

From: Howard Melman <hmelman <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 36361 <at> debbugs.gnu.org
Subject: Re: bug#36361: 'hl-line-range-function' as list of choice
Date: Tue, 26 Oct 2021 15:17:52 -0400
> On Oct 26, 2021, at 3:11 PM, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
> Try this:
> 
>  (defun visual-line-range-function ()
>    "Return a cons cell of positions of begining and end 
>  of the current line in `visual-line-mode`. Meant to be used
>  as the value of `hl-line-range-function`."
>    (save-excursion
>      (cons (progn (vertical-motion 0) (point))
>            (progn (vertical-motion 1) (point)))))

That does seem to work well.  Thanks.

I hope visual-line-mode and hl-line-mode can be made to work 
well together out of the box.

Howard




This bug report was last modified 3 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.