* liece-emacs.el (liece-emacs-unread-character): Abolish.
authorbg66 <bg66>
Mon, 11 Sep 2000 13:55:05 +0000 (13:55 +0000)
committerbg66 <bg66>
Mon, 11 Sep 2000 13:55:05 +0000 (13:55 +0000)
* liece-vars.el (liece-channel-unread-character): New variable.

* liece-xemacs.el (liece-xemacs-unread-mark): Simplify; Don't use
`featurep' and `console-type'.
(toplevel): Ditto.

lisp/ChangeLog
lisp/liece-emacs.el
lisp/liece-vars.el
lisp/liece-xemacs.el

index 8d767ca..10cbc97 100644 (file)
@@ -1,3 +1,13 @@
+2000-09-11  Akira Ohashi  <bg66@luck.gr.jp>
+
+       * liece-emacs.el (liece-emacs-unread-character): Abolish.
+
+       * liece-vars.el (liece-channel-unread-character): New variable.
+
+       * liece-xemacs.el (liece-xemacs-unread-mark): Simplify; Don't use
+       `featurep' and `console-type'.
+       (toplevel): Ditto.
+
 2000-09-11   Daiki Ueno  <ueno@unixuser.org>
 
        * liece-minibuf.el: Autoload `completing-read-multiple'; declare
@@ -58,7 +68,7 @@
        `liece-xemacs-channel-balloon-icon'.
        (liece-xemacs-unread-mark): Rename and simplified from
        `liece-xemacs-channel-balloon'.
-       (liece-xemacs-read-mark): Rename and simplefied from
+       (liece-xemacs-read-mark): Rename and simplified from
        `liece-xemacs-channel-balloon-kill'.
        (liece-xemacs-redisplay-unread-mark): New function.
        (toplevel): Add them to hook.
        * liece-commands.el (liece-command-beep): New function.
        Toggle the automatic beep notice when the channel message is received.
 
-       * liece.el (liece-dialogue-mode-map):
-       Bind "\C-B" to liece-dialogue-beep.
+       * liece.el (liece-dialogue-mode-map): Bind "B" to liece-dialogue-beep.
 
        * liece-vars.el (liece-default-beep): New variable.
        (liece-beep-when-invited): Ditto.
index 8f7761c..675bfeb 100644 (file)
   (autoload 'bitmap-stipple-xbm-file-to-stipple "bitmap-stipple")
   (autoload 'bitmap-stipple-insert-pixmap "bitmap-stipple"))
 
-(defcustom liece-emacs-unread-character "!"
-  "Unread character."
-  :type 'character
-  :group 'liece-look)
-
 ;;; @ widget emulation
 ;;; 
 (defvar liece-widget-keymap nil)
 ;;; 
 (defun liece-emacs-unread-mark (chnl)
   (if liece-display-unread-mark
-    (with-current-buffer liece-channel-list-buffer
-      (let ((buffer-read-only nil))
-       (goto-char (point-min))
-       (when (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
-          (goto-char (match-end 0))
-         (insert (concat " " liece-emacs-unread-character)))))))
+      (with-current-buffer liece-channel-list-buffer
+        (let ((buffer-read-only nil))
+         (goto-char (point-min))
+         (when (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
+            (goto-char (match-end 0))
+           (insert (concat " " liece-channel-unread-character)))))))
 
 (defun liece-emacs-read-mark (chnl)
   (if liece-display-unread-mark
-    (with-current-buffer liece-channel-list-buffer
-      (let ((buffer-read-only nil))
-        (goto-char (point-min))
-        (when (re-search-forward
-              (concat "^ ?[0-9]+: " chnl " "
-                      liece-emacs-unread-character "$") nil t)
-         (goto-char (- (match-end 0) 2))
-        (delete-char 2))))))
+      (with-current-buffer liece-channel-list-buffer
+        (let ((buffer-read-only nil))
+         (goto-char (point-min))
+         (when (re-search-forward
+                (concat "^ ?[0-9]+: " chnl " "
+                        liece-channel-unread-character "$") nil t)
+            (goto-char (- (match-end 0) 2))
+           (delete-char 2))))))
 
 (defun liece-emacs-redisplay-unread-mark ()
   (if liece-display-unread-mark
-    (let ((chnl))
       (dolist (chnl liece-channel-unread-list)
-        (liece-emacs-unread-mark chnl)))))
+        (liece-emacs-unread-mark chnl))))
 
 (add-hook 'liece-nick-insert-hook 'liece-emacs-nick-image-region)
 (add-hook 'liece-nick-replace-hook 'liece-emacs-nick-image-region)
