Update FSF's address.
[riece] / lisp / riece-keyword.el
index 03b1727..85251b7 100644 (file)
@@ -19,8 +19,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:
 
@@ -66,15 +66,13 @@ and the matched message object."
   :group 'riece-highlight-faces)
 (defvar riece-keyword-face 'riece-keyword-face)
 
-(defvar riece-keyword-enabled nil)
-
 (defconst riece-keyword-description
   "Detect keywords in IRC buffers.")
 
 ;;; The old XEmacs package doesn't have autoload setting for regexp-opt.
 (autoload 'regexp-opt "regexp-opt")
 (defun riece-keyword-message-filter (message)
-  (if (and riece-keyword-enabled
+  (if (and (get 'riece-keyword 'riece-addon-enabled)
           riece-keywords
           ;; Ignore messages which belongs to myself.
           (not (riece-message-own-p message)))
@@ -115,11 +113,8 @@ and the matched message object."
 (defun riece-keyword-insinuate ()
   (add-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
 
-(defun riece-keyword-enable ()
-  (setq riece-keyword-enabled t))
-
-(defun riece-keyword-disable ()
-  (setq riece-keyword-enabled nil))
+(defun riece-keyword-uninstall ()
+  (remove-hook 'riece-message-filter-functions 'riece-keyword-message-filter))
 
 (provide 'riece-keyword)