* riece-ctlseq.el (riece-ctlseq-hide-controls): New user option.
authorueno <ueno>
Tue, 4 May 2004 05:55:31 +0000 (05:55 +0000)
committerueno <ueno>
Tue, 4 May 2004 05:55:31 +0000 (05:55 +0000)
* riece-keyword.el (riece-keyword): Fixed the parent custom group.
* riece-url.el (riece-url): Fixed the parent custom group.

lisp/ChangeLog
lisp/riece-ctlseq.el
lisp/riece-keyword.el
lisp/riece-url.el

index 35ef5be..053df5f 100644 (file)
@@ -1,5 +1,12 @@
 2004-05-04  Daiki Ueno  <ueno@unixuser.org>
 
+       * riece-ctlseq.el (riece-ctlseq-hide-controls): New user option.
+
+       * riece-keyword.el (riece-keyword): Fixed the parent custom group.
+       * riece-url.el (riece-url): Fixed the parent custom group.
+
+2004-05-04  Daiki Ueno  <ueno@unixuser.org>
+
        * riece-ctlseq.el: New add-on.
        * COMPILE (riece-modules): Add riece-ctlseq.
        * Makefile.am (EXTRA_DIST): Add riece-ctlseq.el.
index 87729d5..1254011 100644 (file)
 
 ;;; Code:
 
-(require 'riece-highlight)
+(require 'riece-options)
 
-(defvar riece-ctlseq-colors
+(defgroup 'riece-ctlseq nil
+  "Highlight control sequences in IRC buffer."
+  :group 'riece)
+
+(defcustom riece-ctlseq-colors
   '("white" "black" "red" "orange" "yellow" "LightGreen" "DarkOliveGreen"
     "cyan4" "turquoise" "blue" "black" "black" "black" "black" "black"
-    "DarkBlue" "purple1" "purple2" "purple3" "magenta"))
+    "DarkBlue" "purple1" "purple2" "purple3" "magenta")
+  "List of colors can be used with ^C<fg>,<bg>."
+  :group 'riece-ctlseq
+  :type '(repeat (string :tag "Color")))
+
+(defcustom riece-ctlseq-hide-controls t
+  "If non-nil, control characters are hidden."
+  :group 'riece-ctlseq
+  :type 'boolean)
+
+(defcustom riece-ctlseq-face-cache-size 128
+  "Maximum length of the internal face cache."
+  :group 'riece-ctlseq
+  :type 'integer)
 
 (defvar riece-ctlseq-face-cache nil)
-(defvar riece-ctlseq-face-cache-size 128)
 (defvar riece-ctlseq-face-counter 0)
 
 (defun riece-ctlseq-compatible-attributes-p (this other)
     (while (string-match
            "[\x2\xF\x16\x1F]\\|\x3\\([0-9]+\\)?\\(,[0-9]+\\)?"
            (riece-message-text message) start)
-      (put-text-property (match-beginning 0) (match-end 0)
-                        'invisible 'riece-ctlseq (riece-message-text message))
+      (if riece-ctlseq-hide-controls
+         (put-text-property (match-beginning 0) (match-end 0)
+                            'invisible 'riece-ctlseq
+                            (riece-message-text message)))
       (if attrs
          (put-text-property start (match-beginning 0)
                             'riece-ctlseq-attributes (copy-sequence attrs)
                         (get-text-property start
                                            'riece-ctlseq-attributes))))))
 
-(defun riece-ctlseq-requires ()
-  '(riece-highlight))
-                           
 (defun riece-ctlseq-insinuate ()
   (add-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)
   (add-hook 'riece-after-insert-functions 'riece-ctlseq-scan-region))
index 37056e2..b07fa5e 100644 (file)
@@ -33,7 +33,7 @@
 
 (defgroup riece-keyword nil
   "Highlight keyword in IRC buffer."
-  :group 'riece-vars)
+  :group 'riece)
 
 (defcustom riece-keywords nil
   "Keywords to be highlightened."
index e57b752..f7155bc 100644 (file)
@@ -37,7 +37,7 @@
 
 (defgroup riece-url nil
   "URL Browsing in IRC buffer."
-  :group 'riece-vars)
+  :group 'riece)
 
 (defcustom riece-url-regexp  "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA-Z0-9_=#$@~`%&*+|\\/]"
   "Regular expression that matches URLs."