index bf36572..28ecff9 100644 (file)
@@ -86,6 +86,11 @@ list buffer."
   :type 'boolean
   :group 'liece-look)
 
+(defcustom liece-channel-unread-character "!"
+  "Channel unread character."
+  :type 'character
+  :group 'liece-look)
+
 (defcustom liece-tab-stop-list '(2 4 6 8 10 12 14 16)
   "List of tab stop positions in dialogue buffer."
   :type '(repeat integer)
index a1bda48..5685451 100644 (file)
@@ -559,27 +559,30 @@ If ARG is given, don't hide splash buffer."
 ;;; 
 (defun liece-xemacs-unread-mark (chnl)
   (if liece-display-unread-mark
-    (with-current-buffer liece-channel-list-buffer
-      (let* ((buffer-read-only nil)
-             (file (liece-xemacs-icon-path
-                   liece-xemacs-unread-icon))
-            (glyph (make-glyph (vector 'xpm ':file file)))
-            ext)
-       (goto-char (point-min))
-       (when (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
-          (goto-char (match-end 0))
-         (insert " ")
-         (setq ext (make-extent (match-end 0) (1+ (match-end 0))))
-         (set-extent-end-glyph ext glyph))))))
+      (with-current-buffer liece-channel-list-buffer
+        (let* ((buffer-read-only nil)
+              (file (liece-xemacs-icon-path
+                     liece-xemacs-unread-icon))
+              (glyph (make-glyph
+                      (list (vector 'xpm :file file)
+                            (vector 'string
+                                    :data liece-channel-unread-character))))
+              ext)
+         (goto-char (point-min))
+         (when (re-search-forward (concat "^ ?[0-9]+: " chnl "$") nil t)
+            (goto-char (match-end 0))
+           (insert " ")
+           (setq ext (make-extent (match-end 0) (1+ (match-end 0))))
+           (set-extent-end-glyph ext glyph))))))
 
 (defun liece-xemacs-read-mark (chnl)
   (if liece-display-unread-mark
-    (with-current-buffer liece-channel-list-buffer
-      (let ((buffer-read-only nil))
-       (goto-char (point-min))
-       (when (re-search-forward (concat "^ ?[0-9]+: " chnl " $") nil t)
-          (goto-char (1- (match-end 0)))
-         (delete-char 1))))))
+      (with-current-buffer liece-channel-list-buffer
+        (let ((buffer-read-only nil))
+         (goto-char (point-min))
+         (when (re-search-forward (concat "^ ?[0-9]+: " chnl " $") nil t)
+            (goto-char (1- (match-end 0)))
+           (delete-char 1))))))
 
 (defun liece-xemacs-redisplay-unread-mark ()
   (if liece-display-unread-mark
@@ -619,15 +622,9 @@ If ARG is given, don't hide splash buffer."
 (add-hook 'liece-nick-replace-hook 'liece-xemacs-glyph-nick-region)
 (add-hook 'liece-nick-replace-hook 'liece-xemacs-set-drop-functions)
 
-(if (and (featurep 'xpm)
-        (memq (console-type) '(x gtk mswindows)))
-    (progn
-      (fset 'liece-redisplay-unread-mark 'liece-xemacs-redisplay-unread-mark)
-      (add-hook 'liece-channel-unread-hook 'liece-xemacs-unread-mark)
-      (add-hook 'liece-channel-read-hook 'liece-xemacs-read-mark))
-  (fset 'liece-redisplay-unread-mark 'liece-emacs-redisplay-unread-mark)
-  (add-hook 'liece-channel-unread-hook 'liece-emacs-unread-mark)
-  (add-hook 'liece-channel-read-hook 'liece-emacs-read-mark))
+(fset 'liece-redisplay-unread-mark 'liece-xemacs-redisplay-unread-mark)
+(add-hook 'liece-channel-unread-hook 'liece-xemacs-unread-mark)
+(add-hook 'liece-channel-read-hook 'liece-xemacs-read-mark)
 
 (provide 'liece-xemacs)