Commit 5f14a985 authored by Joel Rosdahl's avatar Joel Rosdahl
Browse files

* commands1.el (lyskom-get-least-used-mark-types-alist): Handle

nil in mark list got from cache-get-marked-texts.
parent 777abb7b
2003-10-26 Joel Rosdahl <joel@rosdahl.net>
* commands1.el (lyskom-get-least-used-mark-types-alist): Handle
nil in mark list got from cache-get-marked-texts.
2003-10-23 Joel Rosdahl <joel@rosdahl.net>
Fix bug 1137:
......
......@@ -2371,13 +2371,14 @@ increasing number of marks per mark type (and, when equal, by mark type)."
(cnt-alist nil)) ; the number of texts marked by each mark type
;; Count the number of texts marked per mark type:
(while (not (null mark-list))
(let* ((mark (car mark-list))
(type (mark->mark-type mark))
(tcnt (assq type cnt-alist)))
(when tcnt (setq tcnt (cdr tcnt)))
(setq cnt-alist
(lyskom-set-alist
cnt-alist type (if (null tcnt) 1 (1+ tcnt)))))
(let ((mark (car mark-list)))
(when mark
(let* ((type (mark->mark-type mark))
(tcnt (assq type cnt-alist)))
(when tcnt (setq tcnt (cdr tcnt)))
(setq cnt-alist
(lyskom-set-alist
cnt-alist type (if (null tcnt) 1 (1+ tcnt)))))))
(setq mark-list (cdr mark-list)))
;; Sort the list, least-used, lowest number of mark type first:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment