From: ueno Date: Tue, 19 Sep 2000 05:16:39 +0000 (+0000) Subject: Synch up with `liece-2_0'. X-Git-Tag: liece-1_4_7~51 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=f6ae3f62eecb2c666e9a56380bdb17d981af30c4;p=elisp%2Fliece.git Synch up with `liece-2_0'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 25a0790..254dc44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,31 @@ +2000-09-19 Daiki Ueno + + * liece-menu.el (liece-menu-callback-set-operators): Rename from + `liece-menu-callback-mode+o'. + (liece-menu-callback-set-voices): Rename from + `liece-menu-callback-mode+v'. + (liece-menu-callback-unset-operators): Rename from + `liece-menu-callback-mode-o'. + (liece-menu-callback-unset-voices): Rename from + `liece-menu-callback-mode-v'. + + * liece-nick.el (liece-nick-region-opers): Abolish. + (liece-nick-region-voices): Abolish. + (liece-nick-update-region): Don't set them. + + * liece.el (liece-dialogue-mode-map): Don't bind `liece-command-exec', + `liece-command-lusers' and `liece-command-userhost'. + + * liece-commands.el (liece-command-exec): Abolish. + (liece-command-inline): Abolish. + (liece-command-set-operators): Rename from `liece-command-mode+o'. + (liece-command-set-voices): Rename from `liece-command-mode+v'. + (liece-command-qualify-nicks): New function. + (liece-command-mode-o): Abolish. + (liece-command-mode-v): Abolish. + (liece-command-userhost): Abolish. + (liece-command-lusers): Abolish. + 2000-09-18 Daiki Ueno * liece-vars.el (liece-channel-buffer-mode): Set default to t. @@ -22,6 +50,8 @@ (liece-menu-channel-menu): Move `liece-command-own-freeze' from 'liece-menu-IRC-menu'. (liece-menu-channel-menu): New menu item `liece-dialogue-beep'. + (liece-menu-channel-menu): New menu item + `liece-command-unread-channel'. 2000-09-17 Akira Ohashi diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el index de437de..53ab9ec 100644 --- a/lisp/liece-commands.el +++ b/lisp/liece-commands.el @@ -176,13 +176,6 @@ Optional argument NO-CONS specifies timestamp format is cons cell." (while (not (string-equal (setq message (read-string "> ")) "")) (liece-command-send-message message)))) -(defun liece-command-inline () - "Send current line as a message to the IRC server." - (interactive) - (beginning-of-line) - (liece-send (buffer-substring (point)(progn (end-of-line) (point)))) - (liece-next-line 1)) - (defun liece-command-join-channel (join-channel-var key) "Join a JOIN-CHANNEL-VAR with KEY." (let ((nicks liece-nick-alist) nick) @@ -448,11 +441,6 @@ With - as argument, list all channels." (liece-send "LIST %s" (liece-channel-real channel)) ))) -(defun liece-command-lusers () - "List the number of users and servers." - (interactive) - (liece-send "LUSERS")) - (defun liece-command-modec (chnl change) "Send a MODE command to this CHNL. Argument CHANGE ." @@ -482,107 +470,61 @@ Argument CHANGE ." (list chnl (read-from-minibuffer prompt nil liece-minibuffer-map)))) (liece-send "MODE %s %s" (liece-channel-real chnl) change)) -(defun liece-command-mode+o (opers) - "Send a MODE +o OPERS command." - (interactive - (let ((opers (liece-channel-get-operators)) oper - (nicks (liece-channel-get-nicks)) - (completion-ignore-case t)) - (setq nicks (filter-elements - nick nicks - (not (liece-nick-member nick opers))) - opers (liece-minibuffer-completing-read-multiple - (_ "Assign operational privilege to: ") (list-to-alist nicks))) - (list opers))) - (let (ops) - (dolist (oper opers) - (push oper ops) - (when (= (length ops) liece-compress-mode-length) - (liece-send "MODE %s +%s %s" - (liece-channel-real liece-current-channel) - (string-times "o" liece-compress-mode-length) - (string-join ops " ")) - (setq ops nil))) - (if ops - (liece-send "MODE %s +%s %s" - (liece-channel-real liece-current-channel) - (string-times "o" (length ops)) - (string-join ops " "))))) - -(defun liece-command-mode-o (opers) - "Send a MODE -o OPERS command." - (interactive - (let ((completion-ignore-case t) - (opers (liece-channel-get-operators)) oper nicks) - (setq nicks (liece-minibuffer-completing-read-multiple - (_ "Divest operational privilege from: ") (list-to-alist opers))) - (list nicks))) - (let (ops) - (dolist (oper opers) - (push oper ops) - (when (= (length ops) liece-compress-mode-length) - (liece-send "MODE %s -%s %s" - (liece-channel-real liece-current-channel) - (string-times "o" liece-compress-mode-length) - (string-join ops " ")) - (setq ops nil))) - (if ops - (liece-send "MODE %s -%s %s" - (liece-channel-real liece-current-channel) - (string-times "o" (length ops)) - (string-join ops " "))))) - -(defun liece-command-mode+v (voices) - "Send a MODE +v VOICES command." +(defun liece-command-qualify-nicks (mode nicks val) + (liece-send + "MODE %s %c%s %s" + (liece-channel-real liece-current-channel) + (if val ?+ ?-) (make-string (length nicks) ?o) + (string-join nicks " "))) + +(defun liece-command-set-operators (nicks &optional arg) (interactive - (let ((voices (append (liece-channel-get-voices) - (liece-channel-get-operators))) - voice - (nicks (liece-channel-get-nicks)) + (let ((opers (liece-channel-get-operators)) (completion-ignore-case t) - (count 0)) - (setq nicks (filter-elements nick nicks - (not (string-assoc-ignore-case nick voices))) - voices (liece-minibuffer-completing-read-multiple - (_ "Allow to speak: ") (list-to-alist nicks))) - (list voices))) - (let (vcs) - (dolist (voice voices) - (push voice vcs) - (when (= (length vcs) liece-compress-mode-length) - (liece-send "MODE %s +%s %s" - (liece-channel-real liece-current-channel) - (string-times "v" liece-compress-mode-length) - (string-join vcs " ")) - (setq vcs nil))) - (if vcs - (liece-send "MODE %s +%s %s" - (liece-channel-real liece-current-channel) - (string-times "v" (length vcs)) - (string-join vcs " "))))) - -(defun liece-command-mode-v (voices) - "Send a MODE -v VOICES command." + nicks) + (if current-prefix-arg + (setq nicks (liece-minibuffer-completing-read-multiple + (_ "Divest operational privilege from: ") + (list-to-alist opers))) + (setq nicks (liece-channel-get-nicks) + nicks (filter-elements nick nicks + (not (liece-nick-member nick opers))) + nicks (liece-minibuffer-completing-read-multiple + (_ "Assign operational privilege to: ") + (list-to-alist nicks)))) + (list nicks current-prefix-arg))) + (let (run) + (unwind-protect + (dolist (nick nicks) + (push nick run) + (if (= (length run) liece-compress-mode-length) + (liece-command-qualify-nicks ?o run (not arg)))) + (when run + (liece-command-qualify-nicks ?o run (not arg)))))) + +(defun liece-command-set-voices (nicks &optional arg) (interactive - (let ((completion-ignore-case t) - (voices (liece-channel-get-voices)) voice nicks) - (setq nicks (liece-minibuffer-completing-read-multiple - (_ "Forbid to speak: ") (list-to-alist voices))) - (list nicks))) - (let (vcs) - (dolist (voice voices) - (push voice vcs) - (when (= (length vcs) liece-compress-mode-length) - (liece-send "MODE %s -%s %s" - (liece-channel-real liece-current-channel) - (string-times "v" liece-compress-mode-length) - (string-join vcs " ")) - (setq vcs nil))) - (if vcs - (liece-send "MODE %s -%s %s" - (liece-channel-real liece-current-channel) - (string-times "v" (length vcs)) - (string-join vcs " "))))) + (let ((voices (liece-channel-get-voices)) + (completion-ignore-case t) + nicks) + (if current-prefix-arg + (setq nicks (liece-minibuffer-completing-read-multiple + (_ "Forbid to speak: ") (list-to-alist voices))) + (setq voices (append voices (liece-channel-get-operators)) + nicks (liece-channel-get-nicks) + nicks (filter-elements nick nicks + (not (liece-nick-member nick voices))) + nicks (liece-minibuffer-completing-read-multiple + (_ "Allow to speak: ") (list-to-alist nicks)))) + (list nicks current-prefix-arg))) + (let (run) + (unwind-protect + (dolist (nick nicks) + (push nick run) + (if (= (length run) liece-compress-mode-length) + (liece-command-qualify-nicks ?v run (not arg)))) + (when run + (liece-command-qualify-nicks ?v run (not arg)))))) (defun liece-command-message (address message) "Send ADDRESS a private MESSAGE." @@ -852,16 +794,6 @@ NAMES lists users per channel (call-interactively (function liece-command-generic)) (self-insert-command 1))) -(defun liece-command-exec (command) - "Execute COMMAND, stdout to dialogue." - (interactive "sShell command: ") - (shell-command command t) - (let ((opoint (point))) - (while (< (point) (mark)) - (liece-command-enter-message) - (set-buffer liece-command-buffer)) - (push-mark opoint t))) - (defun liece-command-yank-send (&optional arg) "Send message from yank buffer. Prefix argument ARG is regarded as distance from yank pointer." @@ -1175,16 +1107,6 @@ Argument ARG is prefix argument of toggle status." (insert "+ " friend "\n") (insert "- " friend "\n"))))) -(defun liece-command-userhost (nicks) - "Ask for the hostnames of NICKS." - (interactive - (let (nicks (completion-ignore-case t)) - (setq nicks (liece-minibuffer-completing-read-multiple - (_ "Userhost nick") - (list-to-alist liece-nick-alist))) - (list nicks))) - (liece-send "USERHOST :%s" (mapconcat 'identity nicks ","))) - (defun liece-command-show-last-kill () "Dig last kill from KILL and show it." (interactive) diff --git a/lisp/liece-menu.el b/lisp/liece-menu.el index 43738f3..a46969e 100644 --- a/lisp/liece-menu.el +++ b/lisp/liece-menu.el @@ -55,13 +55,13 @@ ["CTCP PING" liece-menu-callback-ctcp-ping liece-nick-region-nicks] "----" - ["Set Channel Operator(s)" liece-menu-callback-mode+o + ["Set Channel Operator(s)" liece-menu-callback-set-operators liece-nick-region-nicks] - ["Set Channel Voice(s)" liece-menu-callback-mode+v + ["Set Channel Voice(s)" liece-menu-callback-set-voices liece-nick-region-nicks] - ["Unset Channel Operator(s)" liece-menu-callback-mode-o + ["Unset Channel Operator(s)" liece-menu-callback-unset-operators liece-nick-region-nicks] - ["Unset Channel Voice(s)" liece-menu-callback-mode-v + ["Unset Channel Voice(s)" liece-menu-callback-unset-voices liece-nick-region-nicks] "----" ["Kick" liece-menu-callback-kick @@ -121,6 +121,8 @@ (or liece-current-channels liece-current-chat-partners)] ["Go to previous channel" liece-command-previous-channel (or liece-current-channels liece-current-chat-partners)] + ["Go to unread channel" liece-command-unread-channel + (or liece-current-channels liece-current-chat-partners)] ["Rotate left channels" liece-command-pop (or liece-current-channels liece-current-chat-partners)] ["Rotate right channels" liece-command-push @@ -268,27 +270,37 @@ (dolist (nick liece-nick-region-nicks) (liece-command-kick nick))) -(defun liece-menu-callback-mode+o () +(defun liece-menu-callback-set-operators () (interactive) - (dolist (oper liece-nick-region-opers) + (let ((opers (liece-channel-get-operators))) (setq liece-nick-region-nicks - (string-list-remove-ignore-case oper liece-nick-region-nicks))) - (liece-command-mode+o liece-nick-region-nicks)) + (filter-elements nick liece-nick-region-nicks + (not (liece-nick-member nick opers))))) + (liece-command-set-operators liece-nick-region-nicks)) -(defun liece-menu-callback-mode+v () +(defun liece-menu-callback-set-voices () (interactive) - (dolist (voice liece-nick-region-voices) + (let ((voices (liece-channel-get-voices))) (setq liece-nick-region-nicks - (string-list-remove-ignore-case voice liece-nick-region-nicks))) - (liece-command-mode+v liece-nick-region-nicks)) + (filter-elements nick liece-nick-region-nicks + (not (liece-nick-member nick voices))))) + (liece-command-set-voices liece-nick-region-nicks)) -(defun liece-menu-callback-mode-o () +(defun liece-menu-callback-unset-operators () (interactive) - (liece-command-mode-o liece-nick-region-opers)) + (let ((opers (liece-channel-get-operators))) + (setq liece-nick-region-nicks + (filter-elements nick liece-nick-region-nicks + (liece-nick-member nick opers)))) + (liece-command-set-operators liece-nick-region-nicks t)) -(defun liece-menu-callback-mode-v () +(defun liece-menu-callback-unset-voices () (interactive) - (liece-command-mode-v liece-nick-region-voices)) + (let ((voices (liece-channel-get-voices))) + (setq liece-nick-region-nicks + (filter-elements nick liece-nick-region-nicks + (liece-nick-member nick voices)))) + (liece-command-set-voices liece-nick-region-nicks t)) (provide 'liece-menu) diff --git a/lisp/liece-nick.el b/lisp/liece-nick.el index 247728d..570c47d 100644 --- a/lisp/liece-nick.el +++ b/lisp/liece-nick.el @@ -305,14 +305,10 @@ (liece-nick-join user chnl))))) (defvar liece-nick-region-nicks nil) -(defvar liece-nick-region-opers nil) -(defvar liece-nick-region-voices nil) ;;;###liece-autoload (defun liece-nick-update-region () - (setq liece-nick-region-nicks nil - liece-nick-region-opers nil - liece-nick-region-voices nil) + (setq liece-nick-region-nicks nil) (save-excursion (let (region nick) (if (not (region-active-p)) @@ -331,10 +327,6 @@ (while (not (eobp)) (setq nick (widget-value (widget-at (1+ (point))))) (push nick liece-nick-region-nicks) - (if (memq (char-after) '(?@ ?+)) - (push nick liece-nick-region-voices)) - (if (eq ?@ (char-after)) - (push nick liece-nick-region-opers)) (beginning-of-line 2)))))) (defun liece-nick-add-buttons (start end) diff --git a/lisp/liece-version.el b/lisp/liece-version.el index 742f28b..d64e70c 100644 --- a/lisp/liece-version.el +++ b/lisp/liece-version.el @@ -36,7 +36,7 @@ (provide 'liece-version) (product-provide 'liece-version - (product-define "Liece" nil '(1 4 4))) + (product-define "Liece" nil '(1 4 5))) (defconst liece-environment-version (concat diff --git a/lisp/liece.el b/lisp/liece.el index a9c3e05..a8ca428 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -202,7 +202,6 @@ If optional argument SAFE is nil, overwrite previous definitions." "/" liece-command-generic ">" end-of-buffer "<" beginning-of-buffer - "!" liece-command-exec "|" liece-command-show-last-kill "a" liece-command-away "b" liece-command-submit-bug-report @@ -230,8 +229,6 @@ If optional argument SAFE is nil, overwrite previous definitions." "t" liece-command-topic "T" liece-command-timestamp "\C-t" liece-command-find-timestamp - "u" liece-command-lusers - "U" liece-command-userhost "v" liece-command-browse-url "w" liece-command-who) @@ -266,11 +263,7 @@ If optional argument SAFE is nil, overwrite previous definitions." "\r" liece-command-enter-message [tab] liece-command-complete [(meta control c) >] liece-command-push - [(meta control c) <] liece-command-pop - [(meta control c) o] liece-command-mode+o - [(meta control c) O] liece-command-mode-o - [(meta control c) v] liece-command-mode+v - [(meta control c) V] liece-command-mode-v) + [(meta control c) <] liece-command-pop) (liece-define-keys (liece-command-map "\C-c" liece-command-mode-map) "\177" liece-command-scroll-down @@ -281,8 +274,6 @@ If optional argument SAFE is nil, overwrite previous definitions." ">" liece-command-next-channel "<" liece-command-previous-channel "a" liece-command-away - "c" liece-command-inline - "\C-a" liece-command-previous-channel "\C-f" liece-command-freeze "\C-j" liece-command-next-channel "\C-n" liece-command-names @@ -291,7 +282,7 @@ If optional argument SAFE is nil, overwrite previous definitions." "L" liece-command-load-vars "M" liece-command-own-freeze "\C-m" liece-command-modec - "o" liece-command-mode+o + "o" liece-command-set-operators "O" liece-command-toggle-nick-buffer-mode "\C-o" liece-command-toggle-channel-buffer-mode "\C-p" liece-command-part @@ -299,16 +290,14 @@ If optional argument SAFE is nil, overwrite previous definitions." "\C-r" mule-caesar-region "s" liece-command-set-window-style "S" liece-command-save-vars - "v" liece-command-mode+v + "v" liece-command-set-voices "\C-v" liece-command-browse-url "\C-y" liece-command-yank-send) (set-keymap-parent liece-command-map liece-dialogue-mode-map) (liece-define-keys liece-nick-mode-map - "o" liece-command-mode+o - "O" liece-command-mode-o - "v" liece-command-mode+v - "V" liece-command-mode-v + "o" liece-command-set-operators + "v" liece-command-set-voices "f" liece-command-finger " " liece-command-nick-scroll-up "\177" liece-command-nick-scroll-down