+2000-09-20 Daiki Ueno <ueno@unixuser.org>
+
+ * 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 <ueno@unixuser.org>
* liece-version.el (liece-version): Bump up to 2.0.0.
(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")
(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")
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."
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
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."
(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
(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
((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 "^ ")
: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)
"\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."
">" 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
"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)
"$" 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
(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)))
(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)
(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'.