aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/erc
diff options
context:
space:
mode:
authorKaroly Lorentey2006-10-14 16:56:21 +0000
committerKaroly Lorentey2006-10-14 16:56:21 +0000
commit3f87f67ee215ffeecbd2f53bd7f342cdf03f47df (patch)
tree16f2af9111af08a94d608d96a957f5c3ec5effcc /lisp/erc
parent350e4fb815d7413ef6d339dd664014706f742927 (diff)
parent7a210b69c7f92650c524766d1b9d3f3eefdd67c7 (diff)
downloademacs-3f87f67ee215ffeecbd2f53bd7f342cdf03f47df.tar.gz
emacs-3f87f67ee215ffeecbd2f53bd7f342cdf03f47df.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-371 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-372 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-373 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-374 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-375 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-376 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-377 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-378 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-379 Merge from erc--emacs--21 * emacs@sv.gnu.org/emacs--devo--0--patch-380 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-381 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-382 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-383 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-384 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-385 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-386 Update from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-387 Fix ERC bug introduced in last patch * emacs@sv.gnu.org/emacs--devo--0--patch-388 Update from erc--emacs--22 * emacs@sv.gnu.org/emacs--devo--0--patch-389 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-390 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-391 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-392 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-393 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-394 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-395 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-396 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-397 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-398 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-399 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-400 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-401 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-402 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-403 Rcirc update from Ryan Yeske * emacs@sv.gnu.org/emacs--devo--0--patch-404 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-405 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-406 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-407 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-408 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-409 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-410 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-411 Miscellaneous tq-related fixes. * emacs@sv.gnu.org/emacs--devo--0--patch-412 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-121 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-122 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-123 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-124 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-125 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-126 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-127 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-581
Diffstat (limited to 'lisp/erc')
-rw-r--r--lisp/erc/ChangeLog75
-rw-r--r--lisp/erc/erc-backend.el26
-rw-r--r--lisp/erc/erc-log.el41
-rw-r--r--lisp/erc/erc-match.el2
-rw-r--r--lisp/erc/erc-spelling.el14
-rw-r--r--lisp/erc/erc.el51
6 files changed, 153 insertions, 56 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog
index 216d14d0aa6..72754aa1cd3 100644
--- a/lisp/erc/ChangeLog
+++ b/lisp/erc/ChangeLog
@@ -1,3 +1,78 @@
12006-08-13 Romain Francoise <romain@orebokech.com>
2
3 * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p'
4 prompt with a space.
5
62006-08-07 Michael Olson <mwolson@gnu.org>
7
8 * erc-backend.el (erc-process-sentinel-1): Use erc-display-message
9 in several places instead of inserting text.
10 (erc-process-sentinel): Move to the input-marker before removing
11 the prompt.
12
13 * erc.el (erc-port): Fix customization options.
14 (erc-display-message): Handle null type explicitly. Previously,
15 this was relying on a chance side-effect. Cosmetic indentation
16 tweak.
17 (english): Add 'finished and 'terminated entries to the catalog.
18 Add initial and terminal newlines to 'disconnected and
19 'disconnected-noreconnect entries. Avoid long lines.
20
212006-08-06 Michael Olson <mwolson@gnu.org>
22
23 * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with
24 multi-tty Emacs.
25 (erc-select-startup-file): Fix bug introduced by recent change.
26
272006-08-05 Michael Olson <mwolson@gnu.org>
28
29 * erc-log.el (erc-log-standardize-name): New function that returns
30 a filename that is safe for use for a log file.
31 (erc-current-logfile): Use it.
32
33 * erc.el (erc-startup-file-list): Search in ~/.emacs.d first,
34 since that is a fairly standard directory.
35 (erc-select-startup-file): Re-write to use
36 convert-standard-filename, which will ensure that MS-DOS systems
37 look for the _ercrc.el file.
38
392006-08-02 Michael Olson <mwolson@gnu.org>
40
41 * erc.el (erc-version-string): Release ERC 5.1.4.
42
43 * Makefile, NEWS, erc.texi: Update for the 5.1.4 release.
44
45 * erc.el (erc-active-buffer): Fix bug that caused messages to go
46 to the wrong buffer. Thanks to offby1 for the report.
47
48 * erc-backend.el (erc-coding-system-for-target): Handle case where
49 target is nil. Thanks to Kai Fan for the patch.
50
512006-07-29 Michael Olson <mwolson@gnu.org>
52
53 * erc-log.el (erc-log-setup-logging): Don't offer to save the
54 buffer. It will be saved automatically killed. Thanks to Johan
55 Bockgård and Tassilo Horn for pointing this out.
56
572006-07-27 Johan Bockgård <bojohan@users.sourceforge.net>
58
59 * erc.el (define-erc-module): Make find-function and find-variable
60 find the names constructed by `define-erc-module' in Emacs 22.
61
622006-07-14 Michael Olson <mwolson@gnu.org>
63
64 * erc-log.el (log): Make sure that we enable logging on
65 already-opened buffers as well, in case the user toggles this
66 module after loading ERC. Also be sure to remove logging ability
67 from all ERC buffers when the module is disabled.
68 (erc-log-setup-logging): Set buffer-file-name to nil rather than
69 the empty string. This should fix some errors that occur when
70 quitting Emacs without first killing all ERC buffers.
71 (erc-log-disable-logging): New function that removes the logging
72 ability from the current buffer.
73
74 * erc-spelling.el (spelling): Use dolist and buffer-live-p.
75
12006-07-12 Michael Olson <mwolson@gnu.org> 762006-07-12 Michael Olson <mwolson@gnu.org>
2 77
3 * erc-match.el (erc-log-matches): Bind inhibit-read-only rather 78 * erc-match.el (erc-log-matches): Bind inhibit-read-only rather
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 7dce9e4bf01..5acbcb05ab8 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -493,11 +493,7 @@ action."
493 (if erc-server-quitting 493 (if erc-server-quitting
494 ;; normal quit 494 ;; normal quit
495 (progn 495 (progn
496 (let ((string "\n\n*** ERC finished ***\n") 496 (erc-display-message nil 'error (current-buffer) 'finished)
497 (inhibit-read-only t))
498 (erc-put-text-property 0 (length string)
499 'face 'erc-error-face string)
500 (insert string))
501 (when erc-kill-server-buffer-on-quit 497 (when erc-kill-server-buffer-on-quit
502 (set-buffer-modified-p nil) 498 (set-buffer-modified-p nil)
503 (kill-buffer (current-buffer)))) 499 (kill-buffer (current-buffer))))
@@ -519,12 +515,8 @@ action."
519 (erc erc-session-server erc-session-port erc-server-current-nick 515 (erc erc-session-server erc-session-port erc-server-current-nick
520 erc-session-user-full-name t erc-session-password) 516 erc-session-user-full-name t erc-session-password)
521 ;; terminate, do not reconnect 517 ;; terminate, do not reconnect
522 (let ((string (concat "\n\n*** ERC terminated: " event 518 (erc-display-message nil 'error (current-buffer)
523 "\n")) 519 'terminated ?e event))))
524 (inhibit-read-only t))
525 (erc-put-text-property 0 (length string)
526 'face 'erc-error-face string)
527 (insert string)))))
528 520
529(defun erc-process-sentinel (cproc event) 521(defun erc-process-sentinel (cproc event)
530 "Sentinel function for ERC process." 522 "Sentinel function for ERC process."
@@ -545,6 +537,7 @@ action."
545 (run-hook-with-args 'erc-disconnected-hook 537 (run-hook-with-args 'erc-disconnected-hook
546 (erc-current-nick) (system-name) "") 538 (erc-current-nick) (system-name) "")
547 ;; Remove the prompt 539 ;; Remove the prompt
540 (goto-char (or (marker-position erc-input-marker) (point-max)))
548 (forward-line 0) 541 (forward-line 0)
549 (erc-remove-text-properties-region (point) (point-max)) 542 (erc-remove-text-properties-region (point) (point-max))
550 (delete-region (point) (point-max)) 543 (delete-region (point) (point-max))
@@ -563,11 +556,12 @@ action."
563 "Return the coding system or cons cell appropriate for TARGET. 556 "Return the coding system or cons cell appropriate for TARGET.
564This is determined via `erc-encoding-coding-alist' or 557This is determined via `erc-encoding-coding-alist' or
565`erc-server-coding-system'." 558`erc-server-coding-system'."
566 (or (let ((case-fold-search t)) 559 (or (when target
567 (catch 'match 560 (let ((case-fold-search t))
568 (dolist (pat erc-encoding-coding-alist) 561 (catch 'match
569 (when (string-match (car pat) target) 562 (dolist (pat erc-encoding-coding-alist)
570 (throw 'match (cdr pat)))))) 563 (when (string-match (car pat) target)
564 (throw 'match (cdr pat)))))))
571 (and (functionp erc-server-coding-system) 565 (and (functionp erc-server-coding-system)
572 (funcall erc-server-coding-system)) 566 (funcall erc-server-coding-system))
573 erc-server-coding-system)) 567 erc-server-coding-system))
diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el
index b316a8588bd..2fe29e82fe5 100644
--- a/lisp/erc/erc-log.el
+++ b/lisp/erc/erc-log.el
@@ -71,8 +71,6 @@
71;; markers. 71;; markers.
72 72
73;;; TODO: 73;;; TODO:
74;; * Erc needs a generalised make-safe-file-name function, so that
75;; generated file names don't contain any invalid file characters.
76;; 74;;
77;; * Really, we need to lock the logfiles somehow, so that if a user 75;; * Really, we need to lock the logfiles somehow, so that if a user
78;; is running multiple emacsen and/or on the same channel as more 76;; is running multiple emacsen and/or on the same channel as more
@@ -218,7 +216,10 @@ also be a predicate function. To only log when you are not set away, use:
218 (add-hook 'erc-quit-hook 'erc-conditional-save-queries) 216 (add-hook 'erc-quit-hook 'erc-conditional-save-queries)
219 (add-hook 'erc-part-hook 'erc-conditional-save-buffer) 217 (add-hook 'erc-part-hook 'erc-conditional-save-buffer)
220 ;; append, so that 'erc-initialize-log-marker runs first 218 ;; append, so that 'erc-initialize-log-marker runs first
221 (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)) 219 (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
220 (dolist (buffer (erc-buffer-list))
221 (when (buffer-live-p buffer)
222 (with-current-buffer buffer (erc-log-setup-logging)))))
222 ;; disable 223 ;; disable
223 ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) 224 ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
224 (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs) 225 (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs)
@@ -226,7 +227,10 @@ also be a predicate function. To only log when you are not set away, use:
226 (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs) 227 (remove-hook 'erc-kill-channel-hook 'erc-save-buffer-in-logs)
227 (remove-hook 'erc-quit-hook 'erc-conditional-save-queries) 228 (remove-hook 'erc-quit-hook 'erc-conditional-save-queries)
228 (remove-hook 'erc-part-hook 'erc-conditional-save-buffer) 229 (remove-hook 'erc-part-hook 'erc-conditional-save-buffer)
229 (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging))) 230 (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)
231 (dolist (buffer (erc-buffer-list))
232 (when (buffer-live-p buffer)
233 (with-current-buffer buffer (erc-log-disable-logging))))))
230 234
231(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs) 235(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
232 236
@@ -236,8 +240,7 @@ also be a predicate function. To only log when you are not set away, use:
236This function is destined to be run from `erc-connect-pre-hook'." 240This function is destined to be run from `erc-connect-pre-hook'."
237 (when (erc-logging-enabled) 241 (when (erc-logging-enabled)
238 (auto-save-mode -1) 242 (auto-save-mode -1)
239 (setq buffer-offer-save t 243 (setq buffer-file-name nil)
240 buffer-file-name "")
241 (set (make-local-variable 'write-file-functions) 244 (set (make-local-variable 'write-file-functions)
242 '(erc-save-buffer-in-logs)) 245 '(erc-save-buffer-in-logs))
243 (when erc-log-insert-log-on-open 246 (when erc-log-insert-log-on-open
@@ -245,6 +248,12 @@ This function is destined to be run from `erc-connect-pre-hook'."
245 (move-marker erc-last-saved-position 248 (move-marker erc-last-saved-position
246 (1- (point-max))))))) 249 (1- (point-max)))))))
247 250
251(defun erc-log-disable-logging ()
252 "Disable logging in the current buffer."
253 (when (erc-logging-enabled)
254 (setq buffer-offer-save nil
255 erc-enable-logging nil)))
256
248(defun erc-log-all-but-server-buffers (buffer) 257(defun erc-log-all-but-server-buffers (buffer)
249 "Returns t if logging should be enabled in BUFFER. 258 "Returns t if logging should be enabled in BUFFER.
250Returns nil iff `erc-server-buffer-p' returns t." 259Returns nil iff `erc-server-buffer-p' returns t."
@@ -282,17 +291,27 @@ is writeable (it will be created as necessary) and
282 (funcall erc-enable-logging (or buffer (current-buffer))) 291 (funcall erc-enable-logging (or buffer (current-buffer)))
283 erc-enable-logging))) 292 erc-enable-logging)))
284 293
294(defun erc-log-standardize-name (filename)
295 "Make FILENAME safe to use as the name of an ERC log.
296This will not work with full paths, only names.
297
298Any unsafe characters in the name are replaced with \"!\". The
299filename is downcased."
300 (downcase (erc-replace-regexp-in-string
301 "[/\\]" "!" (convert-standard-filename filename))))
302
285(defun erc-current-logfile (&optional buffer) 303(defun erc-current-logfile (&optional buffer)
286 "Return the logfile to use for BUFFER. 304 "Return the logfile to use for BUFFER.
287If BUFFER is nil, the value of `current-buffer' is used. 305If BUFFER is nil, the value of `current-buffer' is used.
288This is determined by `erc-generate-log-file-name-function'. 306This is determined by `erc-generate-log-file-name-function'.
289The result is converted to lowercase, as IRC is case-insensitive" 307The result is converted to lowercase, as IRC is case-insensitive"
290 (expand-file-name 308 (expand-file-name
291 (downcase (funcall erc-generate-log-file-name-function 309 (erc-log-standardize-name
292 (or buffer (current-buffer)) 310 (funcall erc-generate-log-file-name-function
293 (or (erc-default-target) (buffer-name buffer)) 311 (or buffer (current-buffer))
294 (erc-current-nick) 312 (or (erc-default-target) (buffer-name buffer))
295 erc-session-server erc-session-port)) 313 (erc-current-nick)
314 erc-session-server erc-session-port))
296 erc-log-channels-directory)) 315 erc-log-channels-directory))
297 316
298(defun erc-generate-log-file-name-with-date (buffer &rest ignore) 317(defun erc-generate-log-file-name-with-date (buffer &rest ignore)
diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el
index ffbc7482aae..b5dc913a8c4 100644
--- a/lisp/erc/erc-match.el
+++ b/lisp/erc/erc-match.el
@@ -566,7 +566,7 @@ deactivate/activate match logging in the latter. See
566 (unless buffer-already 566 (unless buffer-already
567 (insert " == Type \"q\" to dismiss messages ==\n") 567 (insert " == Type \"q\" to dismiss messages ==\n")
568 (erc-view-mode-enter nil (lambda (buffer) 568 (erc-view-mode-enter nil (lambda (buffer)
569 (when (y-or-n-p "Discard messages?") 569 (when (y-or-n-p "Discard messages? ")
570 (kill-buffer buffer))))) 570 (kill-buffer buffer)))))
571 buffer))) 571 buffer)))
572 572
diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el
index 3cbc786274d..7ed0f510539 100644
--- a/lisp/erc/erc-spelling.el
+++ b/lisp/erc/erc-spelling.el
@@ -40,15 +40,13 @@
40 ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is 40 ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is
41 ;; called AFTER the server buffer is initialized. 41 ;; called AFTER the server buffer is initialized.
42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) 42 ((add-hook 'erc-connect-pre-hook 'erc-spelling-init)
43 (mapc (lambda (buffer) 43 (dolist (buffer (erc-buffer-list))
44 (when buffer 44 (when (buffer-live-p buffer)
45 (with-current-buffer buffer (erc-spelling-init)))) 45 (with-current-buffer buffer (erc-spelling-init)))))
46 (erc-buffer-list)))
47 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) 46 ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init)
48 (mapc (lambda (buffer) 47 (dolist (buffer (erc-buffer-list))
49 (when buffer 48 (when (buffer-live-p buffer)
50 (with-current-buffer buffer (flyspell-mode 0)))) 49 (with-current-buffer buffer (flyspell-mode 0))))))
51 (erc-buffer-list))))
52 50
53(defcustom erc-spelling-dictionaries nil 51(defcustom erc-spelling-dictionaries nil
54 "An alist mapping buffer names to dictionaries. 52 "An alist mapping buffer names to dictionaries.
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."
157This can be either a string or a number." 157This 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.
827The first existent and readable one will get executed. 828The 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")
1388Defaults to the server buffer." 1393Defaults 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.
5239See also `erc-startup-file-list'." 5246See 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")