projects
/
riece
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
* riece-commands.el (riece-command-next-channel): Circularly
[riece]
/
lisp
/
riece-commands.el
diff --git
a/lisp/riece-commands.el
b/lisp/riece-commands.el
index
48cd591
..
28b0d39
100644
(file)
--- a/
lisp/riece-commands.el
+++ b/
lisp/riece-commands.el
@@
-79,6
+79,11
@@
(while (and pointer
(null (car pointer)))
(setq pointer (cdr pointer)))
(while (and pointer
(null (car pointer)))
(setq pointer (cdr pointer)))
+ (when (null pointer)
+ (setq pointer riece-current-channels)
+ (while (and pointer
+ (null (car pointer)))
+ (setq pointer (cdr pointer))))
(if (car pointer)
(riece-command-switch-to-channel (car pointer))
(error "No such channel!")))))
(if (car pointer)
(riece-command-switch-to-channel (car pointer))
(error "No such channel!")))))
@@
-93,9
+98,13
@@
(start riece-current-channels)
channel)
(while (and start (not (eq start pointer)))
(start riece-current-channels)
channel)
(while (and start (not (eq start pointer)))
- (if (car start)
- (setq channel (car start)))
+ (setq channel (car start))
(setq start (cdr start)))
(setq start (cdr start)))
+ (when (null channel)
+ (setq start (copy-sequence riece-current-channels))
+ (setq start (delq nil start))
+ (and (> (length start) 1)
+ (setq channel (nth (1- (length start)) start))))
(if channel
(riece-command-switch-to-channel channel)
(error "No such channel!")))))
(if channel
(riece-command-switch-to-channel channel)
(error "No such channel!")))))