mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Prevent an infinite loop in todo-mode (bug#66994)
* lisp/calendar/todo-mode.el (todo-item-start): Moving an item to a todo file (with `C-u m') that had not yet been read into a buffer puts point at the beginning of the file, from where it is impossible to reach todo-item-start by this function, so don't try in that case.
This commit is contained in:
parent
fa8cc4c9ee
commit
b7871cefe7
1 changed files with 6 additions and 1 deletions
|
@ -5240,7 +5240,12 @@ changes you have made in the order of the categories.
|
||||||
;; Point is on done items separator.
|
;; Point is on done items separator.
|
||||||
(save-excursion (beginning-of-line) (looking-at todo-category-done))
|
(save-excursion (beginning-of-line) (looking-at todo-category-done))
|
||||||
;; Buffer is widened.
|
;; Buffer is widened.
|
||||||
(looking-at (regexp-quote todo-category-beg)))
|
(looking-at (regexp-quote todo-category-beg))
|
||||||
|
;; Moving an item to a todo file (with `C-u m') that had
|
||||||
|
;; not yet been read into a buffer puts point at the
|
||||||
|
;; beginning of the file, from where it is impossible to
|
||||||
|
;; reach todo-item-start by the loop below (bug#66994).
|
||||||
|
(= (point) 1))
|
||||||
(goto-char (line-beginning-position))
|
(goto-char (line-beginning-position))
|
||||||
(while (not (looking-at todo-item-start))
|
(while (not (looking-at todo-item-start))
|
||||||
(forward-line -1))
|
(forward-line -1))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue