emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#27133: closed (26.0.50; Todo-mode multiline item h


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#27133: closed (26.0.50; Todo-mode multiline item highlighting is broken)
Date: Mon, 29 May 2017 18:33:02 +0000

Your message dated Mon, 29 May 2017 20:32:26 +0200
with message-id <address@hidden>
and subject line Re: bug#27133: 26.0.50; Todo-mode multiline item highlighting 
is broken
has caused the debbugs.gnu.org bug report #27133,
regarding 26.0.50; Todo-mode multiline item highlighting is broken
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
27133: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=27133
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 26.0.50; Todo-mode multiline item highlighting is broken Date: Mon, 29 May 2017 20:19:57 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
If a todo-mode item contains more than one line (hard newline), then
typing `H' (`todo-toggle-item-highlighting') only highlights the first
line instead of the entire item.

2017-05-29  Stephen Berman  <address@hidden>

        Make `todo-toggle-item-highlighting' work on multiline items

        * lisp/calendar/todo-mode.el (todo-hl-line-range): New named
        function, replacing an anonymous function for the sake of
        `describe-variable'.
        (todo-modes-set-2): Use it as buffer-local value of
        hl-line-range-function and remove boundp test of this
        variable, so its value is available on invoking
        `todo-toggle-item-highlighting'.

diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 8155a4241a..7b27e7049d 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -6583,17 +6583,19 @@ todo-modes-set-1
     (visual-line-mode)
     (setq wrap-prefix (make-string todo-indent-to-here 32))))
 
+(defun todo-hl-line-range ()
+  "Make `todo-toggle-item-highlighting' highlight entire item."
+  (save-excursion
+    (when (todo-item-end)
+      (cons (todo-item-start)
+            (todo-item-end)))))
+
 (defun todo-modes-set-2 ()
   "Make some settings that apply to multiple Todo modes."
   (add-to-invisibility-spec 'todo)
   (setq buffer-read-only t)
   (setq-local desktop-save-buffer 'todo-desktop-save-buffer)
-  (when (boundp 'hl-line-range-function)
-    (setq-local hl-line-range-function
-               (lambda() (save-excursion
-                           (when (todo-item-end)
-                             (cons (todo-item-start)
-                                   (todo-item-end))))))))
+  (setq-local hl-line-range-function 'todo-hl-line-range))
 
 (defun todo-modes-set-3 ()
   "Make some settings that apply to multiple Todo modes."

In GNU Emacs 26.0.50 (build 29, x86_64-pc-linux-gnu, GTK+ Version 3.22.8)
 of 2017-05-28 built on rosalinde
Repository revision: 288b3ca2e519903653b9bc88d281ecd9f6b162a4
Windowing system distributor 'The X.Org Foundation', version 11.0.11901000

--- End Message ---
--- Begin Message --- Subject: Re: bug#27133: 26.0.50; Todo-mode multiline item highlighting is broken Date: Mon, 29 May 2017 20:32:26 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)
On Mon, 29 May 2017 20:19:57 +0200 Stephen Berman <address@hidden> wrote:

> If a todo-mode item contains more than one line (hard newline), then
> typing `H' (`todo-toggle-item-highlighting') only highlights the first
> line instead of the entire item.

Fixed in commit ed222c502b.


--- End Message ---

reply via email to

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