projects
/
riece
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cache credentials by default.
[riece]
/
lisp
/
riece-unread.el
diff --git
a/lisp/riece-unread.el
b/lisp/riece-unread.el
index
9283cd7
..
c07c840
100644
(file)
--- a/
lisp/riece-unread.el
+++ b/
lisp/riece-unread.el
@@
-18,8
+18,8
@@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 5
9 Temple Place - Suite 330
,
-;; Boston, MA 0211
1-1307
, USA.
+;; Free Software Foundation, Inc., 5
1 Franklin Street, Fifth Floor
,
+;; Boston, MA 0211
0-1301
, USA.
;;; Commentary:
;;; Commentary:
@@
-69,13
+69,11
@@
(defvar riece-unread-channels nil)
(defvar riece-unread-channels nil)
-(defvar riece-unread-enabled nil)
-
(defconst riece-unread-description
"Mark channels where new messages arrived.")
(defun riece-unread-after-display-message-function (message)
(defconst riece-unread-description
"Mark channels where new messages arrived.")
(defun riece-unread-after-display-message-function (message)
- (if
riece-unread-enabled
+ (if
(get 'riece-unread 'riece-addon-enabled)
(let ((target (if (riece-message-private-p message)
(riece-message-speaker message)
(riece-message-target message))))
(let ((target (if (riece-message-private-p message)
(riece-message-speaker message)
(riece-message-target message))))
@@
-87,20
+85,20
@@
(riece-emit-signal 'channel-list-changed)))))
(defun riece-unread-after-switch-to-channel-function (last)
(riece-emit-signal 'channel-list-changed)))))
(defun riece-unread-after-switch-to-channel-function (last)
- (if
riece-unread-enabled
+ (if
(get 'riece-unread 'riece-addon-enabled)
(setq riece-unread-channels
(delq (car (riece-identity-member riece-current-channel
riece-unread-channels))
riece-unread-channels))))
(defun riece-unread-format-identity-for-channel-list-buffer (index identity)
(setq riece-unread-channels
(delq (car (riece-identity-member riece-current-channel
riece-unread-channels))
riece-unread-channels))))
(defun riece-unread-format-identity-for-channel-list-buffer (index identity)
- (if (and
riece-unread-enabled
+ (if (and
(get 'riece-unread 'riece-addon-enabled)
(riece-identity-member identity riece-unread-channels))
(concat (format "%2d:!" index)
(riece-format-identity identity))))
(defun riece-unread-format-identity-for-channel-list-indicator (index identity)
(riece-identity-member identity riece-unread-channels))
(concat (format "%2d:!" index)
(riece-format-identity identity))))
(defun riece-unread-format-identity-for-channel-list-indicator (index identity)
- (if (and
riece-unread-enabled
+ (if (and
(get 'riece-unread 'riece-addon-enabled)
(riece-identity-member identity riece-unread-channels))
(let ((string (riece-format-identity identity))
(start 0))
(riece-identity-member identity riece-unread-channels))
(let ((string (riece-format-identity identity))
(start 0))
@@
-130,6
+128,9
@@
(let (requires)
(if (memq 'riece-highlight riece-addons)
(setq requires (cons 'riece-highlight requires)))
(let (requires)
(if (memq 'riece-highlight riece-addons)
(setq requires (cons 'riece-highlight requires)))
+ ;; To override riece-history's channel mark in the channel list buffer.
+ (if (memq 'riece-history riece-addons)
+ (setq requires (cons 'riece-history requires)))
;;; (if (memq 'riece-guess riece-addons)
;;; (setq requires (cons 'riece-guess requires)))
requires))
;;; (if (memq 'riece-guess riece-addons)
;;; (setq requires (cons 'riece-guess requires)))
requires))
@@
-178,8
+179,7
@@
(define-key riece-dialogue-mode-map
"u" 'riece-unread-switch-to-channel)
(define-key riece-channel-list-mode-map
(define-key riece-dialogue-mode-map
"u" 'riece-unread-switch-to-channel)
(define-key riece-channel-list-mode-map
- "u" 'riece-unread-switch-to-channel)
- (setq riece-unread-enabled t)
+ "u" 'riece-unread-switch-to-channel)
(riece-emit-signal 'channel-list-changed))
(defun riece-unread-disable ()
(riece-emit-signal 'channel-list-changed))
(defun riece-unread-disable ()
@@
-189,8
+189,7
@@
"u" nil)
(define-key riece-channel-list-mode-map
"u" nil)
"u" nil)
(define-key riece-channel-list-mode-map
"u" nil)
- (setq riece-unread-channels nil
- riece-unread-enabled nil)
+ (setq riece-unread-channels nil)
(riece-emit-signal 'channel-list-changed))
(provide 'riece-unread)
(riece-emit-signal 'channel-list-changed))
(provide 'riece-unread)