From 3a93c2e7849ebd42bc4213af19da65a4cd189f1e Mon Sep 17 00:00:00 2001 From: bg66 Date: Mon, 11 Sep 2000 13:55:05 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 15 ++++++++++++--- lisp/liece-emacs.el | 36 +++++++++++++++-------------------- lisp/liece-vars.el | 5 +++++ lisp/liece-xemacs.el | 51 ++++++++++++++++++++++++-------------------------- 4 files changed, 56 insertions(+), 51 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8d767ca..10cbc97 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2000-09-11 Akira Ohashi + + * 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 * 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. @@ -250,8 +260,7 @@ * 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. diff --git a/lisp/liece-emacs.el b/lisp/liece-emacs.el index 8f7761c..675bfeb 100644 --- a/lisp/liece-emacs.el +++ b/lisp/liece-emacs.el @@ -41,11 +41,6 @@ (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) @@ -242,29 +237,28 @@ ;;; (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) diff --git a/lisp/liece-vars.el b/lisp/liece-vars.el index bf36572..28ecff9 100644 --- a/lisp/liece-vars.el +++ b/lisp/liece-vars.el @@ -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) diff --git a/lisp/liece-xemacs.el b/lisp/liece-xemacs.el index a1bda48..5685451 100644 --- a/lisp/liece-xemacs.el +++ b/lisp/liece-xemacs.el @@ -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) -- 1.7.10.4