• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/erc/

Lines Matching +defs:diff +defs:mode +defs:map

96 (defgroup erc-mode-line-and-header nil
97 "Displaying information in the mode-line and header"
209 (defcustom erc-user-mode nil
968 (defcustom erc-mode-hook nil
969 "Hook run after `erc-mode' setup is finished."
1075 ;; mode-specific tables
1077 (defvar erc-mode-syntax-table
1086 "Syntax table used while in ERC mode.")
1088 (defvar erc-mode-abbrev-table nil
1089 "Abbrev table used while in ERC mode.")
1090 (define-abbrev-table 'erc-mode-abbrev-table ())
1092 (defvar erc-mode-map
1093 (let ((map (make-sparse-keymap)))
1094 (define-key map "\C-m" 'erc-send-current-line)
1095 (define-key map "\C-a" 'erc-bol)
1096 (define-key map [home] 'erc-bol)
1097 (define-key map "\C-c\C-a" 'erc-bol)
1098 (define-key map "\C-c\C-b" 'erc-iswitchb)
1099 (define-key map "\C-c\C-c" 'erc-toggle-interpret-controls)
1100 (define-key map "\C-c\C-d" 'erc-input-action)
1101 (define-key map "\C-c\C-e" 'erc-toggle-ctcp-autoresponse)
1102 (define-key map "\C-c\C-f" 'erc-toggle-flood-control)
1103 (define-key map "\C-c\C-i" 'erc-invite-only-mode)
1104 (define-key map "\C-c\C-j" 'erc-join-channel)
1105 (define-key map "\C-c\C-n" 'erc-channel-names)
1106 (define-key map "\C-c\C-o" 'erc-get-channel-mode-from-keypress)
1107 (define-key map "\C-c\C-p" 'erc-part-from-channel)
1108 (define-key map "\C-c\C-q" 'erc-quit-server)
1109 (define-key map "\C-c\C-r" 'erc-remove-text-properties-region)
1110 (define-key map "\C-c\C-t" 'erc-set-topic)
1111 (define-key map "\C-c\C-u" 'erc-kill-input)
1112 (define-key map "\M-\t" 'ispell-complete-word)
1113 (define-key map "\t" 'erc-complete-word)
1118 (define-key map [remap font-lock-fontify-block] 'undefined)
1120 'font-lock-fontify-block 'undefined map global-map))
1122 map)
1208 "Define a new minor mode using ERC conventions.
1211 DOC is the documentation string to use for the minor mode.
1212 ENABLE-BODY is a list of expressions used to enable the mode.
1213 DISABLE-BODY is a list of expressions used to disable the mode.
1214 If LOCAL-P is non-nil, the mode will be created as a buffer-local
1215 mode, rather than a global one.
1217 This will define a minor mode called erc-NAME-mode, possibly
1218 an alias erc-ALIAS-mode, as well as the helper functions
1223 ;;;###autoload (autoload 'erc-replace-mode \"erc-replace\")
1225 \"This mode replaces incoming text according to `erc-replace-alist'.\"
1231 (mode (intern (format "erc-%s-mode" (downcase sn))))
1236 (erc-define-minor-mode
1237 ,mode
1238 ,(format "Toggle ERC %S mode.
1239 With arg, turn ERC %S mode on if and only if arg is positive.
1243 (if ,mode
1247 ,(format "Enable ERC %S mode."
1251 (setq ,mode t)
1254 ,(format "Disable ERC %S mode."
1258 (setq ,mode nil)
1264 (format "erc-%s-mode"
1267 ,mode)))
1269 (put ',mode 'definition-name ',name)
1348 (and (eq major-mode 'erc-mode)
1364 (and (eq major-mode 'erc-mode)
1435 (defun erc-mode ()
1436 "Major mode for Emacs IRC.
1439 \\{erc-mode-map}
1441 Turning on `erc-mode' runs the hook `erc-mode-hook'."
1443 (use-local-map erc-mode-map)
1444 (setq mode-name "ERC"
1445 major-mode 'erc-mode
1446 local-abbrev-table erc-mode-abbrev-table)
1447 (set-syntax-table erc-mode-syntax-table)
1455 ;; Run the mode hooks
1456 (run-hooks 'erc-mode-hook))
1637 "Return a list of `erc-mode' buffers matching certain criteria.
1649 (and (eq major-mode 'erc-mode)
1688 If `erc-track-mode' is in enabled, put the last element of
1691 Due to some yet unresolved reason, global function `iswitchb-mode'
1696 (let ((enabled iswitchb-mode))
1697 (or enabled (iswitchb-mode 1))
1713 (or enabled (iswitchb-mode -1)))))
1806 (let ((f (intern-soft (format "erc-%s-mode" module))))
1851 (const :tag "track: Track channel activity in the mode-line" track)
1858 "Run this to enable erc-foo-mode for all modules in `erc-modules'."
1875 (let ((sym (intern-soft (concat "erc-" (symbol-name mod) "-mode"))))
1928 (erc-mode)
1964 ;; limit on the number of users on the channel (mode +l)
2002 (erc-update-mode-line)
2049 This hook gets executed before `erc' actually invokes `erc-mode'
2231 (erc-view-mode-enter 1)
2232 (when (null (current-local-map))
2236 (use-local-map (make-sparse-keymap))
2273 "Display STRING in `erc-mode' BUFFER.
2969 \\[describe-mode] in that buffer will explain how.
2989 "Change or display the mode value of a channel or user.
2990 The first word specifies the target. The rest is the mode string
2993 If only one word is given, display the mode of that target.
2995 A list of valid mode strings for Freenode may be found at
3039 (erc-update-mode-line)
3475 ;; eg. /mode #foo -bbb a*!*@* b*!*@* c*!*@*
3573 (read-map minibuffer-local-map))
3575 (string last-command-char) read-map))
3753 (erc-update-mode-line)
4068 (mode (erc-response.contents parsed))
4074 ((string-match "^\\([+-]\\)b" mode)
4077 ((string-match "^-" mode)
4084 (cdr (split-string mode)))))
4086 ((string-match "^+" mode)
4093 (cdr (split-string mode))))))))))
4127 (erc-update-mode-line)
4128 (erc-set-initial-user-mode nick buffer)
4132 (defun erc-set-initial-user-mode (nick buffer)
4133 "If `erc-user-mode' is non-nil for NICK, set the user modes.
4136 (when erc-user-mode
4137 (let ((mode (if (functionp erc-user-mode)
4138 (funcall erc-user-mode)
4139 erc-user-mode)))
4140 (when (stringp mode)
4141 (erc-log (format "changing mode for %s to %s" nick mode))
4142 (erc-server-send (format "MODE %s %s" nick mode)))))))
4233 (ns (erc-time-diff erc-server-last-sent-time (erc-current-time))))
4322 (let ((delta (erc-time-diff (string-to-number time)
4383 (erc-time-diff
4387 (erc-update-mode-line)))
4616 (erc-update-mode-line-buffer (current-buffer))))
4618 (defun erc-set-modes (tgt mode-string)
4620 (let* ((modes (erc-parse-modes mode-string))
4623 ;; list of triples: (mode-char 'on/'off argument)
4634 (let ((mode (nth 0 (car arg-modes)))
4637 (cond ((string-match "^[Ll]" mode)
4639 ((string-match "^[Kk]" mode)
4643 (erc-update-mode-line-buffer buf)))))
4655 (defun erc-parse-modes (mode-string)
4667 (if (string-match "^\\s-*\\(\\S-+\\)\\(\\s-.*$\\|$\\)" mode-string)
4668 (let ((chars (mapcar 'char-to-string (match-string 1 mode-string)))
4670 (args-str (match-string 2 mode-string))
4674 (arg-modes nil); list of triples: (mode-char 'on/'off argument)
4707 (defun erc-update-modes (tgt mode-string &optional nick host login)
4708 "Update the mode information for TGT, provided as MODE-STRING.
4711 (let* ((modes (erc-parse-modes mode-string))
4714 ;; list of triples: (mode-char 'on/'off argument)
4737 (let ((mode (nth 0 (car arg-modes)))
4740 (cond ((string-match "^[oO]" mode)
4742 ((string-match "^[Vv]" mode)
4745 ((string-match "^[Ll]" mode)
4747 ((string-match "^[Kk]" mode)
4751 (erc-update-mode-line buf))))
5226 (defun erc-invite-only-mode (&optional arg)
5227 "Turn on the invite only mode (+i) for the current channel.
5229 If ARG is non-nil, turn this mode off (-i).
5238 (arg (erc-load-irc-script-lines (list (concat "/mode " tgt " -i"))
5240 (t (erc-load-irc-script-lines (list (concat "/mode " tgt " +i"))
5243 (defun erc-get-channel-mode-from-keypress (key)
5244 "Read a key sequence and call the corresponding channel mode function.
5245 After doing C-c C-o, type in a channel mode letter.
5248 RET lets you type more than one mode at a time.
5251 Anything else will be sent to `erc-toggle-channel-mode'."
5252 (interactive "kChannel mode (RET to set more than one): ")
5258 (erc-insert-mode-command))
5263 (t (erc-toggle-channel-mode key))))
5265 (defun erc-toggle-channel-mode (mode &optional channel)
5276 ((member mode erc-channel-modes)
5277 (erc-log (format "%s: Toggle mode %s OFF" tgt mode))
5278 (message "Toggle channel mode %s OFF" mode)
5279 (erc-server-send (format "MODE %s -%s" tgt mode)))
5280 (t (erc-log (format "%s: Toggle channel mode %s ON" tgt mode))
5281 (message "Toggle channel mode %s ON" mode)
5282 (erc-server-send (format "MODE %s +%s" tgt mode))))))
5284 (defun erc-insert-mode-command ()
5285 "Insert the line \"/mode <current target> \" at `point'."
5288 (if tgt (insert (concat "/mode " tgt " "))
5477 (erc-update-mode-line))
5573 (defun erc-time-diff (t1 t2)
5705 (defcustom erc-mode-line-format "%s %a"
5706 "A string to be formatted and shown in the mode-line in `erc-mode'.
5709 of `mode-line-buffer-identification'.
5722 :group 'erc-mode-line-and-header
5726 "A string to be formatted and shown in the header-line in `erc-mode'.
5732 See `erc-mode-line-format' for which characters are can be used."
5733 :group 'erc-mode-line-and-header
5736 (when (fboundp 'erc-update-mode-line)
5737 (erc-update-mode-line nil)))
5744 :group 'erc-mode-line-and-header
5753 :group 'erc-mode-line-and-header
5768 This variable is used in mode-line display to save screen
5771 :group 'erc-mode-line-and-header
5774 (defcustom erc-mode-line-away-status-format
5776 "When you're away on a server, this is shown in the mode line.
5779 :group 'erc-mode-line-and-header
5816 "Return a formatted `erc-mode-line-away-status-format'
5820 (format-time-string erc-mode-line-away-status-format a)
5847 (defun erc-update-mode-line-buffer (buffer)
5848 "Update the mode line in a single ERC buffer BUFFER."
5874 (list (format-spec erc-mode-line-format spec)))
5877 (setq mode-line-buffer-identification
5878 (list (format-spec erc-mode-line-format spec)))
5879 (setq mode-line-process (list process-status))))
5905 (force-mode-line-update))))
5907 (defun erc-update-mode-line (&optional buffer)
5908 "Update the mode line in BUFFER.
5910 If BUFFER is nil, update the mode line in all ERC buffers."
5912 (erc-update-mode-line-buffer buffer)
5915 (erc-update-mode-line-buffer buf)))))
5954 (dolist (var (apropos-internal "^erc-.*mode$"))
6001 (mode (intern
6006 (apropos-internal "-mode$" 'commandp))
6009 (funcall mode)
6045 (flood-strict-mode
6046 . "FLOOD PROTECTION: Switched to Strict Flood Control mode.")
6078 (MODE . "%n (%u@%h) has changed mode for %t to %m")
6079 (MODE-nick . "%n has changed mode for %t to %m")
6224 When the current buffer is in `erc-mode', this function will run
6229 (when (eq major-mode 'erc-mode)
6319 ;; indent-tabs-mode: t