X-Git-Url: https://cgit.sxemacs.org/?p=riece;a=blobdiff_plain;f=lisp%2Friece-globals.el;h=c49590da9adeeb9c371c28ac244c3a308be4a7a4;hp=c7b74c7f30d841eebf520e22df6b86c7668fe693;hb=4b1edadb8d14538ee745f4f0cc6f8fd98ad37259;hpb=fe7ce5e9a344721b1ecdd4d9ec1adce5dc908a49 diff --git a/lisp/riece-globals.el b/lisp/riece-globals.el index c7b74c7..c49590d 100644 --- a/lisp/riece-globals.el +++ b/lisp/riece-globals.el @@ -24,16 +24,37 @@ ;;; Code: -;;; Miscellaneous global variables: -(defvar riece-server-process nil - "Primary server process.") +(require 'riece-compat) ;riece-make-interval-regexp + +;;; Constants: +(defconst riece-strict-channel-regexp + (concat "\\([+&#]\\|!" + (riece-make-interval-regexp "[A-Z0-9]" 5) + "\\|!!\\)[^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?")) + +(defconst riece-strict-user-regexp + (concat "[][\\\\`_^{|}A-Za-z]" + (riece-make-interval-regexp "[][\\\\`_^{|}A-Za-z0-9-]" 0 8))) + +(defconst riece-laxed-channel-regexp + "[+&#!][^\0\7\r\n ,:]*\\(:[^\0\7\r\n ,:]*\\)?") + +(defconst riece-laxed-user-regexp + "[][\\\\`_^{|}A-Za-z][][\\\\`_^{|}A-Za-z0-9-]*") + +(defvar riece-channel-regexp riece-laxed-channel-regexp) +(defvar riece-user-regexp riece-laxed-user-regexp) + +;;; Global variables: (defvar riece-server-process-alist nil - "An alist mapping secondary server name to opened processes.") + "An alist mapping server names to processes.") (defvar riece-current-channel nil "The channel you currently have joined.") (defvar riece-current-channels nil "The channels you have currently joined.") +(defvar riece-join-channel-candidate nil + "The candidate for channel to be used with the next join command.") (defvar riece-save-variables-are-dirty nil "Non nil if the variables in `riece-saved-forms' are changed.") @@ -94,58 +115,51 @@ Local to the server buffers.") "Coding system for process I/O. Local to the server buffers.") -;;; Variables local to the command buffer: -(defvar riece-default-channel-candidate nil - "A channel name used as completion candidate. -Local to the command buffer.") -(defvar riece-last-channel nil - "The channel you joined the last time.") -(defvar riece-command-buffer-mode 'channel - "Command buffer mode. -Possible values are `chat' and `channel'. -Local to the command buffer.") - ;;; Variables local to the channel buffers: (defvar riece-freeze nil - "If non-nil, channel window is not scrolled. + "If t, channel window is locked and will not be scrolled. +If 'own, channel window is locked until the user begins to speak. Local to the channel buffers.") -(defvar riece-own-freeze nil - "If non-nil, channel window is not scrolled until you input. + +(defvar riece-freeze-indicator nil + "String displayed on the modeline to allow the user to tell if the +channel buffer is locked. Local to the channel buffers.") ;;; Modeline indicators: (defvar riece-channel-indicator "None" - "A modeline indicator of the current channel.") + "String displayed on the modeline to indicate the current channel.") +(defvar riece-long-channel-indicator "None" + "String displayed on the modeline to indicate the current channel. +Generally, this string will contain more information than +riece-channel-indicator.") (defvar riece-channel-list-indicator "No channel" - "The current joined channels, \"pretty-printed.\".") + "String displayed on the modeline to show the joined channels.") +(defvar riece-user-indicator nil + "String displayed on the modeline to show the current nickname.") -(defvar riece-away-indicator "-") -(defvar riece-freeze-indicator nil) -(defvar riece-own-freeze-indicator nil) +(defvar riece-away-indicator "-" + "String displayed on the modeline to allow the user to tell if the +user is away.") +(defvar riece-operator-indicator "-" + "String displayed on the modeline to allow the user to tell if the +user is a operator.") ;;; Buffers: -(defvar riece-command-buffer "*Commands*" - "Name of command input buffer.") -(defvar riece-dialogue-buffer "*Dialogue*" - "Name of dialogue output buffer.") -(defvar riece-private-buffer "*Private*" - "Name of private message buffer.") -(defvar riece-others-buffer "*Others*" - "Name of others message buffer.") -(defvar riece-channel-buffer nil - "Name of channel message buffer.") -(defvar riece-channel-buffer-format "*Channel:%s*" - "Format of channel message buffer.") -(defvar riece-channel-list-buffer " *Channels*" - "Name of channel list buffer.") +(defvar riece-command-buffer nil + "The command buffer.") +(defvar riece-dialogue-buffer nil + "Buffer for whole conversation.") +(defvar riece-others-buffer nil + "Buffer for other messages.") +(defvar riece-channel-list-buffer nil + "Buffer for channel list.") (defvar riece-user-list-buffer nil - "Name of user list buffer.") -(defvar riece-user-list-buffer-format " *Users:%s*" - "Format of user list buffer.") -(defvar riece-wallops-buffer " *WALLOPS*") + "Buffer for user list.") + +(defvar riece-channel-buffer nil + "Buffer for messages arrived in the current channel.") -(defvar riece-channel-buffer-alist nil) -(defvar riece-user-list-buffer-alist nil) (defvar riece-buffer-list nil) (defvar riece-overriding-server-name nil)