From 199b0d390421502bbf5cf98d850178a6b9f433d8 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Mon, 13 May 2013 11:59:59 +0200 Subject: [PATCH] * todos.el (todos-modes-set-2): Restore point after finding start and end of hl-line-range-function. --- lisp/calendar/ChangeLog | 5 +++++ lisp/calendar/todos.el | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/calendar/ChangeLog b/lisp/calendar/ChangeLog index 19f515781b7..6767b97a26f 100644 --- a/lisp/calendar/ChangeLog +++ b/lisp/calendar/ChangeLog @@ -1,3 +1,8 @@ +2013-05-13 Stephen Berman + + * todos.el (todos-modes-set-2): Restore point after finding start + and end of hl-line-range-function. + 2013-05-13 Stephen Berman * todos.el: Fixes for item marking and marked items. diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index f951123bc2b..91470a38cf8 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -2995,8 +2995,9 @@ which is the value of the user option (add-to-invisibility-spec 'todos) (setq buffer-read-only t) (set (make-local-variable 'hl-line-range-function) - (lambda() (when (todos-item-end) - (cons (todos-item-start) (todos-item-end)))))) + (lambda() (save-excursion + (when (todos-item-end) + (cons (todos-item-start) (todos-item-end))))))) (defun todos-modes-set-3 () "" -- 2.39.5