diff options
author | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-04-01 13:36:38 +0000 |
commit | 52c679585e00cb74dec698374a95462db54c2d27 (patch) | |
tree | 0f62b6771a386e7262c685efd1d1e794d76196de /lisp | |
parent | 27e425dbc76e1ccac5c5d145e8ad08e25f7949f6 (diff) | |
download | emacs-52c679585e00cb74dec698374a95462db54c2d27.tar.gz |
Release ERC 5.2.
I have updated the version of ERC to 5.2, since it fixes a bug with C-c
C-SPC being bound globally by default. For the full list of changes in
this version, see etc/ERC-NEWS.
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-687
Creator: Michael Olson <mwolson@gnu.org>
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/erc/ChangeLog | 1516 | ||||
-rw-r--r-- | lisp/erc/ChangeLog.06 | 1457 | ||||
-rw-r--r-- | lisp/erc/erc-autoaway.el | 125 | ||||
-rw-r--r-- | lisp/erc/erc-backend.el | 198 | ||||
-rw-r--r-- | lisp/erc/erc-button.el | 16 | ||||
-rw-r--r-- | lisp/erc/erc-capab.el | 30 | ||||
-rw-r--r-- | lisp/erc/erc-compat.el | 8 | ||||
-rw-r--r-- | lisp/erc/erc-fill.el | 11 | ||||
-rw-r--r-- | lisp/erc/erc-ibuffer.el | 3 | ||||
-rw-r--r-- | lisp/erc/erc-identd.el | 34 | ||||
-rw-r--r-- | lisp/erc/erc-log.el | 78 | ||||
-rw-r--r-- | lisp/erc/erc-match.el | 9 | ||||
-rw-r--r-- | lisp/erc/erc-menu.el | 7 | ||||
-rw-r--r-- | lisp/erc/erc-netsplit.el | 2 | ||||
-rw-r--r-- | lisp/erc/erc-networks.el | 8 | ||||
-rw-r--r-- | lisp/erc/erc-notify.el | 5 | ||||
-rw-r--r-- | lisp/erc/erc-pcomplete.el | 4 | ||||
-rw-r--r-- | lisp/erc/erc-ring.el | 3 | ||||
-rw-r--r-- | lisp/erc/erc-services.el | 100 | ||||
-rw-r--r-- | lisp/erc/erc-speedbar.el | 5 | ||||
-rw-r--r-- | lisp/erc/erc-spelling.el | 40 | ||||
-rw-r--r-- | lisp/erc/erc-stamp.el | 18 | ||||
-rw-r--r-- | lisp/erc/erc-track.el | 187 | ||||
-rw-r--r-- | lisp/erc/erc.el | 354 |
24 files changed, 2495 insertions, 1723 deletions
diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 62e7eaa21fe..70ffa4ede48 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,3 +1,259 @@ +2007-04-01 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-version-string): Release ERC 5.2. + + * erc-auto.in, erc-chess.el, erc-list.el, erc-speak.el: + * erc-viper.el: Update copyright notices. + + * erc.texi: Make Emacs Lisp source code in this document + essentially public domain. Update version to 5.2. + (Obtaining ERC): Mention extras tarball. + (Releases): Mention local GNU mirror. + (Sample Configuration): Remove notice. + + * FOR-RELEASE (5.3): Add item for erc-nicklist. + Mark NEWS as done. Mark extras tarball as done. + + * Makefile (VERSION): Increment to 5.2. + (TESTING): Remove. + (EXTRAS): New variable containing the contents of our "Emacs 22 + extras" tarball. + (SOURCE): Remove $(TESTING). + (MISC): Add COPYING and ChangeLog.06. Fix ChangeLog.NNNN -> + ChangeLog.NN. + (release): Use $(SNAPDIR) instead of erc-$(VERSION). + (extras): New rule which implements the building of the extras + tarball. + (upload-extras): New rule to upload the extras tarball. It's + yucky to replicate upload, but oh well. + + * NEWS: Mention extras tarball. Note which files have been + renamed. Note that erc-list is enabled by default, except in + Emacs 22. + + * README.extras: New file which serves as a README for the extras + tarball. + +2007-03-31 Michael Olson <mwolson@gnu.org> + + * NEWS: Update for the 5.2 release. + + * FOR-RELEASE: Finish up 5.2 manual item. Add documentation item + for 5.3. + + * erc.texi (Sample Session): Flesh out. Mention #erc. + (Modules): Defer to 5.3 release. + (Advanced Usage): Move Sample Configuration chapter ahead of + unfinished chapters. + (Sample Configuration): Write. + (Options): Mention how to see available ERC options. Defer to 5.3 + release. + (Tips and Tricks): Remove, since it seems better to just include + tips and tricks in the sample configuration, commented out. + + * erc-bbdb.el (erc-bbdb-search-name-and-create): Make prompt more + informative about how to skip merging. + (erc-bbdb-insinuate-and-show-entry-1): Move contents of + erc-bbdb-insinuate-and-show-entry here. + (erc-bbdb-insinuate-and-show-entry): Run + erc-bbdb-insinuate-and-show-entry-1 "outside" of the calling + function, so that we can avoid triggering a process-filter error + if the user hits C-g. + +2007-03-30 Michael Olson <mwolson@gnu.org> + + * FOR-RELEASE: Solve C-c C-SPC keybinding dilemma. + + * erc-autoaway.el (erc-autoaway-idle-method): Use `if' rather than + `cond' and `set' rather than `set-default'. + + * erc-log.el: Avoid compiler warning by requiring erc-network + during compilation. + (erc-generate-log-file-name-function): Add tag to each option. + Add erc-generate-log-file-name-network. + (erc-generate-log-file-name-network): New function which generates + a log file name that uses network name rather than server name, + when possible. + + * erc-track.el (track): Assimilate track-when-inactive module, + since there's no need to have two modules in one file -- an option + will do. Remove track-modified-channels alias. Call + erc-track-minor-mode-maybe, and tear down the minor mode when + disabling. + (erc-track-when-inactive): New option which determines whether to + track visible buffers when inactive. The default is not to do so. + (erc-track-visibility): Mention erc-track-when-inactive. + (erc-buffer-visible): Use erc-track-when-inactive. + (erc-track-enable-keybindings): New option which determines + whether to enable the global-level tracking keybindings. The + default is to do so, unless they would override another binding, + in which case we prompt the user about it. + (erc-track-minor-mode-map): Move global keybindings here. + (erc-track-minor-mode): New minor mode which only enables the + keybindings and does nothing else. + (erc-track-minor-mode-maybe): New function which starts + erc-track-minor-mode, but only if it hasn't already been started, + an ERC buffer exists, and the user OK's it, depending on the value + of `erc-track-enable-keybindings'. + (erc-track-switch-buffer): Display a message if someone calls this + without first enabling erc-track-mode. + +2007-03-17 Michael Olson <mwolson@gnu.org> + + * erc.texi (Development): Mention ErcDevelopment page on + emacswiki. + (Getting Started): Mention ~/.emacs.d/.ercrc.el and the Customize + interface. + (Sample Session): New section that has a very rough draft for a + sample ERC session. + (Special Features): New section that explains some of the special + features of ERC. Taken from ErcFeatures on emacswiki, with + enhancements. + +2007-03-12 Diane Murray <disumu@x3y2z1.net> + + * erc-autoaway.el (erc-autoaway-idle-method): When setting the new + value, disable and re-enable `erc-autoaway-mode' only if it was + already enabled. This fixes a bug where autoaway was enabled just + by loading the file. + +2007-03-10 Diane Murray <disumu@x3y2z1.net> + + * erc-capab.el: Added more information to the Usage section. + (erc-capab-identify-prefix): Doc fix. + (erc-capab-identify-unidentified): New face. + (290): Removed. Definition moved to erc-backend.el. + (erc-capab-identify-send-messages): Renamed from + `erc-capab-send-identify-messages'. + (erc-capab-identify-setup): Use it. + (erc-capab-identify-get-unidentified-nickname): Renamed from + `erc-capab-get-unidentified-nickname'. + (erc-capab-identify-add-prefix): Use it. Use + `erc-capab-identify-unidentified' as the face. + + * erc-backend.el (290): Moved here from erc-capab.el. + + * erc.el (erc-select): Added an autoload cookie. + (erc-message-type-member, erc-restore-text-properties): Use + `erc-get-parsed-vector'. + (erc-auto-query): Set the default to 'bury since many new users + expect private messages from others to be in dedicated query + buffers, not the server buffer. + (erc-common-server-suffixes): Use "freenode" for freenode.net, not + "OPN". Added oftc.net. + + * NEWS: Added note about erc-auto-query's new default setting. + +2007-03-03 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-open, erc): Docfixes. + +2007-03-02 Michael Olson <mwolson@gnu.org> + + * FOR-RELEASE: Make section for 5.3 release and move erc-backend + cleanup there. Awaiting discussion before doing other things. + Add tasks for merging filename changes from the 5.2 release + branch, and for making a tarball of modules not in Emacs 22. Add + item to remind me to update NEWS. Mark backtab entry as done. + + * erc-button.el (button): Add call to `erc-button-add-keys'. + (erc-button-keys-added): New variable tracking whether we've added + the keys yet. + (erc-button-add-keys): New function that adds the <backtab> key to + erc-mode-map. + + * erc.texi: Change version to 5.2 (pre-release). + +2007-02-15 Michael Olson <mwolson@gnu.org> + + * CREDITS: Update. + + * erc-backend.el (erc-server-send-ping-interval): Change to use a + default of 30 seconds. Improve customize interface. + (erc-server-send-ping-timeout): New option that determines when to + consider a connection stalled and restart it. The default is + after 120 seconds. + (erc-server-send-ping): Use erc-server-send-ping-timeout instead + of erc-server-send-ping-interval. If + erc-server-send-ping-timeout is nil, do not ever kill and restart + a hung IRC process. + + * erc.el (erc-modules): Include the name of the module in its + description. This should make it easier for people to find and + enable a particular module. + +2007-02-15 Vivek Dasmohapatra <vivek@etla.org> + + * erc.el (erc-cmd-RECONNECT): Kill old process if it is still + alive. + (erc-message-english-PART): Properly escape "%" characters in + reason. + + * erc-backend.el (erc-server-reconnecting): New variable that is + set when the user requests a reconnect, but the old process is + still alive. This forces the reconnect to work even though the + process is killed manually during reconnect. + (erc-server-connect): Initialize it. + (erc-server-reconnect-p): Use it. + (erc-process-sentinel-1): Set it to nil after the first reconnect + attempt. + +2007-02-07 Diane Murray <disumu@x3y2z1.net> + + * erc-menu.el (erc-menu-definition): Fixed so that the separator + is between "Current channel" and "Pals, fools and other keywords", + not at the bottom of the "Current channel" submenu. + +2007-01-25 Diane Murray <disumu@x3y2z1.net> + + * erc-networks.el (erc-server-alist): Removed SSL server for now + since `erc-server-select' doesn't know to use `erc-ssl'. + + * erc-networks.el (erc-server-alist, erc-networks-alist): Added + definitions for oftc.net. + + * erc-services.el (erc-nickserv-alist): Fixed OFTC message regexp. + +2007-01-22 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-error-occurred): New variable that + indicates when an error has been signaled by the server. This + should fix an infinite reconnect bug when giving some servers a + bogus :full-name. Thanks to Angelina Carlton for the report. + (erc-server-connect): Initialize erc-server-error-occurred. + (erc-server-reconnect-p): Use it. + (ERROR): Set it. + + * erc-services.el (erc-nickserv-alist): Alphabetize and add Ars + and QuakeNet. Standardize look of entries. Fix type mismatch + error in customize interface. + (erc-nickserv-passwords): Alphabetize and add missing entries from + erc-nickserv-alist. + +2007-01-21 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-header-line-format): Document how to disable the + header line, and add a customization type for it. Also, make the + changes take effect immediately. + +2007-01-19 Michael Olson <mwolson@gnu.org> + + * erc.texi (Modules): Document new menu module. Thanks to Leo + for noticing. + +2007-01-16 Diane Murray <disumu@x3y2z1.net> + + * erc-stamp.el (erc-insert-timestamp-left): Fixed so that the + whitespace string filler is hidden correctly when timestamps are + hidden. + (erc-toggle-timestamps): New function to use instead of + `erc-show-timestamps' and `erc-hide-timestamps'. + + * erc.el (erc-restore-text-properties): Moved here from + erc-fill.el since it could be useful in general. + + * erc-fill.el (erc-restore-text-properties): Removed. + 2007-01-13 Michael Olson <mwolson@gnu.org> * erc.el (erc-command-regexp): New variable that is used to match @@ -73,6 +329,10 @@ (erc-format-lag-time): New function. (erc-update-mode-line-buffer): Use it. +2007-01-10 Michael Olson <mwolson@gnu.org> + + * erc.el: Fix typo in url-irc-function instructions. + 2007-01-09 Michael Olson <mwolson@gnu.org> * erc.el (erc-system-name): New option that determines the system @@ -89,1260 +349,10 @@ (erc-menu-add, erc-menu-remove): New functions that add and remove the ERC menu. -2006-12-28 Michael Olson <mwolson@gnu.org> - - * erc-list.el: Change header to mention that this is part of ERC, - rather than GNU Emacs. - - * erc-networks.el (erc-server-alist): Add Ars OpenIRC and - LinuxChix networks. Thanks to Angelina Carlton for mentioning - them. Properly escape periods in Konfido.Net and Kewl.Org. - (erc-networks-alist): Add entries for Ars and LinuxChix, though - the latter does not actually provide an announced network name. - - * erc-services.el (erc-nickserv-identify-mode): Add 'both method, - which waits for a NickServ message if the network supports it, - otherwise sends the password after connecting. - (erc-nickserv-identify-mode): Default to 'both. - (erc-nickserv-passwords): Add OFTC and Azzurra to custom options. - (erc-nickserv-alist): Indentation fix. - (erc-nickserv-identify-on-connect) - (erc-nickserv-identify-on-nick-change): Handle 'both method. - -2006-12-28 Leo <sdl.web@gmail.com> (tiny change) - - * erc.el (erc-iswitchb): Wrap body in unwind-protect so that - hitting C-g does not leave iswitchb-mode on. - -2006-12-27 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-cmd-RECONNECT): New command that calls - erc-server-reconnect. - - * erc-backend.el (erc-server-reconnect-count): New server variable - that keeps track of reconnection attempts. - (erc-server-reconnect-attempts): New option that determines the - number of reconnection attempts that ERC will make per server. - (erc-server-reconnect-timeout): New option that determines the - amount of time, in seconds, that ERC will wait between successive - reconnect attempts. - (erc-server-reconnect): New function that reestablishes the - current IRC connection. Move some commands from - erc-process-sentinel-1 here. - (erc-process-sentinel-1): If we have been disconnected, loop until - we either reconnect or run out of attempts. - (erc-server-reconnect-p): Move higher and make this a defsubst, - since I'm worried about the current buffer changing from - underneath us. Implement limit of number of reconnect attempts.. - - * erc.texi (Getting Started): Update for /RECONNECT command. - -2006-12-26 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-open): Restore old point correctly, or at least get - closer to doing so than before. - -2006-12-13 Leo <sdl.web@gmail.com> (tiny change) - - * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it - isn't active already, instead of leaving it on. - -2006-12-10 Juanma Barranquero <lekktu@gmail.com> - - * erc-ezbounce.el (erc-ezb-init-session-list): Doc fix. - -2006-12-08 Michael Olson <mwolson@gnu.org> - - * erc.el: Re-evaluate contributions from a contributor, and found - them under 15 lines of non-obvious code, so it is safe to remove - the copyright notice. - (erc-modules): Remove list module. - - * erc-list.el: Remove, since a contributor who has not completed - their assignment has contributed significantly more than 15 lines - of code to this file. - -2006-11-28 Juanma Barranquero <lekktu@gmail.com> - - * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify. - (erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook) - (erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer) - (erc-modules, erc-display-message-highlight, erc-process-input-line) - (erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers) - (erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers) - (erc-echo-notice-in-first-user-buffer, erc-connection-established) - (erc-update-user-nick, erc-update-channel-member, erc-highlight-notice) - (erc-command-symbol, erc-add-query, erc-process-script-line) - (erc-determine-parameters, erc-client-info, erc-popup-input-buffer): - (erc-script-echo): Fix typos in docstrings. - (erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list) - (define-erc-module, erc-once-with-server-event) - (erc-once-with-server-event-global, erc-debug-irc-protocol) - (erc-log-irc-protocol, erc-cmd-LOAD, erc-update-user) - (erc-update-current-channel-member, erc-load-script): - (erc-mode-line-away-status-format): Doc fixes. - -2006-11-20 Andrea Russo <rastandy@inventati.org> (tiny change) - - * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker' - before calling `erc-display-prompt'. - -2006-11-24 Juanma Barranquero <lekktu@gmail.com> - - * erc.el (erc-after-connect, erc-open-ssl-stream) - (erc-display-line-1, erc-display-line): - * erc-backend.el (005): Fix space/tab mixup in docstrings. - -2006-11-20 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-version-string): Call this Version 5.2 stable - pre-release, since it diverges slightly from our 5.2 branch, in - that unstable features are not included. - (erc-update-modules): Display better error message when module not - found. - -2006-11-12 Michael Olson <mwolson@gnu.org> - - * erc-log.el: Save all log buffers when Emacs exits, in case - someone ignores the warning about open processes. Remove the - advice code in the commentary. - (erc-save-query-buffers): Docfix. - (erc-log-save-all-buffers): New function that saves all ERC - buffers to logs. - (erc-current-logfile): Fix bug in filename selection, where the - current buffer was erroneously being preferred over the given - buffer. - -2006-11-08 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-string-to-port): Avoid error when a numerical port - is passed. Thanks to Zekeriya KOÇ for the report. - -2006-11-08 Łukasz Demianiuk <ldemianiuk@gmail.com> (tiny change) - - * erc.el (erc-header-line): Fix typo. - -2006-11-06 Juanma Barranquero <lekktu@gmail.com> - - * erc-dcc.el (erc-dcc-send-file): Fix typo in error message. - - * erc.el (read-passwd): - * erc-autoaway.el (erc-autoaway-reestablish-idletimer): - * erc-truncate.el (truncate): Fix typo in docstring. - -2006-10-21 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-iswitchb): Fix bug when hitting C-c C-b without - first loading iswitchb. Thanks to Leo for the report. - -2006-10-10 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-default-port): Make the default be 6667 instead of - ircd. since Mac OS X apparently has problems with looking up that - port name. - - * erc-backend.el (353): Receive names after displaying the initial - message, instead of before. - -2006-10-05 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-my-nick-face): New face. - (erc): Use FULL-NAME argument, not `erc-user-full-name'. This - fixes a bug where the :full-name argument passed to the function - was not respected. - (erc-format-my-nick): Use `erc-my-nick-face'. This should help - make it easier to find messages you sent in conversations when - `erc-show-my-nick' is non-nil. - (erc-compute-server): Doc fix. - -2006-10-01 John J Foerch <jjfoerch@earthlink.net> (tiny change) - - * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline - from the erc-timestamp field. - -2006-09-11 Michael Olson <mwolson@gnu.org> - - * erc-nicklist.el (erc-nicklist-insert-contents): Add missing - parenthesis. Thanks to Stephan Stahl for the report. - -2006-09-10 Eric Hanchrow <offby1@blarg.net> (tiny change) - - * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp - instead of a single user. - -2006-09-10 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-generate-new-buffer-name): If this is a server - buffer and a process exists already, create a new buffer. - (erc-open): If the IRC session was continued, restore the old - point. Thanks to Stephan Stahl for the report. - (erc-member-ignore-case): Coding style tweak. - (erc-cmd-UNIGNORE): Quote the user before comparison. If we don't - find the user listed verbatim, try to match them against the list - using string-match. In this case, prompt as to whether the regexp - should be removed. - (erc-ignored-user-p): Remove CL-ism. - - * erc-autoaway.el (erc-autoaway-possibly-set-away): Check to see - whether we are already away. - - * erc-menu.el: Fix potential compiler warning. - -2006-09-07 Diane Murray <disumu@x3y2z1.net> - - * erc.el: Updated Commentary and URL. - (erc-iswitchb, erc-display-line, erc-set-modes, erc-update-modes) - (erc-arrange-session-in-multiple-windows): No need to check if - `erc-server-process' is bound. - (erc-server-buffer-live-p): Doc fix. - (erc-part-from-channel): Don't use any initial contents at prompt. - (erc-format-nick, erc-format-@nick): Doc fix. Use `when'. - (s367): Fixed to support only banmask and channel which is the - standard. Also, there's no reason to add a message to each banned - user entry trying to persuade the user to use /banlist instead of - /mode #channel +b. That part of the message was a little - confusing, anyways. - (s367-set-by): New catalog entry. The user who set the ban and - the time of ban seem to be specific to only certain servers such - as freenode. - - * erc-autoaway.el (erc-autoaway-idletimer): Doc fix. - - * erc-backend.el (erc-server-process-alive): No need to check if - `erc-server-process' is bound. - (367): Use s367 or s367-set-by where appropriate. - - * erc-compat.el: Fixed URL. - - * erc-dcc.el: Updated copyright years. Added Usage section. - Changed supported Emacs version number from 21.3.50 to 22 in - Commentary. - - * erc-ibuffer.el (erc-server-name, erc-target, erc-away): No need - to check if `erc-server-process' is bound. - - * erc-nicklist.el: Added to the Commentary section an explanation - that `erc-nicklist-quit' should be called from within the nicklist - buffer. Set file coding to utf-8 so a contributor's name is - displayed correctly. - (erc-nicklist-icons-directory): Use customize type directory - instead of string. - (erc-nicklist-insert-contents): Set bbdb-nick to an empty string - if it wasn't found. This fixes a bug where an error would occur - when using `string=' on bbdb-nick if it was nil. - - * erc-replace.el: Removed URL from file information since it - doesn't exist. - - * erc-sound.el: Updated copyright years. Fixed Commentary and - added Usage section. - (define-erc-module): Add and remove `erc-ctcp-query-SOUND' to - `erc-ctcp-query-SOUND-hook' here. Removed the keybinding - definitions. - (erc-play-sound, erc-default-sound, erc-cmd-SOUND) - (erc-ctcp-query-SOUND): Doc fix. - (erc-play-command): Removed, not necessary anymore. - (erc-ctcp-query-SOUND-hook): Set to nil as default. Moved up - higher in code, added docstring. - (erc-play-sound): Use `play-sound-file'. It exists in GNU Emacs - as well since version 21 or earlier. Removed commented-out older - version of function. - - * NEWS: Fixed formatting, added channel tracking change. - -2006-09-03 Diane Murray <disumu@x3y2z1.net> - - * erc.el: M-x erc RET can now be used to start ERC. - (erc-open): Renamed from `erc'. - (erc-before-connect): Change erc-select to erc. - (erc): Renamed from `erc-select'. Use `erc-open'. - (erc-select): Defined as alias of `erc'. - (erc-ssl): Renamed from `erc-select-ssl'. Use `erc'. - (erc-select-ssl): Defined as alias of `erc-ssl'. - (erc-cmd-SERVER): Use `erc'. - (erc-query, erc-handle-irc-url): Use `erc-open'. - - * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'. - - * erc-menu.el (erc-menu-definition): Use `erc'. - - * erc-networks.el: Updated copyright years. - (erc-server-select): Use keyword arguments when calling `erc'. - - * erc.texi (Getting Started, Connecting): Changed erc-select to - erc. - - * NEWS: Added note about these changes. - -2006-08-20 Diane Murray <disumu@x3y2z1.net> - - * erc-backend.el (erc-process-sentinel-1): Doc fix. Let - `erc-server-reconnect-p' check all condition cases. - (erc-server-reconnect-p): Moved rest of checks from - `erc-process-sentinel-1' to here. Now takes an argument, EVENT. - -2006-08-21 Diane Murray <disumu@x3y2z1.net> - - * erc-track.el (erc-track-mode-line-mouse-face): New variable. - (erc-make-mode-line-buffer-name): Add help-echo and mouse-face - properties to channel name. - -2006-08-20 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-with-server-buffer): New macro that switches to the - current ERC server buffer and runs some code. If no server buffer - is available, return nil. This is a useful way to access - variables in the server buffer. - (erc-open-server-buffer-p): New function that returns non-nil if - the given buffer is an ERC server buffer that has an open IRC - process. - -2006-08-14 Diane Murray <disumu@x3y2z1.net> - - * erc-menu.el: Updated copyright years. Removed EmacsWiki URL. - (erc-menu-definition): Name the menu "ERC" instead of "IRC" to - avoid confusion with rcirc and other clients. - - * erc-backend.el (erc-server-banned): New variable. - (erc-server-connect): Set `erc-server-banned' to nil. - (erc-process-sentinel-1): Use `erc-server-reconnect-p'. - (erc-server-reconnect-p): New function. Return non-nil if the - user wants automatic reconnects and if the user has not been - banned from the server. This should fix a bug where ERC gets into - a loop trying to reconnect with no way to stop it when the user is - denied access to the server due to a server ban. It might also - help when Tor users are blocked from freenode if freenode servers - send the 465 message before disconnecting. - (465): Handle "banned from server" error notices. - -2006-08-13 Romain Francoise <romain@orebokech.com> - - * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p' - prompt with a space. - -2006-08-11 Michael Olson <mwolson@gnu.org> - - * erc-fill.el (erc-fill): Skip any initial empty lines so that we - avoid errors when inserting disconnect messages and other messages - that begin with newlines. - -2006-08-07 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-process-sentinel-1): Use erc-display-message - in several places instead of inserting text. - (erc-process-sentinel): Move to the input-marker before removing - the prompt. - - * erc.el (erc-port): Fix customization options. - (erc-display-message): Handle null type explicitly. Previously, - this was relying on a chance side-effect. Cosmetic indentation - tweak. - (english): Add 'finished and 'terminated entries to the catalog. - Add initial and terminal newlines to 'disconnected and - 'disconnected-noreconnect entries. Avoid long lines. - -2006-08-06 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-server-send-queue): Update from Circe - version of this function. - - * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with - multi-tty Emacs. - (erc-select-startup-file): Fix bug introduced by recent change. - -2006-08-05 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-log-standardize-name): New function that returns - a filename that is safe for use for a log file. - (erc-current-logfile): Use it. - - * erc.el (erc-startup-file-list): Search in ~/.emacs.d first, - since that is a fairly standard directory. - (erc-select-startup-file): Re-write to use - convert-standard-filename, which will ensure that MS-DOS systems - look for the _ercrc.el file. - -2006-08-02 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-version-string): Release ERC 5.1.4. - - * Makefile, NEWS, erc.texi: Update for the 5.1.4 release. - - * erc.el (erc-active-buffer): Fix bug that caused messages to go - to the wrong buffer. Thanks to offby1 for the report. - - * erc-backend.el (erc-coding-system-for-target): Handle case where - target is nil. Thanks to Kai Fan for the patch. - -2006-07-29 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-log-setup-logging): Don't offer to save the - buffer. It will be saved automatically killed. Thanks to Johan - Bockgård and Tassilo Horn for pointing this out. - -2006-07-27 Johan Bockgård <bojohan@users.sourceforge.net> - - * erc.el (define-erc-module): Make find-function and find-variable - find the names constructed by `define-erc-module' in Emacs 22. - -2006-07-14 Michael Olson <mwolson@gnu.org> - - * erc-log.el (log): Make sure that we enable logging on - already-opened buffers as well, in case the user toggles this - module after loading ERC. Also be sure to remove logging ability - from all ERC buffers when the module is disabled. - (erc-log-setup-logging): Set buffer-file-name to nil rather than - the empty string. This should fix some errors that occur when - quitting Emacs without first killing all ERC buffers. - (erc-log-disable-logging): New function that removes the logging - ability from the current buffer. - - * erc-spelling.el (spelling): Use dolist and buffer-live-p. - -2006-07-12 Michael Olson <mwolson@gnu.org> - - * erc-match.el (erc-log-matches): Bind inhibit-read-only rather - than call toggle-read-only. - - * erc.el (erc-handle-irc-url): Move here from erc-goodies.el and - add autoload cookie. - -2006-07-09 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-version-string): Release ERC 5.1.3. - - * erc.texi: Update for the 5.1.3 release. - - * erc-autoaway.el (erc-autoaway-set-back): Fix bug after returning - from being set automatically away and current buffer is not an ERC - buffer. - - * erc-identd.el: Fix compiler error. - - * erc.texi (Development): Use @subheading instead of @subsection. - (Advanced Usage): Add menu. - (Connecting): Fully document how to connect to an IRC server. - (Options, Tips and Tricks, Sample Configuration): New unwritten - sections. - - * erc.el (erc-server, erc-port, erc-nick, erc-nick-uniquifier) - (erc-user-full-name, erc-password): Docfixes and customization - interface tweaks. - (erc-try-new-nick-p): Rename from - `erc-manual-set-nick-on-bad-nick-p' and invert meaning. - (erc-nickname-in-use): Use `erc-try-new-nick-p'. Check the length - of `erc-nick-uniquifier', in case someone wants multiple - characters. - (erc-compute-server, erc-compute-nick, erc-compute-full-name) - (erc-compute-port): Docfixes. - - * erc-log.el (log): Move all add-hook calls here, rather than - executing them immediately, and also cause them to be un-hooked - when the module is removed. - (erc-save-buffer-on-part): Move next to - `erc-save-queries-on-quit'. - (erc-save-buffer-on-quit, erc-save-queries-on-quit): Default to t. - (erc-log-write-after-send, erc-log-write-after-insert): Default to - nil. This makes things fast, but reasonably failsafe, by default. - -2006-07-08 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-log-insert-log-on-open): Make this nil by - default, since most IRC clients don't do this. - (erc-log-write-after-send): New option that determines whether the - log file will be written to after every sent message. - (erc-log-write-after-insert): New option that determines whether - the log file will be written to when new text is added to a logged - ERC buffer. - (log): Use the aforementioned options. - - * erc.texi (Modules): Document the "completion" module. - - * erc-pcomplete.el (pcomplete-erc-nicks): Make sure that we don't - have a nil element in the list when ignore-self is non-nil. - -2006-07-05 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-modules): Add the `page' module to the list. - - * erc.texi (Modules): Add entries for `list' and `page' modules. - Change "spell" to "spelling". - (History): Use past tense throughout. - -2006-07-02 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-call-hooks): Fix (stringp nil) error that - can happen when doing /PART. - - * erc.el (erc-quit-reason-various-alist) - (erc-part-reason-various-alist): In the example, use "^$" as an - example, since "" matches anything. - (erc-quit-reason-various, erc-part-reason-various): If no argument - is given, and no matches are found, use our default reason instead - of "nil". - -2006-06-30 Michael Olson <mwolson@gnu.org> - - * erc.texi (Modules): Mention identd. - (Releases): Update mailing list address and download location. - (Development): Refactor. Provide updated directions for Arch. - Make URLs clickable. - (Keystroke Summary): Typo fix. Use more Texinfo syntax. - (Getting Started): Give simpler example. We do not need to - explicitly load every module. - (History): Update. - - * erc.el (erc-version-modules): Remove, since we do not use this - function anymore. - (erc-latest-version, erc-ediff-latest-version): Remove, since this - was only useful back when ERC consisted of one file. - (erc-modules): Add line for identd. - (erc-get-channel-mode-from-keypress): Typo fix. - - * erc-imenu.el: Remove unnecessary lines in header. - - * erc-goodies.el (erc-handle-irc-url): Docfix. - - * erc-identd.el: Define an ERC module for this. - (erc-identd-start): Don't create a process buffer if possible. - Otherwise, use conventional hidden names for process buffers. - -2006-06-29 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-coding-system-for-target): Match - case-insensitively. Use a pattern match instead of `assoc', as - per the documentation for `erc-encoding-coding-alist'. - - * erc-track.el (erc-track-shorten-aggressively): Fix typo. - -2006-06-27 Michael Olson <mwolson@gnu.org> - - * erc.el: Update maintainer information and URLs. - -2006-06-14 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-active-buffer): If the active buffer has been - deleted, default to the server buffer. - (erc-toggle-flood-control): When the user hits C-c C-f, make flood - control really toggle, not unconditionally turn off. - -2006-06-12 Michael Olson <mwolson@gnu.org> - - * NEWS: Add items since the 5.1.2 release. - - * erc-autoaway.el (erc-autoaway-caused-away): New variable that - indicates whether the current away status was caused by this - module. - (erc-autoaway-set-back): Only set back if this module set the user - away. - (erc-autoaway-set-away): Update `erc-autoaway-caused-away'. - (erc-autoaway-reset-indicators): New function that resets some - indicators when the user is no longer away. - (autoaway): Add the above function to the 305 hook. - -2006-06-05 Romain Francoise <romain@orebokech.com> - - * erc.texi (History): Fix various typos. - -2006-06-04 Michael Olson <mwolson@gnu.org> - - * erc-autoaway.el (erc-autoaway-idle-method): Move after the - definition of the autoaway module. - (autoaway): Don't do anything if erc-autoaway-idle-method is - unbound. This prevents an error on startup. - -2006-06-03 Michael Olson <mwolson@gnu.org> - - * erc-autoaway.el: Thanks to Mark Plaksin for the ideas and patch. - (erc-autoaway-idle-method): Renamed from - `erc-autoaway-use-emacs-idle'. We have more than two choices for - how to do this, so it's best to make this take symbol values. - Improve documentation. Remove warning against Emacs idle-time; - the point is moot now that we get user idle time via a different - method. Make sure we disable and re-enable the module when - changing this value. - (autoaway): Conditionalize on the above option. If using the idle - timer or user idle methods, don't add anything to the - send-completed or server-001 hooks, since it is unnecessary. - (erc-autoaway-reestablish-idletimer, erc-autoaway-message): - Docfix. - (erc-autoaway-idle-seconds): Use erc-autoaway-idle-method. - (erc-autoaway-reset-idle-irc): Renamed from - `erc-autoaway-reset-idle'. Don't pass line to - `erc-autoaway-set-away', since it is not used. - (erc-autoaway-reset-idle-user): New function that resets the idle - state for user idle time. - (erc-autoaway-set-back): Remove line argument, since it is not - used. - -2006-06-01 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-buffer-filter): Make sure all buffers returned from - this are live. - -2006-05-01 Edward O'Connor <ted@oconnor.cx> - - * erc-goodies.el (erc-handle-irc-url): New function, suitable as - a value for `url-irc-function'. - -2006-04-18 Diane Murray <disumu@x3y2z1.net> - - * erc-pcomplete.el (pcomplete-erc-nicks): Added new optional - argument IGNORE-SELF. If this is non-nil, don't return the user's - current nickname. Doc fix. - (pcomplete/erc-mode/complete-command): Don't complete the current - nickname. - -2006-04-05 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-cmd-SV): Removed the exclamation point. Show the - build date as it's shown in `emacs-version'. - - * erc-capab.el (erc-capab-identify-add-prefix): Insert the prefix - with the same face property as the previous character. - -2006-04-02 Michael Olson <mwolson@gnu.org> - - * erc-backend.el, erc-ezbounce.el, erc-join.el, erc-netsplit.el, - erc.el: Make sure to include a newline inside of negated classes, - so that a newline is not matched. - -2006-04-01 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-server-connect-function): Don't try to - detect the existence of the `open-network-stream-nowait' function, - since I can't find it in Emacs21, XEmacs21, or Emacs22. - -2006-03-26 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-header-line): New face that will be used to colorize - the text of the header-line, provided that - `erc-header-line-face-method' is non-nil. - (erc-prompt-face): Fix formatting. - (erc-header-line-face-method): New option that determines the - method used for colorizing header-line text. This may be a - function, nil, or non-nil. - (erc-update-mode-line-buffer): Use the aforementioned option and - face to colorize the header-line text, if that is what the user - wants. - (erc-send-input): If flood control is not activated, don't split - the input line. - -2006-03-25 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati - that fixes the case where there is no leading whitespace. Only - remove the first space character, though. - - * erc-identd.el (erc-identd-start): Fix a bug by making sure that - erc-identd-process is set properly. - (erc-identd-start, erc-identd-stop): Add autoload cookies. - (erc-identd-start): Pass :host parameter so this works with Emacs - 22. - -2006-03-09 Diane Murray <disumu@x3y2z1.net> - - * erc-button.el (erc-button-keymap): Use <backtab> rather than - <C-tab> for `erc-button-previous' as it is a more standard key - binding for this type of function. - -2006-02-28 Diane Murray <disumu@x3y2z1.net> - - * erc-capab.el: Removed things that were accidentally committed on - 2006-02-20. Removed Todo section. - (erc-capab-unidentified): Removed. - -2006-02-26 Michael Olson <mwolson@gnu.org> - - * erc-capab.el: Use (eval-when-compile (require 'cl)). - (erc-capab-unidentified): Fix compiler warning by specifying - group. - -2006-02-20 Diane Murray <disumu@x3y2z1.net> - - * erc-capab.el (erc-capab-send-identify-messages): Fixed comment - to explain thoughts better. `erc-server-parameters' is an - associated list when it's set, not a string. - -2006-02-19 Michael Olson <mwolson@gnu.org> - - * erc-capab.el (erc-capab-send-identify-messages): Make sure some - parameters are strings before using them. Thanks to Alejandro - Benitez for the report. - - * erc.el (erc-version-string): Release ERC 5.1.2. - -2006-02-19 Diane Murray <disumu@x3y2z1.net> - - * erc-button.el (erc-button-keymap): Bind `erc-button-previous' to - <C-tab>. - (erc-button-previous): New function. - -2006-02-15 Michael Olson <mwolson@gnu.org> - - * NEWS: Add category for ERC 5.2. - - * erc.el (erc): Move to the end of the buffer when a continued - session is detected. Thanks to e1f and indio for the report and - testing a potential fix. - -2006-02-14 Michael Olson <mwolson@gnu.org> - - * debian/changelog: Prepare a new Debian package. - - * Makefile (debprepare): New rule that creates an ERC snapshot - directory for use in both new Debian releases and revisions for - Debian packages. - (debrelease, debrevision-mwolson): Use debprepare. - - * NEWS: Bring up-to-date. - - * erc-stamp.el (erc-insert-timestamp-right): For now, put - timestamps before rather than after erc-fill-column when - erc-timestamp-right-column is nil. This way we won't surprise - anyone unpleasantly, or so it is hoped. - -2006-02-13 Michael Olson <mwolson@gnu.org> - - * erc-dcc.el: Use (eval-when-compile (require 'cl)). - -2006-02-12 Michael Olson <mwolson@gnu.org> - - * erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el - * erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el - * erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el - * erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el - * erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el - * erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el - * erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el: - Add 2006 to copyright years, to comply with the changed guidelines. - -2006-02-11 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-update-modules): Handle erc-capab-identify - correctly. Make some requirements shorter, so that it's easier to - see why they are needed. - - * erc-capab.el: Add autoload cookie for capab-identify. - (erc-capab-send-identify-messages, erc-capab-identify-activate): - Minor whitespace fix in code. - - * erc-stamp.el (erc-timestamp-use-align-to): Renamed from - `erc-timestamp-right-align-by-pixel'. Set the default based on - whether we are in Emacs 22, and using X. Improve documentation. - (erc-insert-aligned): Remove calculation of offset, since - :align-to pos works after all. Unlike the previous solution, this - one works when erc-stamp.el is compiled. - (erc-insert-timestamp-right): Don't add length of string, and then - later remove its displayed width. This puts timestamps after - erc-fill-column when erc-timestamp-right-column is nil, rather - than before it. It also fixes a subtle bug. Remove use of - `current-window', since there is no variable by that name in - Emacs21, Emacs22, or XEmacs21 beta. Check to see whether - `erc-fill-column' is non-nil before using it. - -2006-02-11 Diane Murray <disumu@x3y2z1.net> - - * erc-list.el: Define `list' module which sets the alias - `erc-cmd-LIST' to `erc-list-channels' when enabled and - `erc-list-channels-simple' when disabled. - (erc-list-channels): Was `erc-cmd-LIST', renamed. - (erc-list-channels-simple): New function. - - * erc.el (erc-modules): Added `list' to enabled modules. Changed - `capab-identify' description. Moved customization options left in - source code. - - * erc-menu.el (erc-menu-definition): Use `erc-list-channels'. - - * erc-capab.el: Put a little more detail into Usage section. - (define-erc-module): Run `erc-capab-identify-setup' in all open - server buffers when enabling. - (erc-capab-identify-setup): Make PROC and PARSED optional - arguments. - (erc-capab-identify-add-prefix): Simplified nickname regexp. This - should now also match nicknames that are formatted differently - than the default. - - * erc-spelling.el (define-erc-module): Make sure there's a buffer - before calling `with-current-buffer'. - -2006-02-10 Michael Olson <mwolson@gnu.org> - - * Makefile (debbuild): Split from debrelease. - (debrevision-mwolson): New rule that causes a Debian revision to - be built. - - * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to - Johan Bockgård. - (erc-modules): Change use of 'pcomplete to 'completion. - -2006-02-09 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) - * erc-capab.el: Require erc. - (erc-capab-send-identify-messages): Use `erc-server-send'. - (erc-capab-identify-remove/set-identified-flag): Use 1 and 0 as - the flags so we can also check whether the `erc-identified' text - property is there at all. - (erc-capab-identify-add-prefix): Use `erc-capab-find-parsed'. - This fixes a bug where the prefix wasn't inserted when timestamps - are inserted on the right. Tweaked nickname regexp. - (erc-capab-find-parsed): New function. - (erc-capab-get-unidentified-nickname): Updated to check for 0 - flag. Only get nickname if there's a nickuserhost associated with - this message. - - * erc-capab.el: New file. Adds the new module - `erc-capab-identify', which allows flagging of unidentified users - on servers running an ircd based on dancer - irc.freenode.net, for - example. - - * erc.el (erc-modules): Added `capab-identify' to options. - (erc-get-parsed-vector, erc-get-parsed-vector-nick) - (erc-get-parsed-vector-type): Moved here from erc-match.el. - - * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) - (erc-get-parsed-vector-type): Moved these functions to erc.el - since they can be useful outside of the text matching module. - - * NEWS: Added erc-capab.el. - - * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client" - to "ERC". - -2006-02-07 Michael Olson <mwolson@gnu.org> - - * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04, - ChangeLog.05: Rename from ChangeLog.NNNN in order to disambiguate - the filenames in DOS. - - * erc-goodies.el: Comment fix. - - * erc-hecomplete.el: Rename from erc-complete.el. Update - commentary. Use define-erc-module so that it's possible to - actually use this. - (erc-hecomplete): Rename function from `erc-complete'. - (erc-hecomplete): Rename group from `erc-old-complete'. Docfix. - - * erc-join.el: Rename from erc-autojoin.el. - - * erc-networks.el: Rename from erc-nets.el. - - * erc-services.el: Rename from erc-nickserv.el. - - * erc-stamp.el (erc-insert-aligned): Don't take 3rd argument. Use - the simpler `indent-to' function when - `erc-timestamp-right-align-by-pixel' is nil. - (erc-insert-timestamp-right): If the timestamp goes on the - following line, don't add timestamp properties to the spaces in - front of it. - - * erc.el (erc-migrate-modules): New function that eases migration - of module names. - (erc-modules): Call erc-migrate-modules in the :get accessor. - (erc-modules, erc-update-modules): Update for new modules names. - (erc-cmd-SMV): Remove, since this does not give useful output due - to the version strings being removed from ERC modules. - -2006-02-05 Michael Olson <mwolson@gnu.org> - - * erc-spelling.el (erc-spelling-init): If - `erc-spelling-dictionaries' is nil, do not set - ispell-local-dictionary. Before, it was being set to nil, which - was causing a long delay while the ispell process restarted. - (erc-spelling-unhighlight-word): New function that removes - flyspell properties from a spell-checked word. - (erc-spelling-flyspell-verify): Don't spell-check nicks or words - that have '/' before them. - -2006-02-04 Michael Olson <mwolson@gnu.org> - - * erc-autojoin.el: Use (eval-when-compile (require 'cl)). - - * erc-complete.el (erc-nick-completion-exclude-myself) - (erc-try-complete-nick): Use better function for getting list of - channel users. - - * erc-goodies.el: Docfix. - - * erc-stamp.el: Use new arch tagline, since the other one wasn't - being treated properly. - - * erc.el (erc-version-string): Release ERC 5.1.1. - -2006-02-03 Zhang Wei <id.brep@gmail.com> - - * erc.el (erc-version-string): Don't hard-code Emacs version. - (erc-version): Use emacs-version. - -2006-01-31 Michael Olson <mwolson@gnu.org> - - * erc-stamp.el: Update copyright years. - -2006-01-30 Simon Josefsson <jas@extundo.com> - - * erc.el (erc-open-ssl-stream): Use tls.el. - -2006-01-30 Michael Olson <mwolson@gnu.org> - - * erc-stamp.el (erc-timestamp-right-align-by-pixel): New option - that determines whether to use pixel values to align right - timestamps. The default is not to do so, since it only works with - Emacs22 on X, and even then some people have trouble. - (erc-insert-aligned): Use `erc-timestamp-right-align-by-pixel'. - -2006-01-29 Michael Olson <mwolson@gnu.org> - - * ChangeLog, ChangeLog.2005, ChangeLog.2004, ChangeLog.2003, - ChangeLog.2002, ChangeLog.2001: Add "See ChangeLog.NNNN" line for - earlier changes. Use utf-8 encoding. Fix some accent typos. - - * erc-speedbar.el (erc-speedbar-buttons): Fix reference to free - variable. - (erc-speedbar-goto-buffer): Fix compiler warning. - - * erc-ibuffer.el: Use `define-ibuffer-filter' instead of - `ibuffer-degine-limiter'. Use `define-ibuffer-column' instead of - `ibuffer-define-column'. Require 'ibuf-ext so that the macros - work without compiler warnings. - - * man/erc.texi (Obtaining ERC, Installation): Note that these - sections may be skipped if using the version of ERC that comes - with Emacs. - -2006-01-29 Edward O'Connor <ted@oconnor.cx> - - * erc-viper.el: Remove. Now that ERC is included in Emacs, these - work-arounds live in Viper itself. - -2006-01-28 Michael Olson <mwolson@gnu.org> - - * erc-*.el, erc.texi, NEWS: Add Arch taglines as per Emacs - guidelines. - - * erc-*.el: Space out copyright years like the rest of Emacs. Use - the Emacs copyright statement. Refer to ourselves as ERC rather - than "Emacs IRC Client", since there are now several IRC clients - for Emacs. - - * erc-compat.el (erc-emacs-build-time): Define as a variable. - - * erc-log.el (erc-log-setup-logging): Use write-file-functions. - - * erc-ibuffer.el: Require 'erc. - - * erc-stamp.el (erc-insert-aligned): Only use the special text - property when window-system is X. - - * erc.texi: Adapt for inclusion in Emacs. - -2006-01-28 Johan Bockgård <bojohan@users.sourceforge.net> - - * erc.el (erc-format-message): More `cl' breakage; don't use - `oddp'. - -2006-01-27 Michael Olson <mwolson@gnu.org> - - * debian/changelog: Update for new release. - - * debian/control (Description): Update. - - * debian/rules: Concatenate ChangeLog for 2005. - - * Makefile (MISC): Include ChangeLog.2005 and erc.texi. - (debrelease, release): Copy images directory. - - * NEWS: Spelling fixes. Add items for recent changes. - - * erc.el (erc): Move call to erc-update-modules before the call to - erc-mode. This should fix a timestamp display issue. - (erc-version-string): Release ERC 5.1. - -2006-01-26 Michael Olson <mwolson@gnu.org> - - * erc-stamp.el (erc-insert-aligned): New function that inserts - text in an perfectly-aligned way relative to the right margin. It - only works well with Emacs22. A sane fallback is provided for - other versions of Emacs. - (erc-insert-timestamp-right): Use the new function. - -2006-01-25 Edward O'Connor <ted@oconnor.cx> - - * erc.el (erc-modules): Ensure that `erc-button-mode' gets enabled - before `erc-match-mode'. - - * erc-match.el (match): Append `erc-match-message' to - `erc-insert-modify-hook'. - -2006-01-25 Michael Olson <mwolson@gnu.org> - - * FOR-RELEASE: Mark last release requirement as done. - - * Makefile (realclean, distclean): Remove docs. - - * erc.texi: Take care of all pre-5.1 items. - - * erc-backend.el (erc-server-send, erc-server-send-queue): Wrap - `process-send-string' in `condition-case' to avoid an error when - quitting ERC. - - * erc-stamp.el (erc-insert-timestamp-right): Try to deal with - variable-width characters in the timestamp and on the same line. - The latter is a kludge, but it seems to work with most of the - input I've thrown at it so far. It's certainly better than going - past the end of line consistently when we have variable-width - characters on the same line. When `erc-timestamp-intangible' is - non-nil, add intangible properties to the whitespace as well, so - that hitting <end> does what you'd expect. - - * erc.el (erc-flood-protect, erc-toggle-flood-control): Update - this to only use boolean values for `erc-flood-protect'. Update - documentation. - (erc-cmd-QUIT): Set the active buffer to be the server buffer, so - that any QUIT-related messages go there. - (erc): Try to be more clever about re-using channel buffers when - automatically re-connecting. Thanks to e1f for noticing. - -2006-01-23 Michael Olson <mwolson@gnu.org> - - * ChangeLog.2005: Remove erroneous line. - - * FOR-RELEASE: Make that the Makefile tweaking is complete. - (NEWS): Mark as done. - - * Makefile (MANUAL): New option indicating the name of the manual. - (PREFIX, ELISPDIR, INFODIR): New options that specify the - directories to install lisp code and info manuals to. PREFIX is - used only by ELISPDIR and INFODIR. - (all): Call `lisp' and create the manual. - (lisp): Compile lisp code. - (%.info, %.html): New rules that make Info files and HTML files, - respectively, from a TexInfo source. - (doc): Create both the Info and HTML versions of the manual. This - is for the user -- we never call it automatically. - (install-info): Install Info files. - (install-bin): Install compiled and source Lisp files. - (todo): Remove, since it seems pointless. - - * NEWS: Update. - - * README: Add Installation instructions. Tweak layout. - - * erc.texi: Work on some pre-5.1 items. - - * erc-stamp.el, erc-track.el: Move some functions and options in - order to get rid of a few compiler warnings. - - * erc.el (erc-modules): Enable readonly by default. This will - prevent new users from accidentally removing old messages, which - could be disconcerting. Also enable stamp by default, since - timestamps are a fairly standard feature among IRC clients. - - * erc-button.el: Munge whitespace. - - * erc-identd.el (erc-identd-start): Instead of throwing an error, - just try to use the obsolete function. - -2006-01-22 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-decode-string-from-target): Make sure that - we have a string as an argument. If not, coerce it to the empty - string. Hopefully, this will work painlessly around an edge case - related to quitting ERC around the same time a message comes in. - -2006-01-22 Johan Bockgård <bojohan@users.sourceforge.net> - - * erc-track.el: Use `(eval-when-compile (require 'cl))' (for - `case'). Doc fixes. - (erc-find-parsed-property): Simplify. - (erc-track-get-active-buffer): Fix logic. Simplify. - (erc-track-switch-buffer): Remove unused variable `dir'. Simplify. - - * erc-speak.el: Doc fixes. - (erc-speak-region): `propertize' --> `erc-propertize'. - - * erc-dcc.el (erc-dcc-chat-parse-output): `propertize' --> - `erc-propertize'. - - * erc-button.el (erc-button-add-button): Take erc-fill-prefix into - account when wrapping URLs. - - * erc-bbdb.el (erc-bbdb-elide-display): Doc fix. - - * erc-backend.el (define-erc-response-handler): Doc fix. - -2006-01-22 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-update-modules): Use `require' instead of `load', - but prevent it from causing errors, in order to preserve the - previous behavior. - -2006-01-21 Michael Olson <mwolson@gnu.org> - - * FOR-RELEASE (Source): Mark cl task as done. - * Makefile (erc-auto.el): Call erc-generate-autoloads rather than - generate-autoloads. - (erc-auto.el, %.elc): Don't show command, just its output. +See ChangeLog.06 for earlier changes. - * NEWS: Add items from 2005-01-01 to 2005-08-13. - - * debian/copyright (Copyright): Update. - - * erc-auto.in (erc-generate-autoloads): Rename from - generate-autoloads. - - * erc.el, erc-autoaway.el, erc-backend.el: Use - erc-server-process-alive instead of erc-process-alive. - - * erc.el, erc-backend.el, erc-ezbounce.el, erc-list.el, - erc-log.el, erc-match.el, erc-nets.el, erc-netsplit.el, - erc-nicklist.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el: - Use (eval-when-compile (require 'cl)), so that compilation doesn't - fail. - - * erc-fill.el, erc-truncate.el: Whitespace munging. - - * erc.el: Update copyright notice. Remove eval-after-load code. - (erc-with-buffer): Docfix. - (erc-once-with-server-event, erc-once-with-server-event-global) - (erc-with-buffer, erc-with-all-buffers-of-server): Use erc-gensym - instead of gensym. - (erc-banlist-update): Use erc-delete-if instead of delete-if. - (erc): Call `erc-update-modules' here. - - * erc-backend.el: Require 'erc-compat to minimize compiler - warnings. - (erc-decode-parsed-server-response): Docfix. - (erc-server-process-alive): Move here from erc.el and rename from - `erc-process-alive'. - (erc-server-send, erc-remove-channel-users): Make sure process is - alive before sending data to it. - - * erc-bbdb.el: Update copyright years. - (erc-bbdb-whois): Remove overexuberant comment. - - * erc-button.el: Require erc-fill, since we make liberal use of - `erc-fill-column'. - - * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): New - functions, the latter of which provides an `assert' equivalent. - (erc-remove-if-not): New function that provides a simple - implementation of `remove-if-not'. - (erc-gensym): New function that provides a simple implementation - of `gensym'. - (erc-delete-if): New function that provides a simple - implementation of `delete-if'. - (erc-member-if): New function that provides a simple - implementation of `member-if'. - (field-end): Remove this, since it is unused, and later versions - of XEmacs have this function already. - (erc-function-arglist): Moved here from erc.el. - (erc-delete-dups): New compatibility function for dealing with - XEmacs. - (erc-subseq): New function copied from cl-extra.el. - - * erc-dcc.el: Require pcomplete during compilation to avoid - compiler warnings. - (erc-unpack-int, erc-dcc-send-filter) - (erc-dcc-get-filter): Use erc-assert instead of assert. - (pcomplete/erc-mode/DCC): Use erc-remove-if-not instead of - remove-if-not. - - * erc-match.el (erc-log-matches): Fix compiler warning. - - * erc-nicklist.el: Update copyright notice. - (erc-nicklist-menu): Change use of caadr to (car (cadr ...)). - (erc-nicklist-bitlbee-connected-p): Remove. - (erc-nicklist-insert-medium-name-or-icon): Accept channel - argument. Use it to determine whether we are on bitlbee. Now - that bitlbee names its channel "&bitlbee", this is trivial. - (erc-nicklist-insert-contents): Pass channel as specified above. - Don't try to determine whether we are on bitlbee here. - (erc-nicklist-channel-users-info): Use erc-remove-if-not instead - of remove-if-not. - (erc-nicklist-search-for-nick): Use erc-member-if instead of - member-if. - - * erc-notify.el (erc-notify-QUIT): Use erc-delete-if with a - partially-evaluated lambda expression instead of `delete' and - `find'. - - * erc-track.el: Use erc-assert. - (erc-track-modified-channels): Remove use of `return'. - (erc-track-modified-channels): Use `cadr' instead of `second', - since otherwise we would need yet another eval-when-compile line. - -2006-01-19 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-process-sentinel-1): Remove attempt to - detect SIGPIPE, since it doesn't work. - -2006-01-10 Diane Murray <disumu@x3y2z1.net> - - * erc-spelling.el: Updated copyright years. - (define-erc-module): Enable/disable `flyspell-mode' for all open - ERC buffers as well. - (erc-spelling-dictionaries): Reworded customize description. - - * erc.el (erc-command-symbol): New function. - (erc-extract-command-from-line): Use `erc-command-symbol'. This - fixes a bug where "Symbol's function definition is void: - erc-cmd-LIST" would be shown after typing /list at the prompt (the - command was interned because erc-menu.el uses it and is enabled by - default whereas erc-list.el is not). - - * NEWS: Started a list of renamed variables. - - * erc.el: Reworded the message sent when defining variable - aliases. - (erc-command-indicator-face): Doc fix. - (erc-modules): Enable the match module by default which makes - current nickname highlighting on as the default. - - * erc-button.el: Updated copyright years. - (erc-button): New face. - (erc-button-face): Use `erc-button'. - (erc-button-nickname-face): New customizable variable. - (erc-button-add-nickname-buttons, erc-button-add-buttons-1): Send - new argument to `erc-button-add-button'. - (erc-button-add-button): Doc fix. Added new argument to function - definition, NICK-P. If it's a nickname, use - `erc-button-nickname-face', otherwise use `erc-button-face'. This - makes channel tracking and buttons work better together when - `erc-button-buttonize-nicks' is enabled, since there is a nickname - on just about every line. - - * erc-track.el (erc-track-use-faces): Doc fix. - (erc-track-faces-priority-list): Added `erc-button' to list. - (erc-track-priority-faces-only): Doc fix. - -2006-01-09 Diane Murray <disumu@x3y2z1.net> - - * erc-button.el (erc-button-url-regexp): Use `concat' so the - regexp is not one long line. - (erc-button-alist): Fixed so that customizing works correctly. - Reorganized. Removed lambda functions with more than two lines. - Doc fix. - (erc-button-describe-symbol, erc-button-beats-to-time): New - functions. Moved from `erc-button-alist'. - -2006-01-07 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-process-sentinel-1): Don't try to re-open a - process if a SIGPIPE occurs. This happens when a new message - comes in at the same time a /quit is requested. - (erc-process-sentinel): Use string-match rather than string= to do - these comparisons. Matching literal newlines makes me nervous. - - * erc-track.el (erc-track-remove-from-mode-line): Handle case - where global-mode-string is not a list. Emacs22 permits this. - - -See ChangeLog.05 for earlier changes. - - Copyright (C) 2006, 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -1366,4 +376,4 @@ See ChangeLog.05 for earlier changes. ;; add-log-time-zone-rule: t ;; End: -;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a +;; arch-tag: 3369b6e5-96b1-4b32-96cd-9a905c747496 diff --git a/lisp/erc/ChangeLog.06 b/lisp/erc/ChangeLog.06 new file mode 100644 index 00000000000..f7d891cb5f6 --- /dev/null +++ b/lisp/erc/ChangeLog.06 @@ -0,0 +1,1457 @@ +2006-12-28 Michael Olson <mwolson@gnu.org> + + * erc-list.el: Change header to mention that this is part of ERC, + rather than GNU Emacs. + + * erc-networks.el (erc-server-alist): Add Ars OpenIRC and + LinuxChix networks. Thanks to Angelina Carlton for mentioning + them. Properly escape periods in Konfido.Net and Kewl.Org. + (erc-networks-alist): Add entries for Ars and LinuxChix, though + the latter does not actually provide an announced network name. + + * erc-services.el (erc-nickserv-identify-mode): Add 'both method, + which waits for a NickServ message if the network supports it, + otherwise sends the password after connecting. + (erc-nickserv-identify-mode): Default to 'both. + (erc-nickserv-passwords): Add OFTC and Azzurra to custom options. + (erc-nickserv-alist): Indentation fix. + (erc-nickserv-identify-on-connect) + (erc-nickserv-identify-on-nick-change): Handle 'both method. + +2006-12-28 Leo <sdl.web@gmail.com> (tiny change) + + * erc.el (erc-iswitchb): Wrap body in unwind-protect so that + hitting C-g does not leave iswitchb-mode on. + +2006-12-27 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-cmd-RECONNECT): New command that calls + erc-server-reconnect. + + * erc-backend.el (erc-server-reconnect-count): New server variable + that keeps track of reconnection attempts. + (erc-server-reconnect-attempts): New option that determines the + number of reconnection attempts that ERC will make per server. + (erc-server-reconnect-timeout): New option that determines the + amount of time, in seconds, that ERC will wait between successive + reconnect attempts. + (erc-server-reconnect): New function that reestablishes the + current IRC connection. Move some commands from + erc-process-sentinel-1 here. + (erc-process-sentinel-1): If we have been disconnected, loop until + we either reconnect or run out of attempts. + (erc-server-reconnect-p): Move higher and make this a defsubst, + since I'm worried about the current buffer changing from + underneath us. Implement limit of number of reconnect attempts.. + + * erc.texi (Getting Started): Update for /RECONNECT command. + +2006-12-26 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-open): Restore old point correctly, or at least get + closer to doing so than before. + +2006-12-13 Leo <sdl.web@gmail.com> (tiny change) + + * erc.el (erc-iswitchb): Temporarily enable iswitchb mode if it + isn't active already, instead of leaving it on. + +2006-12-10 Juanma Barranquero <lekktu@gmail.com> + + * erc-ezbounce.el (erc-ezb-init-session-list): Doc fix. + +2006-12-08 Michael Olson <mwolson@gnu.org> + + * erc.el: Re-evaluate contributions from a contributor, and found + them under 15 lines of non-obvious code, so it is safe to remove + the copyright notice. + (erc-modules): Remove list module. + + * erc-list.el: Remove, since a contributor who has not completed + their assignment has contributed significantly more than 15 lines + of code to this file. + +2006-11-28 Juanma Barranquero <lekktu@gmail.com> + + * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Simplify. + (erc-prompt-for-channel-key, erc-ignore-reply-list, erc-send-post-hook) + (erc-active-buffer, erc-join-buffer, erc-frame-alist, erc-with-buffer) + (erc-modules, erc-display-message-highlight, erc-process-input-line) + (erc-cmd-HELP, erc-server-hooks, erc-echo-notice-in-user-buffers) + (erc-format-my-nick, erc-echo-notice-in-user-and-target-buffers) + (erc-echo-notice-in-first-user-buffer, erc-connection-established) + (erc-update-user-nick, erc-update-channel-member, erc-highlight-notice) + (erc-command-symbol, erc-add-query, erc-process-script-line) + (erc-determine-parameters, erc-client-info, erc-popup-input-buffer): + (erc-script-echo): Fix typos in docstrings. + (erc-channel-user-op-p, erc-channel-user-voice-p, erc-startup-file-list) + (define-erc-module, erc-once-with-server-event) + (erc-once-with-server-event-global, erc-debug-irc-protocol) + (erc-log-irc-protocol, erc-cmd-LOAD, erc-update-user) + (erc-update-current-channel-member, erc-load-script): + (erc-mode-line-away-status-format): Doc fixes. + +2006-11-20 Andrea Russo <rastandy@inventati.org> (tiny change) + + * erc-dcc.el (erc-dcc-chat-setup): Initialize `erc-input-marker' + before calling `erc-display-prompt'. + +2006-11-24 Juanma Barranquero <lekktu@gmail.com> + + * erc.el (erc-after-connect, erc-open-ssl-stream) + (erc-display-line-1, erc-display-line): + * erc-backend.el (005): Fix space/tab mixup in docstrings. + +2006-11-20 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-version-string): Call this Version 5.2 stable + pre-release, since it diverges slightly from our 5.2 branch, in + that unstable features are not included. + (erc-update-modules): Display better error message when module not + found. + +2006-11-12 Michael Olson <mwolson@gnu.org> + + * erc-log.el: Save all log buffers when Emacs exits, in case + someone ignores the warning about open processes. Remove the + advice code in the commentary. + (erc-save-query-buffers): Docfix. + (erc-log-save-all-buffers): New function that saves all ERC + buffers to logs. + (erc-current-logfile): Fix bug in filename selection, where the + current buffer was erroneously being preferred over the given + buffer. + +2006-11-08 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-string-to-port): Avoid error when a numerical port + is passed. Thanks to Zekeriya KOÇ for the report. + +2006-11-08 Łukasz Demianiuk <ldemianiuk@gmail.com> (tiny change) + + * erc.el (erc-header-line): Fix typo. + +2006-11-06 Juanma Barranquero <lekktu@gmail.com> + + * erc-dcc.el (erc-dcc-send-file): Fix typo in error message. + + * erc.el (read-passwd): + * erc-autoaway.el (erc-autoaway-reestablish-idletimer): + * erc-truncate.el (truncate): Fix typo in docstring. + +2006-10-21 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-iswitchb): Fix bug when hitting C-c C-b without + first loading iswitchb. Thanks to Leo for the report. + +2006-10-10 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-default-port): Make the default be 6667 instead of + ircd. since Mac OS X apparently has problems with looking up that + port name. + + * erc-backend.el (353): Receive names after displaying the initial + message, instead of before. + +2006-10-05 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-my-nick-face): New face. + (erc): Use FULL-NAME argument, not `erc-user-full-name'. This + fixes a bug where the :full-name argument passed to the function + was not respected. + (erc-format-my-nick): Use `erc-my-nick-face'. This should help + make it easier to find messages you sent in conversations when + `erc-show-my-nick' is non-nil. + (erc-compute-server): Doc fix. + +2006-10-01 John J Foerch <jjfoerch@earthlink.net> (tiny change) + + * erc-stamp.el (erc-insert-timestamp-right): Exclude the newline + from the erc-timestamp field. + +2006-09-11 Michael Olson <mwolson@gnu.org> + + * erc-nicklist.el (erc-nicklist-insert-contents): Add missing + parenthesis. Thanks to Stephan Stahl for the report. + +2006-09-10 Eric Hanchrow <offby1@blarg.net> (tiny change) + + * erc.el (erc-cmd-IGNORE): Prompt user if this might be a regexp + instead of a single user. + +2006-09-10 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-generate-new-buffer-name): If this is a server + buffer and a process exists already, create a new buffer. + (erc-open): If the IRC session was continued, restore the old + point. Thanks to Stephan Stahl for the report. + (erc-member-ignore-case): Coding style tweak. + (erc-cmd-UNIGNORE): Quote the user before comparison. If we don't + find the user listed verbatim, try to match them against the list + using string-match. In this case, prompt as to whether the regexp + should be removed. + (erc-ignored-user-p): Remove CL-ism. + + * erc-autoaway.el (erc-autoaway-possibly-set-away): Check to see + whether we are already away. + + * erc-menu.el: Fix potential compiler warning. + +2006-09-07 Diane Murray <disumu@x3y2z1.net> + + * erc.el: Updated Commentary and URL. + (erc-iswitchb, erc-display-line, erc-set-modes, erc-update-modes) + (erc-arrange-session-in-multiple-windows): No need to check if + `erc-server-process' is bound. + (erc-server-buffer-live-p): Doc fix. + (erc-part-from-channel): Don't use any initial contents at prompt. + (erc-format-nick, erc-format-@nick): Doc fix. Use `when'. + (s367): Fixed to support only banmask and channel which is the + standard. Also, there's no reason to add a message to each banned + user entry trying to persuade the user to use /banlist instead of + /mode #channel +b. That part of the message was a little + confusing, anyways. + (s367-set-by): New catalog entry. The user who set the ban and + the time of ban seem to be specific to only certain servers such + as freenode. + + * erc-autoaway.el (erc-autoaway-idletimer): Doc fix. + + * erc-backend.el (erc-server-process-alive): No need to check if + `erc-server-process' is bound. + (367): Use s367 or s367-set-by where appropriate. + + * erc-compat.el: Fixed URL. + + * erc-dcc.el: Updated copyright years. Added Usage section. + Changed supported Emacs version number from 21.3.50 to 22 in + Commentary. + + * erc-ibuffer.el (erc-server-name, erc-target, erc-away): No need + to check if `erc-server-process' is bound. + + * erc-nicklist.el: Added to the Commentary section an explanation + that `erc-nicklist-quit' should be called from within the nicklist + buffer. Set file coding to utf-8 so a contributor's name is + displayed correctly. + (erc-nicklist-icons-directory): Use customize type directory + instead of string. + (erc-nicklist-insert-contents): Set bbdb-nick to an empty string + if it wasn't found. This fixes a bug where an error would occur + when using `string=' on bbdb-nick if it was nil. + + * erc-replace.el: Removed URL from file information since it + doesn't exist. + + * erc-sound.el: Updated copyright years. Fixed Commentary and + added Usage section. + (define-erc-module): Add and remove `erc-ctcp-query-SOUND' to + `erc-ctcp-query-SOUND-hook' here. Removed the keybinding + definitions. + (erc-play-sound, erc-default-sound, erc-cmd-SOUND) + (erc-ctcp-query-SOUND): Doc fix. + (erc-play-command): Removed, not necessary anymore. + (erc-ctcp-query-SOUND-hook): Set to nil as default. Moved up + higher in code, added docstring. + (erc-play-sound): Use `play-sound-file'. It exists in GNU Emacs + as well since version 21 or earlier. Removed commented-out older + version of function. + + * NEWS: Fixed formatting, added channel tracking change. + +2006-09-03 Diane Murray <disumu@x3y2z1.net> + + * erc.el: M-x erc RET can now be used to start ERC. + (erc-open): Renamed from `erc'. + (erc-before-connect): Change erc-select to erc. + (erc): Renamed from `erc-select'. Use `erc-open'. + (erc-select): Defined as alias of `erc'. + (erc-ssl): Renamed from `erc-select-ssl'. Use `erc'. + (erc-select-ssl): Defined as alias of `erc-ssl'. + (erc-cmd-SERVER): Use `erc'. + (erc-query, erc-handle-irc-url): Use `erc-open'. + + * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'. + + * erc-menu.el (erc-menu-definition): Use `erc'. + + * erc-networks.el: Updated copyright years. + (erc-server-select): Use keyword arguments when calling `erc'. + + * erc.texi (Getting Started, Connecting): Changed erc-select to + erc. + + * README: Changed erc-select to erc. + + * NEWS: Added note about these changes. + + * FOR-RELEASE: Marked this item as done. + +2006-08-21 Diane Murray <disumu@x3y2z1.net> + + * erc-track.el (erc-track-mode-line-mouse-face): New variable. + (erc-make-mode-line-buffer-name): Add help-echo and mouse-face + properties to channel name. + +2006-08-20 Michael Olson <mwolson@gnu.org> + + * erc-identd.el (erc-identd): New customization group. + (erc-identd-port): New option that specifies the port to use if + none is given as an argument to erc-identd-start. + (identd): Place erc-identd-quickstart in erc-connect-pre-hook + instead of erc-identd-start so that we deal with the different + meaning of the first argument. + (erc-identd-start): Use erc-identd-port. + (erc-identd-quickstart): New function that ignores any arguments + and calls erc-identd-start. + + * erc.el (erc-with-server-buffer): New macro that switches to the + current ERC server buffer and runs some code. If no server buffer + is available, return nil. This is a useful way to access + variables in the server buffer. + (erc-get-server-user, erc-add-server-user) + (erc-remove-server-user, erc-change-user-nickname) + (erc-get-server-nickname-list, erc-get-server-nickname-alist) + (erc-ison-p, erc-active-buffer, erc-cmd-IGNORE) + (erc-cmd-UNIGNORE, erc-cmd-IDLE, erc-cmd-NICK, erc-cmd-BANLIST) + (erc-cmd-MASSUNBAN, erc-nickname-in-use, erc-ignored-user-p) + (erc-format-channel-modes): Use it. + (erc-once-with-server-event, erc-once-with-server-event-global) + (erc-with-buffer, erc-with-all-buffers-of-server): Use make-symbol + instead of gensym. + (erc-open-server-buffer-p): New function that returns non-nil if + the given buffer is an ERC server buffer that has an open IRC + process. + (erc-with-buffer): Use buffer-live-p here to set a good example, + though it isn't really needed here. + (erc-away): Mention erc-away-time. + (erc): Don't propagate the erc-away setting, since it makes more + sense to access it from the server buffer. Set up the prompt + before connecting rather than after. Run erc-connect-pre-hook + with the buffer as an argument, instead of no arguments. + (erc-cmd-GAWAY): Use erc-open-server-buffer-p instead of + erc-server-buffer-p so that only open connections are set away. + (erc-cmd-GQUIT): Use erc-open-server-buffer-p. + (erc-process-away): Docfix. Don't set erc-away in channel + buffers. + (erc-set-current-nick): Make this uniform with the style used in + erc-current-nick. + (erc-away-time): Rename from erc-away-p, since this is no longer a + boolean-style predicate. + (erc-format-away-status): Use it. + (erc-initialize-log-marker): Accept a `buffer' argument. + (erc-connect-pre-hook): Docfix. + (erc-connection-established): Make sure this runs in the correct + buffer. + (erc-set-initial-user-mode): Accept a `buffer' argument. + + * erc-stamp.el (erc-add-timestamp): Use erc-away-time. + + * erc-spelling.el (erc-spelling-init): Use + erc-with-server-buffer. Accept `buffer' argument. + (spelling): Call erc-spelling-init with the `buffer' argument. + + * erc-speedbar.el (erc-speedbar-buttons): Use erc-server-buffer-p. + + * erc-pcomplete.el (pcomplete/erc-mode/UNIGNORE) + (pcomplete-erc-all-nicks): Use erc-with-server-buffer. + + * erc-notify.el (erc-notify-timer, erc-cmd-NOTIFY): Use + erc-with-server-buffer. + + * erc-networks.el (erc-network, erc-current-network) + (erc-network-name): Use erc-with-server-buffer. + + * erc-netsplit.el (erc-cmd-WHOLEFT): Use erc-with-server-buffer. + + * erc-match.el (erc-log-matches, erc-log-matches-come-back): Use + erc-away-time. + + * erc-log.el (log): Use erc-away-time. Remove unnecessary check. + Pass `buffer' argument to erc-log-setup-logging instead of setting + the current buffer. Ditto for erc-log-disable-logging. + (erc-log-setup-logging, erc-log-disable-loggin): Accept a `buffer' + argument. + + * erc-list.el (erc-chanlist): Use erc-with-server-buffer. + + * erc-ibuffer.el (erc-away): Use erc-away-time. + + * erc-dcc.el (erc-dcc-get-filter): Temporarily make the buffer + read only instead of permanently doing so. + + * erc-compat.el (erc-gensym, *erc-sym-counter*): Remove, since + Emacs Lisp has make-symbol, which is better. + + * erc-chess.el (erc-chess-handler, erc-cmd-CHESS): Use + erc-with-server-buffer. + + * erc-capab.el (capab-identify): Only deal with server buffers + that have an open IRC process. + (erc-capab-identify-add-prefix): Use erc-with-server-buffer. + + * erc-backend.el (erc-server-connected): Docfix. Recommend the + `erc-server-process-alive' function. + (erc-coding-system-for-target): Supply a default target if one is + not given. + (erc-server-send): Simplify slightly. + (erc-call-hooks): Use erc-with-server-buffer. + (erc-server-connect, erc-server-setup-periodical-ping): Accept + `buffer' argument. + + * erc-autoaway.el (erc-autoaway-reestablish-idletimer): Move + higher to avoid an automatic load snafu. + (erc-autoaway-some-server-buffer): New function that returns an + ERC server buffer with a live connection, or nil otherwise. + (erc-autoaway-insinuate-maybe): New function that adds the + autoaway reset function to post-command-hook if at least one ERC + process is alive. + (erc-autoaway-remove-maybe): New function that removes the + autoaway reset function from post-command-hook if no ERC process + is alive. + (autoaway): Don't touch post-command-hook unless an IRC process is + already open. Remove our addition to post-command-hook as soon as + there are no more IRC processes open. Reset the indicators before + connecting to an IRC server, which fixes a bug when re-connecting. + (erc-autoaway-reset-idle-user): Call erc-autoaway-remove-maybe if + there are no more IRC processes open. + (erc-autoaway-set-back): Pick an open IRC process. Accept an + argument which is a function call if we can't find one. + (erc-autoaway-some-open-server-buffer): New function which returns + an ERC server buffer with an open connection and a user that is + not away. + (erc-autoaway-possibly-set-away, erc-autoaway-set-away): Use it. + (erc-autoaway-set-away): Accept a `notest' argument which is used + to avoid testing the same thing twice. + (erc-autoaway-last-sent-time, erc-autoaway-caused-away): Move + higher in file to fix byte-compile warning. + +2006-08-20 Diane Murray <disumu@x3y2z1.net> + + * erc-backend.el (erc-process-sentinel-1): Doc fix. Let + `erc-server-reconnect-p' check all condition cases. + (erc-server-reconnect-p): Moved rest of checks from + `erc-process-sentinel-1' to here. Now takes an argument, EVENT. + +2006-08-14 Diane Murray <disumu@x3y2z1.net> + + * erc-menu.el: Updated copyright years. Removed EmacsWiki URL. + (erc-menu-definition): Name the menu "ERC" instead of "IRC" to + avoid confusion with rcirc and other clients. + + * erc-backend.el (erc-server-banned): New variable. + (erc-server-connect): Set `erc-server-banned' to nil. + (erc-process-sentinel-1): Use `erc-server-reconnect-p'. + (erc-server-reconnect-p): New function. Return non-nil if the + user wants automatic reconnects and if the user has not been + banned from the server. This should fix a bug where ERC gets into + a loop trying to reconnect with no way to stop it when the user is + denied access to the server due to a server ban. It might also + help when Tor users are blocked from freenode if freenode servers + send the 465 message before disconnecting. + (465): Handle "banned from server" error notices. + +2006-08-13 Romain Francoise <romain@orebokech.com> + + * erc-match.el (erc-log-matches-make-buffer): End `y-or-n-p' + prompt with a space. + +2006-08-13 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-timed-out): New variable that + indicates whether the current connection has timed out due to + failure to respond to a ping. + (erc-server-send-ping): Set erc-server-timed-out to t. + (erc-server-connect): Initialize erc-server-timed-out to nil. + (erc-process-sentinel-1): Consult erc-server-timed-out. + +2006-08-11 Michael Olson <mwolson@gnu.org> + + * erc-fill.el (erc-fill): Skip any initial empty lines so that we + avoid errors when inserting disconnect messages and other messages + that begin with newlines. + +2006-08-07 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-process-sentinel-1): Use erc-display-message + in several places instead of inserting text. + (erc-process-sentinel): Move to the input-marker before removing + the prompt. + + * erc.el (erc-port): Fix customization options. + (erc-display-message): Handle null type explicitly. Previously, + this was relying on a chance side-effect. Cosmetic indentation + tweak. + (english): Add 'finished and 'terminated entries to the catalog. + Add initial and terminal newlines to 'disconnected and + 'disconnected-noreconnect entries. Avoid long lines. + (erc-cmd-QUIT): Bind the current erc-server-process to + server-proc. If the IRC server responds quickly, it is possible + for the connection to close, and hence server buffer to be killed, + if erc-kill-server-buffer-on-quit is non-nil. This avoids that + problem. + +2006-08-06 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-send-queue): Update from Circe + version of this function. + (erc-server-ping-timer-alist): New variable that keeps track of + ping timers according to their associated server. + (erc-server-last-received-time): New variable that specifies the + time of the last message we received from the server. This is + used to detect hung processes. + (erc-server-send-ping): New function that sends a ping to the IRC + process corresponding with the given buffer. Split from + erc-server-setup-periodical-ping. If the server buffer no longer + exists, cancel the timer. If the server process has not given us + a message, including PING responses, since the last PING, kill it. + This is necessary to deal with some aberrant freenode behavior. + Idea taken from rcirc. + (erc-server-setup-periodical-ping): Rename from + erc-server-setup-periodical-server-ping. + (erc-server-filter-function): Use erc-current-time instead of + current-time. + + * erc.el (erc-arrange-session-in-multiple-windows): Fix bug with + multi-tty Emacs. + (erc-select-startup-file): Fix bug introduced by recent change. + (erc-cmd-QUIT): If the IRC process has not terminated itself + within 4 seconds of completing our quit-hook, kill it manually. + Freenode in particular needs this. + (erc-connection-established): Use erc-server-setup-periodical-ping + instead of erc-server-setup-periodical-server-ping. + +2006-08-05 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-log-standardize-name): New function that returns + a filename that is safe for use for a log file. + (erc-current-logfile): Use it. + + * erc.el (erc-startup-file-list): Search in ~/.emacs.d first, + since that is a fairly standard directory. + (erc-select-startup-file): Re-write to use + convert-standard-filename, which will ensure that MS-DOS systems + look for the _ercrc.el file. + +2006-08-02 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-version-string): Release ERC 5.1.4. + + * Makefile, NEWS, erc.texi: Update for the 5.1.4 release. + + * erc.el (erc-active-buffer): Fix bug that caused messages to go + to the wrong buffer. Thanks to offby1 for the report. + + * erc-backend.el (erc-coding-system-for-target): Handle case where + target is nil. Thanks to Kai Fan for the patch. + +2006-07-29 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-log-setup-logging): Don't offer to save the + buffer. It will be saved automatically killed. Thanks to Johan + Bockgård and Tassilo Horn for pointing this out. + +2006-07-27 Johan Bockgård <bojohan@users.sourceforge.net> + + * erc.el (define-erc-module): Make find-function and find-variable + find the names constructed by `define-erc-module' in Emacs 22. + +2006-07-14 Michael Olson <mwolson@gnu.org> + + * erc-log.el (log): Make sure that we enable logging on + already-opened buffers as well, in case the user toggles this + module after loading ERC. Also be sure to remove logging ability + from all ERC buffers when the module is disabled. + (erc-log-setup-logging): Set buffer-file-name to nil rather than + the empty string. This should fix some errors that occur when + quitting Emacs without first killing all ERC buffers. + (erc-log-disable-logging): New function that removes the logging + ability from the current buffer. + + * erc-spelling.el (spelling): Use dolist and buffer-live-p. + +2006-07-12 Michael Olson <mwolson@gnu.org> + + * erc-match.el (erc-log-matches): Bind inhibit-read-only rather + than call toggle-read-only. + + * erc.el (erc-handle-irc-url): Move here from erc-goodies.el and + add autoload cookie. + +2006-07-09 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-version-string): Release ERC 5.1.3. + + * erc.texi: Update for the 5.1.3 release. + + * erc-autoaway.el (erc-autoaway-set-back): Fix bug after returning + from being set automatically away and current buffer is not an ERC + buffer. + + * erc-identd.el: Fix compiler error. + + * erc.texi (Development): Use @subheading instead of @subsection. + (Advanced Usage): Add menu. + (Connecting): Fully document how to connect to an IRC server. + (Options, Tips and Tricks, Sample Configuration): New unwritten + sections. + + * erc.el (erc-server, erc-port, erc-nick, erc-nick-uniquifier) + (erc-user-full-name, erc-password): Docfixes and customization + interface tweaks. + (erc-try-new-nick-p): Rename from + `erc-manual-set-nick-on-bad-nick-p' and invert meaning. + (erc-nickname-in-use): Use `erc-try-new-nick-p'. Check the length + of `erc-nick-uniquifier', in case someone wants multiple + characters. + (erc-compute-server, erc-compute-nick, erc-compute-full-name) + (erc-compute-port): Docfixes. + + * erc-log.el (log): Move all add-hook calls here, rather than + executing them immediately, and also cause them to be un-hooked + when the module is removed. + (erc-save-buffer-on-part): Move next to + `erc-save-queries-on-quit'. + (erc-save-buffer-on-quit, erc-save-queries-on-quit): Default to t. + (erc-log-write-after-send, erc-log-write-after-insert): Default to + nil. This makes things fast, but reasonably failsafe, by default. + +2006-07-08 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-log-insert-log-on-open): Make this nil by + default, since most IRC clients don't do this. + (erc-log-write-after-send): New option that determines whether the + log file will be written to after every sent message. + (erc-log-write-after-insert): New option that determines whether + the log file will be written to when new text is added to a logged + ERC buffer. + (log): Use the aforementioned options. + + * erc.texi (Modules): Document the "completion" module. + + * erc-pcomplete.el (pcomplete-erc-nicks): Make sure that we don't + have a nil element in the list when ignore-self is non-nil. + +2006-07-05 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-modules): Use `set' instead of `set-default', since + this setting should never be buffer-local. Add the `page' module + to the list. + + * erc.texi (Modules): Add entries for `list' and `page' modules. + Change "spell" to "spelling". + (History): Use past tense throughout. + +2006-07-02 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-call-hooks): Fix (stringp nil) error that + can happen when doing /PART. + + * erc.el (erc-quit-reason-various-alist) + (erc-part-reason-various-alist): In the example, use "^$" as an + example, since "" matches anything. + (erc-quit-reason-various, erc-part-reason-various): If no argument + is given, and no matches are found, use our default reason instead + of "nil". + +2006-06-30 Michael Olson <mwolson@gnu.org> + + * erc.texi (Modules): Mention identd. + (Releases): Update mailing list address and download location. + (Development): Refactor. Provide updated directions for Arch. + Make URLs clickable. + (Keystroke Summary): Typo fix. Use more Texinfo syntax. + (Getting Started): Give simpler example. We do not need to + explicitly load every module. + (History): Update. + + * erc-autoaway.el, erc-join.el, erc-backend.el, erc-bbdb.el: + erc-button.el, erc-chess.el, erc-compat.el, erc-hecomplete.el: + erc-dcc.el, erc-ezbounce.el, erc-fill.el, erc-ibuffer.el: + erc-imenu.el, erc-list.el, erc-log.el, erc-match.el, erc-menu.el: + erc-networks.el, erc-netsplit.el, erc-nicklist.el: + erc-services.el, erc-pcomplete.el, erc-replace.el, erc-ring.el: + erc-speedbar.el, erc-spelling.el, erc-stamp.el, erc-track.el: + erc.el: Remove version strings. + + * erc.el (erc-cmd-SMV): Remove, since we do not have meaningful + module versions anymore. + (erc-version-modules): Remove, since we do not use this function + anymore. + (erc-latest-version, erc-ediff-latest-version): Remove, since this + was only useful back when ERC consisted of one file. + (erc-modules): Add line for identd. + (erc-get-channel-mode-from-keypress): Typo fix. + + * erc-imenu.el: Remove unnecessary lines in header. + + * erc-goodies.el (erc-handle-irc-url): Docfix. + + * erc-identd.el: Define an ERC module for this. + (erc-identd-start): Don't create a process buffer if possible. + Otherwise, use conventional hidden names for process buffers. + +2006-06-29 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-coding-system-for-target): Match + case-insensitively. Use a pattern match instead of `assoc', as + per the documentation for `erc-encoding-coding-alist'. + + * erc-track.el (erc-track-shorten-aggressively): Fix typo. + +2006-06-27 Michael Olson <mwolson@gnu.org> + + * erc.el: Update maintainer information and URLs. + +2006-06-14 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-active-buffer): If the active buffer has been + deleted, default to the server buffer. + (erc-toggle-flood-control): When the user hits C-c C-f, make flood + control really toggle, not unconditionally turn off. + +2006-06-12 Michael Olson <mwolson@gnu.org> + + * NEWS: Add items since the 5.1.2 release. + + * erc-autoaway.el (erc-autoaway-caused-away): New variable that + indicates whether the current away status was caused by this + module. + (erc-autoaway-set-back): Only set back if this module set the user + away. + (erc-autoaway-set-away): Update `erc-autoaway-caused-away'. + (erc-autoaway-reset-indicators): New function that resets some + indicators when the user is no longer away. + (autoaway): Add the above function to the 305 hook. + +2006-06-05 Romain Francoise <romain@orebokech.com> + + * erc.texi (History): Fix various typos. + +2006-06-04 Michael Olson <mwolson@gnu.org> + + * erc-autoaway.el (erc-autoaway-idle-method): Move after the + definition of the autoaway module. + (autoaway): Don't do anything if erc-autoaway-idle-method is + unbound. This prevents an error on startup. + +2006-06-03 Michael Olson <mwolson@gnu.org> + + * erc-autoaway.el: Thanks to Mark Plaksin for the ideas and patch. + (erc-autoaway-idle-method): Renamed from + `erc-autoaway-use-emacs-idle'. We have more than two choices for + how to do this, so it's best to make this take symbol values. + Improve documentation. Remove warning against Emacs idle-time; + the point is moot now that we get user idle time via a different + method. Make sure we disable and re-enable the module when + changing this value. + (autoaway): Conditionalize on the above option. If using the idle + timer or user idle methods, don't add anything to the + send-completed or server-001 hooks, since it is unnecessary. + (erc-autoaway-reestablish-idletimer, erc-autoaway-message): + Docfix. + (erc-autoaway-idle-seconds): Use erc-autoaway-idle-method. + (erc-autoaway-reset-idle-irc): Renamed from + `erc-autoaway-reset-idle'. Don't pass line to + `erc-autoaway-set-away', since it is not used. + (erc-autoaway-reset-idle-user): New function that resets the idle + state for user idle time. + (erc-autoaway-set-back): Remove line argument, since it is not + used. + +2006-06-01 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-buffer-filter): Make sure all buffers returned from + this are live. + +2006-05-01 Edward O'Connor <ted@oconnor.cx> + + * erc-goodies.el (erc-handle-irc-url): New function, suitable as + a value for `url-irc-function'. + +2006-04-18 Diane Murray <disumu@x3y2z1.net> + + * erc-pcomplete.el (pcomplete-erc-nicks): Added new optional + argument IGNORE-SELF. If this is non-nil, don't return the user's + current nickname. Doc fix. + (pcomplete/erc-mode/complete-command): Don't complete the current + nickname. + +2006-04-05 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-cmd-SV): Removed the exclamation point. Show the + build date as it's shown in `emacs-version'. + + * erc-capab.el (erc-capab-identify-add-prefix): Insert the prefix + with the same face property as the previous character. + +2006-04-02 Michael Olson <mwolson@gnu.org> + + * erc-backend.el, erc-ezbounce.el, erc-join.el, erc-netsplit.el, + erc.el: Make sure to include a newline inside of negated classes, + so that a newline is not matched. + +2006-04-01 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-connect-function): Don't try to + detect the existence of the `open-network-stream-nowait' function, + since I can't find it in Emacs21, XEmacs21, or Emacs22. + +2006-03-27 Michael Olson <mwolson@gnu.org> + + * erc.texi: Update direntry. Remove unneeded local variables. + +2006-03-26 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-header-line): New face that will be used to colorize + the text of the header-line, provided that + `erc-header-line-face-method' is non-nil. + (erc-prompt-face): Fix formatting. + (erc-header-line-face-method): New option that determines the + method used for colorizing header-line text. This may be a + function, nil, or non-nil. + (erc-update-mode-line-buffer): Use the aforementioned option and + face to colorize the header-line text, if that is what the user + wants. + (erc-send-input): If flood control is not activated, don't split + the input line. + +2006-03-25 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-cmd-QUOTE): Install patch from Aravind Gottipati + that fixes the case where there is no leading whitespace. Only + remove the first space character, though. + + * erc-identd.el (erc-identd-start): Fix a bug by making sure that + erc-identd-process is set properly. + (erc-identd-start, erc-identd-stop): Add autoload cookies. + (erc-identd-start): Pass :host parameter so this works with Emacs + 22. + +2006-03-09 Diane Murray <disumu@x3y2z1.net> + + * erc-button.el (erc-button-keymap): Use <backtab> rather than + <C-tab> for `erc-button-previous' as it is a more standard key + binding for this type of function. + +2006-02-28 Diane Murray <disumu@x3y2z1.net> + + * erc-capab.el: Removed things that were accidentally committed on + 2006-02-20. Removed Todo section. + (erc-capab-unidentified): Removed. + +2006-02-26 Michael Olson <mwolson@gnu.org> + + * erc-capab.el: Use (eval-when-compile (require 'cl)). + (erc-capab-unidentified): Fix compiler warning by specifying + group. + +2006-02-20 Diane Murray <disumu@x3y2z1.net> + + * erc-capab.el (erc-capab-send-identify-messages): Fixed comment + to explain thoughts better. `erc-server-parameters' is an + associated list when it's set, not a string. + +2006-02-19 Michael Olson <mwolson@gnu.org> + + * erc-capab.el (erc-capab-send-identify-messages): Make sure some + parameters are strings before using them. Thanks to Alejandro + Benitez for the report. + + * erc.el (erc-version-string): Release ERC 5.1.2. + +2006-02-19 Diane Murray <disumu@x3y2z1.net> + + * erc-button.el (erc-button-keymap): Bind `erc-button-previous' to + <C-tab>. + (erc-button-previous): New function. + +2006-02-15 Michael Olson <mwolson@gnu.org> + + * NEWS: Add category for ERC 5.2. + + * erc.el (erc): Move to the end of the buffer when a continued + session is detected. Thanks to e1f and indio for the report and + testing a potential fix. + +2006-02-14 Michael Olson <mwolson@gnu.org> + + * debian/changelog: Prepare a new Debian package. + + * Makefile (debprepare): New rule that creates an ERC snapshot + directory for use in both new Debian releases and revisions for + Debian packages. + (debrelease, debrevision-mwolson): Use debprepare. + + * NEWS: Bring up-to-date. + + * erc-stamp.el (erc-insert-timestamp-right): For now, put + timestamps before rather than after erc-fill-column when + erc-timestamp-right-column is nil. This way we won't surprise + anyone unpleasantly, or so it is hoped. + +2006-02-13 Michael Olson <mwolson@gnu.org> + + * erc-dcc.el: Use (eval-when-compile (require 'cl)). + +2006-02-12 Michael Olson <mwolson@gnu.org> + + * erc-autoaway.el, erc-dcc.el, erc-ezbounce.el, erc-fill.el + * erc-goodies.el, erc-hecomplete.el, erc-ibuffer.el, erc-identd.el + * erc-imenu.el, erc-join.el, erc-lang.el, erc-list.el, erc-log.el + * erc-match.el, erc-menu.el, erc-netsplit.el, erc-networks.el + * erc-notify.el, erc-page.el, erc-pcomplete.el, erc-replace.el + * erc-ring.el, erc-services.el, erc-sound.el, erc-speedbar.el + * erc-spelling.el, erc-track.el, erc-truncate.el, erc-xdcc.el: + Add 2006 to copyright years, to comply with the changed guidelines. + +2006-02-11 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-update-modules): Handle erc-capab-identify + correctly. Make some requirements shorter, so that it's easier to + see why they are needed. + + * erc-capab.el: Add autoload cookie for capab-identify. + (erc-capab-send-identify-messages, erc-capab-identify-activate): + Minor whitespace fix in code. + + * erc-stamp.el (erc-timestamp-use-align-to): Renamed from + `erc-timestamp-right-align-by-pixel'. Set the default based on + whether we are in Emacs 22, and using X. Improve documentation. + (erc-insert-aligned): Remove calculation of offset, since + :align-to pos works after all. Unlike the previous solution, this + one works when erc-stamp.el is compiled. + (erc-insert-timestamp-right): Don't add length of string, and then + later remove its displayed width. This puts timestamps after + erc-fill-column when erc-timestamp-right-column is nil, rather + than before it. It also fixes a subtle bug. Remove use of + `current-window', since there is no variable by that name in + Emacs21, Emacs22, or XEmacs21 beta. Check to see whether + `erc-fill-column' is non-nil before using it. + +2006-02-11 Diane Murray <disumu@x3y2z1.net> + + * erc-list.el: Define `list' module which sets the alias + `erc-cmd-LIST' to `erc-list-channels' when enabled and + `erc-list-channels-simple' when disabled. + (erc-list-channels): Was `erc-cmd-LIST', renamed. + (erc-list-channels-simple): New function. + + * erc.el (erc-modules): Added `list' to enabled modules. Changed + `capab-identify' description. Moved customization options left in + source code. + + * erc-menu.el (erc-menu-definition): Use `erc-list-channels'. + + * erc-capab.el: Put a little more detail into Usage section. + (define-erc-module): Run `erc-capab-identify-setup' in all open + server buffers when enabling. + (erc-capab-identify-setup): Make PROC and PARSED optional + arguments. + (erc-capab-identify-add-prefix): Simplified nickname regexp. This + should now also match nicknames that are formatted differently + than the default. + + * erc-spelling.el (define-erc-module): Make sure there's a buffer + before calling `with-current-buffer'. + +2006-02-10 Michael Olson <mwolson@gnu.org> + + * Makefile (debbuild): Split from debrelease. + (debrevision-mwolson): New rule that causes a Debian revision to + be built. + + * erc.el (erc-migrate-modules): Use a better algorithm. Thanks to + Johan Bockgård. + (erc-modules): Change use of 'pcomplete to 'completion. + +2006-02-09 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) + * erc-capab.el: Require erc. + (erc-capab-send-identify-messages): Use `erc-server-send'. + (erc-capab-identify-remove/set-identified-flag): Use 1 and 0 as + the flags so we can also check whether the `erc-identified' text + property is there at all. + (erc-capab-identify-add-prefix): Use `erc-capab-find-parsed'. + This fixes a bug where the prefix wasn't inserted when timestamps + are inserted on the right. Tweaked nickname regexp. + (erc-capab-find-parsed): New function. + (erc-capab-get-unidentified-nickname): Updated to check for 0 + flag. Only get nickname if there's a nickuserhost associated with + this message. + + * erc-capab.el: New file. Adds the new module + `erc-capab-identify', which allows flagging of unidentified users + on servers running an ircd based on dancer - irc.freenode.net, for + example. + + * erc.el (erc-modules): Added `capab-identify' to options. + (erc-get-parsed-vector, erc-get-parsed-vector-nick) + (erc-get-parsed-vector-type): Moved here from erc-match.el. + + * erc-match.el (erc-get-parsed-vector, erc-get-parsed-vector-nick) + (erc-get-parsed-vector-type): Moved these functions to erc.el + since they can be useful outside of the text matching module. + + * NEWS: Added erc-capab.el. + + * erc-dcc.el, erc-stamp.el, erc-xdcc.el: Changed "Emacs IRC Client" + to "ERC". + +2006-02-07 Michael Olson <mwolson@gnu.org> + + * ChangeLog.01, ChangeLog.02, ChangeLog.03, ChangeLog.04, + ChangeLog.05: Rename from ChangeLog.NNNN in order to disambiguate + the filenames in DOS. + + * erc-goodies.el: Comment fix. + + * erc-hecomplete.el: Rename from erc-complete.el. Update + commentary. Use define-erc-module so that it's possible to + actually use this. + (erc-hecomplete): Rename function from `erc-complete'. + (erc-hecomplete): Rename group from `erc-old-complete'. Docfix. + + * erc-join.el: Rename from erc-autojoin.el. + + * erc-networks.el: Rename from erc-nets.el. + + * erc-services.el: Rename from erc-nickserv.el. + + * erc-stamp.el (erc-insert-aligned): Don't take 3rd argument. Use + the simpler `indent-to' function when + `erc-timestamp-right-align-by-pixel' is nil. + (erc-insert-timestamp-right): If the timestamp goes on the + following line, don't add timestamp properties to the spaces in + front of it. + + * erc.el (erc-migrate-modules): New function that eases migration + of module names. + (erc-modules): Call erc-migrate-modules in the :get accessor. + (erc-modules, erc-update-modules): Update for new modules names. + (erc-cmd-SMV): Remove, since this does not give useful output due + to the version strings being removed from ERC modules. + +2006-02-05 Michael Olson <mwolson@gnu.org> + + * erc-spelling.el (erc-spelling-init): If + `erc-spelling-dictionaries' is nil, do not set + ispell-local-dictionary. Before, it was being set to nil, which + was causing a long delay while the ispell process restarted. + (erc-spelling-unhighlight-word): New function that removes + flyspell properties from a spell-checked word. + (erc-spelling-flyspell-verify): Don't spell-check nicks or words + that have '/' before them. + +2006-02-04 Michael Olson <mwolson@gnu.org> + + * erc-autojoin.el: Use (eval-when-compile (require 'cl)). + + * erc-complete.el (erc-nick-completion-exclude-myself) + (erc-try-complete-nick): Use better function for getting list of + channel users. + + * erc-goodies.el: Docfix. + + * erc-stamp.el: Use new arch tagline, since the other one wasn't + being treated properly. + + * erc.el (erc-version-string): Release ERC 5.1.1. + +2006-02-03 Zhang Wei <id.brep@gmail.com> + + * erc.el (erc-version-string): Don't hard-code Emacs version. + (erc-version): Use emacs-version. + +2006-01-31 Michael Olson <mwolson@gnu.org> + + * erc-stamp.el: Update copyright years. + +2006-01-30 Simon Josefsson <jas@extundo.com> + + * erc.el (erc-open-ssl-stream): Use tls.el. + +2006-01-30 Michael Olson <mwolson@gnu.org> + + * erc-stamp.el (erc-timestamp-right-align-by-pixel): New option + that determines whether to use pixel values to align right + timestamps. The default is not to do so, since it only works with + Emacs22 on X, and even then some people have trouble. + (erc-insert-aligned): Use `erc-timestamp-right-align-by-pixel'. + +2006-01-29 Michael Olson <mwolson@gnu.org> + + * ChangeLog, ChangeLog.2005, ChangeLog.2004, ChangeLog.2003, + ChangeLog.2002, ChangeLog.2001: Add "See ChangeLog.NNNN" line for + earlier changes. Use utf-8 encoding. Fix some accent typos. + + * erc-speedbar.el (erc-speedbar-buttons): Fix reference to free + variable. + (erc-speedbar-goto-buffer): Fix compiler warning. + + * erc-ibuffer.el: Use `define-ibuffer-filter' instead of + `ibuffer-degine-limiter'. Use `define-ibuffer-column' instead of + `ibuffer-define-column'. Require 'ibuf-ext so that the macros + work without compiler warnings. + + * man/erc.texi (Obtaining ERC, Installation): Note that these + sections may be skipped if using the version of ERC that comes + with Emacs. + +2006-01-29 Edward O'Connor <ted@oconnor.cx> + + * erc-viper.el: Remove. Now that ERC is included in Emacs, these + work-arounds live in Viper itself. + +2006-01-28 Michael Olson <mwolson@gnu.org> + + * erc-*.el, erc.texi, NEWS: Add Arch taglines as per Emacs + guidelines. + + * erc-*.el: Space out copyright years like the rest of Emacs. Use + the Emacs copyright statement. Refer to ourselves as ERC rather + than "Emacs IRC Client", since there are now several IRC clients + for Emacs. + + * erc-compat.el (erc-emacs-build-time): Define as a variable. + + * erc-log.el (erc-log-setup-logging): Use write-file-functions. + + * erc-ibuffer.el: Require 'erc. + + * erc-stamp.el (erc-insert-aligned): Only use the special text + property when window-system is X. + + * erc.texi: Adapt for inclusion in Emacs. + +2006-01-28 Johan Bockgård <bojohan@users.sourceforge.net> + + * erc.el (erc-format-message): More `cl' breakage; don't use + `oddp'. + +2006-01-27 Michael Olson <mwolson@gnu.org> + + * debian/changelog: Update for new release. + + * debian/control (Description): Update. + + * debian/rules: Concatenate ChangeLog for 2005. + + * Makefile (MISC): Include ChangeLog.2005 and erc.texi. + (debrelease, release): Copy images directory. + + * NEWS: Spelling fixes. Add items for recent changes. + + * erc.el (erc): Move call to erc-update-modules before the call to + erc-mode. This should fix a timestamp display issue. + (erc-version-string): Release ERC 5.1. + +2006-01-26 Michael Olson <mwolson@gnu.org> + + * erc-stamp.el (erc-insert-aligned): New function that inserts + text in an perfectly-aligned way relative to the right margin. It + only works well with Emacs22. A sane fallback is provided for + other versions of Emacs. + (erc-insert-timestamp-right): Use the new function. + +2006-01-25 Edward O'Connor <ted@oconnor.cx> + + * erc.el (erc-modules): Ensure that `erc-button-mode' gets enabled + before `erc-match-mode'. + + * erc-match.el (match): Append `erc-match-message' to + `erc-insert-modify-hook'. + +2006-01-25 Michael Olson <mwolson@gnu.org> + + * FOR-RELEASE: Mark last release requirement as done. + + * Makefile (realclean, distclean): Remove docs. + + * erc.texi: Take care of all pre-5.1 items. + + * erc-backend.el (erc-server-send, erc-server-send-queue): Wrap + `process-send-string' in `condition-case' to avoid an error when + quitting ERC. + + * erc-stamp.el (erc-insert-timestamp-right): Try to deal with + variable-width characters in the timestamp and on the same line. + The latter is a kludge, but it seems to work with most of the + input I've thrown at it so far. It's certainly better than going + past the end of line consistently when we have variable-width + characters on the same line. When `erc-timestamp-intangible' is + non-nil, add intangible properties to the whitespace as well, so + that hitting <end> does what you'd expect. + + * erc.el (erc-flood-protect, erc-toggle-flood-control): Update + this to only use boolean values for `erc-flood-protect'. Update + documentation. + (erc-cmd-QUIT): Set the active buffer to be the server buffer, so + that any QUIT-related messages go there. + (erc): Try to be more clever about re-using channel buffers when + automatically re-connecting. Thanks to e1f for noticing. + +2006-01-23 Michael Olson <mwolson@gnu.org> + + * ChangeLog.2005: Remove erroneous line. + + * FOR-RELEASE: Make that the Makefile tweaking is complete. + (NEWS): Mark as done. + + * Makefile (MANUAL): New option indicating the name of the manual. + (PREFIX, ELISPDIR, INFODIR): New options that specify the + directories to install lisp code and info manuals to. PREFIX is + used only by ELISPDIR and INFODIR. + (all): Call `lisp' and create the manual. + (lisp): Compile lisp code. + (%.info, %.html): New rules that make Info files and HTML files, + respectively, from a TexInfo source. + (doc): Create both the Info and HTML versions of the manual. This + is for the user -- we never call it automatically. + (install-info): Install Info files. + (install-bin): Install compiled and source Lisp files. + (todo): Remove, since it seems pointless. + + * NEWS: Update. + + * README: Add Installation instructions. Tweak layout. + + * erc.texi: Work on some pre-5.1 items. + + * erc-stamp.el, erc-track.el: Move some functions and options in + order to get rid of a few compiler warnings. + + * erc.el (erc-modules): Enable readonly by default. This will + prevent new users from accidentally removing old messages, which + could be disconcerting. Also enable stamp by default, since + timestamps are a fairly standard feature among IRC clients. + + * erc-button.el: Munge whitespace. + + * erc-identd.el (erc-identd-start): Instead of throwing an error, + just try to use the obsolete function. + +2006-01-22 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-decode-string-from-target): Make sure that + we have a string as an argument. If not, coerce it to the empty + string. Hopefully, this will work painlessly around an edge case + related to quitting ERC around the same time a message comes in. + +2006-01-22 Johan Bockgård <bojohan@users.sourceforge.net> + + * erc-track.el: Use `(eval-when-compile (require 'cl))' (for + `case'). Doc fixes. + (erc-find-parsed-property): Simplify. + (erc-track-get-active-buffer): Fix logic. Simplify. + (erc-track-switch-buffer): Remove unused variable `dir'. Simplify. + + * erc-speak.el: Doc fixes. + (erc-speak-region): `propertize' --> `erc-propertize'. + + * erc-dcc.el (erc-dcc-chat-parse-output): `propertize' --> + `erc-propertize'. + + * erc-button.el (erc-button-add-button): Take erc-fill-prefix into + account when wrapping URLs. + + * erc-bbdb.el (erc-bbdb-elide-display): Doc fix. + + * erc-backend.el (define-erc-response-handler): Doc fix. + +2006-01-22 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-update-modules): Use `require' instead of `load', + but prevent it from causing errors, in order to preserve the + previous behavior. + +2006-01-21 Michael Olson <mwolson@gnu.org> + + * FOR-RELEASE (Source): Mark cl task as done. + + * Makefile (erc-auto.el): Call erc-generate-autoloads rather than + generate-autoloads. + (erc-auto.el, %.elc): Don't show command, just its output. + + * NEWS: Add items from 2005-01-01 to 2005-08-13. + + * debian/copyright (Copyright): Update. + + * erc-auto.in (erc-generate-autoloads): Rename from + generate-autoloads. + + * erc.el, erc-autoaway.el, erc-backend.el: Use + erc-server-process-alive instead of erc-process-alive. + + * erc.el, erc-backend.el, erc-ezbounce.el, erc-list.el, + erc-log.el, erc-match.el, erc-nets.el, erc-netsplit.el, + erc-nicklist.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el: + Use (eval-when-compile (require 'cl)), so that compilation doesn't + fail. + + * erc-fill.el, erc-truncate.el: Whitespace munging. + + * erc.el: Update copyright notice. Remove eval-after-load code. + (erc-with-buffer): Docfix. + (erc-once-with-server-event, erc-once-with-server-event-global) + (erc-with-buffer, erc-with-all-buffers-of-server): Use erc-gensym + instead of gensym. + (erc-banlist-update): Use erc-delete-if instead of delete-if. + (erc): Call `erc-update-modules' here. + + * erc-backend.el: Require 'erc-compat to minimize compiler + warnings. + (erc-decode-parsed-server-response): Docfix. + (erc-server-process-alive): Move here from erc.el and rename from + `erc-process-alive'. + (erc-server-send, erc-remove-channel-users): Make sure process is + alive before sending data to it. + + * erc-bbdb.el: Update copyright years. + (erc-bbdb-whois): Remove overexuberant comment. + + * erc-button.el: Require erc-fill, since we make liberal use of + `erc-fill-column'. + + * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): New + functions, the latter of which provides an `assert' equivalent. + (erc-remove-if-not): New function that provides a simple + implementation of `remove-if-not'. + (erc-gensym): New function that provides a simple implementation + of `gensym'. + (erc-delete-if): New function that provides a simple + implementation of `delete-if'. + (erc-member-if): New function that provides a simple + implementation of `member-if'. + (field-end): Remove this, since it is unused, and later versions + of XEmacs have this function already. + (erc-function-arglist): Moved here from erc.el. + (erc-delete-dups): New compatibility function for dealing with + XEmacs. + (erc-subseq): New function copied from cl-extra.el. + + * erc-dcc.el: Require pcomplete during compilation to avoid + compiler warnings. + (erc-unpack-int, erc-dcc-send-filter) + (erc-dcc-get-filter): Use erc-assert instead of assert. + (pcomplete/erc-mode/DCC): Use erc-remove-if-not instead of + remove-if-not. + + * erc-match.el (erc-log-matches): Fix compiler warning. + + * erc-nicklist.el: Update copyright notice. + (erc-nicklist-menu): Change use of caadr to (car (cadr ...)). + (erc-nicklist-bitlbee-connected-p): Remove. + (erc-nicklist-insert-medium-name-or-icon): Accept channel + argument. Use it to determine whether we are on bitlbee. Now + that bitlbee names its channel "&bitlbee", this is trivial. + (erc-nicklist-insert-contents): Pass channel as specified above. + Don't try to determine whether we are on bitlbee here. + (erc-nicklist-channel-users-info): Use erc-remove-if-not instead + of remove-if-not. + (erc-nicklist-search-for-nick): Use erc-member-if instead of + member-if. + + * erc-notify.el (erc-notify-QUIT): Use erc-delete-if with a + partially-evaluated lambda expression instead of `delete' and + `find'. + + * erc-track.el: Use erc-assert. + (erc-track-modified-channels): Remove use of `return'. + (erc-track-modified-channels): Use `cadr' instead of `second', + since otherwise we would need yet another eval-when-compile line. + +2006-01-19 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-process-sentinel-1): Remove attempt to + detect SIGPIPE, since it doesn't work. + +2006-01-10 Diane Murray <disumu@x3y2z1.net> + + * erc-spelling.el: Updated copyright years. + (define-erc-module): Enable/disable `flyspell-mode' for all open + ERC buffers as well. + (erc-spelling-dictionaries): Reworded customize description. + + * erc.el (erc-command-symbol): New function. + (erc-extract-command-from-line): Use `erc-command-symbol'. This + fixes a bug where "Symbol's function definition is void: + erc-cmd-LIST" would be shown after typing /list at the prompt (the + command was interned because erc-menu.el uses it and is enabled by + default whereas erc-list.el is not). + + * NEWS: Started a list of renamed variables. + + * erc.el: Reworded the message sent when defining variable + aliases. + (erc-command-indicator-face): Doc fix. + (erc-modules): Enable the match module by default which makes + current nickname highlighting on as the default. + + * erc-button.el: Updated copyright years. + (erc-button): New face. + (erc-button-face): Use `erc-button'. + (erc-button-nickname-face): New customizable variable. + (erc-button-add-nickname-buttons, erc-button-add-buttons-1): Send + new argument to `erc-button-add-button'. + (erc-button-add-button): Doc fix. Added new argument to function + definition, NICK-P. If it's a nickname, use + `erc-button-nickname-face', otherwise use `erc-button-face'. This + makes channel tracking and buttons work better together when + `erc-button-buttonize-nicks' is enabled, since there is a nickname + on just about every line. + + * erc-track.el (erc-track-use-faces): Doc fix. + (erc-track-faces-priority-list): Added `erc-button' to list. + (erc-track-priority-faces-only): Doc fix. + +2006-01-09 Diane Murray <disumu@x3y2z1.net> + + * erc-button.el (erc-button-url-regexp): Use `concat' so the + regexp is not one long line. + (erc-button-alist): Fixed so that customizing works correctly. + Reorganized. Removed lambda functions with more than two lines. + Doc fix. + (erc-button-describe-symbol, erc-button-beats-to-time): New + functions. Moved from `erc-button-alist'. + +2006-01-07 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-process-sentinel-1): Don't try to re-open a + process if a SIGPIPE occurs. This happens when a new message + comes in at the same time a /quit is requested. + (erc-process-sentinel): Use string-match rather than string= to do + these comparisons. Matching literal newlines makes me nervous. + + * erc-track.el (erc-track-remove-from-mode-line): Handle case + where global-mode-string is not a list. Emacs22 permits this. + + +See ChangeLog.05 for earlier changes. + + Copyright (C) 2006, 2007 Free Software Foundation, Inc. + + This file is part of GNU Emacs. + + GNU Emacs is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + GNU Emacs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with GNU Emacs; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + +;; Local Variables: +;; coding: utf-8 +;; add-log-time-zone-rule: t +;; End: + +;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el index 9d90d0ae5e9..91a1150802b 100644 --- a/lisp/erc/erc-autoaway.el +++ b/lisp/erc/erc-autoaway.el @@ -40,6 +40,49 @@ yourself back when you type something." "The Emacs idletimer. This is only used when `erc-autoaway-idle-method' is set to 'emacs.") +(defvar erc-autoaway-last-sent-time (erc-current-time) + "The last time the user sent something.") + +(defvar erc-autoaway-caused-away nil + "Indicates whether this module was responsible for setting the +user's away status.") + +(eval-when-compile (defvar erc-autoaway-idle-seconds)) + +(defun erc-autoaway-reestablish-idletimer () + "Reestablish the Emacs idletimer. +If `erc-autoaway-idle-method' is 'emacs, you must call this +function each time you change `erc-autoaway-idle-seconds'." + (interactive) + (when erc-autoaway-idletimer + (erc-cancel-timer erc-autoaway-idletimer)) + (setq erc-autoaway-idletimer + (run-with-idle-timer erc-autoaway-idle-seconds + t + 'erc-autoaway-set-away + erc-autoaway-idle-seconds))) + +(defun erc-autoaway-some-server-buffer () + "Return some ERC server buffer if its connection is alive. +If none is found, return nil." + (car (erc-buffer-list #'erc-open-server-buffer-p))) + +(defun erc-autoaway-insinuate-maybe (&optional server &rest ignored) + "Add autoaway reset function to `post-command-hook' if at least one +ERC process is alive. + +This is used when `erc-autoaway-idle-method' is 'user." + (when (or server (erc-autoaway-some-server-buffer)) + (add-hook 'post-command-hook 'erc-autoaway-reset-idle-user))) + +(defun erc-autoaway-remove-maybe (&rest ignored) + "Remove the autoaway reset function from `post-command-hook' if +no ERC process is alive. + +This is used when `erc-autoaway-idle-method' is 'user." + (unless (erc-autoaway-some-server-buffer) + (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user))) + ;;;###autoload (autoload 'erc-autoaway-mode "erc-autoaway") (define-erc-module autoaway nil "In ERC autoaway mode, you can be set away automatically. @@ -65,24 +108,31 @@ set you no longer away. Related variables: `erc-public-away-p' and `erc-away-nickname'." ;; Enable: ((when (boundp 'erc-autoaway-idle-method) + (add-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators) + (setq erc-autoaway-last-sent-time (erc-current-time)) (cond ((eq erc-autoaway-idle-method 'irc) (add-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc) (add-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc)) ((eq erc-autoaway-idle-method 'user) - (add-hook 'post-command-hook 'erc-autoaway-reset-idle-user)) + (add-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe) + (add-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe) + (erc-autoaway-insinuate-maybe)) ((eq erc-autoaway-idle-method 'emacs) (erc-autoaway-reestablish-idletimer))) (add-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away) (add-hook 'erc-server-305-functions 'erc-autoaway-reset-indicators))) ;; Disable: ((when (boundp 'erc-autoaway-idle-method) + (remove-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators) (cond ((eq erc-autoaway-idle-method 'irc) (remove-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc) (remove-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc)) ((eq erc-autoaway-idle-method 'user) - (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user)) + (remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user) + (remove-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe) + (remove-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe)) ((eq erc-autoaway-idle-method 'emacs) (erc-cancel-timer erc-autoaway-idletimer) (setq erc-autoaway-idletimer nil))) @@ -104,9 +154,12 @@ definitions of being idle." (const :tag "Emacs idle time" emacs) (const :tag "Last IRC action" irc)) :set (lambda (sym val) - (erc-autoaway-disable) - (set-default sym val) - (erc-autoaway-enable))) + (if erc-autoaway-mode + (progn + (erc-autoaway-disable) + (set sym val) + (erc-autoaway-enable)) + (set sym val)))) (defcustom erc-auto-set-away t "*If non-nil, set away after `erc-autoaway-idle-seconds' seconds of idling. @@ -133,21 +186,6 @@ See `erc-auto-discard-away'." :group 'erc-autoaway :type 'regexp) -(eval-when-compile (defvar erc-autoaway-idle-seconds)) - -(defun erc-autoaway-reestablish-idletimer () - "Reestablish the Emacs idletimer. -If `erc-autoaway-idle-method' is 'emacs, you must call this -function each time you change `erc-autoaway-idle-seconds'." - (interactive) - (when erc-autoaway-idletimer - (erc-cancel-timer erc-autoaway-idletimer)) - (setq erc-autoaway-idletimer - (run-with-idle-timer erc-autoaway-idle-seconds - t - 'erc-autoaway-set-away - erc-autoaway-idle-seconds))) - (defcustom erc-autoaway-idle-seconds 1800 "*Number of seconds after which ERC will set you automatically away. If you are changing this variable using lisp instead of customizing it, @@ -167,19 +205,12 @@ in seconds." :group 'erc-autoaway :type 'string) -(defvar erc-autoaway-last-sent-time (erc-current-time) - "The last time the user sent something.") - -(defvar erc-autoaway-caused-away nil - "Indicates whether this module was responsible for setting the -user's away status.") - (defun erc-autoaway-reset-idle-user (&rest stuff) "Reset the stored user idle time. This is one global variable since a user talking on one net can talk on another net too." (when erc-auto-discard-away - (erc-autoaway-set-back)) + (erc-autoaway-set-back #'erc-autoaway-remove-maybe)) (setq erc-autoaway-last-sent-time (erc-current-time))) (defun erc-autoaway-reset-idle-irc (line &rest stuff) @@ -192,12 +223,24 @@ talk on another net too." (erc-autoaway-set-back)) (setq erc-autoaway-last-sent-time (erc-current-time))) -(defun erc-autoaway-set-back () - "Discard the away state globally." - (let ((server-buffer (car (erc-buffer-list #'erc-server-buffer-p)))) - (when (and erc-autoaway-caused-away - (with-current-buffer server-buffer (erc-away-p))) - (erc-cmd-GAWAY "")))) +(defun erc-autoaway-set-back (&optional none-alive-func) + "Discard the away state globally. + +NONE-ALIVE-FUNC is the function to call if no ERC processes are alive." + (let ((server-buffer (erc-autoaway-some-server-buffer))) + (if (and erc-autoaway-caused-away + (buffer-live-p server-buffer) + (with-current-buffer server-buffer erc-away)) + (erc-cmd-GAWAY "") + (when none-alive-func (funcall none-alive-func))))) + +(defun erc-autoaway-some-open-server-buffer () + "Return some ERC server buffer if its connection is alive and the +user is not away. +If none is found, return nil." + (car (erc-buffer-list (lambda () + (and (erc-open-server-buffer-p) + (not erc-away)))))) (defun erc-autoaway-possibly-set-away (current-time) "Set autoaway when `erc-auto-set-away' is true and the idletime is @@ -207,7 +250,7 @@ exceeds `erc-autoaway-idle-seconds'." ;; whenever the server sends something to the client. (when (and erc-auto-set-away (not erc-autoaway-caused-away) - (not (erc-away-p))) + (erc-autoaway-some-open-server-buffer)) (let ((idle-time (erc-time-diff erc-autoaway-last-sent-time current-time))) (when (>= idle-time erc-autoaway-idle-seconds) @@ -215,15 +258,17 @@ exceeds `erc-autoaway-idle-seconds'." nil 'notice nil (format "Setting automatically away after %i seconds of idle-time" idle-time)) - (erc-autoaway-set-away idle-time))))) + (erc-autoaway-set-away idle-time t))))) + +(defun erc-autoaway-set-away (idle-time &optional notest) + "Set the away state globally. -(defun erc-autoaway-set-away (idle-time) - "Set the away state globally." +If NOTEST is specified, do not check to see whether there is an +activer server buffer available." ;; Note that the idle timer runs, even when Emacs is inactive. In ;; order to prevent flooding when we connect, we test for an ;; existing process. - (when (and (erc-server-process-alive) - (not (erc-away-p))) + (when (or notest (erc-autoaway-some-open-server-buffer)) (setq erc-autoaway-caused-away t) (erc-cmd-GAWAY (format erc-autoaway-message idle-time)))) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index fbe6f22e1d6..08cb738d360 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -174,9 +174,15 @@ WALLCHOPS - supports sending messages to all operators in a channel") ;;; Server and connection state +(defvar erc-server-ping-timer-alist nil + "Mapping of server buffers to their specific ping timer.") + (defvar erc-server-connected nil - "Non-nil if the `current-buffer' is associated with an open IRC connection. -This variable is buffer-local.") + "Non-nil if the current buffer has been used by ERC to establish +an IRC connection. + +If you wish to determine whether an IRC connection is currently +active, use the `erc-server-process-alive' function instead.") (make-variable-buffer-local 'erc-server-connected) (defvar erc-server-reconnect-count 0 @@ -187,10 +193,23 @@ This variable is buffer-local.") "Non-nil if the user requests a quit.") (make-variable-buffer-local 'erc-server-quitting) +(defvar erc-server-reconnecting nil + "Non-nil if the user requests an explicit reconnect, and the +current IRC process is still alive.") +(make-variable-buffer-local 'erc-server-reconnecting) + +(defvar erc-server-timed-out nil + "Non-nil if the IRC server failed to respond to a ping.") +(make-variable-buffer-local 'erc-server-timed-out) + (defvar erc-server-banned nil "Non-nil if the user is denied access because of a server ban.") (make-variable-buffer-local 'erc-server-banned) +(defvar erc-server-error-occurred nil + "Non-nil if the user triggers some server error.") +(make-variable-buffer-local 'erc-server-error-occurred) + (defvar erc-server-lines-sent nil "Line counter.") (make-variable-buffer-local 'erc-server-lines-sent) @@ -210,6 +229,11 @@ This is useful for flood protection.") This is useful for flood protection.") (make-variable-buffer-local 'erc-server-last-ping-time) +(defvar erc-server-last-received-time nil + "Time the last message was received from the server. +This is useful for detecting hung connections.") +(make-variable-buffer-local 'erc-server-last-received-time) + (defvar erc-server-lag nil "Calculated server lag time in seconds. This variable is only set in a server buffer.") @@ -387,11 +411,24 @@ protection algorithm." ;; Ping handling -(defcustom erc-server-send-ping-interval 90 +(defcustom erc-server-send-ping-interval 30 "*Interval of sending pings to the server, in seconds. If this is set to nil, pinging the server is disabled." :group 'erc-server - :type '(choice (const nil) (integer :tag "Seconds"))) + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Seconds"))) + +(defcustom erc-server-send-ping-timeout 120 + "*If the time between ping and response is greater than this, reconnect. +The time is in seconds. + +This must be greater than or equal to the value for +`erc-server-send-ping-interval'. + +If this is set to nil, never try to reconnect." + :group 'erc-server + :type '(choice (const :tag "Disabled" nil) + (integer :tag "Seconds"))) (defvar erc-server-ping-handler nil "This variable holds the periodic ping timer.") @@ -424,20 +461,40 @@ Currently this is called by `erc-send-input'." (upcase-word 1) (buffer-string))) -(defun erc-server-setup-periodical-server-ping (&rest ignore) - "Set up a timer to periodically ping the current server." - (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler)) - (when erc-server-send-ping-interval - (setq erc-server-ping-handler - (run-with-timer - 4 erc-server-send-ping-interval - (lambda (buf) - (when (buffer-live-p buf) - (with-current-buffer buf - (erc-server-send - (format "PING %.0f" - (erc-current-time)))))) - (current-buffer))))) +(defun erc-server-send-ping (buf) + "Send a ping to the IRC server buffer in BUF. +Additionally, detect whether the IRC process has hung." + (if (buffer-live-p buf) + (with-current-buffer buf + (if (and erc-server-send-ping-timeout + (> + (erc-time-diff (erc-current-time) + erc-server-last-received-time) + erc-server-send-ping-timeout)) + (progn + ;; if the process is hung, kill it + (setq erc-server-timed-out t) + (delete-process erc-server-process)) + (erc-server-send (format "PING %.0f" (erc-current-time))))) + ;; remove timer if the server buffer has been killed + (let ((timer (assq buf erc-server-ping-timer-alist))) + (when timer + (erc-cancel-timer (cdr timer)) + (setcdr timer nil))))) + +(defun erc-server-setup-periodical-ping (buffer) + "Set up a timer to periodically ping the current server. +The current buffer is given by BUFFER." + (with-current-buffer buffer + (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler)) + (when erc-server-send-ping-interval + (setq erc-server-ping-handler (run-with-timer + 4 erc-server-send-ping-interval + #'erc-server-send-ping + buffer)) + (setq erc-server-ping-timer-alist (cons (cons buffer + erc-server-ping-handler) + erc-server-ping-timer-alist))))) (defun erc-server-process-alive () "Return non-nil when `erc-server-process' is open or running." @@ -447,40 +504,47 @@ Currently this is called by `erc-send-input'." ;;;; Connecting to a server -(defun erc-server-connect (server port) - "Perform the connection and login. -We will store server variables in the current buffer." +(defun erc-server-connect (server port buffer) + "Perform the connection and login using the specified SERVER and PORT. +We will store server variables in the buffer given by BUFFER." (let ((msg (erc-format-message 'connect ?S server ?p port))) (message "%s" msg) - (setq erc-server-process - (funcall erc-server-connect-function - (format "erc-%s-%s" server port) - (current-buffer) server port)) - (message "%s...done" msg)) - ;; Misc server variables - (setq erc-server-quitting nil) - (setq erc-server-banned nil) - (setq erc-server-last-sent-time (erc-current-time)) - (setq erc-server-last-ping-time (erc-current-time)) - (setq erc-server-lines-sent 0) - ;; last peers (sender and receiver) - (setq erc-server-last-peers '(nil . nil)) - ;; process handlers - (set-process-sentinel erc-server-process 'erc-process-sentinel) - (set-process-filter erc-server-process 'erc-server-filter-function) - ;; we do our own encoding and decoding - (when (fboundp 'set-process-coding-system) - (set-process-coding-system erc-server-process 'raw-text)) - (set-marker (process-mark erc-server-process) (point)) + (let ((process (funcall erc-server-connect-function + (format "erc-%s-%s" server port) + nil server port))) + (message "%s...done" msg) + ;; Misc server variables + (with-current-buffer buffer + (setq erc-server-process process) + (setq erc-server-quitting nil) + (setq erc-server-reconnecting nil) + (setq erc-server-timed-out nil) + (setq erc-server-banned nil) + (setq erc-server-error-occurred nil) + (let ((time (erc-current-time))) + (setq erc-server-last-sent-time time) + (setq erc-server-last-ping-time time) + (setq erc-server-last-received-time time)) + (setq erc-server-lines-sent 0) + ;; last peers (sender and receiver) + (setq erc-server-last-peers '(nil . nil))) + ;; we do our own encoding and decoding + (when (fboundp 'set-process-coding-system) + (set-process-coding-system process 'raw-text)) + ;; process handlers + (set-process-sentinel process 'erc-process-sentinel) + (set-process-filter process 'erc-server-filter-function) + (set-process-buffer process buffer))) (erc-log "\n\n\n********************************************\n") - (message (erc-format-message 'login ?n (erc-current-nick))) + (message (erc-format-message + 'login ?n + (with-current-buffer buffer (erc-current-nick)))) ;; wait with script loading until we receive a confirmation (first ;; MOTD line) (if (eq erc-server-connect-function 'open-network-stream-nowait) ;; it's a bit unclear otherwise that it's attempting to establish a ;; connection - (erc-display-message nil nil (current-buffer) - "Opening connection..\n") + (erc-display-message nil nil buffer "Opening connection..\n") (erc-login))) (defun erc-server-reconnect () @@ -501,6 +565,7 @@ Make sure you are in an ERC buffer when running this." (defun erc-server-filter-function (process string) "The process filter for the ERC server." (with-current-buffer (process-buffer process) + (setq erc-server-last-received-time (erc-current-time)) ;; If you think this is written in a weird way - please refer to the ;; docstring of `erc-server-processing-p' (if erc-server-processing-p @@ -529,16 +594,20 @@ Make sure you are in an ERC buffer when running this." (defsubst erc-server-reconnect-p (event) "Return non-nil if ERC should attempt to reconnect automatically. EVENT is the message received from the closed connection process." - (and erc-server-auto-reconnect - (not erc-server-banned) - ;; make sure we don't infinitely try to reconnect, unless the - ;; user wants that - (or (eq erc-server-reconnect-attempts t) - (and (integerp erc-server-reconnect-attempts) - (< erc-server-reconnect-count erc-server-reconnect-attempts))) - (not (string-match "^deleted" event)) - ;; open-network-stream-nowait error for connection refused - (not (string-match "^failed with code 111" event)))) + (or erc-server-reconnecting + (and erc-server-auto-reconnect + (not erc-server-banned) + (not erc-server-error-occurred) + ;; make sure we don't infinitely try to reconnect, unless the + ;; user wants that + (or (eq erc-server-reconnect-attempts t) + (and (integerp erc-server-reconnect-attempts) + (< erc-server-reconnect-count + erc-server-reconnect-attempts))) + (or erc-server-timed-out + (not (string-match "^deleted" event))) + ;; open-network-stream-nowait error for connection refused + (not (string-match "^failed with code 111" event))))) (defun erc-process-sentinel-1 (event) "Called when `erc-process-sentinel' has decided that we're disconnecting. @@ -562,6 +631,7 @@ Conditionally try to reconnect and take appropriate action." (if (erc-server-reconnect-p event) (condition-case err (progn + (setq erc-server-reconnecting nil) (erc-server-reconnect) (setq erc-server-reconnect-count 0)) (error (when (integerp erc-server-reconnect-attempts) @@ -611,6 +681,7 @@ Conditionally try to reconnect and take appropriate action." "Return the coding system or cons cell appropriate for TARGET. This is determined via `erc-encoding-coding-alist' or `erc-server-coding-system'." + (unless target (setq target (erc-default-target))) (or (when target (let ((case-fold-search t)) (catch 'match @@ -656,14 +727,11 @@ See `erc-server-flood-margin' for an explanation of the flood protection algorithm." (erc-log (concat "erc-server-send: " string "(" (buffer-name) ")")) (setq erc-server-last-sent-time (erc-current-time)) - (let ((buf (erc-server-buffer)) - (encoding (erc-coding-system-for-target - (or target (erc-default-target))))) + (let ((encoding (erc-coding-system-for-target target))) (when (consp encoding) (setq encoding (car encoding))) - (if (and buf - (erc-server-process-alive)) - (with-current-buffer buf + (if (erc-server-process-alive) + (erc-with-server-buffer (let ((str (concat string "\r\n"))) (if forcep (progn @@ -903,10 +971,8 @@ Finds hooks by looking in the `erc-server-responses' hashtable." (let ((hook (or (erc-get-hook (erc-response.command message)) 'erc-default-server-functions))) (run-hook-with-args-until-success hook process message) - (let ((server-buffer (erc-server-buffer))) - (when (buffer-live-p server-buffer) - (with-current-buffer server-buffer - (run-hook-with-args 'erc-timer-hook (erc-current-time))))))) + (erc-with-server-buffer + (run-hook-with-args 'erc-timer-hook (erc-current-time))))) (add-hook 'erc-default-server-functions 'erc-handle-unknown-server-response) @@ -1062,6 +1128,7 @@ add things to `%s' instead." (define-erc-response-handler (ERROR) "Handle an ERROR command from the server." nil + (setq erc-server-error-occurred t) (erc-display-message parsed 'error nil 'ERROR ?s (erc-response.sender parsed) ?c (erc-response.contents parsed))) @@ -1446,6 +1513,9 @@ A server may send more than one 005 message." See `erc-display-server-message'." nil (erc-display-server-message proc parsed)) +(define-erc-response-handler (290) + "Handle dancer-ircd CAPAB messages." nil nil) + (define-erc-response-handler (301) "AWAY notice." nil (erc-display-message parsed 'notice 'active 's301 diff --git a/lisp/erc/erc-button.el b/lisp/erc/erc-button.el index 1fd224fb956..435c72bba23 100644 --- a/lisp/erc/erc-button.el +++ b/lisp/erc/erc-button.el @@ -56,10 +56,12 @@ "This mode buttonizes all messages according to `erc-button-alist'." ((add-hook 'erc-insert-modify-hook 'erc-button-add-buttons 'append) (add-hook 'erc-send-modify-hook 'erc-button-add-buttons 'append) - (add-hook 'erc-complete-functions 'erc-button-next)) + (add-hook 'erc-complete-functions 'erc-button-next) + (add-hook 'erc-mode-hook 'erc-button-add-keys)) ((remove-hook 'erc-insert-modify-hook 'erc-button-add-buttons) (remove-hook 'erc-send-modify-hook 'erc-button-add-buttons) - (remove-hook 'erc-complete-functions 'erc-button-next))) + (remove-hook 'erc-complete-functions 'erc-button-next) + (remove-hook 'erc-mode-hook 'erc-button-add-keys))) ;; Make XEmacs use `erc-button-face'. (when (featurep 'xemacs) @@ -241,6 +243,16 @@ PAR is a number of a regexp grouping whose text will be passed to This syntax table should make all the legal nick characters word constituents.") +(defvar erc-button-keys-added nil + "Internal variable used to keep track of whether we've added the +global-level ERC button keys yet.") + +(defun erc-button-add-keys () + "Add ERC mode-level button movement keys. This is only done once." + (unless erc-button-keys-added + (define-key erc-mode-map (kbd "<backtab>") 'erc-button-previous) + (setq erc-button-keys-added t))) + (defun erc-button-add-buttons () "Find external references in the current buffer and make buttons of them. \"External references\" are things like URLs, as diff --git a/lisp/erc/erc-capab.el b/lisp/erc/erc-capab.el index 268c4bfe68a..b7ccade02e0 100644 --- a/lisp/erc/erc-capab.el +++ b/lisp/erc/erc-capab.el @@ -56,8 +56,10 @@ ;; (erc-capab-identify-mode 1) ;; `erc-capab-identify-prefix' will now be added to the beginning of -;; unidentified users' nicknames. The default is an asterisk, "*". If -;; the value of this variable is nil or you disable this module (see +;; unidentified users' nicknames. The default is an asterisk, "*". +;; You can customize the prefix and the face used to display it, +;; `erc-capab-identify-unidentified'. If the value of +;; `erc-capab-identify-prefix' is nil or you disable this module (see ;; `erc-capab-identify-disable'), no prefix will be inserted, but the ;; flag sent by the server will still be stripped. @@ -73,14 +75,19 @@ :group 'erc) (defcustom erc-capab-identify-prefix "*" - "The prefix used for unidentified users." + "The prefix used for unidentified users. + +If you change this from the default \"*\", be sure to use a +character not found in IRC nicknames to avoid confusion." :group 'erc-capab :type '(choice string (const nil))) -;;; Define module: +(defface erc-capab-identify-unidentified '((t)) ; same as `erc-default-face' + "Face to use for `erc-capab-identify-prefix'." + :group 'erc-capab + :group 'erc-faces) -(define-erc-response-handler (290) - "Handle dancer-ircd CAPAB messages." nil nil) +;;; Define module: ;;;###autoload (autoload 'erc-capab-identify-mode "erc-capab" nil t) (define-erc-module capab-identify nil @@ -124,9 +131,9 @@ Optional argument PARSED is the current message, a response struct. These arguments are sent to this function when called as a hook in `erc-server-005-functions'." (unless erc-capab-identify-sent - (erc-capab-send-identify-messages))) + (erc-capab-identify-send-messages))) -(defun erc-capab-send-identify-messages () +(defun erc-capab-identify-send-messages () "Send CAPAB IDENTIFY messages if the server supports it." (when (and (stringp erc-server-version) (string-match "^\\(dancer-ircd\\|hyperion\\)" erc-server-version) @@ -175,7 +182,7 @@ PARSED is an `erc-parsed' response struct." (when (and erc-capab-identify-prefix (erc-with-server-buffer erc-capab-identify-activated)) (goto-char (or (erc-find-parsed-property) (point-min))) - (let ((nickname (erc-capab-get-unidentified-nickname + (let ((nickname (erc-capab-identify-get-unidentified-nickname (erc-get-parsed-vector (point))))) (when (and nickname (goto-char (point-min)) @@ -183,10 +190,9 @@ PARSED is an `erc-parsed' response struct." (re-search-forward (regexp-quote nickname) nil t)) (goto-char (match-beginning 0)) (insert (erc-propertize erc-capab-identify-prefix - 'face (get-char-property (- (point) 1) - 'face))))))) + 'face 'erc-capab-identify-unidentified)))))) -(defun erc-capab-get-unidentified-nickname (parsed) +(defun erc-capab-identify-get-unidentified-nickname (parsed) "Return the nickname of the user if unidentified. PARSED is an `erc-parsed' response struct." (when (and (erc-response-p parsed) diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el index 60cbe992d19..dcfcfe84c98 100644 --- a/lisp/erc/erc-compat.el +++ b/lisp/erc/erc-compat.el @@ -161,14 +161,6 @@ avoid corrupting the original SEQ." (setq newseq (cons el newseq)))) (nreverse newseq))) -;; Provide a simpler replacement for `gensym'. -(defvar *erc-sym-counter* 0) -(defun erc-gensym () - "Generate a new uninterned symbol." - (let ((num (prog1 *erc-sym-counter* - (setq *erc-sym-counter* (1+ *erc-sym-counter*))))) - (make-symbol (format "*erc-sym-%d*" num)))) - ;; Copied from cl-extra.el (defun erc-subseq (seq start &optional end) "Return the subsequence of SEQ from START to END. diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el index 26ca86f04c6..fc1c71babdf 100644 --- a/lisp/erc/erc-fill.el +++ b/lisp/erc/erc-fill.el @@ -1,6 +1,7 @@ ;;; erc-fill.el --- Filling IRC messages in various ways -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Mario Lang <mlang@delysid.org> @@ -187,14 +188,6 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'." (length (format-time-string erc-timestamp-format)) 0)) -(defun erc-restore-text-properties () - "Restore the property 'erc-parsed for the region." - (let* ((parsed-posn (text-property-not-all (point-min) (point-max) - 'erc-parsed nil)) - (parsed-prop (when parsed-posn - (get-text-property parsed-posn 'erc-parsed)))) - (put-text-property (point-min) (point-max) 'erc-parsed parsed-prop))) - (provide 'erc-fill) ;;; erc-fill.el ends here diff --git a/lisp/erc/erc-ibuffer.el b/lisp/erc/erc-ibuffer.el index 5266d837d64..25ad1319bd6 100644 --- a/lisp/erc/erc-ibuffer.el +++ b/lisp/erc/erc-ibuffer.el @@ -127,8 +127,7 @@ (define-ibuffer-column erc-away (:name "A") (if (and erc-server-process (processp erc-server-process) - (with-current-buffer (process-buffer erc-server-process) - erc-away)) + (erc-away-time)) "A" " ")) diff --git a/lisp/erc/erc-identd.el b/lisp/erc/erc-identd.el index c7f7c615e92..8a70a743edb 100644 --- a/lisp/erc/erc-identd.el +++ b/lisp/erc/erc-identd.el @@ -42,12 +42,26 @@ (defvar erc-identd-process nil) +(defgroup erc-identd nil + "Run a local identd server." + :group 'erc) + +(defcustom erc-identd-port 8113 + "Port to run the identd server on if not specified in the argument for +`erc-identd-start'. + +This can be either a string or a number." + :group 'erc-identd + :type '(choice (const :tag "None" nil) + (integer :tag "Port number") + (string :tag "Port string"))) + ;;;###autoload (autoload 'erc-identd-mode "erc-identd") (define-erc-module identd nil "This mode launches an identd server on port 8113." - ((add-hook 'erc-connect-pre-hook 'erc-identd-start) + ((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart) (add-hook 'erc-disconnected-hook 'erc-identd-stop)) - ((remove-hook 'erc-connect-pre-hook 'erc-identd-start) + ((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart) (remove-hook 'erc-disconnected-hook 'erc-identd-stop))) (defun erc-identd-filter (proc string) @@ -71,12 +85,11 @@ run from inetd. The idea is to provide a simple identd server when you need one, without having to install one globally on your system." (interactive (list (read-string "Serve identd requests on port: " "8113"))) - (if (null port) - (setq port 8113) - (if (stringp port) - (setq port (string-to-number port)))) - (if erc-identd-process - (delete-process erc-identd-process)) + (unless port (setq port erc-identd-port)) + (when (stringp port) + (setq port (string-to-number port))) + (when erc-identd-process + (delete-process erc-identd-process)) (setq erc-identd-process (make-network-process :name "identd" :buffer nil @@ -85,6 +98,11 @@ system." :filter 'erc-identd-filter)) (set-process-query-on-exit-flag erc-identd-process nil)) +(defun erc-identd-quickstart (&rest ignored) + "Start the identd server with the default port. +The default port is specified by `erc-identd-port'." + (erc-identd-start)) + ;;;###autoload (defun erc-identd-stop (&rest ignore) (interactive) diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 22c9b3622d3..9801192bca0 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -85,7 +85,9 @@ ;;; Code: (require 'erc) -(eval-when-compile (require 'cl)) +(eval-when-compile + (require 'erc-networks) + (require 'cl)) (defgroup erc-log nil "Logging facilities for ERC." @@ -100,10 +102,12 @@ NICK is the current nick, SERVER and PORT are the parameters used to connect BUFFERs `erc-server-process'." :group 'erc-log - :type '(choice (const erc-generate-log-file-name-long) - (const erc-generate-log-file-name-short) - (const erc-generate-log-file-name-with-date) - (symbol))) + :type '(choice (const :tag "Long style" erc-generate-log-file-name-long) + (const :tag "Long, but with network name rather than server" + erc-generate-log-file-name-network) + (const :tag "Short" erc-generate-log-file-name-short) + (const :tag "With date" erc-generate-log-file-name-with-date) + (symbol :tag "Other function"))) (defcustom erc-truncate-buffer-on-save nil "Truncate any ERC (channel, query, server) buffer when it is saved." @@ -197,7 +201,7 @@ also be a predicate function. To only log when you are not set away, use: \(setq erc-enable-logging (lambda (buffer) (with-current-buffer buffer - (not erc-away))))" + (null (erc-away-time)))))" ;; enable ((when erc-log-write-after-insert (add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)) @@ -211,8 +215,7 @@ also be a predicate function. To only log when you are not set away, use: ;; append, so that 'erc-initialize-log-marker runs first (add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append) (dolist (buffer (erc-buffer-list)) - (when (buffer-live-p buffer) - (with-current-buffer buffer (erc-log-setup-logging))))) + (erc-log-setup-logging buffer))) ;; disable ((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs) (remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs) @@ -223,30 +226,38 @@ also be a predicate function. To only log when you are not set away, use: (remove-hook 'erc-part-hook 'erc-conditional-save-buffer) (remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging) (dolist (buffer (erc-buffer-list)) - (when (buffer-live-p buffer) - (with-current-buffer buffer (erc-log-disable-logging)))))) + (erc-log-disable-logging buffer)))) (define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs) ;;; functionality referenced from erc.el -(defun erc-log-setup-logging () +(defun erc-log-setup-logging (buffer) "Setup the buffer-local logging variables in the current buffer. -This function is destined to be run from `erc-connect-pre-hook'." - (when (erc-logging-enabled) - (auto-save-mode -1) - (setq buffer-file-name nil) - (set (make-local-variable '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 - (1- (point-max))))))) - -(defun erc-log-disable-logging () - "Disable logging in the current buffer." - (when (erc-logging-enabled) - (setq buffer-offer-save nil - erc-enable-logging nil))) +This function is destined to be run from `erc-connect-pre-hook'. +The current buffer is given by BUFFER." + (when (erc-logging-enabled 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)))) + (when erc-log-insert-log-on-open + (ignore-errors (insert-file-contents (erc-current-logfile)) + (move-marker erc-last-saved-position + (1- (point-max)))))))) + +(defun erc-log-disable-logging (buffer) + "Disable logging in BUFFER." + (when (erc-logging-enabled buffer) + (with-current-buffer buffer + (setq buffer-offer-save nil + erc-enable-logging nil)))) (defun erc-log-all-but-server-buffers (buffer) "Returns t if logging should be enabled in BUFFER. @@ -340,6 +351,19 @@ This function is a possible value for `erc-generate-log-file-name-function'." ;; we need a make-safe-file-name function. (convert-standard-filename file))) +(defun erc-generate-log-file-name-network (buffer target nick server port) + "Generates a log-file name using the network name rather than server name. +This results in a file name of the form #channel!nick@network.txt. +This function is a possible value for `erc-generate-log-file-name-function'." + (require 'erc-networks) + (let ((file (concat + (if target (concat target "!")) + nick "@" + (or (with-current-buffer buffer (erc-network-name)) server) + ".txt"))) + ;; we need a make-safe-file-name function. + (convert-standard-filename file))) + ;;;###autoload (defun erc-save-buffer-in-logs (&optional buffer) "Append BUFFER contents to the log file, if logging is enabled. diff --git a/lisp/erc/erc-match.el b/lisp/erc/erc-match.el index 50e4cfbc521..35ba1b13492 100644 --- a/lisp/erc/erc-match.el +++ b/lisp/erc/erc-match.el @@ -1,6 +1,7 @@ ;;; erc-match.el --- Highlight messages matching certain regexps -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Keywords: comm, faces @@ -540,7 +541,7 @@ deactivate/activate match logging in the latter. See (when (and (or (eq erc-log-matches-flag t) (and (eq erc-log-matches-flag 'away) - erc-away)) + (erc-away-time))) match-buffer-name) (let ((line (format-spec erc-log-match-format (format-spec-make @@ -572,7 +573,7 @@ deactivate/activate match logging in the latter. See (defun erc-log-matches-come-back (proc parsed) "Display a notice that messages were logged while away." - (when (and erc-away + (when (and (erc-away-time) (eq erc-log-matches-flag 'away)) (mapc (lambda (match-type) @@ -583,7 +584,7 @@ deactivate/activate match logging in the latter. See (with-current-buffer buffer (get-text-property (1- (point-max)) 'timestamp)))) - (away-time (erc-emacs-time-to-erc-time erc-away))) + (away-time (erc-emacs-time-to-erc-time (erc-away-time)))) (when (and away-time last-msg-time (erc-time-gt last-msg-time away-time)) (erc-display-message diff --git a/lisp/erc/erc-menu.el b/lisp/erc/erc-menu.el index a5826625bde..888da702d62 100644 --- a/lisp/erc/erc-menu.el +++ b/lisp/erc/erc-menu.el @@ -1,6 +1,7 @@ ;; erc-menu.el -- Menu-bar definitions for ERC -;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2004, 2005, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, processes, menu @@ -75,8 +76,8 @@ (erc-channel-user-op-p (erc-current-nick))] ["Set a key..." erc-set-channel-key (erc-channel-user-op-p (erc-current-nick))]) - ["Leave this channel..." erc-part-from-channel erc-channel-users] - "-") + ["Leave this channel..." erc-part-from-channel erc-channel-users]) + "-" (list "Pals, fools and other keywords" ["Add pal..." erc-add-pal] ["Delete pal..." erc-delete-pal] diff --git a/lisp/erc/erc-netsplit.el b/lisp/erc/erc-netsplit.el index 567c91cc075..b4c26b1bb88 100644 --- a/lisp/erc/erc-netsplit.el +++ b/lisp/erc/erc-netsplit.el @@ -184,7 +184,7 @@ join from that split has been detected or not.") ;;;###autoload (defun erc-cmd-WHOLEFT () "Show who's gone." - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (if (null erc-netsplit-list) (erc-display-message nil 'notice 'active diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el index 9f8c5528d04..4631ceae3ae 100644 --- a/lisp/erc/erc-networks.el +++ b/lisp/erc/erc-networks.el @@ -317,6 +317,7 @@ ("Novernet: Random server" Novernet "irc.novernet.com" ((6665 6669) 7000 )) ("Nullrouted: Random server" Nullrouted "irc.nullrouted.org" ((6666 6669) 7000 )) ("NullusNet: Random server" NullusNet "irc.nullus.net" 6667) + ("OFTC: Random server" OFTC "irc.oftc.net" ((6667 6670) 7000)) ("OpChat: Random server" OpChat "irc.opchat.org" ((6667 6669))) ("Othernet: Random server" Othernet "irc.othernet.org" 6667) ("Othernet: US, FL, Miami" Othernet "miami.fl.us.othernet.org" 6667) @@ -611,6 +612,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges." (Novernet "novernet.com") (Nullrouted "nullrouted.org") (NullusNet "nullus.net") + (OFTC "oftc.net") (OpChat "opchat.org") (Openprojects "openprojects.net") (Othernet "othernet.org") @@ -737,12 +739,12 @@ search for a match in `erc-networks-alist'." (defun erc-network () "Return the value of `erc-network' for the current server." - (with-current-buffer (erc-server-buffer) erc-network)) + (erc-with-server-buffer erc-network)) (defun erc-current-network () "Deprecated. Use `erc-network' instead. Return the name of this server's network as a symbol." - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (intern (downcase (symbol-name erc-network))))) (erc-make-obsolete 'erc-current-network 'erc-network @@ -750,7 +752,7 @@ network as a symbol." (defun erc-network-name () "Returns the name of the current network as a string." - (with-current-buffer (erc-server-buffer) (symbol-name erc-network))) + (erc-with-server-buffer (symbol-name erc-network))) (defun erc-set-network-name (proc parsed) "Set `erc-network' to the value returned by `erc-determine-network'." diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 82784c624c0..d34e38ade43 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el @@ -121,8 +121,7 @@ changes." (ison-list (delete "" (split-string (erc-response.contents parsed)))) (new-list ison-list) - (old-list (with-current-buffer (erc-server-buffer) - erc-last-ison))) + (old-list (erc-with-server-buffer erc-last-ison))) (while new-list (when (not (erc-member-ignore-case (car new-list) old-list)) (run-hook-with-args 'erc-notify-signon-hook server (car new-list)) @@ -204,7 +203,7 @@ with args, toggle notify status of people." (cond ((null args) ;; Print current notificated people (online) - (let ((ison (with-current-buffer (erc-server-buffer) erc-last-ison))) + (let ((ison (erc-with-server-buffer erc-last-ison))) (if (not ison) (erc-display-message nil 'notice 'active "No ison-list yet!") diff --git a/lisp/erc/erc-pcomplete.el b/lisp/erc/erc-pcomplete.el index 951ba25898c..f207bcc1b8b 100644 --- a/lisp/erc/erc-pcomplete.el +++ b/lisp/erc/erc-pcomplete.el @@ -180,7 +180,7 @@ the most recent speakers are listed first." (while (pcomplete-here (pcomplete-erc-nicks)))) (defun pcomplete/erc-mode/UNIGNORE () - (pcomplete-here (with-current-buffer (erc-server-buffer) erc-ignore-list))) + (pcomplete-here (erc-with-server-buffer erc-ignore-list))) ;;; Functions that provide possible completions. @@ -233,7 +233,7 @@ If optional argument IGNORE-SELF is non-nil, don't return the current nick." (defun pcomplete-erc-all-nicks (&optional postfix) "Returns a list of all nicks on the current server." (let (nicks) - (with-current-buffer (process-buffer erc-server-process) + (erc-with-server-buffer (maphash (lambda (nick user) (setq nicks (cons (concat nick postfix) nicks))) erc-server-users)) diff --git a/lisp/erc/erc-ring.el b/lisp/erc/erc-ring.el index 911a154e915..95c313a23f6 100644 --- a/lisp/erc/erc-ring.el +++ b/lisp/erc/erc-ring.el @@ -1,6 +1,7 @@ ;; erc-ring.el -- Command history handling for erc using ring.el -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Alex Schroeder <alex@gnu.org> ;; Keywords: comm diff --git a/lisp/erc/erc-services.el b/lisp/erc/erc-services.el index 5d03a7b6365..a2cc1b19782 100644 --- a/lisp/erc/erc-services.el +++ b/lisp/erc/erc-services.el @@ -168,15 +168,18 @@ Example of use: :type '(repeat (list :tag "Network" (choice :tag "Network name" - (const freenode) - (const OFTC) + (const Ars) + (const Austnet) + (const Azzurra) + (const BitlBee) + (const BRASnet) (const DALnet) + (const freenode) (const GalaxyNet) - (const SlashNET) - (const BRASnet) (const iip) - (const Austnet) - (const Azzurra) + (const OFTC) + (const QuakeNet) + (const SlashNET) (symbol :tag "Network name")) (repeat :tag "Nickname and password" (cons :tag "Identity" @@ -186,68 +189,63 @@ Example of use: ;; Variables: (defcustom erc-nickserv-alist - '((BitlBee - nil - nil + '((Ars + nil nil + "Census" + "IDENTIFY" nil nil) + (Austnet + "NickOP!service@austnet.org" + "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>" + "nickop@austnet.org" + "identify" nil nil) + (Azzurra + "NickServ!service@azzurra.org" + "/ns\\s-IDENTIFY\\s-password" + "NickServ" + "IDENTIFY" nil nil) + (BitlBee + nil nil "&bitlbee" - "identify" - nil) + "identify" nil nil) + (BRASnet + "NickServ!services@brasnet.org" + "/NickServ\\s-IDENTIFY\\s-senha" + "NickServ" + "IDENTIFY" nil "") (DALnet "NickServ!service@dal.net" "/msg\\s-NickServ@services.dal.net\\s-IDENTIFY\\s-<password>" "NickServ@services.dal.net" - "IDENTIFY" - nil) + "IDENTIFY" nil nil) (freenode "NickServ!NickServ@services." "/msg\\s-NickServ\\s-IDENTIFY\\s-<password>" "NickServ" - "IDENTIFY" - nil) + "IDENTIFY" nil nil) (GalaxyNet "NS!nickserv@galaxynet.org" "Please\\s-change\\s-nicks\\s-or\\s-authenticate." "NS@services.galaxynet.org" - "AUTH" - t) - (SlashNET - "NickServ!services@services.slashnet.org" - "/msg\\s-NickServ\\s-IDENTIFY\\s-password" - "NickServ@services.slashnet.org" - "IDENTIFY" - nil) + "AUTH" t nil) (iip "Trent@anon.iip" "type\\s-/squery\\s-Trent\\s-identify\\s-<password>" "Trent@anon.iip" - "IDENTIFY" - nil - "SQUERY") - (BRASnet - "NickServ!services@brasnet.org" - "/NickServ\\s-IDENTIFY\\s-senha" - "NickServ" - "IDENTIFY" - nil - "") - (Austnet - "NickOP!service@austnet.org" - "/msg\\s-NickOP@austnet.org\\s-identify\\s-<password>" - "nickop@austnet.org" - "identify" - nil) - (Azzurra - "NickServ!service@azzurra.org" - "/ns\\s-IDENTIFY\\s-password" - "NickServ" - "IDENTIFY" - nil) + "IDENTIFY" nil "SQUERY") (OFTC "NickServ!services@services.oftc.net" - "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" + "type\\s-/msg\\s-NickServ\\s-IDENTIFY\\s-password." "NickServ" - "IDENTIFY" - nil)) + "IDENTIFY" nil nil) + (QuakeNet + nil nil + "Q@CServe.quakenet.org" + "auth" t nil) + (SlashNET + "NickServ!services@services.slashnet.org" + "/msg\\s-NickServ\\s-IDENTIFY\\s-password" + "NickServ@services.slashnet.org" + "IDENTIFY" nil nil)) "Alist of NickServer details, sorted by network. Every element in the list has the form \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER) @@ -265,8 +263,10 @@ ANSWER is the command to use for the answer. The default is 'privmsg. :type '(repeat (list :tag "Nickserv data" (symbol :tag "Network name") - (string :tag "Nickserv's nick!user@host") - (regexp :tag "Identify request sent by Nickserv") + (choice (string :tag "Nickserv's nick!user@host") + (const :tag "No message sent by Nickserv" nil)) + (choice (regexp :tag "Identify request sent by Nickserv") + (const :tag "No message sent by Nickserv" nil)) (string :tag "Identify to") (string :tag "Identify keyword") (boolean :tag "Use current nick in identify message?") diff --git a/lisp/erc/erc-speedbar.el b/lisp/erc/erc-speedbar.el index 551b83fb5ac..0d88589838e 100644 --- a/lisp/erc/erc-speedbar.el +++ b/lisp/erc/erc-speedbar.el @@ -1,6 +1,7 @@ ;;; erc-speedbar.el --- Speedbar support for ERC -;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2003, 2004, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Contributor: Eric M. Ludlam <eric@siege-engine.com> @@ -113,7 +114,7 @@ This will add a speedbar major display mode." (erase-buffer) (let (serverp chanp queryp) (with-current-buffer buffer - (setq serverp (eq buffer (process-buffer erc-server-process))) + (setq serverp (erc-server-buffer-p)) (setq chanp (erc-channel-p (erc-default-target))) (setq queryp (erc-query-buffer-p))) (cond (serverp diff --git a/lisp/erc/erc-spelling.el b/lisp/erc/erc-spelling.el index 484ddb36d52..a15ca17987f 100644 --- a/lisp/erc/erc-spelling.el +++ b/lisp/erc/erc-spelling.el @@ -41,12 +41,10 @@ ;; called AFTER the server buffer is initialized. ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) (dolist (buffer (erc-buffer-list)) - (when (buffer-live-p buffer) - (with-current-buffer buffer (erc-spelling-init))))) + (erc-spelling-init buffer))) ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) (dolist (buffer (erc-buffer-list)) - (when (buffer-live-p buffer) - (with-current-buffer buffer (flyspell-mode 0)))))) + (with-current-buffer buffer (flyspell-mode 0))))) (defcustom erc-spelling-dictionaries nil "An alist mapping buffer names to dictionaries. @@ -60,24 +58,22 @@ name here." (string :tag "Dictionary")))) :group 'erc-spelling) -(defun erc-spelling-init () - "Enable flyspell mode in an ERC buffer." - (let ((name (downcase (buffer-name))) - (dicts erc-spelling-dictionaries)) - (when dicts - (while (and dicts - (not (string= name (downcase (caar dicts))))) - (setq dicts (cdr dicts))) - (setq ispell-local-dictionary - (if dicts - (cadr (car dicts)) - (let ((server (erc-server-buffer))) - (if server - (with-current-buffer server - ispell-local-dictionary) - nil)))))) - (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify) - (flyspell-mode 1)) +(defun erc-spelling-init (buffer) + "Enable flyspell mode in an ERC buffer. +The current buffer is given by BUFFER." + (with-current-buffer buffer + (let ((name (downcase (buffer-name))) + (dicts erc-spelling-dictionaries)) + (when dicts + (while (and dicts + (not (string= name (downcase (caar dicts))))) + (setq dicts (cdr dicts))) + (setq ispell-local-dictionary + (if dicts + (cadr (car dicts)) + (erc-with-server-buffer ispell-local-dictionary))))) + (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify) + (flyspell-mode 1))) (defun erc-spelling-unhighlight-word (word) "Unhighlight the given WORD. diff --git a/lisp/erc/erc-stamp.el b/lisp/erc/erc-stamp.el index 5a9977aaead..0b8017ffe0b 100644 --- a/lisp/erc/erc-stamp.el +++ b/lisp/erc/erc-stamp.el @@ -147,7 +147,7 @@ or `erc-send-modify-hook'." (error "Timestamp function unbound")) (when (and (fboundp erc-insert-away-timestamp-function) erc-away-timestamp-format - (with-current-buffer (erc-server-buffer) erc-away) + (erc-away-time) (not erc-timestamp-format)) (funcall erc-insert-away-timestamp-function (erc-format-timestamp ct erc-away-timestamp-format))) @@ -203,6 +203,7 @@ space before a right timestamp in any saved logs." (s (if ignore-p (make-string len ? ) string))) (unless ignore-p (setq erc-timestamp-last-inserted string)) (erc-put-text-property 0 len 'field 'erc-timestamp s) + (erc-put-text-property 0 len 'invisible 'timestamp s) (insert s))) (defun erc-insert-aligned (string pos) @@ -319,6 +320,21 @@ set, and timestamping is already active." (setq erc-hide-timestamps nil) (erc-munge-invisibility-spec)) +(defun erc-toggle-timestamps () + "Hide or show timestamps in ERC buffers. + +Note that timestamps can only be shown for a message using this +function if `erc-timestamp-format' was set and timestamping was +enabled when the message was inserted." + (interactive) + (if erc-hide-timestamps + (setq erc-hide-timestamps nil) + (setq erc-hide-timestamps t)) + (mapc (lambda (buffer) + (with-current-buffer buffer + (erc-munge-invisibility-spec))) + (erc-buffer-list))) + (defun erc-echo-timestamp (before now) "Print timestamp text-property of an IRC message. Argument BEFORE is where point was before it got moved and diff --git a/lisp/erc/erc-track.el b/lisp/erc/erc-track.el index 0fa550a5838..4a8b673d46b 100644 --- a/lisp/erc/erc-track.el +++ b/lisp/erc/erc-track.el @@ -1,6 +1,7 @@ ;;; erc-track.el --- Track modified channel buffers -;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2003, 2004, 2005, 2006, +;; 2007 Free Software Foundation, Inc. ;; Author: Mario Lang <mlang@delysid.org> ;; Keywords: comm, faces @@ -46,12 +47,33 @@ "Track active buffers and show activity in the modeline." :group 'erc) +(defcustom erc-track-enable-keybindings 'ask + "Whether to enable the ERC track keybindings, namely: +`C-c C-SPC' and `C-c C-@', which both do the same thing. + +The default is to check to see whether these keys are used +already: if not, then enable the ERC track minor mode, which +provides these keys. Otherwise, do not touch the keys. + +This can alternatively be set to either t or nil, which indicate +respectively always to enable ERC track minor mode or never to +enable ERC track minor mode. + +The reason for using this default value is to both (1) adhere to +the Emacs development guidelines which say not to touch keys of +the form C-c C-<something> and also (2) to meet the expectations +of long-time ERC users, many of whom rely on these keybindings." + :group 'erc-track + :type '(choice (const :tag "Ask, if used already" ask) + (const :tag "Enable" t) + (const :tag "Disable" nil))) + (defcustom erc-track-visibility t "Where do we look for buffers to determine their visibility? The value of this variable determines, when a buffer is considered visible or invisible. New messages in invisible buffers are tracked, while switching to visible buffers when they are tracked removes them -from the list. See also `erc-track-when-inactive-mode'. +from the list. See also `erc-track-when-inactive'. Possible values are: @@ -488,45 +510,124 @@ START is the minimum length of the name used." (equal (erc-unique-substrings '("abc" "abcdefg")) '("abc" "abcd")))))) +;;; Minor mode + +;; Play nice with other IRC clients (and Emacs development rules) by +;; making this a minor mode + +(defvar erc-track-minor-mode-map (make-sparse-keymap) + "Keymap for rcirc track minor mode.") + +(define-key erc-track-minor-mode-map (kbd "C-c C-@") 'erc-track-switch-buffer) +(define-key erc-track-minor-mode-map (kbd "C-c C-SPC") + 'erc-track-switch-buffer) + +;;;###autoload +(define-minor-mode erc-track-minor-mode + "Global minor mode for tracking ERC buffers and showing activity in the +mode line. + +This exists for the sole purpose of providing the C-c C-SPC and +C-c C-@ keybindings. Make sure that you have enabled the track +module, otherwise the keybindings will not do anything useful." + :init-value nil + :lighter "" + :keymap erc-track-minor-mode-map + :global t + :group 'erc-track) + +(defun erc-track-minor-mode-maybe () + "Enable `erc-track-minor-mode', depending on `erc-track-enable-keybindings'." + (unless (or erc-track-minor-mode + ;; don't start the minor mode until we have an ERC + ;; process running, because we don't want to prompt the + ;; user while starting Emacs + (null (erc-buffer-list))) + (cond ((eq erc-track-enable-keybindings 'ask) + (let ((key (or (and (key-binding (kbd "C-c C-SPC")) "C-SPC") + (and (key-binding (kbd "C-c C-@")) "C-@")))) + (if key + (if (y-or-n-p + (concat "The C-c " key " binding is in use;" + " override it for tracking? ")) + (progn + (message (concat "Will change it; set" + " `erc-track-enable-keybindings'" + " to disable this message")) + (sleep-for 3) + (erc-track-minor-mode 1)) + (message (concat "Not changing it; set" + " `erc-track-enable-keybindings'" + " to disable this message")) + (sleep-for 3)) + (erc-track-minor-mode 1)))) + ((eq erc-track-enable-keybindings t) + (erc-track-minor-mode 1)) + (t nil)))) + ;;; Module ;;;###autoload (autoload 'erc-track-mode "erc-track" nil t) -(define-erc-module track track-modified-channels +(define-erc-module track nil "This mode tracks ERC channel buffers with activity." - ((erc-track-add-to-mode-line erc-track-position-in-mode-line) - (setq erc-modified-channels-object (erc-modified-channels-object nil)) - (erc-update-mode-line) - (if (featurep 'xemacs) - (defadvice switch-to-buffer (after erc-update (&rest args) activate) - (erc-modified-channels-update)) - (add-hook 'window-configuration-change-hook 'erc-modified-channels-update)) - (add-hook 'erc-insert-post-hook 'erc-track-modified-channels) - (add-hook 'erc-disconnected-hook 'erc-modified-channels-update)) - ((erc-track-remove-from-mode-line) - (if (featurep 'xemacs) - (ad-disable-advice 'switch-to-buffer 'after 'erc-update) - (remove-hook 'window-configuration-change-hook - 'erc-modified-channels-update)) - (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update) - (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels))) - -;;;###autoload (autoload 'erc-track-when-inactive-mode "erc-track" nil t) -(define-erc-module track-when-inactive nil - "This mode enables channel tracking even for visible buffers, -if you are inactivity." - ((if (featurep 'xemacs) - (defadvice switch-to-buffer (after erc-update-when-inactive (&rest args) activate) - (erc-user-is-active)) - (add-hook 'window-configuration-change-hook 'erc-user-is-active)) - (add-hook 'erc-send-completed-hook 'erc-user-is-active) - (add-hook 'erc-server-001-functions 'erc-user-is-active)) - ((erc-track-remove-from-mode-line) - (if (featurep 'xemacs) - (ad-disable-advice 'switch-to-buffer 'after 'erc-update-when-inactive) - (remove-hook 'window-configuration-change-hook 'erc-user-is-active)) - (remove-hook 'erc-send-completed-hook 'erc-user-is-active) - (remove-hook 'erc-server-001-functions 'erc-user-is-active) - (remove-hook 'erc-timer-hook 'erc-user-is-active))) + ;; Enable: + ((when (boundp 'erc-track-when-inactive) + (if erc-track-when-inactive + (progn + (if (featurep 'xemacs) + (defadvice switch-to-buffer (after erc-update-when-inactive + (&rest args) activate) + (erc-user-is-active)) + (add-hook 'window-configuration-change-hook 'erc-user-is-active)) + (add-hook 'erc-send-completed-hook 'erc-user-is-active) + (add-hook 'erc-server-001-functions 'erc-user-is-active)) + (erc-track-add-to-mode-line erc-track-position-in-mode-line) + (setq erc-modified-channels-object (erc-modified-channels-object nil)) + (erc-update-mode-line) + (if (featurep 'xemacs) + (defadvice switch-to-buffer (after erc-update (&rest args) activate) + (erc-modified-channels-update)) + (add-hook 'window-configuration-change-hook + 'erc-modified-channels-update)) + (add-hook 'erc-insert-post-hook 'erc-track-modified-channels) + (add-hook 'erc-disconnected-hook 'erc-modified-channels-update)) + ;; enable the tracking keybindings + (erc-track-minor-mode-maybe))) + ;; Disable: + ((when (boundp 'erc-track-when-inactive) + (erc-track-remove-from-mode-line) + (if erc-track-when-inactive + (progn + (if (featurep 'xemacs) + (ad-disable-advice 'switch-to-buffer 'after + 'erc-update-when-inactive) + (remove-hook 'window-configuration-change-hook + 'erc-user-is-active)) + (remove-hook 'erc-send-completed-hook 'erc-user-is-active) + (remove-hook 'erc-server-001-functions 'erc-user-is-active) + (remove-hook 'erc-timer-hook 'erc-user-is-active)) + (if (featurep 'xemacs) + (ad-disable-advice 'switch-to-buffer 'after 'erc-update) + (remove-hook 'window-configuration-change-hook + 'erc-modified-channels-update)) + (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update) + (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels)) + ;; disable the tracking keybindings + (when erc-track-minor-mode + (erc-track-minor-mode -1))))) + +(defcustom erc-track-when-inactive nil + "Enable channel tracking even for visible buffers, if you are +inactive." + :group 'erc-track + :type 'boolean + :set (lambda (sym val) + (if erc-track-mode + (progn + (erc-track-disable) + (set sym val) + (erc-track-enable)) + (set sym val)))) ;;; Visibility @@ -545,7 +646,7 @@ only consider active buffers visible.") (defun erc-buffer-visible (buffer) "Return non-nil when the buffer is visible." - (if erc-track-when-inactive-mode + (if erc-track-when-inactive (when erc-buffer-activity; could be nil (and (get-buffer-window buffer erc-track-visibility) (<= (erc-time-diff erc-buffer-activity (erc-current-time)) @@ -815,7 +916,9 @@ relative to `erc-track-switch-direction'" switch back to the last non-ERC buffer visited. Next is defined by `erc-track-switch-direction', a negative argument will reverse this." (interactive "p") - (when erc-track-mode + (if (not erc-track-mode) + (message (concat "Enable the ERC track module if you want to use the" + " tracking minor mode")) (cond (erc-modified-channels-alist ;; if we're not in erc-mode, set this buffer to return to (unless (eq major-mode 'erc-mode) @@ -828,12 +931,6 @@ switch back to the last non-ERC buffer visited. Next is defined by (buffer-live-p erc-track-last-non-erc-buffer)) (switch-to-buffer erc-track-last-non-erc-buffer))))) -;; These bindings are global, because they pop us from any other -;; buffer to an active ERC buffer! - -(global-set-key (kbd "C-c C-@") 'erc-track-switch-buffer) -(global-set-key (kbd "C-c C-SPC") 'erc-track-switch-buffer) - (provide 'erc-track) ;;; erc-track.el ends here diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 927dce02d64..37c2c2e0883 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -66,7 +66,7 @@ ;;; Code: -(defconst erc-version-string "Version 5.2 stable pre-release" +(defconst erc-version-string "Version 5.2" "ERC version. This is used by function `erc-version'.") (eval-when-compile (require 'cl)) @@ -324,7 +324,7 @@ Each function should accept two arguments, NEW-NICK and OLD-NICK." (defcustom erc-connect-pre-hook '(erc-initialize-log-marker) "Hook called just before `erc' calls `erc-connect'. -Functions are run in the buffer-to-be." +Functions are passed a buffer as the first argument." :group 'erc-hooks :type 'hook) @@ -392,14 +392,14 @@ in the current buffer's `erc-channel-users' hash table." (defsubst erc-get-server-user (nick) "Finds the USER corresponding to NICK in the current server's `erc-server-users' hash table." - (with-current-buffer (process-buffer erc-server-process) + (erc-with-server-buffer (gethash (erc-downcase nick) erc-server-users))) (defsubst erc-add-server-user (nick user) "This function is for internal use only. Adds USER with nickname NICK to the `erc-server-users' hash table." - (with-current-buffer (process-buffer erc-server-process) + (erc-with-server-buffer (puthash (erc-downcase nick) user erc-server-users))) (defsubst erc-remove-server-user (nick) @@ -410,7 +410,7 @@ hash table. This user is not removed from the `erc-channel-users' lists of other buffers. See also: `erc-remove-user'." - (with-current-buffer (process-buffer erc-server-process) + (erc-with-server-buffer (remhash (erc-downcase nick) erc-server-users))) (defun erc-change-user-nickname (user new-nick) @@ -421,7 +421,7 @@ Changes the nickname of USER to NEW-NICK in the other buffers are also changed." (let ((nick (erc-server-user-nickname user))) (setf (erc-server-user-nickname user) new-nick) - (with-current-buffer (process-buffer erc-server-process) + (erc-with-server-buffer (remhash (erc-downcase nick) erc-server-users) (puthash (erc-downcase new-nick) user erc-server-users)) (dolist (buf (erc-server-user-buffers user)) @@ -514,16 +514,15 @@ See also: `erc-sort-channel-users-by-activity'" (defun erc-get-server-nickname-list () "Returns a list of known nicknames on the current server." - (if (erc-server-process-alive) - (with-current-buffer (erc-server-buffer) - (let (nicks) - (when (hash-table-p erc-server-users) - (maphash (lambda (n user) - (setq nicks - (cons (erc-server-user-nickname user) - nicks))) - erc-server-users) - nicks))))) + (erc-with-server-buffer + (let (nicks) + (when (hash-table-p erc-server-users) + (maphash (lambda (n user) + (setq nicks + (cons (erc-server-user-nickname user) + nicks))) + erc-server-users) + nicks)))) (defun erc-get-channel-nickname-list () "Returns a list of known nicknames on the current channel." @@ -538,16 +537,15 @@ See also: `erc-sort-channel-users-by-activity'" (defun erc-get-server-nickname-alist () "Returns an alist of known nicknames on the current server." - (if (erc-server-process-alive) - (with-current-buffer (erc-server-buffer) - (let (nicks) - (when (hash-table-p erc-server-users) - (maphash (lambda (n user) - (setq nicks - (cons (cons (erc-server-user-nickname user) nil) - nicks))) - erc-server-users) - nicks))))) + (erc-with-server-buffer + (let (nicks) + (when (hash-table-p erc-server-users) + (maphash (lambda (n user) + (setq nicks + (cons (cons (erc-server-user-nickname user) nil) + nicks))) + erc-server-users) + nicks)))) (defun erc-get-channel-nickname-alist () "Returns an alist of known nicknames on the current channel." @@ -1293,7 +1291,7 @@ capabilities." (unless (erc-server-buffer-p) (error "You should only run `erc-once-with-server-event' in a server buffer")) - (let ((fun (erc-gensym)) + (let ((fun (make-symbol "fun")) (hook (erc-get-hook event))) (put fun 'erc-original-buffer (current-buffer)) (fset fun `(lambda (proc parsed) @@ -1316,7 +1314,7 @@ not be run. When FORMS execute, the current buffer is the server buffer associated with the connection over which the data was received that triggered EVENT." - (let ((fun (erc-gensym)) + (let ((fun (make-symbol "fun")) (hook (erc-get-hook event))) (fset fun `(lambda (proc parsed) (remove-hook ',hook ',fun) @@ -1370,7 +1368,7 @@ If BUFFER is nil, the current buffer is used." (defun erc-ison-p (nick) "Return non-nil if NICK is online." (interactive "sNick: ") - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (let ((erc-online-p 'unknown)) (erc-once-with-server-event 303 @@ -1420,7 +1418,7 @@ server buffer.") (defun erc-active-buffer () "Return the value of `erc-active-buffer' for the current server. Defaults to the server buffer." - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (if (buffer-live-p erc-active-buffer) erc-active-buffer (setq erc-active-buffer (current-buffer))))) @@ -1603,10 +1601,10 @@ See `erc-get-buffer' for details. See also `with-current-buffer'. \(fn (TARGET [PROCESS]) BODY...)" - (let ((buf (erc-gensym)) - (proc (erc-gensym)) - (target (erc-gensym)) - (process (erc-gensym))) + (let ((buf (make-symbol "buf")) + (proc (make-symbol "proc")) + (target (make-symbol "target")) + (process (make-symbol "process"))) `(let* ((,target ,(car spec)) (,process ,(cadr spec)) (,buf (if (bufferp ,target) @@ -1616,7 +1614,7 @@ See also `with-current-buffer'. erc-server-process)))) (if (and ,target ,proc) (erc-get-buffer ,target ,proc)))))) - (when ,buf + (when (buffer-live-p ,buf) (with-current-buffer ,buf ,@body))))) (put 'erc-with-buffer 'lisp-indent-function 1) @@ -1671,8 +1669,8 @@ FORMS will be evaluated in all buffers having the process PROCESS and where PRED matches or in all buffers of the server process if PRED is nil." ;; Make the evaluation have the correct order - (let ((pre (erc-gensym)) - (pro (erc-gensym))) + (let ((pre (make-symbol "pre")) + (pro (make-symbol "pro"))) `(let ((,pro ,process) (,pre ,pred)) (mapcar (lambda (buffer) @@ -1755,7 +1753,10 @@ all channel buffers on all servers." (make-variable-buffer-local 'erc-invitation) (defvar erc-away nil - "Non-nil indicates that we are away.") + "Non-nil indicates that we are away. + +Use `erc-away-time' to access this if you might be in a channel +buffer rather than a server buffer.") (make-variable-buffer-local 'erc-away) (defvar erc-channel-list nil @@ -1813,43 +1814,43 @@ removed from the list will be disabled." :type '(set :greedy t - (const :tag "Set away status automatically" autoaway) - (const :tag "Join channels automatically" autojoin) - (const :tag "Buttonize URLs, nicknames, and other text" button) - (const - :tag - "Mark unidentified users on freenode and other servers supporting CAPAB" - capab-identify) - (const :tag "Wrap long lines" fill) - (const :tag "Launch an identd server on port 8113" identd) - (const :tag "Highlight or remove IRC control characters" + (const :tag "autoaway: Set away status automatically" autoaway) + (const :tag "autojoin: Join channels automatically" autojoin) + (const :tag "button: Buttonize URLs, nicknames, and other text" button) + (const :tag "capab: Mark unidentified users on servers supporting CAPAB" + capab-identify) + (const :tag "completion: Complete nicknames and commands (programmable)" + completion) + (const :tag "hecomplete: Complete nicknames and commands (old)" hecomplete) + (const :tag "fill: Wrap long lines" fill) + (const :tag "identd: Launch an identd server on port 8113" identd) + (const :tag "irccontrols: Highlight or remove IRC control characters" irccontrols) - (const :tag "Save buffers in logs" log) - (const :tag "Highlight pals, fools, and other keywords" match) - (const :tag "Display a menu in ERC buffers" menu) - (const :tag "Detect netsplits" netsplit) - (const :tag "Don't display non-IRC commands after evaluation" + (const :tag "log: Save buffers in logs" log) + (const :tag "match: Highlight pals, fools, and other keywords" match) + (const :tag "menu: Display a menu in ERC buffers" menu) + (const :tag "netsplit: Detect netsplits" netsplit) + (const :tag "noncommands: Don't display non-IRC commands after evaluation" noncommands) - (const :tag "Notify when the online status of certain users changes" + (const :tag + "notify: Notify when the online status of certain users changes" notify) - (const :tag "Complete nicknames and commands (programmable)" - completion) - (const :tag "Complete nicknames and commands (old)" hecomplete) - (const :tag "Process CTCP PAGE requests from IRC" page) - (const :tag "Make displayed lines read-only" readonly) - (const :tag "Replace text in messages" replace) - (const :tag "Enable an input history" ring) - (const :tag "Scroll to the bottom of the buffer" scrolltobottom) - (const :tag "Identify to Nickserv (IRC Services) automatically" + (const :tag "page: Process CTCP PAGE requests from IRC" page) + (const :tag "readonly: Make displayed lines read-only" readonly) + (const :tag "replace: Replace text in messages" replace) + (const :tag "ring: Enable an input history" ring) + (const :tag "scrolltobottom: Scroll to the bottom of the buffer" + scrolltobottom) + (const :tag "services: Identify to Nickserv (IRC Services) automatically" services) - (const :tag "Convert smileys to pretty icons" smiley) - (const :tag "Play sounds when you receive CTCP SOUND requests" + (const :tag "smiley: Convert smileys to pretty icons" smiley) + (const :tag "sound: Play sounds when you receive CTCP SOUND requests" sound) - (const :tag "Add timestamps to messages" stamp) - (const :tag "Check spelling" spelling) - (const :tag "Track channel activity in the mode-line" track) - (const :tag "Truncate buffers to a certain size" truncate) - (const :tag "Translate morse code in messages" unmorse) + (const :tag "stamp: Add timestamps to messages" stamp) + (const :tag "spelling: Check spelling" spelling) + (const :tag "track: Track channel activity in the mode-line" track) + (const :tag "truncate: Truncate buffers to a certain size" truncate) + (const :tag "unmorse: Translate morse code in messages" unmorse) (repeat :tag "Others" :inline t symbol)) :group 'erc) @@ -1902,9 +1903,7 @@ removed from the list will be disabled." (defun erc-open (&optional server port nick full-name connect passwd tgt-list channel process) - "ERC is a powerful, modular, and extensible IRC client. - -Connect to SERVER on PORT as NICK with FULL-NAME. + "Connect to SERVER on PORT as NICK with FULL-NAME. If CONNECT is non-nil, connect to the server. Otherwise assume already connected and just create a separate buffer for the new @@ -1969,10 +1968,6 @@ Returns the buffer for the given server or channel." (erc-set-active-buffer buffer) ;; last invitation channel (setq erc-invitation nil) - ;; away flag - ;; Should only be used in session-buffers - (setq erc-away (let ((serverbuf (erc-server-buffer))) - (and serverbuf (with-current-buffer serverbuf erc-away)))) ;; Server channel list (setq erc-channel-list ()) ;; login-time 'nick in use' error @@ -1987,25 +1982,25 @@ Returns the buffer for the given server or channel." (setq erc-dbuf (when erc-log-p (get-buffer-create (concat "*ERC-DEBUG: " server "*")))) - (erc-determine-parameters server port nick full-name) - - ;; Saving log file on exit - (run-hooks 'erc-connect-pre-hook) - - (when connect - (erc-server-connect erc-session-server erc-session-port)) - (erc-update-mode-line) - (set-marker erc-insert-marker (point)) + ;; set up prompt (unless continued-session (goto-char (point-max)) (insert "\n")) - (set-marker (process-mark erc-server-process) (point)) (if continued-session (goto-char old-point) (set-marker erc-insert-marker (point)) (erc-display-prompt) (goto-char (point-max))) + (erc-determine-parameters server port nick full-name) + + ;; Saving log file on exit + (run-hook-with-args 'erc-connect-pre-hook buffer) + + (when connect + (erc-server-connect erc-session-server erc-session-port buffer)) + (erc-update-mode-line) + ;; Now display the buffer in a window as per user wishes. (unless (eq buffer old-buffer) (when erc-log-p @@ -2016,11 +2011,13 @@ Returns the buffer for the given server or channel." buffer)) -(defun erc-initialize-log-marker () - "Initialize the `erc-last-saved-position' marker to a sensible position." +(defun erc-initialize-log-marker (buffer) + "Initialize the `erc-last-saved-position' marker to a sensible position. +BUFFER is the current buffer." + (with-current-buffer buffer (setq erc-last-saved-position (make-marker)) (move-marker erc-last-saved-position - (1- (marker-position erc-insert-marker)))) + (1- (marker-position erc-insert-marker))))) ;; interactive startup @@ -2120,8 +2117,12 @@ functions in here get called with the parameters SERVER and NICK." (nick (erc-compute-nick)) password (full-name (erc-compute-full-name))) - "Select connection parameters and run ERC. -Non-interactively, it takes keyword arguments + "ERC is a powerful, modular, and extensible IRC client. +This function is the main entry point for ERC. + +It permits you to select connection parameters, and then starts ERC. + +Non-interactively, it takes the keyword arguments (server (erc-compute-server)) (port (erc-compute-port)) (nick (erc-compute-nick)) @@ -2132,12 +2133,13 @@ That is, if called with (erc :server \"irc.freenode.net\" :full-name \"Harry S Truman\") -server and full-name will be set to those values, whereas +then the server and full-name will be set to those values, whereas `erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will be invoked for the values of the other parameters." (interactive (erc-select-read-args)) (erc-open server port nick full-name t password)) +;;;###autoload (defalias 'erc-select 'erc) (defun erc-ssl (&rest r) @@ -2428,7 +2430,7 @@ See also `erc-format-message' and `erc-display-line'." This function relies on the erc-parsed text-property being present." - (let ((prop-val (get-text-property position 'erc-parsed))) + (let ((prop-val (erc-get-parsed-vector position))) (and prop-val (member (erc-response.command prop-val) list)))) (defvar erc-send-input-line-function 'erc-send-input-line) @@ -2586,20 +2588,19 @@ If no USER argument is specified, list the contents of `erc-ignore-list'." (erc-display-line (erc-make-notice (format "Now ignoring %s" user)) 'active) - (with-current-buffer (erc-server-buffer) - (add-to-list 'erc-ignore-list user))) - (if (null (with-current-buffer (erc-server-buffer) erc-ignore-list)) + (erc-with-server-buffer (add-to-list 'erc-ignore-list user))) + (if (null (erc-with-server-buffer erc-ignore-list)) (erc-display-line (erc-make-notice "Ignore list is empty") 'active) (erc-display-line (erc-make-notice "Ignore list:") 'active) (mapc #'(lambda (item) (erc-display-line (erc-make-notice item) 'active)) - (with-current-buffer (erc-server-buffer) erc-ignore-list)))) + (erc-with-server-buffer erc-ignore-list)))) t) (defun erc-cmd-UNIGNORE (user) "Remove the user specified in USER from the ignore list." - (let ((ignored-nick (car (with-current-buffer (erc-server-buffer) + (let ((ignored-nick (car (erc-with-server-buffer (erc-member-ignore-case (regexp-quote user) erc-ignore-list))))) (unless ignored-nick @@ -2614,7 +2615,7 @@ If no USER argument is specified, list the contents of `erc-ignore-list'." (erc-display-line (erc-make-notice (format "No longer ignoring %s" user)) 'active) - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (setq erc-ignore-list (delete ignored-nick erc-ignore-list))))) t) @@ -2673,8 +2674,8 @@ If no reason is given, unset away status." "Mark the user as being away everywhere, the reason being indicated by LINE." ;; on all server buffers. (erc-with-all-buffers-of-server nil - #'erc-server-buffer-p - (erc-cmd-AWAY line))) + #'erc-open-server-buffer-p + (erc-cmd-AWAY line))) (put 'erc-cmd-GAWAY 'do-not-parse-args t) (defun erc-cmd-CTCP (nick cmd &rest args) @@ -2866,10 +2867,9 @@ If SERVER is non-nil, use that, rather than the current server." (defun erc-cmd-IDLE (nick) "Show the length of time NICK has been idle." - (let ((serverbuf (erc-server-buffer)) - (origbuf (current-buffer)) + (let ((origbuf (current-buffer)) symlist) - (with-current-buffer serverbuf + (erc-with-server-buffer (add-to-list 'symlist (cons (erc-once-with-server-event 311 `(string= ,nick @@ -3027,8 +3027,8 @@ The rest of LINE is the message to send." (defun erc-cmd-NICK (nick) "Change current nickname to NICK." (erc-log (format "cmd: NICK: %s (erc-bad-nick: %S)" nick erc-bad-nick)) - (let ((nicklen (cdr (assoc "NICKLEN" (with-current-buffer (erc-server-buffer) - erc-server-parameters))))) + (let ((nicklen (cdr (assoc "NICKLEN" (erc-with-server-buffer + erc-server-parameters))))) (and nicklen (> (length nick) (string-to-number nicklen)) (erc-display-message nil 'notice 'active 'nick-too-long @@ -3167,7 +3167,8 @@ the message given by REASON." ((string-match "^\\s-*\\(.*\\)$" reason) (let* ((s (match-string 1 reason)) (buffer (erc-server-buffer)) - (reason (funcall erc-quit-reason (if (equal s "") nil s)))) + (reason (funcall erc-quit-reason (if (equal s "") nil s))) + server-proc) (with-current-buffer (if (and buffer (bufferp buffer)) buffer @@ -3175,10 +3176,18 @@ the message given by REASON." (erc-log (format "cmd: QUIT: %s" reason)) (setq erc-server-quitting t) (erc-set-active-buffer (erc-server-buffer)) + (setq server-proc erc-server-process) (erc-server-send (format "QUIT :%s" reason))) - (run-hook-with-args 'erc-quit-hook erc-server-process) + (run-hook-with-args 'erc-quit-hook server-proc) (when erc-kill-queries-on-quit - (erc-kill-query-buffers erc-server-process))) + (erc-kill-query-buffers server-proc)) + ;; if the process has not been killed within 4 seconds, kill it + (run-at-time 4 nil + (lambda (proc) + (when (and (processp proc) + (memq (process-status proc) '(run open))) + (delete-process proc))) + server-proc)) t) (t nil))) @@ -3189,9 +3198,7 @@ the message given by REASON." (defun erc-cmd-GQUIT (reason) "Disconnect from all servers at once with the same quit REASON." - (erc-with-all-buffers-of-server nil #'(lambda () - (and (erc-server-buffer-p) - (erc-server-process-alive))) + (erc-with-all-buffers-of-server nil #'erc-open-server-buffer-p (erc-cmd-QUIT reason))) (defalias 'erc-cmd-GQ 'erc-cmd-GQUIT) @@ -3199,8 +3206,17 @@ the message given by REASON." (defun erc-cmd-RECONNECT () "Try to reconnect to the current IRC server." - (setq erc-server-reconnect-count 0) - (erc-server-reconnect) + (let ((buffer (or (erc-server-buffer) (current-buffer))) + (process nil)) + (with-current-buffer (if (bufferp buffer) buffer (current-buffer)) + (setq erc-server-quitting nil) + (setq erc-server-reconnecting t) + (setq erc-server-reconnect-count 0) + (setq process (get-buffer-process (erc-server-buffer))) + (if process + (delete-process process) + (erc-server-reconnect)) + (setq erc-server-reconnecting nil))) t) (defun erc-cmd-SERVER (server) @@ -3373,7 +3389,7 @@ The ban list is fetched from the server if necessary." (setq erc-server-367-functions 'erc-banlist-store erc-channel-banlist nil) ;; fetch the ban list then callback - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (erc-once-with-server-event 368 `(with-current-buffer ,chnl-name @@ -3443,7 +3459,7 @@ Unban all currently banned users in the current channel." (let ((old-367-hook erc-server-367-functions)) (setq erc-server-367-functions 'erc-banlist-store) ;; fetch the ban list then callback - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer (erc-once-with-server-event 368 `(with-current-buffer ,chnl @@ -3737,7 +3753,7 @@ To change how this query window is displayed, use `let' to bind (erc-update-mode-line) buf)) -(defcustom erc-auto-query nil +(defcustom erc-auto-query 'bury "If non-nil, create a query buffer each time you receive a private message. If the buffer doesn't already exist it is created. This can be @@ -3811,7 +3827,7 @@ See also `erc-display-error-notice'." (setq erc-nick-change-attempt-count (+ erc-nick-change-attempt-count 1)) (let ((newnick (nth 1 erc-default-nicks)) (nicklen (cdr (assoc "NICKLEN" - (with-current-buffer (erc-server-buffer) + (erc-with-server-buffer erc-server-parameters))))) (setq erc-bad-nick t) ;; try to use a different nick @@ -4101,24 +4117,29 @@ See also: `erc-echo-notice-in-user-buffers', "Run just after connection. Set user modes and run `erc-after-connect' hook." - (unless erc-server-connected ; only once per session - (let ((server (or erc-server-announced-name (erc-response.sender parsed))) - (nick (car (erc-response.command-args parsed )))) - (setq erc-server-connected t) - (erc-update-mode-line) - (erc-set-initial-user-mode nick) - (erc-server-setup-periodical-server-ping) - (run-hook-with-args 'erc-after-connect server nick)))) - -(defun erc-set-initial-user-mode (nick) - "If `erc-user-mode' is non-nil for NICK, set the user modes." - (when erc-user-mode - (let ((mode (if (functionp erc-user-mode) - (funcall erc-user-mode) - erc-user-mode))) - (when (stringp mode) - (erc-log (format "changing mode for %s to %s" nick mode)) - (erc-server-send (format "MODE %s %s" nick mode)))))) + (with-current-buffer (process-buffer proc) + (unless erc-server-connected ; only once per session + (let ((server (or erc-server-announced-name + (erc-response.sender parsed))) + (nick (car (erc-response.command-args parsed))) + (buffer (process-buffer proc))) + (setq erc-server-connected t) + (erc-update-mode-line) + (erc-set-initial-user-mode nick buffer) + (erc-server-setup-periodical-ping buffer) + (run-hook-with-args 'erc-after-connect server nick))))) + +(defun erc-set-initial-user-mode (nick buffer) + "If `erc-user-mode' is non-nil for NICK, set the user modes. +The server buffer is given by BUFFER." + (with-current-buffer buffer + (when erc-user-mode + (let ((mode (if (functionp erc-user-mode) + (funcall erc-user-mode) + erc-user-mode))) + (when (stringp mode) + (erc-log (format "changing mode for %s to %s" nick mode)) + (erc-server-send (format "MODE %s %s" nick mode))))))) (defun erc-display-error-notice (parsed string) "Display STRING as an error notice. @@ -4345,14 +4366,12 @@ If non-nil, return from being away." erc-nick))) (cond (away-p - (erc-with-all-buffers-of-server proc nil - (setq erc-away (current-time)))) + (setq erc-away (current-time))) (t (let ((away-time erc-away)) ;; away must be set to NIL BEFORE sending anything to prevent ;; an infinite recursion - (erc-with-all-buffers-of-server proc nil - (setq erc-away nil)) + (setq erc-away nil) (save-excursion (set-buffer (erc-active-buffer)) (when erc-public-away-p @@ -5037,8 +5056,9 @@ strings over to the next call." (defun erc-set-current-nick (nick) "Set the current nickname to NICK." - (with-current-buffer (or (erc-server-buffer) - (current-buffer)) + (with-current-buffer (if (buffer-live-p (erc-server-buffer)) + (erc-server-buffer) + (current-buffer)) (setq erc-server-current-nick nick))) (defun erc-current-nick () @@ -5119,7 +5139,7 @@ Takes a full SPEC of a user in the form \"nick!login@host\", and matches against all the regexp's in `erc-ignore-list'. If any match, returns that regexp." (catch 'found - (dolist (ignored (with-current-buffer (erc-server-buffer) erc-ignore-list)) + (dolist (ignored (erc-with-server-buffer erc-ignore-list)) (if (string-match ignored spec) (throw 'found ignored))))) @@ -5673,12 +5693,12 @@ entry of `channel-members'." "")) user)))) -(defun erc-away-p () - "Return t if the current ERC process is set away." - (save-excursion - (and (erc-server-buffer-live-p) - (set-buffer (process-buffer erc-server-process)) - erc-away))) +(defun erc-away-time () + "Return non-nil if the current ERC process is set away. + +In particular, the time that we were set away is returned. +See `current-time' for details on the time format." + (erc-with-server-buffer erc-away)) ;; Mode line handling @@ -5706,9 +5726,17 @@ The following characters are replaced: "A string to be formatted and shown in the header-line in `erc-mode'. Only used starting in Emacs 21. +Set this to nil if you do not want the header line to be +displayed. + See `erc-mode-line-format' for which characters are can be used." :group 'erc-mode-line-and-header - :type 'string) + :set (lambda (sym val) + (set sym val) + (when (fboundp 'erc-update-mode-line) + (erc-update-mode-line nil))) + :type '(choice (const :tag "Disabled" nil) + string)) (defcustom erc-header-line-uses-help-echo-p t "Show the contents of the header line in the echo area or as a tooltip @@ -5734,7 +5762,8 @@ Otherwise, use the `erc-header-line' face." (defcustom erc-common-server-suffixes '(("openprojects.net$" . "OPN") - ("freenode.net$" . "OPN")) + ("freenode.net$" . "freenode") + ("oftc.net$" . "OFTC")) "Alist of common server name suffixes. This variable is used in mode-line display to save screen real estate. Set it to nil if you want to avoid changing @@ -5786,9 +5815,7 @@ This should be a string with substitution variables recognized by (defun erc-format-away-status () "Return a formatted `erc-mode-line-away-status-format' if `erc-away' is non-nil." - (let ((a (when (erc-server-buffer-live-p) - (with-current-buffer (process-buffer erc-server-process) - erc-away)))) + (let ((a (erc-away-time))) (if a (format-time-string erc-mode-line-away-status-format a) ""))) @@ -5813,9 +5840,7 @@ if `erc-away' is non-nil." (defun erc-format-lag-time () "Return the estimated lag time to server, `erc-server-lag'." - (let ((lag (when (erc-server-buffer-live-p) - (with-current-buffer (process-buffer erc-server-process) - erc-server-lag)))) + (let ((lag (erc-with-server-buffer erc-server-lag))) (cond (lag (format "lag:%.0f" lag)) (t "")))) @@ -6137,7 +6162,8 @@ functions." (format "%s (%s@%s) has left channel %s%s" nick user host channel (if (not (string= reason "")) - (format ": %s" reason) + (format ": %s" + (erc-replace-regexp-in-string "%" "%%" reason)) ""))))) @@ -6232,6 +6258,13 @@ This function should be on `erc-kill-channel-hook'." "Find the next occurrence of the `erc-parsed' text property." (text-property-not-all (point-min) (point-max) 'erc-parsed nil)) +(defun erc-restore-text-properties () + "Restore the property 'erc-parsed for the region." + (let ((parsed-posn (erc-find-parsed-property))) + (put-text-property + (point-min) (point-max) + 'erc-parsed (when parsed-posn (erc-get-parsed-vector parsed-posn))))) + (defun erc-get-parsed-vector (point) "Return the whole parsed vector on POINT." (get-text-property point 'erc-parsed)) @@ -6263,8 +6296,7 @@ Otherwise, connect to HOST:PORT as USER and /join CHANNEL." (lambda () (and (string-equal erc-session-server host) (= erc-session-port port) - erc-server-connected - (eq (erc-server-buffer) (current-buffer)))))))) + (erc-open-server-buffer-p))))))) (with-current-buffer (or server-buffer (current-buffer)) (if (and server-buffer channel) (erc-cmd-JOIN channel) |