projects
/
riece
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed.
[riece]
/
lisp
/
riece-history.el
diff --git
a/lisp/riece-history.el
b/lisp/riece-history.el
index
64ed6b9
..
25b8e7e
100644
(file)
--- a/
lisp/riece-history.el
+++ b/
lisp/riece-history.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:
@@
-35,10
+35,10
@@
(require 'riece-options)
(require 'riece-globals)
(require 'riece-options)
(require 'riece-globals)
-(require 'riece-highlight)
(require 'riece-identity)
(require 'riece-signal)
(require 'ring)
(require 'riece-identity)
(require 'riece-signal)
(require 'ring)
+(require 'riece-highlight)
(defgroup riece-history nil
"Manage history of channel shifting."
(defgroup riece-history nil
"Manage history of channel shifting."
@@
-76,8
+76,6
@@
(defvar riece-channel-history nil)
(defvar riece-channel-history nil)
-(defvar riece-history-enabled nil)
-
(defconst riece-history-description
"Manage history of channel shifting.")
(defconst riece-history-description
"Manage history of channel shifting.")
@@
-91,7
+89,7
@@
(nreverse result)))
(defun riece-history-format-identity-for-channel-list-buffer (index identity)
(nreverse result)))
(defun riece-history-format-identity-for-channel-list-buffer (index identity)
- (if (and
riece-history-enabled
+ (if (and
(get 'riece-history 'riece-addon-enabled)
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(concat (format "%2d:+" index)
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(concat (format "%2d:+" index)
@@
-99,7
+97,7
@@
(defun riece-history-format-identity-for-channel-list-indicator (index
identity)
(defun riece-history-format-identity-for-channel-list-indicator (index
identity)
- (if (and
riece-history-enabled
+ (if (and
(get 'riece-history 'riece-addon-enabled)
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(let ((string (riece-format-identity identity))
(not (ring-empty-p riece-channel-history))
(riece-identity-equal identity (ring-ref riece-channel-history 0)))
(let ((string (riece-format-identity identity))
@@
-117,10
+115,14
@@
;;; '(riece-guess)))
(defun riece-history-after-switch-to-channel-functions (last)
;;; '(riece-guess)))
(defun riece-history-after-switch-to-channel-functions (last)
- (if (and
riece-history-enabled
last
+ (if (and
(get 'riece-history 'riece-addon-enabled)
last
(not (riece-identity-equal last riece-current-channel)))
(ring-insert riece-channel-history last)))
(not (riece-identity-equal last riece-current-channel)))
(ring-insert riece-channel-history last)))
+(defun riece-history-requires ()
+ (if (memq 'riece-highlight riece-addons)
+ '(riece-highlight)))
+
(defun riece-history-insinuate ()
(add-hook 'riece-after-switch-to-channel-functions
'riece-history-after-switch-to-channel-functions)
(defun riece-history-insinuate ()
(add-hook 'riece-after-switch-to-channel-functions
'riece-history-after-switch-to-channel-functions)
@@
-151,12
+153,10
@@
(defun riece-history-enable ()
(setq riece-channel-history
(make-ring riece-channel-history-length))
(defun riece-history-enable ()
(setq riece-channel-history
(make-ring riece-channel-history-length))
- (setq riece-history-enabled t)
(riece-emit-signal 'channel-list-changed))
(defun riece-history-disable ()
(riece-emit-signal 'channel-list-changed))
(defun riece-history-disable ()
- (setq riece-channel-history nil
- riece-history-enabled nil)
+ (setq riece-channel-history nil)
(riece-emit-signal 'channel-list-changed))
(provide 'riece-history)
(riece-emit-signal 'channel-list-changed))
(provide 'riece-history)