From: ueno Date: Wed, 20 Sep 2000 16:37:03 +0000 (+0000) Subject: Synch up with `liece-1_4_4-4'. X-Git-Tag: liece-2_0_0-pre1~23 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=367b26807f317c588fc87b0fd8d757aa066d11e6;p=elisp%2Fliece.git Synch up with `liece-1_4_4-4'. * liece-commands.el (liece-command-toggle-away): Rename from `liece-command-away'. (liece-command-toggle-freeze): Rename from `liece-command-freeze'. (liece-command-toggle-own-freeze): Rename from `liece-command-own-freeze'. (liece-command-toggle-beep): Rename from `liece-command-beep'. * liece.el (liece-dialogue-beep): Abolish. (liece-dialogue-freeze): Abolish. (liece-dialogue-own-freeze): Abolish. (liece-initialize-buffers): Don't parse error message. (liece): Assume `liece-away-message' is nil. (liece-command-map): Don't bind `liece-command-freeze' and `liece-command-own-freeze'. (liece-dialogue-mode-map): Don't bind `liece-command-timestamp' and `liece-command-find-timestamp'; bind `liece-command-toggle-private' to "C-t p"; bind `liece-command-toggle-away' to "C-t a"; bind `liece-command-toggle-freeze' to "C-t f"; bind `liece-command-toggle-own-freeze' to "C-t o". * liece-minibuf.el (liece-minibuffer-parse-modes): Don't complete mode flags when completing an argument. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cae7099..4f5c785 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,29 @@ +2000-09-20 Daiki Ueno + + * liece-commands.el (liece-command-toggle-away): Rename from + `liece-command-away'. + (liece-command-toggle-freeze): Rename from `liece-command-freeze'. + (liece-command-toggle-own-freeze): Rename from + `liece-command-own-freeze'. + (liece-command-toggle-beep): Rename from `liece-command-beep'. + + * liece.el (liece-dialogue-beep): Abolish. + (liece-dialogue-freeze): Abolish. + (liece-dialogue-own-freeze): Abolish. + (liece-initialize-buffers): Don't parse error message. + (liece): Assume `liece-away-message' is nil. + (liece-command-map): Don't bind `liece-command-freeze' and + `liece-command-own-freeze'. + (liece-dialogue-mode-map): Don't bind `liece-command-timestamp' + and `liece-command-find-timestamp'; bind + `liece-command-toggle-private' to "C-t p"; bind + `liece-command-toggle-away' to "C-t a"; bind + `liece-command-toggle-freeze' to "C-t f"; bind + `liece-command-toggle-own-freeze' to "C-t o". + + * liece-minibuf.el (liece-minibuffer-parse-modes): Don't complete + mode flags when completing an argument. + 2000-09-19 Daiki Ueno * liece-version.el (liece-version): Bump up to 2.0.0. diff --git a/lisp/liece-commands.el b/lisp/liece-commands.el index 53ab9ec..c491216 100644 --- a/lisp/liece-commands.el +++ b/lisp/liece-commands.el @@ -669,13 +669,6 @@ query information to the foreign server." (liece-send "INVITE %s %s" invite-nick-var (liece-channel-real invite-channel-var))) -(defun liece-command-away (awaymsg) - "Mark/unmark yourself as being away. -Leave message AWAYMSG." - (interactive "sAway message: ") - (liece-send "AWAY :%s" awaymsg) - (setq liece-away-message awaymsg)) - (defun liece-command-scroll-down (lines) "Scroll LINES down dialogue buffer from command buffer." (interactive "P") @@ -722,7 +715,18 @@ Leave message AWAYMSG." (end-of-buffer (message "End of buffer")))))) -(defun liece-command-freeze (&optional arg) +(defun liece-command-toggle-away (&optional away-message) + "Mark yourself as being away." + (interactive + (if current-prefix-arg + (let ((away-message (read-string "Away message: "))) + (list away-message)))) + (if away-message + (liece-send "AWAY :%s" away-message) + (liece-send "AWAY")) + (setq liece-away-message away-message)) + +(defun liece-command-toggle-freeze (&optional arg) "Prevent automatic scrolling of the dialogue window. If prefix argument ARG is non-nil, toggle frozen status." (interactive "P") @@ -731,7 +735,7 @@ If prefix argument ARG is non-nil, toggle frozen status." liece-dialogue-buffer) (if arg (prefix-numeric-value arg)))) -(defun liece-command-own-freeze (&optional arg) +(defun liece-command-toggle-own-freeze (&optional arg) "Prevent automatic scrolling of the dialogue window. The difference from `liece-command-freeze' is that your messages are hidden. If prefix argument ARG is non-nil, toggle frozen status." @@ -741,7 +745,7 @@ If prefix argument ARG is non-nil, toggle frozen status." liece-dialogue-buffer) (if arg (prefix-numeric-value arg)))) -(defun liece-command-beep (&optional arg) +(defun liece-command-toggle-beep (&optional arg) "Toggle the automatic beep notice when the channel message is received." (interactive "P") (liece-set-beep (if liece-channel-buffer-mode @@ -749,6 +753,21 @@ If prefix argument ARG is non-nil, toggle frozen status." liece-dialogue-buffer) (if arg (prefix-numeric-value arg)))) +(defun liece-command-toggle-private () + "Toggle between private mode and channel mode." + (interactive) + (case (prog1 liece-command-buffer-mode + (liece-toggle-command-buffer-mode)) + (chat + (if liece-current-channel + (liece-switch-to-channel liece-current-channel)) + (setq liece-command-buffer-mode-indicator "Channels")) + (channel + (if liece-current-chat-partner + (liece-switch-to-channel liece-current-chat-partner)) + (setq liece-command-buffer-mode-indicator "Partners"))) + (liece-channel-change)) + (defun liece-command-quit (&optional arg) "Quit IRC. If prefix argument ARG is non-nil, leave signoff message." @@ -1118,21 +1137,6 @@ Argument ARG is prefix argument of toggle status." (forward-line -1) (concat (buffer-substring (point) (point-max)) "\n")))) -(defun liece-command-toggle-private () - "Toggle private mode / channel mode." - (interactive) - (case (prog1 liece-command-buffer-mode - (liece-toggle-command-buffer-mode)) - (chat - (if liece-current-channel - (liece-switch-to-channel liece-current-channel)) - (setq liece-command-buffer-mode-indicator "Channels")) - (channel - (if liece-current-chat-partner - (liece-switch-to-channel liece-current-chat-partner)) - (setq liece-command-buffer-mode-indicator "Partners"))) - (liece-channel-change)) - (defun liece-command-tag-region (start end) "Move current region between START and END to `kill-ring'." (interactive diff --git a/lisp/liece-minibuf.el b/lisp/liece-minibuf.el index 1f44d85..1db543c 100644 --- a/lisp/liece-minibuf.el +++ b/lisp/liece-minibuf.el @@ -63,12 +63,10 @@ (forward-char) (setq preceding-char (char-before)) (cond - ((and (memq state '(flag arg)) - (or (char-equal preceding-char ?+) - (char-equal preceding-char ?-))) + ((and (eq state 'flag) (memq preceding-char '(+ ?-))) (setq state 'mode type nil)) - ((and (eq state 'mode) (char-equal preceding-char ? )) + ((and (eq state 'mode) (eq preceding-char ? )) (setq state 'arg)) ((and (eq state 'mode) (memq preceding-char '(?o ?v))) (setq type (nconc type (list 'nick preceding-char @@ -76,7 +74,7 @@ ((and (eq state 'mode) (eq preceding-char ?b)) (setq type (nconc type (list 'ban (char-before (1- (point))))))))) (cons state type)))) - + (defun liece-minibuffer-prepare-candidate () (let ((point (point))) (skip-syntax-backward "^ ") diff --git a/lisp/liece-vars.el b/lisp/liece-vars.el index 43a1442..839d048 100644 --- a/lisp/liece-vars.el +++ b/lisp/liece-vars.el @@ -598,7 +598,7 @@ Current version takes the one which is earlier in path \(if many\)." :type '(radio (string :tag "Signoff message")) :group 'liece-vars) -(defcustom liece-away-message "" +(defcustom liece-away-message nil "Default away message." :type 'string :group 'liece-vars) diff --git a/lisp/liece.el b/lisp/liece.el index a8ca428..6c215a5 100644 --- a/lisp/liece.el +++ b/lisp/liece.el @@ -150,7 +150,7 @@ For efficiency this should be prime. See documentation of intern and "\C-c9" liece-switch-to-channel-no-19 "\C-c0" liece-switch-to-channel-no-20)) -;;; Keymap macros. -- borrowd from `gnus-util.el'. +;;; Keymap macros. -- borrowed from `gnus-util.el'. (defmacro liece-local-set-keys (&rest plist) "Set the keys in PLIST in the current keymap." @@ -203,13 +203,13 @@ If optional argument SAFE is nil, overwrite previous definitions." ">" end-of-buffer "<" beginning-of-buffer "|" liece-command-show-last-kill - "a" liece-command-away + "\C-ta" liece-command-toggle-away "b" liece-command-submit-bug-report - "B" liece-dialogue-beep + "\C-tb" liece-command-toggle-beep "c" liece-command-point-back-to-command-buffer "f" liece-command-finger - "F" liece-dialogue-freeze - "O" liece-dialogue-own-freeze + "\C-tf" liece-command-toggle-freeze + "\C-to" liece-command-toggle-own-freeze "i" liece-command-invite "j" liece-command-join "k" liece-command-kill @@ -222,13 +222,13 @@ If optional argument SAFE is nil, overwrite previous definitions." "n" liece-command-nickname "o" other-window "p" liece-command-mta-private - "P" liece-command-toggle-private + "\C-tp" liece-command-toggle-private "q" liece-command-quit "r" liece-command-reconfigure-windows "x" liece-command-tag-region "t" liece-command-topic - "T" liece-command-timestamp - "\C-t" liece-command-find-timestamp + ;;"T" liece-command-timestamp + ;;"\C-t" liece-command-find-timestamp "v" liece-command-browse-url "w" liece-command-who) @@ -273,14 +273,11 @@ If optional argument SAFE is nil, overwrite previous definitions." "$" liece-command-end-of-buffer ">" liece-command-next-channel "<" liece-command-previous-channel - "a" liece-command-away - "\C-f" liece-command-freeze "\C-j" liece-command-next-channel "\C-n" liece-command-names "\C-u" liece-command-unread-channel "l" liece-command-list "L" liece-command-load-vars - "M" liece-command-own-freeze "\C-m" liece-command-modec "o" liece-command-set-operators "O" liece-command-toggle-nick-buffer-mode @@ -573,8 +570,8 @@ If already connected, just pop up the windows." (if (listp chnl) (liece-command-join (car chnl) (cadr chnl)) (liece-command-join chnl))))) - (unless (string-equal liece-away-message "") - (liece-command-away liece-away-message)) + (when liece-away-message + (liece-command-toggle-away liece-away-message)) (run-hooks 'liece-startup-hook) (setq liece-obarray (or liece-obarray (make-vector liece-obarray-size nil))) @@ -737,10 +734,6 @@ Instead, these commands are available: (use-local-map liece-nick-mode-map) (run-hooks 'liece-nick-mode-hook)) -(fset 'liece-dialogue-beep 'liece-command-beep) -(fset 'liece-dialogue-freeze 'liece-command-freeze) -(fset 'liece-dialogue-own-freeze 'liece-command-own-freeze) - (defun liece-initialize-buffers () "Initialize buffers." (dolist (spec liece-buffer-mode-alist) @@ -825,9 +818,7 @@ Optional argument TIMEOUT specifies connection timeout." (t (liece)))) (condition-case code (liece-accept-process-output liece-server-process) - (error - (or (string-equal "select error: Invalid argument" (nth 1 code)) - (signal (car code) (cdr code)))))) + (error (signal (car code) (cdr code))))) (defmacro liece-replace-internal (buffer match defstring oldstring newstring) "Helper function only used from `liece-replace'.