;; 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:
(defvar riece-channel-history nil)
-(defvar riece-history-enabled nil)
-
(defconst riece-history-description
"Manage history of channel shifting.")
(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)
(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))
;;; '(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)))
(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)