unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* hl-line-mode and visual-line-mode
@ 2011-12-22 15:55 Titus von der Malsburg
  2011-12-22 16:07 ` Titus von der Malsburg
  0 siblings, 1 reply; 2+ messages in thread
From: Titus von der Malsburg @ 2011-12-22 15:55 UTC (permalink / raw)
  To: help-gnu-emacs

In visual-line-mode, global-hl-line-mode marks the whole paragraph
(the buffer line) instead of only the visual line.  This can be fixed
with this redefinition of hl-line-range-function:
  (defun visual-line-line-range ()    (save-excursion      (cons
(progn (vertical-motion 0) (point))            (progn (vertical-motion
1) (point)))))

   (setq hl-line-range-function 'visual-line-line-range)

This works nicely except that it doesn't highlight the whole line but
only the text contained in that line.  The space between the last word
and the margin is not marked.  Only lines that end with a newline
character are completely highlighted.  How can I fix this?

Thanks for any suggestions!

  Titus



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-22 16:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-22 15:55 hl-line-mode and visual-line-mode Titus von der Malsburg
2011-12-22 16:07 ` Titus von der Malsburg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).