;; 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-ctlseq-face-cache nil)
(defvar riece-ctlseq-face-counter 0)
-(defvar riece-ctlseq-enabled nil)
-
-(defvar riece-ctlseq-description
+(defconst riece-ctlseq-description
"Mark up control sequences in IRC buffers.")
(defun riece-ctlseq-compatible-attributes-p (this other)
attrs)))
(defun riece-ctlseq-message-filter (message)
- (if riece-ctlseq-enabled
+ (if (get 'riece-ctlseq 'riece-addon-enabled)
(let ((start 0)
(end (length (riece-message-text message)))
attrs)
(defun riece-ctlseq-insinuate ()
(add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
-(defun riece-ctlseq-enable ()
- (setq riece-ctlseq-enabled t))
-
-(defun riece-ctlseq-disable ()
- (setq riece-ctlseq-enabled nil))
+(defun riece-ctlseq-uninstall ()
+ (remove-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter))
(provide 'riece-ctlseq)