X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Friece-history.el;h=25b8e7e6c57b514beb10856e83ffcf8abf03d781;hb=2e935f0d418b1ebdf6315395faa66f6927ed9d1f;hp=497a2727d15b693f17cff38e04f2529f7c72f4e4;hpb=c663ebf2ebff0d8bc962291d6af965d3e5154f3a;p=elisp%2Friece.git diff --git a/lisp/riece-history.el b/lisp/riece-history.el index 497a272..25b8e7e 100644 --- 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 -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. ;;; Commentary: @@ -76,8 +76,6 @@ (defvar riece-channel-history nil) -(defvar riece-history-enabled nil) - (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) - (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) @@ -99,7 +97,7 @@ (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)) @@ -117,7 +115,7 @@ ;;; '(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))) @@ -155,12 +153,10 @@ (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 () - (setq riece-channel-history nil - riece-history-enabled nil) + (setq riece-channel-history nil) (riece-emit-signal 'channel-list-changed)) (provide 'riece-history)