From b6675b2d62e7962cd924051f5d30d2cd7deede66 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 29 Oct 2007 01:00:33 +0000 Subject: Sync from upstream ERC --- lisp/erc/ChangeLog | 31 ++++++++++++++++++++++++++++++- lisp/erc/erc-ibuffer.el | 4 +++- lisp/erc/erc-log.el | 3 ++- lisp/erc/erc-track.el | 2 ++ lisp/erc/erc.el | 9 +++++++-- 5 files changed, 44 insertions(+), 5 deletions(-) (limited to 'lisp/erc') diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 09882be34b8..da03b833f51 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,12 @@ +2007-10-29 Michael Olson + + * erc-ibuffer.el (erc-modified-channels-alist): Use + eval-when-compile, and explain why we are doing this.. + + * erc-track.el: Make sure that the state of erc-track-minor-mode + is not preserved when using desktop.el. Thanks to Levin for the + report. + 2007-10-25 Dan Nicolaescu * erc-ibuffer.el (erc-modified-channels-alist): Pacify @@ -8,7 +17,27 @@ * erc-track.el (erc-modified-channels-update): Use mapc rather than mapcar. -2007-09-18 Exal de Jesus Garcia Carrillo (tiny change) +2007-10-12 Diane Murray + + * erc.el (erc-join-channel): Prompt for channel key if C-u or + another prefix-arg was typed. + + * NEWS: Noted this change. + +2007-10-07 Michael Olson + + * erc.el (erc-cmd-ME'S): New command that handles the case where + someone types "/me's". It concatenates the text " 's" to the + beginning of the input and then sends the result like a normal + "/me" command. + (erc-command-regexp): Permit single-quote character. + +2007-09-30 Aidan Kehoe (tiny change) + + * erc-log.el (erc-save-buffer-in-logs): Prevent spurious warnings + when looking at a log file and concurrently saving to it. + +2007-09-18 Exal de Jesus Garcia Carrillo (tiny change) * erc.texi (Special-Features): Fix small typo. diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el index e4de3c1fe50..76c2d2b18b1 100644 --- a/lisp/erc/erc-ibuffer.el +++ b/lisp/erc/erc-ibuffer.el @@ -71,7 +71,9 @@ (string-match qualifier (or erc-server-announced-name erc-session-server))))) -(defvar erc-modified-channels-alist) +;; Silence the byte-compiler +(eval-when-compile + (defvar erc-modified-channels-alist)) (define-ibuffer-column erc-modified (:name "M") (if (and (boundp 'erc-track-mode) diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 1733b3d1b00..7ea3c63b4b2 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -415,7 +415,8 @@ You can save every individual message by putting this function on (or buffer (setq buffer (current-buffer))) (when (erc-logging-enabled buffer) (let ((file (erc-current-logfile buffer)) - (coding-system erc-log-file-coding-system)) + (coding-system erc-log-file-coding-system) + (inhibit-clash-detection t)) ; needed for XEmacs (save-excursion (with-current-buffer buffer (save-restriction diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index ad3eaf73a4b..61d56c94ca7 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -560,6 +560,8 @@ module, otherwise the keybindings will not do anything useful." :global t :group 'erc-track) +(add-to-list 'desktop-minor-mode-table '(erc-track-minor-mode nil)) + (defun erc-track-minor-mode-maybe () "Enable `erc-track-minor-mode', depending on `erc-track-enable-keybindings'." (unless (or erc-track-minor-mode diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 2c5786adff3..7b27f278bed 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -3014,6 +3014,11 @@ LINE has the format \"USER ACTION\"." (t nil))) (put 'erc-cmd-ME 'do-not-parse-args t) +(defun erc-cmd-ME\'S (line) + "Do a /ME command, but add the string \" 's\" to the beginning." + (erc-cmd-ME (concat " 's" line))) +(put 'erc-cmd-ME\'S 'do-not-parse-args t) + (defun erc-cmd-LASTLOG (line) "Show all lines in the current buffer matching the regexp LINE. @@ -3669,7 +3674,7 @@ If `point' is at the beginning of a channel name, use that as default." (set-buffer (process-buffer erc-server-process)) erc-channel-list))) (completing-read "Join channel: " table nil nil nil nil chnl)) - (when erc-prompt-for-channel-key + (when (or current-prefix-arg erc-prompt-for-channel-key) (read-from-minibuffer "Channel key (RET for none): " nil)))) (erc-cmd-JOIN channel (when (>= (length key) 1) key))) @@ -5033,7 +5038,7 @@ Specifically, return the position of `erc-insert-marker'." erc-input-marker (erc-end-of-input-line))) -(defvar erc-command-regexp "^/\\([A-Za-z]+\\)\\(\\s-+.*\\|\\s-*\\)$" +(defvar erc-command-regexp "^/\\([A-Za-z']+\\)\\(\\s-+.*\\|\\s-*\\)$" "Regular expression used for matching commands in ERC.") (defun erc-send-input (input) -- cgit v1.2.3 From b957dc707e62ff9bc37ee719fe48871f6b866720 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Mon, 29 Oct 2007 01:21:16 +0000 Subject: Fix typo in lisp/erc/ChangeLog --- lisp/erc/ChangeLog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/erc') diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index da03b833f51..0867cb8de2f 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,7 +1,7 @@ 2007-10-29 Michael Olson * erc-ibuffer.el (erc-modified-channels-alist): Use - eval-when-compile, and explain why we are doing this.. + eval-when-compile, and explain why we are doing this. * erc-track.el: Make sure that the state of erc-track-minor-mode is not preserved when using desktop.el. Thanks to Levin for the -- cgit v1.2.3 From f2168a4cda83e9e3489e3cb96e7764884c4029e1 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Tue, 30 Oct 2007 00:50:07 +0000 Subject: Revert bad erc-track change; ignore erc-track-minor-mode properly in desktop * lisp/desktop.el (desktop-minor-mode-table): Add line for ERC. --- lisp/ChangeLog | 4 ++++ lisp/desktop.el | 3 ++- lisp/erc/ChangeLog | 4 ---- lisp/erc/erc-track.el | 2 -- 4 files changed, 6 insertions(+), 7 deletions(-) (limited to 'lisp/erc') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0299bb9b2f6..79cffa6e39a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2007-10-30 Michael Olson + + * desktop.el (desktop-minor-mode-table): Add line for ERC. + 2007-10-29 Ken Manheimer * allout.el (allout-command-prefix, allout-inhibit-auto-fill): diff --git a/lisp/desktop.el b/lisp/desktop.el index 0fa38ed3c91..040688492a4 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -454,7 +454,8 @@ Furthermore the major mode function must be autoloaded.") (defcustom desktop-minor-mode-table '((auto-fill-function auto-fill-mode) (vc-mode nil) - (vc-dired-mode nil)) + (vc-dired-mode nil) + (erc-track-minor-mode nil)) "Table mapping minor mode variables to minor mode functions. Each entry has the form (NAME RESTORE-FUNCTION). NAME is the name of the buffer-local variable indicating that the minor diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 0867cb8de2f..1cd1edb65eb 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -3,10 +3,6 @@ * erc-ibuffer.el (erc-modified-channels-alist): Use eval-when-compile, and explain why we are doing this. - * erc-track.el: Make sure that the state of erc-track-minor-mode - is not preserved when using desktop.el. Thanks to Levin for the - report. - 2007-10-25 Dan Nicolaescu * erc-ibuffer.el (erc-modified-channels-alist): Pacify diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 61d56c94ca7..ad3eaf73a4b 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -560,8 +560,6 @@ module, otherwise the keybindings will not do anything useful." :global t :group 'erc-track) -(add-to-list 'desktop-minor-mode-table '(erc-track-minor-mode nil)) - (defun erc-track-minor-mode-maybe () "Enable `erc-track-minor-mode', depending on `erc-track-enable-keybindings'." (unless (or erc-track-minor-mode -- cgit v1.2.3 From 88406d6ee8a9108ae8265aac2f023e61f4bff827 Mon Sep 17 00:00:00 2001 From: Michael Olson Date: Thu, 1 Nov 2007 01:12:59 +0000 Subject: Silence some byte-compiler warnings in ERC --- lisp/erc/ChangeLog | 14 ++++++++++++++ lisp/erc/erc-compat.el | 3 +++ lisp/erc/erc-log.el | 9 +-------- lisp/erc/erc-stamp.el | 4 ++++ lisp/erc/erc.el | 17 ++++++++++------- 5 files changed, 32 insertions(+), 15 deletions(-) (limited to 'lisp/erc') diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 1cd1edb65eb..929df097790 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,17 @@ +2007-11-01 Michael Olson + + * erc-compat.el (erc-set-write-file-functions): New compatibility + function to set the write hooks appropriately. + + * erc-log.el (erc-log-setup-logging): Use + erc-set-write-file-functions. This fixes a byte-compiler warning. + + * erc-stamp.el: Silence byte-compiler warning about + erc-fill-column. + + * erc.el (erc-with-all-buffers-of-server): Bind the result of + mapcar to a variable in order to silence a byte-compiler warning. + 2007-10-29 Michael Olson * erc-ibuffer.el (erc-modified-channels-alist): Use diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el index 47bdd94ade2..d6591415867 100644 --- a/lisp/erc/erc-compat.el +++ b/lisp/erc/erc-compat.el @@ -50,6 +50,9 @@ See `erc-encoding-coding-alist'." (defalias 'erc-delete-dups 'delete-dups) (defalias 'erc-replace-regexp-in-string 'replace-regexp-in-string) +(defun erc-set-write-file-functions (new-val) + (set (make-local-variable 'write-file-functions) new-val)) + (defvar erc-emacs-build-time (if (stringp emacs-build-time) emacs-build-time diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 7ea3c63b4b2..8b5e07a383e 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -268,14 +268,7 @@ The current buffer is given by BUFFER." (with-current-buffer buffer (auto-save-mode -1) (setq buffer-file-name nil) - (cond ((boundp 'write-file-functions) - (set (make-local-variable 'write-file-functions) - '(erc-save-buffer-in-logs))) - ((boundp 'local-write-file-hooks) - (setq local-write-file-hooks '(erc-save-buffer-in-logs))) - (t - (set (make-local-variable 'write-file-hooks) - '(erc-save-buffer-in-logs)))) + (erc-set-write-file-functions '(erc-save-buffer-in-logs)) (when erc-log-insert-log-on-open (ignore-errors (insert-file-contents (erc-current-logfile)) (move-marker erc-last-saved-position diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 3b7f5ba18f2..64b04051d91 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -264,6 +264,10 @@ property to get to the POSth column." (list 'space ':align-to pos))) (insert string)) +;; Silence byte-compiler +(eval-when-compile + (defvar erc-fill-column)) + (defun erc-insert-timestamp-right (string) "Insert timestamp on the right side of the screen. STRING is the timestamp to insert. The function is a possible value diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 7b27f278bed..fab8f7ca1b9 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -1680,13 +1680,16 @@ nil." ;; Make the evaluation have the correct order (let ((pre (make-symbol "pre")) (pro (make-symbol "pro"))) - `(let ((,pro ,process) - (,pre ,pred)) - (mapcar (lambda (buffer) - (with-current-buffer buffer - ,@forms)) - (erc-buffer-list ,pre - ,pro))))) + `(let* ((,pro ,process) + (,pre ,pred) + (res (mapcar (lambda (buffer) + (with-current-buffer buffer + ,@forms)) + (erc-buffer-list ,pre + ,pro)))) + ;; Silence the byte-compiler by binding the result of mapcar to + ;; a variable. + res))) (put 'erc-with-all-buffers-of-server 'lisp-indent-function 1) (put 'erc-with-all-buffers-of-server 'edebug-form-spec '(form form body)) -- cgit v1.2.3