Commit 679a99da authored by Johan Sundström's avatar Johan Sundström
Browse files

Added special meaning to negative arguments for kom-list-news.

parent 42851c5e
2000-05-27 Johan Sundström <jhs@lysator.liu.se>
* commands2.el (kom-list-news): Now understands negative numeric
arguments as signifying "list conferences with at most |argument|
and at least one unread message in them". A prefix argument of
zero still lists all conferences.
* swedish-strings.el, english-strings.el (lyskom-message): Added
the string list-unread-with-at-most-n-unread.
2000-05-26 David Byers <davby@ida.liu.se>
......
......@@ -736,16 +736,19 @@ send. If DONTSHOW is non-nil, don't display the sent message."
(t nil)))
(sum 0)
(mship-confs (and (numberp num-arg)
(< num-arg 1)
(delq nil
(= num-arg 0)
(delq nil
(mapcar (lambda (el)
(when (not (membership-type->passive
(membership->type el)))
(membership->conf-no el)))
lyskom-membership))))
(nconfs 0))
(when num-arg
(cond
((> num-arg 0)
(lyskom-format-insert 'list-unread-with-n-unread num-arg))
((< num-arg 0)
(lyskom-format-insert 'list-unread-with-at-most-n-unread (- num-arg))))
(mapcar
(function
(lambda (info)
......@@ -755,9 +758,13 @@ send. If DONTSHOW is non-nil, don't display the sent message."
(setq mship-confs (delq (conf-stat->conf-no conf-stat) mship-confs))
(cond
((eq (read-info->type info) 'CONF)
(if (or (not num-arg)
(>= un num-arg))
(lyskom-insert
(if (or (not num-arg) ; no prefix argument
(and (>= num-arg 0) ; positive numeric argument
(>= un num-arg)) ; less than number of unreads
(and (not (= un 0)) ; unreads present,
(<= num-arg -1) ; negative numeric argument,
(<= un (- num-arg)))) ; at most -argument unreads
(lyskom-insert
(if (and (boundp 'lyskom-special-conf-name)
(stringp lyskom-special-conf-name)
(string-match lyskom-special-conf-name name))
......@@ -767,7 +774,7 @@ send. If DONTSHOW is non-nil, don't display the sent message."
nconfs (1+ nconfs)))))))
(read-list->all-entries lyskom-to-do-list))
(mapcar
(mapcar
(lambda (conf-no)
(lyskom-format-insert 'you-have-no-unreads conf-no))
mship-confs)
......
......@@ -611,6 +611,7 @@ The message you were sending to %#1M was:
(you-have-read-everything . "No news (is bad news).\n")
(total-unreads . "\nYou have %#1d unread text%#1?d%[%]%[s%] texts in %#2M.\n")
(list-unread-with-n-unread . "Listing conferences with at least %#1d unread.\n")
(list-unread-with-at-most-n-unread . "Listing conferences with at most %#1d unread.\n")
(waiting-for-anything .
"You are waiting for a text in any conference.\n")
(waiting-higher-than .
......
......@@ -599,6 +599,7 @@ Meddelandet du f
(you-have-read-everything . "Du har sett alla nyheter.\n")
(total-unreads . "\nDu har %#1d olst%#1?d%[%]%[a%] inlgg i %#2d mte%#2?d%[%]%[n%].\n")
(list-unread-with-n-unread . "Visar endast mten med minst %#1d olsta.\n")
(list-unread-with-at-most-n-unread . "Visar endast mten med som mest %#1d olsta.\n")
(waiting-for-anything .
"Du vntar p ett inlgg i vilket mte som helst.\n")
(waiting-higher-than .
......
Supports Markdown
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