diff options
Diffstat (limited to 'lisp/erc/erc.el')
| -rw-r--r-- | lisp/erc/erc.el | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index fd5a49eae4b..41d59576251 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -67,7 +67,7 @@ | |||
| 67 | 67 | ||
| 68 | ;;; Code: | 68 | ;;; Code: |
| 69 | 69 | ||
| 70 | (defconst erc-version-string "Version 5.1.3" | 70 | (defconst erc-version-string "Version 5.1.4" |
| 71 | "ERC version. This is used by function `erc-version'.") | 71 | "ERC version. This is used by function `erc-version'.") |
| 72 | 72 | ||
| 73 | (eval-when-compile (require 'cl)) | 73 | (eval-when-compile (require 'cl)) |
| @@ -157,8 +157,8 @@ parameters and authentication." | |||
| 157 | This can be either a string or a number." | 157 | This can be either a string or a number." |
| 158 | :group 'erc | 158 | :group 'erc |
| 159 | :type '(choice (const :tag "None" nil) | 159 | :type '(choice (const :tag "None" nil) |
| 160 | (const :tag "Port number" number) | 160 | (integer :tag "Port number") |
| 161 | (const :tag "Port string" string))) | 161 | (string :tag "Port string"))) |
| 162 | 162 | ||
| 163 | (defcustom erc-nick nil | 163 | (defcustom erc-nick nil |
| 164 | "Nickname to use if one is not provided. | 164 | "Nickname to use if one is not provided. |
| @@ -822,7 +822,8 @@ See `erc-server-flood-margin' for other flood-related parameters.") | |||
| 822 | ;; Script parameters | 822 | ;; Script parameters |
| 823 | 823 | ||
| 824 | (defcustom erc-startup-file-list | 824 | (defcustom erc-startup-file-list |
| 825 | '("~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") | 825 | '("~/.emacs.d/.ercrc.el" "~/.emacs.d/.ercrc" |
| 826 | "~/.ercrc.el" "~/.ercrc" ".ercrc.el" ".ercrc") | ||
| 826 | "List of files to try for a startup script. | 827 | "List of files to try for a startup script. |
| 827 | The first existent and readable one will get executed. | 828 | The first existent and readable one will get executed. |
| 828 | 829 | ||
| @@ -1243,7 +1244,11 @@ With arg, turn ERC %S mode on if and only if arg is positive. | |||
| 1243 | (format "erc-%s-mode" | 1244 | (format "erc-%s-mode" |
| 1244 | (downcase (symbol-name alias))))) | 1245 | (downcase (symbol-name alias))))) |
| 1245 | (quote | 1246 | (quote |
| 1246 | ,mode)))))) | 1247 | ,mode))) |
| 1248 | ;; For find-function and find-variable. | ||
| 1249 | (put ',mode 'definition-name ',name) | ||
| 1250 | (put ',enable 'definition-name ',name) | ||
| 1251 | (put ',disable 'definition-name ',name)))) | ||
| 1247 | 1252 | ||
| 1248 | (put 'define-erc-module 'doc-string-elt 3) | 1253 | (put 'define-erc-module 'doc-string-elt 3) |
| 1249 | 1254 | ||
| @@ -1388,8 +1393,8 @@ server buffer") | |||
| 1388 | Defaults to the server buffer." | 1393 | Defaults to the server buffer." |
| 1389 | (with-current-buffer (erc-server-buffer) | 1394 | (with-current-buffer (erc-server-buffer) |
| 1390 | (if (buffer-live-p erc-active-buffer) | 1395 | (if (buffer-live-p erc-active-buffer) |
| 1391 | erc-active-buffer) | 1396 | erc-active-buffer |
| 1392 | (setq erc-active-buffer (current-buffer)))) | 1397 | (setq erc-active-buffer (current-buffer))))) |
| 1393 | 1398 | ||
| 1394 | (defun erc-set-active-buffer (buffer) | 1399 | (defun erc-set-active-buffer (buffer) |
| 1395 | "Set the value of `erc-active-buffer' to BUFFER." | 1400 | "Set the value of `erc-active-buffer' to BUFFER." |
| @@ -2358,6 +2363,8 @@ See also `erc-format-message' and `erc-display-line'." | |||
| 2358 | msg))) | 2363 | msg))) |
| 2359 | (setq string | 2364 | (setq string |
| 2360 | (cond | 2365 | (cond |
| 2366 | ((null type) | ||
| 2367 | string) | ||
| 2361 | ((listp type) | 2368 | ((listp type) |
| 2362 | (mapc (lambda (type) | 2369 | (mapc (lambda (type) |
| 2363 | (setq string | 2370 | (setq string |
| @@ -2370,7 +2377,7 @@ See also `erc-format-message' and `erc-display-line'." | |||
| 2370 | (if (not (erc-response-p parsed)) | 2377 | (if (not (erc-response-p parsed)) |
| 2371 | (erc-display-line string buffer) | 2378 | (erc-display-line string buffer) |
| 2372 | (unless (member (erc-response.command parsed) erc-hide-list) | 2379 | (unless (member (erc-response.command parsed) erc-hide-list) |
| 2373 | (erc-put-text-property 0 (length string) 'erc-parsed parsed string) | 2380 | (erc-put-text-property 0 (length string) 'erc-parsed parsed string) |
| 2374 | (erc-put-text-property 0 (length string) 'rear-sticky t string) | 2381 | (erc-put-text-property 0 (length string) 'rear-sticky t string) |
| 2375 | (erc-display-line string buffer))))) | 2382 | (erc-display-line string buffer))))) |
| 2376 | 2383 | ||
| @@ -5237,13 +5244,11 @@ If FILE is found, return the path to it." | |||
| 5237 | (defun erc-select-startup-file () | 5244 | (defun erc-select-startup-file () |
| 5238 | "Select an ERC startup file. | 5245 | "Select an ERC startup file. |
| 5239 | See also `erc-startup-file-list'." | 5246 | See also `erc-startup-file-list'." |
| 5240 | (let ((l erc-startup-file-list) | 5247 | (catch 'found |
| 5241 | (f nil)) | 5248 | (dolist (f erc-startup-file-list) |
| 5242 | (while (and (not f) l) | 5249 | (setq f (convert-standard-filename f)) |
| 5243 | (if (file-readable-p (car l)) | 5250 | (when (file-readable-p f) |
| 5244 | (setq f (car l))) | 5251 | (throw 'found f))))) |
| 5245 | (setq l (cdr l))) | ||
| 5246 | f)) | ||
| 5247 | 5252 | ||
| 5248 | (defun erc-find-script-file (file) | 5253 | (defun erc-find-script-file (file) |
| 5249 | "Search for FILE in `default-directory', and any in `erc-script-path'." | 5254 | "Search for FILE in `default-directory', and any in `erc-script-path'." |
| @@ -5890,7 +5895,8 @@ All windows are opened in the current frame." | |||
| 5890 | (setq bufs (cdr bufs)) | 5895 | (setq bufs (cdr bufs)) |
| 5891 | (while bufs | 5896 | (while bufs |
| 5892 | (split-window) | 5897 | (split-window) |
| 5893 | (switch-to-buffer-other-window (car bufs)) | 5898 | (other-window 1) |
| 5899 | (switch-to-buffer (car bufs)) | ||
| 5894 | (setq bufs (cdr bufs)) | 5900 | (setq bufs (cdr bufs)) |
| 5895 | (balance-windows))))) | 5901 | (balance-windows))))) |
| 5896 | 5902 | ||
| @@ -5942,12 +5948,17 @@ All windows are opened in the current frame." | |||
| 5942 | (ctcp-request-to . "==> CTCP request from %n (%u@%h) to %t: %r") | 5948 | (ctcp-request-to . "==> CTCP request from %n (%u@%h) to %t: %r") |
| 5943 | (ctcp-too-many . "Too many CTCP queries in single message. Ignoring") | 5949 | (ctcp-too-many . "Too many CTCP queries in single message. Ignoring") |
| 5944 | (flood-ctcp-off . "FLOOD PROTECTION: Automatic CTCP responses turned off.") | 5950 | (flood-ctcp-off . "FLOOD PROTECTION: Automatic CTCP responses turned off.") |
| 5945 | (flood-strict-mode . "FLOOD PROTECTION: Switched to Strict Flood Control mode.") | 5951 | (flood-strict-mode |
| 5946 | (disconnected . "Connection failed! Re-establishing connection...") | 5952 | . "FLOOD PROTECTION: Switched to Strict Flood Control mode.") |
| 5947 | (disconnected-noreconnect . "Connection failed! Not re-establishing connection.") | 5953 | (disconnected . "\n\nConnection failed! Re-establishing connection...\n") |
| 5954 | (disconnected-noreconnect | ||
| 5955 | . "\n\nConnection failed! Not re-establishing connection.\n") | ||
| 5956 | (finished . "\n\n*** ERC finished ***\n") | ||
| 5957 | (terminated . "\n\n*** ERC terminated: %e\n") | ||
| 5948 | (login . "Logging in as \'%n\'...") | 5958 | (login . "Logging in as \'%n\'...") |
| 5949 | (nick-in-use . "%n is in use. Choose new nickname: ") | 5959 | (nick-in-use . "%n is in use. Choose new nickname: ") |
| 5950 | (nick-too-long . "WARNING: Nick length (%i) exceeds max NICKLEN(%l) defined by server") | 5960 | (nick-too-long |
| 5961 | . "WARNING: Nick length (%i) exceeds max NICKLEN(%l) defined by server") | ||
| 5951 | (no-default-channel . "No default channel") | 5962 | (no-default-channel . "No default channel") |
| 5952 | (no-invitation . "You've got no invitation") | 5963 | (no-invitation . "You've got no invitation") |
| 5953 | (no-target . "No target") | 5964 | (no-target . "No target") |