1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-04 06:31:13 -08:00

* lisp/calendar/todo-mode.el: Restore old code.

This commit is contained in:
Po Lu 2022-03-23 16:51:01 +08:00
parent a34afbf2ae
commit b49d249ee5

View file

@ -1040,7 +1040,9 @@ empty line above the done items separator."
(eval-and-compile (require 'hl-line))
(when (memq major-mode
'(todo-mode todo-archive-mode todo-filtered-items-mode))
(hl-line-mode 'toggle)))
(if hl-line-mode
(hl-line-mode -1)
(hl-line-mode 1))))
(defvar todo--item-headers-hidden nil
"Non-nil if item date-time headers in current buffer are hidden.")
@ -6674,8 +6676,9 @@ Added to `window-configuration-change-hook' in Todo mode."
(defun todo-hl-line-range ()
"Make `todo-toggle-item-highlighting' highlight entire item."
(save-excursion
(when (and (todo-item-end) hl-line--overlay)
(move-overlay hl-line--overlay (todo-item-start) (todo-item-end)))))
(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."
@ -6683,7 +6686,7 @@ Added to `window-configuration-change-hook' in Todo mode."
(setq buffer-read-only t)
(setq-local todo--item-headers-hidden nil)
(setq-local desktop-save-buffer 'todo-desktop-save-buffer)
(add-hook 'hl-line-highlight-hook #'todo-hl-line-range nil t))
(setq-local hl-line-range-function #'todo-hl-line-range))
(defun todo-modes-set-3 ()
"Make some settings that apply to multiple Todo modes."