Mercurial > emacs
changeset 87952:b8f89dd3680d
ERC: Sync version 5.3, release candidate 1.
author | Michael Olson <mwolson@gnu.org> |
---|---|
date | Fri, 25 Jan 2008 03:28:10 +0000 |
parents | 0c208f9e2445 |
children | 2c8219ff3526 |
files | etc/ChangeLog etc/ERC-NEWS lisp/erc/ChangeLog lisp/erc/ChangeLog.07 lisp/erc/erc-backend.el lisp/erc/erc-button.el lisp/erc/erc-compat.el lisp/erc/erc-dcc.el lisp/erc/erc-goodies.el lisp/erc/erc-list.el lisp/erc/erc-networks.el lisp/erc/erc-page.el lisp/erc/erc-replace.el lisp/erc/erc-services.el lisp/erc/erc-track.el lisp/erc/erc-xdcc.el lisp/erc/erc.el |
diffstat | 17 files changed, 2023 insertions(+), 1039 deletions(-) [+] |
line wrap: on
line diff
--- a/etc/ChangeLog Fri Jan 25 02:46:19 2008 +0000 +++ b/etc/ChangeLog Fri Jan 25 03:28:10 2008 +0000 @@ -1,3 +1,7 @@ +2008-01-25 Michael Olson <mwolson@gnu.org> + + * ERC-NEWS: Update for ERC 5.3 release candidate. + 2008-01-22 Juanma Barranquero <lekktu@gmail.com> * DEVEL.HUMOR: New entry.
--- a/etc/ERC-NEWS Fri Jan 25 02:46:19 2008 +0000 +++ b/etc/ERC-NEWS Fri Jan 25 03:28:10 2008 +0000 @@ -15,14 +15,237 @@ `erc-join-channel' now accepts a prefix-argument to prompt for the key when channels are protected by keywords. +** ERC will now automatically determine which nick prefixes are valid +when joining a server. + +** Figure out which directory contains startup files when looking for +.erc.el. For Emacs this is usually ~/.emacs.d, and for XEmacs this is +usually ~/.xemacs. + +** Fix bug with view-mode when running erc-toggle-debug-irc-protocol. + +** Permit several commands to be run even when the server connection is dead. +This includes /CLEAR, /COUNTRY, /HELP, /LASTLOG, /QUIT, /GQUIT, +/RECONNECT, /SERVER, and /SET. + +** Make /RECONNECT work better when the server connection is dead. +Also, handle case where the server buffer has been killed. + +** Better handle interaction with /RECONNECT and indefinite reconnect +attempts. Display message which tells the user that they can stop the +reconnect attempts by killing the server buffer. + +** New option `erc-reuse-frames' determines whether new frames are always +created. It defaults to not creating a new frame for an ERC buffer if +there is already a window displaying it. This only has an effect when +the `erc-join-buffer' option is set to 'frame. + +** New command /ME'S handles the case where someone types "/me's" in an +ERC buffer. It concatenates the text " 's" to the beginning of the +input and then sends the result like a normal /ME command. + +** Fix bug where some messages were being sent to the server too soon. +In the past, this may have resulted in strange problems like seeing +the connection attempt stall, which may have especially affected +spotty or traffic-shaped connections. + +** Handle 307 (nick has identified) responses from the server. + +** Display a less-confusing message if the connection attempt fails. + +** On a tty, make sure that notices are displayed in blue rather than pink. + +** By default, open query buffers that are initiated by others in a new +unselected window. This may be changed by customizing the +`erc-auto-query' option. This should make ERC more friendly to new +users. + +** New option `erc-query-display' indicates how to display a query buffer +that is made using the /QUERY command. The default is to display the +query in a new selected window. + +** By default, display network name rather than server name in the modeline. +This should ERC use less space in the modeline. To get the old +behavior back, set `erc-mode-line-format' to "%s %a". + +** New option `erc-remove-parsed-property' determines whether to remove +the 'erc-parsed property. This should save some memory in channels +with large amounts of text on screen. It is enabled by default. + +** Modules newly enabled by default + +*** move-to-prompt: Move to the prompt when typing text. +*** networks: Provide data about IRC networks. + +** New formatting variables allowed in `erc-format-network': + +*** `%N': the name of the network. +*** `%S': much like %s, but let the network name trump the server name. + +** Compatibility with old releases + +*** In `erc-server-coding-system' and `erc-coding-system-for-target', pass +the `target' argument as the first and only argument to the function +named by these options. + +*** In `erc-track-faces-priority-list', permit list entries to be lists of +faces. This can be used to differentiate between, for example, +buttons in default text and buttons in notices. + +*** The `erc-assert' function has been removed in favor of using `assert' +from cl-macs.el. + +*** If your application uses the 'erc-parsed text property outside of +the insert hooks, you will need to set `erc-remove-parsed-property' +to nil. + ** Changes and additions to modules +*** BBDB (erc-bbdb.el) + +**** Work around bug in XEmacs 21.4 that causes an error to be thrown when +the first argument to `run-at-time' is nil. + +*** Button (erc-button.el) + +**** Recognize parentheses that are part of URLs. + +**** When in a channel, only buttonize nicks from that channel. + +*** DCC support (erc-dcc.el) + +**** Turn this into the "dcc" module for ERC, so that it can be more +easily enabled. + +**** New option `erc-dcc-listen-host' determines which IP address to listen +on for outside connection attempts. + +**** New option `erc-dcc-public-host' determines which IP address to advertise +when sending a file. This is useful for people who are on a local +subnet. Together, these two options replace the `erc-dcc-host' +option. + +**** New option `erc-dcc-receive-cache' indicates how much of a received +file to store in an Emacs buffer before flushing it to disk. The +default is 0.5 MB. + +**** Save only parts of received files in buffers, writing repeatedly to +disk after we get at least `erc-dcc-receive-cache' bytes. This allows +users to receive very large files without running out of memory. + +**** Rename `erc-verbose-dcc' option to `erc-dcc-verbose' and also +default it to nil. + +**** Fix edge case in erc-dcc-send-sentinel. + +**** If client confirms too much, then display byte count and kill the +file buffer. + +*** Goodies (erc-goodies.el) + +**** New module move-to-prompt causes the point to be moved to the prompt +if a user tries to type elsewhere in the buffer, and then inserts +their keystrokes after the prompt. It is enabled by default. + +**** New module keep-place keeps your place in unvisited ERC buffers +when new messages arrive. + +**** Enable scroll-to-bottom in all ERC buffers when the module is enabled, +rather than having the user do it manually. + +**** Fix bug with buffer ordering and scroll-to-bottom module. + +**** In the unmorse module, handle the morse code style that has "/ " at +the end of every letter. + +*** Identd (erc-identd.el) + +**** Fix bad behavior when closing the identd process. + +*** Channel lists (erc-list.el) + +**** Replace the old module with a rewritten one, so that we can include +it with Emacs. The old version of erc-list.el has been renamed to +erc-list-old.el, and is available as the list-old module. + +The new version does not yet have support for XEmacs. + +**** Don't display lots of output in the server buffer when running /LIST. + +*** Logging (erc-log.el) + +**** Permit the `erc-log-channels-directory' option to be set to a function +name. This makes it easier to write custom functions that determine +where log files should be placed. + +**** New option `erc-log-filter-function' specifies the function to call +for filtering text before writing it to a log file. By default, no +filtering is performed. + +*** Networks (erc-networks.el) + +**** Turn this into the "networks" module for ERC, so that it can be more +easily enabled. Enable it by default. + +**** Add support for Rizon. + +*** Internet services / Nickserv (erc-services.el) + +**** New hook option `erc-nickserv-identified-hook' is run after NickServ +acknowledges a successful identification. + +**** Add support for the GRnet and Rizon networks. + +*** Timestamps (erc-stamp.el) + +**** By default, place timestamps on both the left and the right. +The left timestamps appear once a day, and the right timestamps appear +once a minute when new messages arrive. To change this, customize the +`erc-insert-timestamp-function' and +`erc-insert-away-timestamp-function' options. + *** Channel tracking (erc-track.el) -If erc-track-position-in-mode-line is set to nil, the tracking -information won't be shown in the mode line, which is a change -from the previous behavior of showing it "After all other -information". +**** If `erc-track-position-in-mode-line' is set to nil, the tracking +information won't be shown in the mode line, which is a change from +the previous behavior of showing it "After all other information". + +If this variable is set to t, then the information will be added to +the very end of the mode line. + +**** New option `erc-track-remove-disconnected-buffers' controls whether +buffers associated with a server that is disconnected should be +removed from the modified buffers list. The default is to keep them +in the list. + +**** New hook option `erc-track-list-changed-hook' is run whenever the +contents of the modified channels list changes. It is useful for +people who use a separate mechanism to provide notification of channel +activity. + +**** The `erc-track-switch-direction' option now can be set to the value +'importance. If set to this value, ERC will switch to channels in +order of importance, which is determined by the position of the +channel's face in `erc-track-faces-priority-list'. + +**** Activate erc-track-minor-mode earlier in the connection process. + +**** Don't track buttons in notices. + +**** Get a rough idea for which channels are currently active by +switching between several normal conversation faces in the modeline. +This behavior can be modified by changing the new +`erc-track-faces-normal-list' option. + +**** Ignore display of who set the default channel topic and listing of +users on the current channel. Customize the `erc-track-exclude-types' +option to indicate the types of messages to exclude. These two +message types are "333" and "353", respectively. + +*** Support for acting as an XDCC file-server (erc-xdcc.el) + +**** Turn this into the "xdcc" module for ERC, so that it can be more +easily enabled. * Changes in ERC 5.2
--- a/lisp/erc/ChangeLog Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/ChangeLog Fri Jan 25 03:28:10 2008 +0000 @@ -1,843 +1,271 @@ +2008-01-25 Michael Olson <mwolson@gnu.org> + + * NEWS: Update. + + * erc-goodies.el (keep-place): New module which keeps your place + in unvisited ERC buffers when new messages arrive. This is mostly + taken from Johan Bockgård's init file. + (erc-noncommands-list): Move to correct place. + + * erc-networks.el: Add a module definition. + + * erc-services.el (erc-nickserv-identify-mode): Force-enable the + networks module, because we need it to set erc-network for us. + + * erc-track.el (erc-track-faces-normal-list): Indicate in the + docstring that this variable can be set to nil. + + * erc.el: On second thought, don't load erc-networks. Just enable + the networks module by default. + (erc-modules): Add option for keep-place and networks. Enable + networks by default. + (erc-version-string): Make release candidate 1 available. + +2008-01-24 Michael Olson <mwolson@gnu.org> + + * erc.el: Load erc-networks.el so that functions get access to the + `erc-network-name' function. + + * erc-track.el (erc-track-faces-normal-list): Add + erc-dangerous-host-face. + (erc-track-exclude-types): Add 333 and 353 to the default list of + things to ignore, and explain what they are in the docstring. + +2008-01-23 Michael Olson <mwolson@gnu.org> + + * erc-track.el (erc-track-faces-priority-list): Move + erc-nick-default-face higher, so that it can be used for the + activity indication effect. Add erc-current-nick-face, + erc-pal-face, erc-dangerous-host-face, and erc-fool-face by + themselves. + (erc-track-faces-normal-list): New option that contains a list of + faces to consider "normal". + (erc-track-position-in-mode-line): Minor docfix. + (erc-track-find-face): Use erc-track-faces-normal-list to produce + a sort of blinking activity effect. + +2008-01-22 Michael Olson <mwolson@gnu.org> + + * erc-button.el (erc-button-add-nickname-buttons): When in a + channel buffer, only look at nicks from the current channel. + Thanks to e1f for the report. + +2008-01-21 Michael Olson <mwolson@gnu.org> + + * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): Remove, + since we can use the default `assert' function without it causing + us any problems, even in Emacs 21. Thanks to bojohan for the + suggestion. + + * erc-goodies.el (move-to-prompt): Use the "XEmacs" method + instead, because the [remap ...] method interferes with + delete-selection-mode. + (erc-move-to-prompt): Rename from erc-move-to-prompt-xemacs. + Deactivate mark and call push-mark before moving point. Thanks to + bojohan for the suggestion. + (erc-move-to-prompt-setup): Rename from + erc-move-to-prompt-init-xemacs. + + * erc-track.el (erc-track-faces-priority-list): Replace erc-button + with '(erc-button erc-default-face) so that we only care about + buttons that are part of normal text. Adjust customization type + to handle this case. Make erc-nick-default-face a list. Handle + pals, fools, current nick, and dangerous hosts. + (erc-track-find-face): Simplify. Adapt for list of faces case. + (erc-faces-in): Don't deflate lists of faces. Add them as-is. + (erc-track-face-priority): Use equal instead of eq. + +2008-01-20 Michael Olson <mwolson@gnu.org> + + * erc-goodies.el (erc-move-to-prompt, erc-move-to-prompt-xemacs): + Fix off-by-one error that caused the point to move when placed at + the beginning of some already-typed text. Thanks to e1f for the + report. + + * erc-dcc.el, erc-xdcc.el: Add simple module definitions. + + * erc.el (erc-modules): Add dcc and xdcc. + +2008-01-19 Michael Olson <mwolson@gnu.org> + + * erc-bbdb.el (erc-bbdb-insinuate-and-show-entry): Work around bug + in XEmacs 21.4 that throws an error when the first argument to + run-at-time is nil. + + * erc-button.el (button): Undo XEmacs-specific change to all ERC + buffers when module is removed. + (erc-button-setup): Rename from erc-button-add-keys, and move + XEmacs-specific stuff here. + + * erc-goodies.el (erc-unmorse): Improve regexp for detecting + morse. Deal with the morse style that has "/ " at the end of + every letter. + (erc-imenu-setup): New function that sets up Imenu support. Add + it instead of a lambda form to erc-mode-hook. + (scrolltobottom): Remove erc-scroll-to-bottom from all ERC buffers + when module is removed. Activate the functionality in all ERC + buffers when the module is activated, rather than leaving it up to + the user. + (move-to-prompt): New module that moves to the ERC prompt if a + user tries to type elsewhere in the buffer, and then inserts their + keystrokes there. This is mostly taken from Johan Bockgård's init + file. + (erc-move-to-prompt): New function that implements this. + (erc-move-to-prompt-xemacs): New function that implements this for + XEmacs. + (erc-move-to-prompt-init-xemacs): New function to perform the + extra initialization step needed for XEmacs. + + * erc-page.el, erc-replace.el: Fix header and footer. + + * erc-track.el (erc-track-minor-mode-maybe): Take an optional + buffer arg so that we can put this in erc-connect-pre-hook. If + given this argument, include it in the check to determine whether + to activate erc-track-minor-mode. + (track): Add erc-track-minor-mode-maybe to erc-connect-pre-hook, + so that we can use it as soon as a connection is attempted. + + * erc.el (erc-format-network, erc-format-target-and/or-network): + Use erc-network-name function instead, and check to see whether + that function is bound. This fixes an error in process filter for + people who did not have erc-services or erc-networks loaded. + (erc-modules): Add move-to-prompt module and enable it by + default. Thanks to e1f for the suggestion. + +2008-01-18 Michael Olson <mwolson@gnu.org> + + * Makefile (EXTRAS): Include erc-list-old.el. + + * erc-dcc.el (erc-dcc-verbose): Rename from erc-verbose-dcc. + (erc-pack-int): Rewrite to not depend on a count argument. + (erc-unpack-int): Rewrite to remove 4-character limitation. + (erc-dcc-server): Call set-process-coding-system and + set-process-filter-multibyte so that the contents get sent out + without modification. + (erc-dcc-send-filter): Don't take a substring -- just pass the + whole string to erc-unpack-int. + (erc-dcc-receive-cache): New option that indicates the number of + bytes to let the receive buffer grow before flushing it. + (erc-dcc-file-name): New buffer-local variable to keep track of + the filename of the currently-received file. + (erc-dcc-get-file): Disable undo for a speed increase. Set + erc-dcc-file-name. Truncate the file before writing to it. + (erc-dcc-append-contents): New function to append the contents of + a buffer to a file and then erase the contents of the buffer. + (erc-dcc-get-filter): Flush buffer contents after exceeding + erc-dcc-receive-cache. This allows large files to be downloaded + without storing the whole thing in memory. + (erc-dcc-get-sentinel): Flush any remaining contents before + closing. No need to save buffer. + (erc-dcc-listen-host): New option that determines which IP address + to listen on. + (erc-dcc-public-host): New option that determines which IP address + to advertise when sending a file. This is useful for people who + are on a local subnet. Together, these two options replace + erc-dcc-host. + + * erc.el (erc-mode-line-format): Add %N and %S. %N is the name of + the network, and %S is much like %s but with the network name + trumping the server name. Default to "%S %a". Thanks to e1f for + the suggestion. + (erc-format-network): New function that formats the network name. + (erc-format-target-and/or-network): New function that formats both + the network name and target, falling back on the server name if + the network name is not available. + (erc-update-mode-line-buffer): Add the new format spec items. + +2008-01-17 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-join-buffer): Improve documentation. + (erc-query-display): New option indicating how to display a query + buffer that is made by using the /QUERY command. The default is + to display the query in a new window. + (erc-cmd-QUERY): Use it. Improve docstring. + (erc-auto-query): Default this to 'window-noselect instead, + because I've already seen bug reports about new users thinking + that ERC didn't display their test messages. Improve + customization type. + (erc-notice-face): Make this work with XEmacs. + (erc-join-buffer): Mention 'buffer in docstring. Improve + customization type. + + * erc-dcc.el (erc-dcc-send-sentinel): Better handle case where elt + is nil, in order to avoid an error. Thanks to Brent Goodrick for + the initial patch. + (erc-dcc-display-send): New function split from erc-dcc-send-hook. + (erc-dcc-send-connect-hook): Use it -- we don't like lambda forms + in hooks. + (erc-dcc-send-filter): Display byte count if the client confirmed + too much, and kill the buffer. Otherwise a DoS might be possible + by making Emacs run out of RAM. + + * erc-backend.el (erc-server-connect): Detect early on whether the + connection attempt has failed in order to avoid confusing error + messages. + + * erc-networks.el (erc-server-alist): Add Rizon network. + + * erc-services.el (erc-nickserv-passwords): Add Rizon to options. + (erc-nickserv-alist): Add support for Rizon. + + * erc-track.el (erc-track-find-face): Don't let buttons in notices + trump default text. Use catch/throw. Default to first element of + FACES is nothing is found. + + * erc-xdcc.el: Add local variables for proper indentation setup. + +2008-01-15 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-coding-system): Docfix. + (erc-coding-system-for-target): Pass the `target' argument along + as the first and only argument. It's not good to just depend on a + dynamic binding. + +2008-01-10 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (321, 322): Split message-displaying parts into + new functions, which are added to each response's respective + hook. This makes them easier to disable. + + * erc-list.el: New file from Tom Tromey. Use erc-propertize + instead of propertize. Require 'erc. + (list): New module definition. Remove message-displaying + functions for 321 and 322 response handlers when enabling the + module, and restore them when disabling. As a sanity check, + remove the erc-list-handle-322 function when disabling the module. + (erc-list-handle-322): Handle the case where we run the LIST + command, but do not go through the normal steps. + (erc-cmd-LIST): Add docstring. Strip initial space from line if + it is non-nil. Use make-local-variable to silence compiler + warning. Capture current buffer and pass it to + erc-list-install-322-handler. + (erc-list-install-322-handler): Take server-buffer argument, so + that we are certain of being in the right buffer. Use 4th + argument to add-hook, so that erc-server-322-functions is only + modified in one buffer. + + * erc-list-old.el: Renamed from old erc-list.el. + + * erc.el (erc-modules): Add list-old. + (erc-set-topic): Handle case where there are no newlines in the + existing topic, which happens when /LIST is run. + (erc-notice-face): If we have less than 88 colors, make this + blue. Otherwise the text will be pink in a tty, which looks + dreadful. Thanks to e1f for the report. + (erc-remove-parsed-property): New option that determines whether + to remove the erc-parsed property after displaying a message. + This should have the effect of making ERC take up less memory. + (erc-display-line-1): Use it. + 2008-01-04 Stefan Monnier <monnier@iro.umontreal.ca> * erc-ibuffer.el (erc-channel-modes): Pass mode-name through format-mode-line -2007-12-16 Diane Murray <disumu@x3y2z1.net> - - * erc-services.el (erc-nickserv-alist): Removed autodetect regexp, - added identified regexp for OFTC. - (erc-nickserv-identification-autodetect): Make sure success-regex - is non-nil. - (erc-nickserv-identify-autodetect): Make sure identify-regex is - non-nil. Doc fix. - -2007-12-13 Diane Murray <disumu@x3y2z1.net> - - * erc-backend.el (PRIVMSG, QUIT, TOPIC, WALLOPS, 376, 004, 221) - (312, 315, 319, 330, 331, 333, 367, 368, 391, 405, 406, 412) - (421, 432, 433, 437, 442, 461, 474, 477, 482, 431): Doc fix. - -2007-12-09 Michael Olson <mwolson@gnu.org> - - * erc-services.el (erc-nickserv-alist): Fix regexps for GRnet. - -2007-12-09 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) - - * erc-backend.el, erc.el: - Parse 275 (secure connection) responses. - - * erc-services.el: Add identification hooks for GRnet, the Greek - IRC network <http://www.irc.gr>. - -2007-12-08 David Kastrup <dak@gnu.org> - - * erc-stamp.el (erc-echo-timestamp): - * erc-lang.el (language): - * erc-backend.el (erc-server-connect): Fix buggy call to `message'. - -2007-12-07 Edward O'Connor <ted@oconnor.cx> - - * erc-services.el: Provide a hook that runs when nickserv confirms - that the user has successfully identified. - (services, erc-nickserv-identify-mode): Add and remove - erc-nickserv-identification-autodetect from - erc-server-NOTICE-functions. - (erc-nickserv-alist): Add SUCCESS-REGEXP to each entry. - (erc-nickserv-alist-identified-regexp) - (erc-nickserv-identification-autodetect): New functions. - (erc-nickserv-identified-hook): New hook. - -2007-12-06 D. Goel <deego3@gmail.com> - - * erc-match.el (erc-add-entry-to-list): Fix buggy call to `error'. - -2007-12-01 Glenn Morris <rgm@gnu.org> - - * erc-backend.el (erc-server-send-ping): Move after definition of - erc-server-send. - - * erc.el (iswitchb-temp-buflist, iswitchb-read-buffer) - (erc-controls-strip): Declare for compiler. - (erc-iswitchb): Don't require iswitchb when compiling. Test - iswitchb-mode is bound. - -2007-11-30 Dan Nicolaescu <dann@ics.uci.edu> - - * erc.el (open-ssl-stream, open-tls-stream, erc-network-name): - Declare as functions. - -2007-11-29 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) - - * erc-backend.el, erc.el: - Parse 307 (nick has identified) responses. - -2007-11-15 Juanma Barranquero <lekktu@gmail.com> - - * erc.el (erc-open): - * erc-backend.el (define-erc-response-handler): - * erc-log.el (log): - * erc-match.el (erc-log-matches): Fix typos in docstrings. - -2007-11-11 Michael Olson <mwolson@gnu.org> - - * erc-autoaway.el (erc-autoaway-possibly-set-away): - * erc-netsplit.el (erc-netsplit-timer): - * erc-notify.el (erc-notify-timer): - * erc-track.el (erc-user-is-active): Only run if we have - successfully established a connection to the server and have - logged in. I suspect that sending messages too soon may make some - IRC servers not respond well, particularly when the network - connection is iffy or subject to traffic-shaping. - -2007-11-01 Michael Olson <mwolson@gnu.org> - - * erc-compat.el (erc-set-write-file-functions): New compatibility - function to set the write hooks appropriately. - - * erc-log.el (erc-log-setup-logging): Use - erc-set-write-file-functions. This fixes a byte-compiler warning. - - * erc-stamp.el: Silence byte-compiler warning about - erc-fill-column. - - * erc.el (erc-with-all-buffers-of-server): Bind the result of - mapcar to a variable in order to silence a byte-compiler warning. - -2007-10-29 Michael Olson <mwolson@gnu.org> - - * erc-ibuffer.el (erc-modified-channels-alist): Use - eval-when-compile, and explain why we are doing this. - -2007-10-25 Dan Nicolaescu <dann@ics.uci.edu> - - * erc-ibuffer.el (erc-modified-channels-alist): Pacify - byte-compiler. - -2007-10-13 Glenn Morris <rgm@gnu.org> - - * erc-track.el (erc-modified-channels-update): Use mapc rather - than mapcar. - -2007-10-12 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-join-channel): Prompt for channel key if C-u or - another prefix-arg was typed. - - * NEWS: Noted this change. - -2007-10-07 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-cmd-ME'S): New command that handles the case where - someone types "/me's". It concatenates the text " 's" to the - beginning of the input and then sends the result like a normal - "/me" command. - (erc-command-regexp): Permit single-quote character. - -2007-09-30 Aidan Kehoe <kehoea@parhasard.net> (tiny change) - - * erc-log.el (erc-save-buffer-in-logs): Prevent spurious warnings - when looking at a log file and concurrently saving to it. - -2007-09-18 Exal de Jesus Garcia Carrillo <exal@gnu.org> (tiny change) - - * erc.texi (Special-Features): Fix small typo. - -2007-09-16 Michael Olson <mwolson@gnu.org> - - * erc-track.el (erc-track-switch-direction): Mention - erc-track-faces-priority-list. Thanks to Leo for the suggestion. - -2007-09-11 Exal de Jesus Garcia Carrillo <exal@gnu.org> (tiny change) - - * erc-sound.el: Fix typo in setting up instructions. - -2007-09-10 Michael Olson <mwolson@gnu.org> - - * Makefile (elpa): Copy dir template rather than echoing a few - lines. The reason for this is that the ELPA package for ERC was - getting a corrupt dir entry. - - * dir-template: Template for the ELPA dir file. - -2007-09-08 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-log-filter-function): New option that specifies - the function to call for filtering text before writing it to a log - file. Thanks to David O'Toole for the suggestion. - (erc-save-buffer-in-logs): Use erc-log-filter-function. Make sure - we carry along the value of coding-system-for-write, because this - could potentially be shadowed by the temporary buffer. - - * erc.el (erc-version-string): Update to 5.3, development version. - -2007-09-07 Glenn Morris <rgm@gnu.org> - - * erc.el (erc-toggle-debug-irc-protocol): Fix call to - erc-view-mode-enter. - -2007-08-08 Glenn Morris <rgm@gnu.org> - - * erc-log.el, erc.el: Replace `iff' in doc-strings and comments. - -2007-09-03 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-default-port): Make this an integer value rather - than a string. Thanks to Luca Capello for the report. - -2007-08-27 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-cmd-GQUIT): If erc-kill-queries-on-quit is non-nil, - kill all query buffers after 4 seconds. - -2007-08-16 Michael Olson <mwolson@gnu.org> - - * NEWS: Add ERC 5.3 changes section, and mention jbms' erc-track - compatibility note. - - * erc-track.el (erc-track-list-changed-hook): Turn this into a - customizable option. - (erc-track-switch-direction): Add 'importance option. - (erc-modified-channels-display): If erc-track-switch-direction is - 'importance, call erc-track-sort-by-importance. - (erc-track-face-priority): New function that returns a number - indicating the position of a face in erc-track-faces-priority-list. - (erc-track-sort-by-importance): New function that sorts - erc-modified-channels-list according to erc-track-face-priority. - (erc-track-get-active-buffer): Make 'oldest a rough opposite of - 'importance. - -2007-08-14 Jeremy Maitin-Shepard <jbms@cmu.edu> - - * erc-track.el (erc-track-remove-disconnected-buffers): New - variable which controls whether buffers associated with a server - that is disconnected should be removed from - `erc-modified-channels-alist'. Existing behavior is to - unconditionally remove such buffers, which is achieved by setting - `erc-track-removed-disconnected-buffers' to t. When set to t, - which is the new default value, such buffers remain in the list, - which I think is often the desired behavior, since the user may - likely wish to find out about activity that occurred in a channel - prior to it being disconnected. - (erc-track-list-changed-hook): New hook that is run whenever the - contents of `erc-modified-channels-alist' changes; it is useful - for users such as myself that don't use the default mode-line - notification but instead use a separate mechanism (which is tied - to my window manager) to provide notification of channel activity. - (erc-track-get-buffer-window): New function that acts as a wrapper - around `get-buffer-window' that handles the `selected-visible' - option of `erc-track-visibility'; previously, the value of - `erc-track-visibility' was passed directly to `get-buffer-window', - which does not support `selected-visible'; consequently, - `selected-visible' was not properly supported. - (erc-track-modified-channels): Fix a bug in the logic for removing - buffers from the list in certain cases. - (erc-track-position-in-mode-line): Add a supported value that - specifies that the tracking information should not be added to the - mode line at all. The value of nil is used to indicate that the - information should not be added at all to the mode line. - (erc-track-add-to-mode-line): Check for position eq to t, rather - than non-nil. - (erc-buffer-visible): Use erc-track-get-buffer-window. - (erc-modified-channels-update): Take - erc-track-remove-disconnected-buffers into account. - (erc-modified-channels-display): Run `erc-track-list-changed-hook'. - - * erc.el (erc-reuse-frames): New option that determines whether - new frames are always created. Defaults to t. This only has an - effect when erc-join-buffer is set to 'frame. - (erc-setup-buffer): Use it. - -2007-08-14 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (erc-server-reconnect): If the server buffer has - been killed, use the current buffer instead. If the current - buffer is not an ERC buffer, give an error. This fixes a bug when - /reconnect is run from a channel buffer whose server buffer has - been deleted. Thanks to jbms for the report. - (erc-process-sentinel-1): Take server buffer as an argument, so - that we can make sure that it is current. - (erc-process-sentinel): Pass buffer to erc-process-sentinel-1. - (erc-process-sentinel-2): New function split from - erc-process-sentinel-1. If server buffer is deleted during a - reconnect attempt, stop trying to reconnect. Fix bug where - reconnect was not happening when erc-server-reconnect-attempts was - t. Call erc-server-reconnect-p only once each time. If we are - instructed to try connecting indefinitely, tell the user that they - can stop this by killing the server buffer. Call the process - sentinel by means of run-at-time, so that there is time to kill - the buffer if need be; this also removes the need for a while - loop. Refuse to reconnect again if erc-server-reconnect-timeout - is not an number. - - * erc.el (erc-command-no-process-p): Fix bug: the return value of - erc-extract-command-from-line is a list rather than a single - symbol. Thanks to jbms for the report. - (erc-cmd-RECONNECT): Use simpler logic, and use buffer-live-p - rather than bufferp. - (erc-send-current-line, erc-display-command, erc-display-msg): - Handle case where erc-server-process is nil, so that /reconnect - works. - -2007-08-12 Michael Olson <mwolson@gnu.org> - - * erc-identd.el (erc-identd-filter): Instead of sending an EOF - character, which now confuses freenode, stop the server process, - so that no new connections are accepted, and kill the current - client process. - -2007-07-30 Michael Olson <mwolson@gnu.org> - - * erc-nicklist.el: Remove from the Emacs source tree. This file - is not release quality, and relies heavily on a module which - cannot be distributed with ERC due to licensing reasons. - -2007-07-29 Michael Olson <mwolson@gnu.org> - - * erc-list.el: Relicense to GPLv3. Since the file was already - licensed under version 2 or later, it turns out that we do not - need the permission of all of the authors in order to proceed. - -2007-07-25 Glenn Morris <rgm@gnu.org> - - * Relicense all FSF files to GPLv3 or later. - -2007-07-13 Michael Olson <mwolson@gnu.org> - - * erc-goodies.el (erc-get-bg-color-face, erc-get-fg-color-face): - Use erc-error rather than message and beep. - - * erc-sound.el: Indentation fix. - - * erc.el (erc-command-no-process-p): New function that determines - if its argument is an ERC command that can be run when the server - process is not alive. - (erc-cmd-SET, erc-cmd-CLEAR, erc-cmd-COUNTRY, erc-cmd-HELP) - (erc-cmd-LASTLOG, erc-cmd-QUIT, erc-cmd-GQUIT) - (erc-cmd-RECONNECT, erc-cmd-SERVER): Denote that these commands - can be run even when the server process is not alive. - (erc-send-current-line): Call erc-command-no-process-p if the - server process is not alive, to determine if we have a command - that can be run anyway. Thanks to Tom Tromey for the bug report. - (erc-error): New function that either displays a message or throws - an error, depending on whether debug-on-error is non-nil. - (erc-cmd-SERVER, erc-send-current-line): Use it. - -2007-07-10 Michael Olson <mwolson@gnu.org> - - * Relicense all FSF-assigned code to GPLv3. - -2007-06-25 Michael Olson <mwolson@gnu.org> - - * erc.texi (Options): Fix typo. - (Getting Help and Reporting Bugs): Update webpage URL. Make Gmane - part more readable. - -2007-06-20 Michael Olson <mwolson@gnu.org> - - * erc-stamp.el (erc-timestamp-format-left): New option that - specifies the left timestamp to use for - erc-insert-timestamp-left-and-right. - (erc-timestamp-format-right): New option that specifies the right - timestamp to use for erc-insert-timestamp-left-and-right. - (erc-insert-timestamp-function): Change default to - erc-insert-timestamp-left-and-right. - (erc-insert-away-timestamp-function): Ditto. - (erc-timestamp-last-inserted-left) - (erc-timestamp-last-inserted-right): New variables to keep track - of data for erc-insert-timestamp-left-and-right. - (erc-insert-timestamp-left-and-right): New function that places - timestamps on both the left and right sides of the screen, but - only if each timestamp has changed since it was last computed. - Thanks to offby1 for urging me to merge this. - - * erc.el (erc-open-ssl-stream): Display informative error when - ssl.el not found. - (erc-tls): New function to connect using tls.el. - (erc-open-tls-stream): New function to initiate tls connection. - Display informative error when tls.el not found. - -2007-06-19 Michael Olson <mwolson@gnu.org> - - * erc-log.el: Update header with accurate instructions. - -2007-06-17 Michael Olson <mwolson@gnu.org> - - * erc-pkg.el: Update description to match what is currently in ELPA. - -2007-06-14 Juanma Barranquero <lekktu@gmail.com> - - * erc-goodies.el (erc-scroll-to-bottom): Remove redundant check. - -2007-06-13 Michael Olson <mwolson@gnu.org> - - * erc-compat.el (erc-with-selected-window): New compatibility - macro that implements `with-selected-window'. - - * erc-goodies.el (erc-scroll-to-bottom): Use it. This fixes a bug - with buffer ordering where ERC buffers would move to the top. - Thanks to Ivan Kanis for the patch. - -2007-06-10 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-logging-enabled): Fix a bug that occurred when - `erc-log-channels-directory' had the name of a function. - -2007-06-06 Juanma Barranquero <lekktu@gmail.com> - - * erc.el (erc-show-channel-key-p, erc-startup-file-list): - Fix typo in docstring. - -2007-06-03 Michael Olson <mwolson@gnu.org> - - * erc-compat.el (erc-view-mode-enter): Make this its own function, - in order to document what we do, and provide sane fallback - behavior. - - * erc.el (erc-toggle-debug-irc-protocol): Don't pass any arguments - to erc-view-mode-enter, since we don't do anything special with - the exit function. This fixes a bug with Emacs 21 and Emacs 22. - Thanks to Leo for noticing. - -2007-05-30 Michael Olson <mwolson@gnu.org> - - * erc-compat.el (erc-user-emacs-directory): New variable that - determines where to find user-specific Emacs settings. For Emacs, - this is usually ~/.emacs.d, and for XEmacs this is usually - ~/.xemacs. - - * erc.el (erc-startup-file-list): Use erc-user-emacs-directory. - -2007-05-28 Michael Olson <mwolson@gnu.org> - - * erc-button.el (erc-button-url-regexp): Recognize parentheses as - part of URLs. Thanks to Lawrence Mitchell for the fix. - -2007-05-26 Michael Olson <mwolson@gnu.org> - - * erc.texi (Modules): Fix references to completion modules. - -2007-05-21 Michael Olson <mwolson@gnu.org> - * Makefile (SOURCE): Remove erc-pkg.el. - (debclean): New rule to clean old Debian packages of ERC. - (debprepare): Don't modify the released tarball, but copy it as - the .orig.tar.gz file. - (debrelease, debrevision): Remove. - (debinstall): New target that copies the generated Debian file to - a distro-specific location. - (deb): New rule that chains together the stages in building a - Debian package. - (EXTRAS): Add erc-nicklist.el, since it is not release-quality. - (extras): Copy images directory. - - * erc-nicklist.el (erc-nicklist-icons-directory): Use - locate-library to find the "images" directory. This should be - more failsafe. Thanks to Tom Tromey for the idea. - -2007-05-19 Michael Olson <mwolson@gnu.org> - - * Makefile (ELPA): New variable that contains the location of my - local ELPA repository. - (elpa): New rule that makes an ELPA package for ERC. - -2007-04-19 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-parse-prefix): New function that retrieves the - PREFIX server parameter from the current server and returns an - alist of prefix type to prefix character. - (erc-channel-receive-names): Use `erc-parse-prefix' to determine - whether the first character of a nick is a prefix character or - not. This should fix a bug reported by bromine about needing to - type "%" first to complete nicks of people who are "hops" on - Slashnet. This should also support for very exotic IRC server - setups, if any exist. - (erc-update-current-channel-member): Indentation. - -2007-04-15 Michael Olson <mwolson@gnu.org> - - * erc-log.el (erc-generate-log-file-name-function): Docfix. - Mention how to deal with the case for putting log files in - different directories. Change a customization type from `symbol' - to `function'. - (erc-log-channels-directory): Allow this to contain a function - name, which is called with the same args as in - `erc-generate-log-file-name-function'. Thanks to andrewy for the - report and use case. - (erc-current-logfile): Detect if `erc-log-channels-directory' is a - function and call it with arguments if so. - -2007-04-12 Michael Olson <mwolson@gnu.org> - - * erc-backend.el (define-erc-response-handler): Mention that hook - processing stops when the function returns non-nil. This should - help avoid a nasty "gotcha" when making custom functions. Thanks - to John Sullivan for the report. - -2007-04-08 Diane Murray <disumu@x3y2z1.net> - - * erc-nicklist.el (erc-nicklist-voiced-position): Fixed - customization mismatch. - -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. - (DISTRIBUTOR): New variable used to differentiate between building - packages for Ubuntu and Debian. - (debrelease, debrevision): Use it. - (debbuild): Run linda in addition to lintian. - - * 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. +See ChangeLog.07 for earlier changes. -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 - a command. - (erc-send-input): Use it. This fixes a bug where paths -- - "/usr/bin/foo", for example -- were being displayed as commands, - but still sent correctly. - (erc-extract-command-from-line): Use it. - - * erc.texi (Modules): Document erc-capab-identify. - -2007-01-11 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-find-parsed-property): Moved here from erc-track.el - since it can be useful in general. - - * erc-track.el (erc-find-parsed-property): Removed. - - * erc-capab.el (erc-capab-find-parsed): Removed. - (erc-capab-identify-add-prefix): Use `erc-find-parsed-property'. - - * erc.el (erc-open): Run `erc-before-connect' hook here. This - makes sure the hook always gets called before a connection is - made, as some functions, like `erc-handle-irc-url', use `erc-open' - instead of `erc'. - (erc): Removed `erc-before-connect' hook. - - * erc-menu.el (erc-menu-definition): Put items specific to - channels in a "Current channel" submenu. - - * erc-backend.el (321, 323): Display channel list in server buffer - when not using the channel list module. - - * erc.el: Updated copyright years. - (erc-version-string): Set to 5.2 (devel). - (erc-format-lag-time): Fixed to work when `erc-server-lag' is nil. - (erc-update-mode-line-buffer): Set the header face. - -2007-01-11 Michael Olson <mwolson@gnu.org> - - * erc-bbdb.el (erc-bbdb-popup-type): Fix customization type and - documentation. - - * erc-services.el (erc-nickserv-identify-mode): Improve - documentation for nick-change option and move higher to fix - compiler warning. Avoid a recursive load error. - (erc-nickserv-alist): Add simple entry for BitlBee, to avoid - "NickServ is AWAY: User is offline" error. Oddly enough, bitlbee - was smart enough to recognize that as an authentication request - and log in regardless, which is why I didn't notice this earlier. - (erc-nickserv-alist-sender, erc-nickserv-alist-regexp) - (erc-nickserv-alist-nickserv, erc-nickserv-alist-ident-keyword) - (erc-nickserv-alist-use-nick-p) - (erc-nickserv-alist-ident-command): New accessors for - erc-nickserv-alist. Using nth is unwieldy. - (erc-nickserv-identify-autodetect) - (erc-nickserv-identify-on-connect) - (erc-nickserv-identify-on-nick-change, erc-nickserv-identify): Use - the new accessors. - -2007-01-11 Diane Murray <disumu@x3y2z1.net> - - * NEWS: Added note for `erc-my-nick-face'. Fixed capab-identify - wording. - -2007-01-10 Diane Murray <disumu@x3y2z1.net> - - * erc.el (erc-mode-line-format): Added %l to documentation. - (erc-header-line-format): Removed "[IRC]". Use the new %l - replacement character. Doc fix. - (erc-format-channel-modes): Removed lag code. Removed parentheses - from mode string. - (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 - name to use when logging in. The default is to figure this out by - calling `system-name'. - (erc-login): Use it. - -2007-01-07 Michael Olson <mwolson@gnu.org> - - * erc.el (erc-modules): Add the menu module. This should fix a - bug with incorrect ERC submenus being displayed. - - * erc-menu.el: Turn this into a module. - (erc-menu-add, erc-menu-remove): New functions that add and remove - the ERC menu. - - -See ChangeLog.06 for earlier changes. - - Copyright (C) 2007, 2008 Free Software Foundation, Inc. + Copyright (C) 2008 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -860,5 +288,3 @@ ;; coding: utf-8 ;; add-log-time-zone-rule: t ;; End: - -;; arch-tag: 3369b6e5-96b1-4b32-96cd-9a905c747496
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.07 Fri Jan 25 03:28:10 2008 +0000 @@ -0,0 +1,839 @@ +2007-12-16 Diane Murray <disumu@x3y2z1.net> + + * erc-services.el (erc-nickserv-alist): Removed autodetect regexp, + added identified regexp for OFTC. + (erc-nickserv-identification-autodetect): Make sure success-regex + is non-nil. + (erc-nickserv-identify-autodetect): Make sure identify-regex is + non-nil. Doc fix. + +2007-12-13 Diane Murray <disumu@x3y2z1.net> + + * erc-backend.el (PRIVMSG, QUIT, TOPIC, WALLOPS, 376, 004, 221) + (312, 315, 319, 330, 331, 333, 367, 368, 391, 405, 406, 412) + (421, 432, 433, 437, 442, 461, 474, 477, 482, 431): Doc fix. + +2007-12-09 Michael Olson <mwolson@gnu.org> + + * erc-services.el (erc-nickserv-alist): Fix regexps for GRnet. + +2007-12-09 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) + + * erc-backend.el, erc.el: + Parse 275 (secure connection) responses. + + * erc-services.el: Add identification hooks for GRnet, the Greek + IRC network <http://www.irc.gr>. + +2007-12-08 David Kastrup <dak@gnu.org> + + * erc-stamp.el (erc-echo-timestamp): + * erc-lang.el (language): + * erc-backend.el (erc-server-connect): Fix buggy call to `message'. + +2007-12-07 Edward O'Connor <ted@oconnor.cx> + + * erc-services.el: Provide a hook that runs when nickserv confirms + that the user has successfully identified. + (services, erc-nickserv-identify-mode): Add and remove + erc-nickserv-identification-autodetect from + erc-server-NOTICE-functions. + (erc-nickserv-alist): Add SUCCESS-REGEXP to each entry. + (erc-nickserv-alist-identified-regexp) + (erc-nickserv-identification-autodetect): New functions. + (erc-nickserv-identified-hook): New hook. + +2007-12-06 D. Goel <deego3@gmail.com> + + * erc-match.el (erc-add-entry-to-list): Fix buggy call to `error'. + +2007-12-01 Glenn Morris <rgm@gnu.org> + + * erc-backend.el (erc-server-send-ping): Move after definition of + erc-server-send. + +2007-11-29 Giorgos Keramidas <keramida@ceid.upatras.gr> (tiny change) + + * erc-backend.el, erc.el: + Parse 307 (nick has identified) responses. + +2007-11-15 Juanma Barranquero <lekktu@gmail.com> + + * erc.el (erc-open): + * erc-backend.el (define-erc-response-handler): + * erc-log.el (log): + * erc-match.el (erc-log-matches): Fix typos in docstrings. + +2007-11-11 Michael Olson <mwolson@gnu.org> + + * erc-autoaway.el (erc-autoaway-possibly-set-away): + * erc-netsplit.el (erc-netsplit-timer): + * erc-notify.el (erc-notify-timer): + * erc-track.el (erc-user-is-active): Only run if we have + successfully established a connection to the server and have + logged in. I suspect that sending messages too soon may make some + IRC servers not respond well, particularly when the network + connection is iffy or subject to traffic-shaping. + +2007-11-01 Michael Olson <mwolson@gnu.org> + + * erc-compat.el (erc-set-write-file-functions): New compatibility + function to set the write hooks appropriately. + + * erc-log.el (erc-log-setup-logging): Use + erc-set-write-file-functions. This fixes a byte-compiler warning. + + * erc-stamp.el: Silence byte-compiler warning about + erc-fill-column. + + * erc.el (erc-with-all-buffers-of-server): Bind the result of + mapcar to a variable in order to silence a byte-compiler warning. + +2007-10-29 Michael Olson <mwolson@gnu.org> + + * erc-ibuffer.el (erc-modified-channels-alist): Use + eval-when-compile, and explain why we are doing this. + +2007-10-25 Dan Nicolaescu <dann@ics.uci.edu> + + * erc-ibuffer.el (erc-modified-channels-alist): Pacify + byte-compiler. + +2007-10-13 Glenn Morris <rgm@gnu.org> + + * erc-track.el (erc-modified-channels-update): Use mapc rather + than mapcar. + +2007-10-12 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-join-channel): Prompt for channel key if C-u or + another prefix-arg was typed. + + * NEWS: Noted this change. + +2007-10-07 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-cmd-ME'S): New command that handles the case where + someone types "/me's". It concatenates the text " 's" to the + beginning of the input and then sends the result like a normal + "/me" command. + (erc-command-regexp): Permit single-quote character. + +2007-09-30 Aidan Kehoe <kehoea@parhasard.net> (tiny change) + + * erc-log.el (erc-save-buffer-in-logs): Prevent spurious warnings + when looking at a log file and concurrently saving to it. + +2007-09-18 Exal de Jesus Garcia Carrillo <exal@gnu.org> (tiny change) + + * erc.texi (Special-Features): Fix small typo. + +2007-09-16 Michael Olson <mwolson@gnu.org> + + * erc-track.el (erc-track-switch-direction): Mention + erc-track-faces-priority-list. Thanks to Leo for the suggestion. + +2007-09-11 Exal de Jesus Garcia Carrillo <exal@gnu.org> (tiny change) + + * erc-sound.el: Fix typo in setting up instructions. + +2007-09-10 Michael Olson <mwolson@gnu.org> + + * Makefile (elpa): Copy dir template rather than echoing a few + lines. The reason for this is that the ELPA package for ERC was + getting a corrupt dir entry. + + * dir-template: Template for the ELPA dir file. + +2007-09-08 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-log-filter-function): New option that specifies + the function to call for filtering text before writing it to a log + file. Thanks to David O'Toole for the suggestion. + (erc-save-buffer-in-logs): Use erc-log-filter-function. Make sure + we carry along the value of coding-system-for-write, because this + could potentially be shadowed by the temporary buffer. + + * erc.el (erc-version-string): Update to 5.3, development version. + +2007-09-07 Glenn Morris <rgm@gnu.org> + + * erc.el (erc-toggle-debug-irc-protocol): Fix call to + erc-view-mode-enter. + +2007-08-08 Glenn Morris <rgm@gnu.org> + + * erc-log.el, erc.el: Replace `iff' in doc-strings and comments. + +2007-09-03 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-default-port): Make this an integer value rather + than a string. Thanks to Luca Capello for the report. + +2007-08-27 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-cmd-GQUIT): If erc-kill-queries-on-quit is non-nil, + kill all query buffers after 4 seconds. + +2007-08-16 Michael Olson <mwolson@gnu.org> + + * NEWS: Add ERC 5.3 changes section, and mention jbms' erc-track + compatibility note. + + * erc-track.el (erc-track-list-changed-hook): Turn this into a + customizable option. + (erc-track-switch-direction): Add 'importance option. + (erc-modified-channels-display): If erc-track-switch-direction is + 'importance, call erc-track-sort-by-importance. + (erc-track-face-priority): New function that returns a number + indicating the position of a face in erc-track-faces-priority-list. + (erc-track-sort-by-importance): New function that sorts + erc-modified-channels-list according to erc-track-face-priority. + (erc-track-get-active-buffer): Make 'oldest a rough opposite of + 'importance. + +2007-08-14 Jeremy Maitin-Shepard <jbms@cmu.edu> + + * erc-track.el (erc-track-remove-disconnected-buffers): New + variable which controls whether buffers associated with a server + that is disconnected should be removed from + `erc-modified-channels-alist'. Existing behavior is to + unconditionally remove such buffers, which is achieved by setting + `erc-track-removed-disconnected-buffers' to t. When set to t, + which is the new default value, such buffers remain in the list, + which I think is often the desired behavior, since the user may + likely wish to find out about activity that occurred in a channel + prior to it being disconnected. + (erc-track-list-changed-hook): New hook that is run whenever the + contents of `erc-modified-channels-alist' changes; it is useful + for users such as myself that don't use the default mode-line + notification but instead use a separate mechanism (which is tied + to my window manager) to provide notification of channel activity. + (erc-track-get-buffer-window): New function that acts as a wrapper + around `get-buffer-window' that handles the `selected-visible' + option of `erc-track-visibility'; previously, the value of + `erc-track-visibility' was passed directly to `get-buffer-window', + which does not support `selected-visible'; consequently, + `selected-visible' was not properly supported. + (erc-track-modified-channels): Fix a bug in the logic for removing + buffers from the list in certain cases. + (erc-track-position-in-mode-line): Add a supported value that + specifies that the tracking information should not be added to the + mode line at all. The value of nil is used to indicate that the + information should not be added at all to the mode line. + (erc-track-add-to-mode-line): Check for position eq to t, rather + than non-nil. + (erc-buffer-visible): Use erc-track-get-buffer-window. + (erc-modified-channels-update): Take + erc-track-remove-disconnected-buffers into account. + (erc-modified-channels-display): Run `erc-track-list-changed-hook'. + + * erc.el (erc-reuse-frames): New option that determines whether + new frames are always created. Defaults to t. This only has an + effect when erc-join-buffer is set to 'frame. + (erc-setup-buffer): Use it. + +2007-08-14 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (erc-server-reconnect): If the server buffer has + been killed, use the current buffer instead. If the current + buffer is not an ERC buffer, give an error. This fixes a bug when + /reconnect is run from a channel buffer whose server buffer has + been deleted. Thanks to jbms for the report. + (erc-process-sentinel-1): Take server buffer as an argument, so + that we can make sure that it is current. + (erc-process-sentinel): Pass buffer to erc-process-sentinel-1. + (erc-process-sentinel-2): New function split from + erc-process-sentinel-1. If server buffer is deleted during a + reconnect attempt, stop trying to reconnect. Fix bug where + reconnect was not happening when erc-server-reconnect-attempts was + t. Call erc-server-reconnect-p only once each time. If we are + instructed to try connecting indefinitely, tell the user that they + can stop this by killing the server buffer. Call the process + sentinel by means of run-at-time, so that there is time to kill + the buffer if need be; this also removes the need for a while + loop. Refuse to reconnect again if erc-server-reconnect-timeout + is not an number. + + * erc.el (erc-command-no-process-p): Fix bug: the return value of + erc-extract-command-from-line is a list rather than a single + symbol. Thanks to jbms for the report. + (erc-cmd-RECONNECT): Use simpler logic, and use buffer-live-p + rather than bufferp. + (erc-send-current-line, erc-display-command, erc-display-msg): + Handle case where erc-server-process is nil, so that /reconnect + works. + +2007-08-12 Michael Olson <mwolson@gnu.org> + + * erc-identd.el (erc-identd-filter): Instead of sending an EOF + character, which now confuses freenode, stop the server process, + so that no new connections are accepted, and kill the current + client process. + +2007-07-29 Michael Olson <mwolson@gnu.org> + + * erc-list.el: Relicense to GPLv3. Since the file was already + licensed under version 2 or later, it turns out that we do not + need the permission of all of the authors in order to proceed. + +2007-07-13 Michael Olson <mwolson@gnu.org> + + * erc-goodies.el (erc-get-bg-color-face, erc-get-fg-color-face): + Use erc-error rather than message and beep. + + * erc-sound.el: Indentation fix. + + * erc.el (erc-command-no-process-p): New function that determines + if its argument is an ERC command that can be run when the server + process is not alive. + (erc-cmd-SET, erc-cmd-CLEAR, erc-cmd-COUNTRY, erc-cmd-HELP) + (erc-cmd-LASTLOG, erc-cmd-QUIT, erc-cmd-GQUIT) + (erc-cmd-RECONNECT, erc-cmd-SERVER): Denote that these commands + can be run even when the server process is not alive. + (erc-send-current-line): Call erc-command-no-process-p if the + server process is not alive, to determine if we have a command + that can be run anyway. Thanks to Tom Tromey for the bug report. + (erc-error): New function that either displays a message or throws + an error, depending on whether debug-on-error is non-nil. + (erc-cmd-SERVER, erc-send-current-line): Use it. + +2007-07-10 Michael Olson <mwolson@gnu.org> + + * Relicense all FSF-assigned code to GPLv3. + +2007-06-25 Michael Olson <mwolson@gnu.org> + + * erc.texi (Options): Fix typo. + (Getting Help and Reporting Bugs): Update webpage URL. Make Gmane + part more readable. + +2007-06-20 Michael Olson <mwolson@gnu.org> + + * erc-stamp.el (erc-timestamp-format-left): New option that + specifies the left timestamp to use for + erc-insert-timestamp-left-and-right. + (erc-timestamp-format-right): New option that specifies the right + timestamp to use for erc-insert-timestamp-left-and-right. + (erc-insert-timestamp-function): Change default to + erc-insert-timestamp-left-and-right. + (erc-insert-away-timestamp-function): Ditto. + (erc-timestamp-last-inserted-left) + (erc-timestamp-last-inserted-right): New variables to keep track + of data for erc-insert-timestamp-left-and-right. + (erc-insert-timestamp-left-and-right): New function that places + timestamps on both the left and right sides of the screen, but + only if each timestamp has changed since it was last computed. + Thanks to offby1 for urging me to merge this. + + * erc.el (erc-open-ssl-stream): Display informative error when + ssl.el not found. + (erc-tls): New function to connect using tls.el. + (erc-open-tls-stream): New function to initiate tls connection. + Display informative error when tls.el not found. + +2007-06-19 Michael Olson <mwolson@gnu.org> + + * erc-log.el: Update header with accurate instructions. + +2007-06-17 Michael Olson <mwolson@gnu.org> + + * erc-pkg.el: Update description to match what is currently in ELPA. + +2007-06-14 Juanma Barranquero <lekktu@gmail.com> + + * erc-goodies.el (erc-scroll-to-bottom): Remove redundant check. + +2007-06-13 Michael Olson <mwolson@gnu.org> + + * erc-compat.el (erc-with-selected-window): New compatibility + macro that implements `with-selected-window'. + + * erc-goodies.el (erc-scroll-to-bottom): Use it. This fixes a bug + with buffer ordering where ERC buffers would move to the top. + Thanks to Ivan Kanis for the patch. + +2007-06-10 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-logging-enabled): Fix a bug that occurred when + `erc-log-channels-directory' had the name of a function. + +2007-06-06 Juanma Barranquero <lekktu@gmail.com> + + * erc.el (erc-show-channel-key-p, erc-startup-file-list): + Fix typo in docstring. + +2007-06-03 Michael Olson <mwolson@gnu.org> + + * erc-compat.el (erc-view-mode-enter): Make this its own function, + in order to document what we do, and provide sane fallback + behavior. + + * erc.el (erc-toggle-debug-irc-protocol): Don't pass any arguments + to erc-view-mode-enter, since we don't do anything special with + the exit function. This fixes a bug with Emacs 21 and Emacs 22. + Thanks to Leo for noticing. + +2007-05-30 Michael Olson <mwolson@gnu.org> + + * erc-compat.el (erc-user-emacs-directory): New variable that + determines where to find user-specific Emacs settings. For Emacs, + this is usually ~/.emacs.d, and for XEmacs this is usually + ~/.xemacs. + + * erc.el (erc-startup-file-list): Use erc-user-emacs-directory. + +2007-05-28 Michael Olson <mwolson@gnu.org> + + * erc-button.el (erc-button-url-regexp): Recognize parentheses as + part of URLs. Thanks to Lawrence Mitchell for the fix. + +2007-05-26 Michael Olson <mwolson@gnu.org> + + * erc.texi (Modules): Fix references to completion modules. + +2007-05-21 Michael Olson <mwolson@gnu.org> + + * Makefile (SOURCE): Remove erc-pkg.el. + (debclean): New rule to clean old Debian packages of ERC. + (debprepare): Don't modify the released tarball, but copy it as + the .orig.tar.gz file. + (debrelease, debrevision): Remove. + (debinstall): New target that copies the generated Debian file to + a distro-specific location. + (deb): New rule that chains together the stages in building a + Debian package. + (EXTRAS): Add erc-nicklist.el, since it is not release-quality. + (extras): Copy images directory. + + * erc-nicklist.el (erc-nicklist-icons-directory): Use + locate-library to find the "images" directory. This should be + more failsafe. Thanks to Tom Tromey for the idea. + +2007-05-19 Michael Olson <mwolson@gnu.org> + + * Makefile (ELPA): New variable that contains the location of my + local ELPA repository. + (elpa): New rule that makes an ELPA package for ERC. + +2007-04-19 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-parse-prefix): New function that retrieves the + PREFIX server parameter from the current server and returns an + alist of prefix type to prefix character. + (erc-channel-receive-names): Use `erc-parse-prefix' to determine + whether the first character of a nick is a prefix character or + not. This should fix a bug reported by bromine about needing to + type "%" first to complete nicks of people who are "hops" on + Slashnet. This should also support for very exotic IRC server + setups, if any exist. + (erc-update-current-channel-member): Indentation. + +2007-04-15 Michael Olson <mwolson@gnu.org> + + * erc-log.el (erc-generate-log-file-name-function): Docfix. + Mention how to deal with the case for putting log files in + different directories. Change a customization type from `symbol' + to `function'. + (erc-log-channels-directory): Allow this to contain a function + name, which is called with the same args as in + `erc-generate-log-file-name-function'. Thanks to andrewy for the + report and use case. + (erc-current-logfile): Detect if `erc-log-channels-directory' is a + function and call it with arguments if so. + +2007-04-12 Michael Olson <mwolson@gnu.org> + + * erc-backend.el (define-erc-response-handler): Mention that hook + processing stops when the function returns non-nil. This should + help avoid a nasty "gotcha" when making custom functions. Thanks + to John Sullivan for the report. + +2007-04-08 Diane Murray <disumu@x3y2z1.net> + + * erc-nicklist.el (erc-nicklist-voiced-position): Fixed + customization mismatch. + +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. + (DISTRIBUTOR): New variable used to differentiate between building + packages for Ubuntu and Debian. + (debrelease, debrevision): Use it. + (debbuild): Run linda in addition to lintian. + + * 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 + a command. + (erc-send-input): Use it. This fixes a bug where paths -- + "/usr/bin/foo", for example -- were being displayed as commands, + but still sent correctly. + (erc-extract-command-from-line): Use it. + + * erc.texi (Modules): Document erc-capab-identify. + +2007-01-11 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-find-parsed-property): Moved here from erc-track.el + since it can be useful in general. + + * erc-track.el (erc-find-parsed-property): Removed. + + * erc-capab.el (erc-capab-find-parsed): Removed. + (erc-capab-identify-add-prefix): Use `erc-find-parsed-property'. + + * erc.el (erc-open): Run `erc-before-connect' hook here. This + makes sure the hook always gets called before a connection is + made, as some functions, like `erc-handle-irc-url', use `erc-open' + instead of `erc'. + (erc): Removed `erc-before-connect' hook. + + * erc-menu.el (erc-menu-definition): Put items specific to + channels in a "Current channel" submenu. + + * erc-backend.el (321, 323): Display channel list in server buffer + when not using the channel list module. + + * erc.el: Updated copyright years. + (erc-version-string): Set to 5.2 (devel). + (erc-format-lag-time): Fixed to work when `erc-server-lag' is nil. + (erc-update-mode-line-buffer): Set the header face. + +2007-01-11 Michael Olson <mwolson@gnu.org> + + * erc-bbdb.el (erc-bbdb-popup-type): Fix customization type and + documentation. + + * erc-services.el (erc-nickserv-identify-mode): Improve + documentation for nick-change option and move higher to fix + compiler warning. Avoid a recursive load error. + (erc-nickserv-alist): Add simple entry for BitlBee, to avoid + "NickServ is AWAY: User is offline" error. Oddly enough, bitlbee + was smart enough to recognize that as an authentication request + and log in regardless, which is why I didn't notice this earlier. + (erc-nickserv-alist-sender, erc-nickserv-alist-regexp) + (erc-nickserv-alist-nickserv, erc-nickserv-alist-ident-keyword) + (erc-nickserv-alist-use-nick-p) + (erc-nickserv-alist-ident-command): New accessors for + erc-nickserv-alist. Using nth is unwieldy. + (erc-nickserv-identify-autodetect) + (erc-nickserv-identify-on-connect) + (erc-nickserv-identify-on-nick-change, erc-nickserv-identify): Use + the new accessors. + +2007-01-11 Diane Murray <disumu@x3y2z1.net> + + * NEWS: Added note for `erc-my-nick-face'. Fixed capab-identify + wording. + +2007-01-10 Diane Murray <disumu@x3y2z1.net> + + * erc.el (erc-mode-line-format): Added %l to documentation. + (erc-header-line-format): Removed "[IRC]". Use the new %l + replacement character. Doc fix. + (erc-format-channel-modes): Removed lag code. Removed parentheses + from mode string. + (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 + name to use when logging in. The default is to figure this out by + calling `system-name'. + (erc-login): Use it. + +2007-01-07 Michael Olson <mwolson@gnu.org> + + * erc.el (erc-modules): Add the menu module. This should fix a + bug with incorrect ERC submenus being displayed. + + * erc-menu.el: Turn this into a module. + (erc-menu-add, erc-menu-remove): New functions that add and remove + the ERC menu. + + +See ChangeLog.06 for earlier changes. + + Copyright (C) 2007, 2008 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 3, 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: 3369b6e5-96b1-4b32-96cd-9a905c747496
--- a/lisp/erc/erc-backend.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-backend.el Fri Jan 25 03:28:10 2008 +0000 @@ -332,11 +332,10 @@ If a cons, the encoding system for outgoing text is in the car and the decoding system for incoming text is in the cdr. The most -interesting use for this is to put `undecided' in the cdr. If a -function, it is called with no arguments and should return a -coding system or a cons as described above. Note that you can use -the dynamically bound variable `target' to get the current -target. See `erc-coding-system-for-target'. +interesting use for this is to put `undecided' in the cdr. + +If a function, it is called with the argument `target' and should +return a coding system or a cons as described above. If you need to send non-ASCII text to people not using a client that does decoding on its own, you must tell ERC what encoding to use. @@ -491,6 +490,8 @@ (let ((process (funcall erc-server-connect-function (format "erc-%s-%s" server port) nil server port))) + (unless (processp process) + (error "Connection attempt failed")) (message "%s...done" msg) ;; Misc server variables (with-current-buffer buffer @@ -686,7 +687,7 @@ (when (string-match (car pat) target) (throw 'match (cdr pat))))))) (and (functionp erc-server-coding-system) - (funcall erc-server-coding-system)) + (funcall erc-server-coding-system target)) erc-server-coding-system)) (defun erc-decode-string-from-target (str target) @@ -1649,8 +1650,13 @@ (define-erc-response-handler (321) "LIST header." nil - (setq erc-channel-list nil) - (erc-display-message parsed 'notice proc 's321)) + (setq erc-channel-list nil)) + +(defun erc-server-321-message (proc parsed) + "Display a message for the 321 event." + (erc-display-message parsed 'notice proc 's321) + nil) +(add-hook 'erc-server-321-functions 'erc-server-321-message t) (define-erc-response-handler (322) "LIST notice." nil @@ -1658,10 +1664,17 @@ (multiple-value-bind (channel num-users) (cdr (erc-response.command-args parsed)) (add-to-list 'erc-channel-list (list channel)) - (erc-update-channel-topic channel topic) + (erc-update-channel-topic channel topic)))) + +(defun erc-server-322-message (proc parsed) + "Display a message for the 322 event." + (let ((topic (erc-response.contents parsed))) + (multiple-value-bind (channel num-users) + (cdr (erc-response.command-args parsed)) (erc-display-message parsed 'notice proc 's322 ?c channel ?u num-users ?t (or topic ""))))) +(add-hook 'erc-server-322-functions 'erc-server-322-message t) (define-erc-response-handler (324) "Channel or nick modes." nil
--- a/lisp/erc/erc-button.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-button.el Fri Jan 25 03:28:10 2008 +0000 @@ -57,16 +57,15 @@ ((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-mode-hook 'erc-button-add-keys)) + (add-hook 'erc-mode-hook 'erc-button-setup)) ((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-mode-hook 'erc-button-add-keys))) - -;; Make XEmacs use `erc-button-face'. -(when (featurep 'xemacs) - (add-hook 'erc-mode-hook - (lambda () (set (make-local-variable 'widget-button-face) nil)))) + (remove-hook 'erc-mode-hook 'erc-button-setup) + (when (featurep 'xemacs) + (dolist (buffer (erc-buffer-list)) + (with-current-buffer buffer + (kill-local-variable 'widget-button-face)))))) ;;; Variables @@ -247,8 +246,12 @@ "Internal variable used to keep track of whether we've added the global-level ERC button keys yet.") -(defun erc-button-add-keys () +(defun erc-button-setup () "Add ERC mode-level button movement keys. This is only done once." + ;; Make XEmacs use `erc-button-face'. + (when (featurep 'xemacs) + (set (make-local-variable 'widget-button-face) nil)) + ;; Add keys. (unless erc-button-keys-added (define-key erc-mode-map (kbd "<backtab>") 'erc-button-previous) (setq erc-button-keys-added t))) @@ -299,9 +302,10 @@ (setq bounds (bounds-of-thing-at-point 'word)) (setq word (buffer-substring-no-properties (car bounds) (cdr bounds))) - (if (erc-get-server-user word) - (erc-button-add-button (car bounds) (cdr bounds) - fun t (list word))))))) + (when (or (and (erc-server-buffer-p) (erc-get-server-user word)) + (and erc-channel-users (erc-get-channel-user word))) + (erc-button-add-button (car bounds) (cdr bounds) + fun t (list word))))))) (defun erc-button-add-buttons-1 (regexp entry) "Search through the buffer for matches to ENTRY and add buttons."
--- a/lisp/erc/erc-compat.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-compat.el Fri Jan 25 03:28:10 2008 +0000 @@ -88,53 +88,6 @@ (defalias 'erc-make-obsolete 'make-obsolete) (defalias 'erc-make-obsolete-variable 'make-obsolete-variable) -;; Provde an equivalent of `assert', based on the code from cl-macs.el -(defun erc-const-expr-p (x) - (cond ((consp x) - (or (eq (car x) 'quote) - (and (memq (car x) '(function function*)) - (or (symbolp (nth 1 x)) - (and (eq (and (consp (nth 1 x)) - (car (nth 1 x))) 'lambda) 'func))))) - ((symbolp x) (and (memq x '(nil t)) t)) - (t t))) - -(put 'erc-assertion-failed 'error-conditions '(error)) -(put 'erc-assertion-failed 'error-message "Assertion failed") - -(defun erc-list* (arg &rest rest) - "Return a new list with specified args as elements, cons'd to last arg. -Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to -`(cons A (cons B (cons C D)))'." - (cond ((not rest) arg) - ((not (cdr rest)) (cons arg (car rest))) - (t (let* ((n (length rest)) - (copy (copy-sequence rest)) - (last (nthcdr (- n 2) copy))) - (setcdr last (car (cdr last))) - (cons arg copy))))) - -(defmacro erc-assert (form &optional show-args string &rest args) - "Verify that FORM returns non-nil; signal an error if not. -Second arg SHOW-ARGS means to include arguments of FORM in message. -Other args STRING and ARGS... are arguments to be passed to `error'. -They are not evaluated unless the assertion fails. If STRING is -omitted, a default message listing FORM itself is used." - (let ((sargs - (and show-args - (delq nil (mapcar - (function - (lambda (x) - (and (not (erc-const-expr-p x)) x))) - (cdr form)))))) - (list 'progn - (list 'or form - (if string - (erc-list* 'error string (append sargs args)) - (list 'signal '(quote erc-assertion-failed) - (erc-list* 'list (list 'quote form) sargs)))) - nil))) - ;; Provide a simpler replacement for `member-if' (defun erc-member-if (predicate list) "Find the first item satisfying PREDICATE in LIST.
--- a/lisp/erc/erc-dcc.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-dcc.el Fri Jan 25 03:28:10 2008 +0000 @@ -60,6 +60,12 @@ (require 'cl) (require 'pcomplete)) +;;;###autoload (autoload 'erc-dcc-mode "erc-dcc") +(define-erc-module dcc nil + "Provide Direct Client-to-Client support for ERC." + ((add-hook 'erc-server-401-functions 'erc-dcc-no-such-nick)) + ((remove-hook 'erc-server-401-functions 'erc-dcc-no-such-nick))) + (defgroup erc-dcc nil "DCC stands for Direct Client Communication, where you and your friend's client programs connect directly to each other, @@ -70,7 +76,7 @@ IRC users." :group 'erc) -(defcustom erc-verbose-dcc t +(defcustom erc-dcc-verbose nil "*If non-nil, be verbose about DCC activity reporting." :group 'erc-dcc :type 'boolean) @@ -195,20 +201,22 @@ (setq list (cdr list))))) result)) -;; msa wrote this nifty little frob to convert an n-byte integer to a packed -;; string. -(defun erc-pack-int (value count) - (if (> count 0) - (concat (erc-pack-int (/ value 256) (1- count)) - (char-to-string (% value 256))) - "")) +(defun erc-pack-int (value) + "Convert an integer into a packed string." + (let* ((len (ceiling (/ value 256.0))) + (str (make-string len ?a)) + (i (1- len))) + (while (>= i 0) + (aset str i (% value 256)) + (setq value (/ value 256)) + (setq i (1- i))) + str)) (defun erc-unpack-int (str) - "Unpack a 1-4 character packed string into an integer." + "Unpack a packed string into an integer." (let ((len (length str)) (num 0) (count 0)) - (erc-assert (<= len 4)) ;; this isn't going to fit in elisp bounds (while (< count len) (setq num (+ num (lsh (aref str (- len count 1)) (* 8 count)))) (setq count (1+ count))) @@ -256,15 +264,24 @@ ;;; Server code -(defcustom erc-dcc-host nil - "*IP address to use for outgoing DCC offers. -Should be set to a string or nil, if nil, automatic detection of the -host interface to use will be attempted." +(defcustom erc-dcc-listen-host nil + "IP address to listen on when offering files. +Should be set to a string or nil. If nil, automatic detection of +the host interface to use will be attempted." :group 'erc-dcc :type (list 'choice (list 'const :tag "Auto-detect" nil) (list 'string :tag "IP-address" :valid-regexp erc-dcc-ipv4-regexp))) +(defcustom erc-dcc-public-host nil + "IP address to use for outgoing DCC offers. +Should be set to a string or nil. If nil, use the value of +`erc-dcc-listen-host'." + :group 'erc-dcc + :type (list 'choice (list 'const :tag "Same as erc-dcc-listen-host" nil) + (list 'string :tag "IP-address" + :valid-regexp erc-dcc-ipv4-regexp))) + (defcustom erc-dcc-send-request 'ask "*How to treat incoming DCC Send requests. 'ask - Report the Send request, and wait for the user to manually accept it @@ -282,7 +299,7 @@ "Determine the IP address we are using. If variable `erc-dcc-host' is non-nil, use it. Otherwise call `erc-dcc-get-host' on the erc-server-process." - (or erc-dcc-host (erc-dcc-get-host erc-server-process) + (or erc-dcc-listen-host (erc-dcc-get-host erc-server-process) (error "Unable to determine local address"))) (defcustom erc-dcc-port-range nil @@ -311,6 +328,7 @@ process) (while (not process) (condition-case err + (progn (setq process (make-network-process :name name :buffer nil @@ -322,6 +340,11 @@ :sentinel sentinel :log #'erc-dcc-server-accept :server t)) + (when (processp process) + (when (fboundp 'set-process-coding-system) + (set-process-coding-system process 'binary 'binary)) + (when (fboundp 'set-process-filter-multibyte) + (set-process-filter-multibyte process nil)))) (file-error (unless (and (string= "Cannot bind server socket" (cadr err)) (string= "address already in use" (caddr err))) @@ -698,7 +721,7 @@ (confirmed-marker (plist-get elt :sent)) (sent-marker (plist-get elt :sent))) (with-current-buffer (process-buffer proc) - (when erc-verbose-dcc + (when erc-dcc-verbose (erc-display-message nil 'notice (erc-dcc-get-parent proc) (format "DCC: Confirmed %d, sent %d, sending block now" @@ -713,8 +736,7 @@ (length string))))) (defun erc-dcc-send-filter (proc string) - (erc-assert (= (% (length string) 4) 0)) - (let* ((size (erc-unpack-int (substring string (- (length string) 4)))) + (let* ((size (erc-unpack-int string)) (elt (erc-dcc-member :peer proc)) (parent (plist-get elt :parent)) (sent-marker (plist-get elt :sent)) @@ -742,16 +764,21 @@ ((> confirmed-marker sent-marker) (erc-display-message nil 'notice parent - (format "DCC: Client confirmed too much!")) + (format "DCC: Client confirmed too much (%s vs %s)!" + (marker-position confirmed-marker) + (marker-position sent-marker))) + (set-buffer-modified-p nil) + (kill-buffer (current-buffer)) (delete-process proc)))))) +(defun erc-dcc-display-send (proc) + (erc-display-message + nil 'notice (erc-dcc-get-parent proc) + (format "DCC: SEND connect from %s" + (format-network-address (process-contact proc :remote))))) + (defcustom erc-dcc-send-connect-hook - '((lambda (proc) - (erc-display-message - nil 'notice (erc-dcc-get-parent proc) - (format "DCC: SEND connect from %s" - (format-network-address (process-contact proc :remote))))) - erc-dcc-send-block) + '(erc-dcc-display-send erc-dcc-send-block) "*Hook run whenever the remote end of a DCC SEND offer connected to your listening port." :group 'erc-dcc @@ -762,14 +789,14 @@ (erc-extract-nick (plist-get plist :nick))) (defun erc-dcc-send-sentinel (proc event) - (let* ((elt (erc-dcc-member :peer proc)) - (buf (marker-buffer (plist-get elt :sent)))) + (let* ((elt (erc-dcc-member :peer proc))) (cond ((string-match "^open from " event) (when elt - (with-current-buffer buf - (set-process-buffer proc buf) - (setq erc-dcc-entry-data elt)) + (let ((buf (marker-buffer (plist-get elt :sent)))) + (with-current-buffer buf + (set-process-buffer proc buf) + (setq erc-dcc-entry-data elt))) (run-hook-with-args 'erc-dcc-send-connect-hook proc)))))) (defun erc-dcc-find-file (file) @@ -807,15 +834,23 @@ (process-send-string pproc (format "PRIVMSG %s :\C-aDCC SEND %s %s %d %d\C-a\n" nick (erc-dcc-file-to-name file) - (erc-ip-to-decimal (nth 0 contact)) + (erc-ip-to-decimal (or erc-dcc-public-host + (nth 0 contact))) (nth 1 contact) size))) (error "`make-network-process' not supported by your Emacs"))) ;;; GET handling +(defcustom erc-dcc-receive-cache (* 1024 512) + "Number of bytes to let the receive buffer grow before flushing it." + :group 'erc-dcc + :type 'integer) + (defvar erc-dcc-byte-count nil) (make-variable-buffer-local 'erc-dcc-byte-count) +(defvar erc-dcc-file-name nil) +(make-variable-buffer-local 'erc-dcc-file-name) (defun erc-dcc-get-file (entry file parent-proc) "This function does the work of setting up a transfer from the remote client @@ -825,6 +860,7 @@ proc) (with-current-buffer buffer (fundamental-mode) + (buffer-disable-undo (current-buffer)) ;; This is necessary to have the buffer saved as-is in GNU ;; Emacs. ;; XEmacs change: We don't have `set-buffer-multibyte', setting @@ -835,7 +871,10 @@ (setq mode-line-process '(":%s") buffer-file-type t buffer-read-only t) - (set-visited-file-name file) + (setq erc-dcc-file-name file) + + ;; Truncate the given file to size 0 before appending to it. + (write-region (point) (point) erc-dcc-file-name nil 'nomessage) (setq erc-server-process parent-proc erc-dcc-entry-data entry) @@ -847,7 +886,6 @@ (string-to-number (plist-get entry :port)) entry)) (set-process-buffer proc buffer) - ;; The following two lines make saving as-is work under Windows (set-process-coding-system proc 'binary 'binary) (set-buffer-file-coding-system 'binary t) @@ -856,6 +894,14 @@ (setq entry (plist-put entry :start-time (erc-current-time))) (setq entry (plist-put entry :peer proc))))) +(defun erc-dcc-append-contents (buffer file) + "Append the contents of BUFFER to FILE. +The contents of the BUFFER will then be erased." + (with-current-buffer buffer + (let ((coding-system-for-write 'binary)) + (write-region (point-min) (point-max) erc-dcc-file-name t 'nomessage) + (erase-buffer)))) + (defun erc-dcc-get-filter (proc str) "This is the process filter for transfers from other clients to this one. It reads incoming bytes from the network and stores them in the DCC @@ -868,8 +914,10 @@ (insert (string-make-unibyte str)) (setq erc-dcc-byte-count (+ (length str) erc-dcc-byte-count)) - (erc-assert (= erc-dcc-byte-count (1- (point-max)))) - (and erc-verbose-dcc + (when (> (point-max) erc-dcc-receive-cache) + (erc-dcc-append-contents (current-buffer) erc-dcc-file-name)) + + (and erc-dcc-verbose (erc-display-message nil 'notice erc-server-process 'dcc-get-bytes-received @@ -885,7 +933,7 @@ (delete-process proc)) (t (process-send-string - proc (erc-pack-int erc-dcc-byte-count 4))))))) + proc (erc-pack-int erc-dcc-byte-count))))))) (defun erc-dcc-get-sentinel (proc event) @@ -895,17 +943,18 @@ ;; FIXME, we should look at EVENT, and also check size. (with-current-buffer (process-buffer proc) (delete-process proc) - (setq buffer-read-only nil) (setq erc-dcc-list (delete erc-dcc-entry-data erc-dcc-list)) + (unless (= (point-min) (point-max)) + (setq erc-dcc-byte-count (+ (buffer-size) erc-dcc-byte-count)) + (erc-dcc-append-contents (current-buffer) erc-dcc-file-name)) (erc-display-message nil 'notice erc-server-process 'dcc-get-complete - ?f (file-name-nondirectory buffer-file-name) - ?s (number-to-string (buffer-size)) + ?f erc-dcc-file-name + ?s (number-to-string erc-dcc-byte-count) ?t (format "%.0f" (erc-time-diff (plist-get erc-dcc-entry-data :start-time) - (erc-current-time)))) - (save-buffer)) + (erc-current-time))))) (kill-buffer (process-buffer proc)) (delete-process proc)) @@ -1126,8 +1175,6 @@ (if (processp peer) (delete-process peer))) nil)) -(add-hook 'erc-server-401-functions 'erc-dcc-no-such-nick) - (provide 'erc-dcc) ;;; erc-dcc.el ends here
--- a/lisp/erc/erc-goodies.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-goodies.el Fri Jan 25 03:28:10 2008 +0000 @@ -33,10 +33,14 @@ (require 'erc) -;; Imenu Autoload -(add-hook 'erc-mode-hook - (lambda () - (setq imenu-create-index-function 'erc-create-imenu-index))) +;;; Imenu support + +(defun erc-imenu-setup () + "Setup Imenu support in an ERC buffer." + (set (make-local-variable 'imenu-create-index-function) + 'erc-create-imenu-index)) + +(add-hook 'erc-mode-hook 'erc-imenu-setup) (autoload 'erc-create-imenu-index "erc-imenu" "Imenu index creation function") ;;; Automatically scroll to bottom @@ -51,11 +55,15 @@ :type '(choice integer (const nil))) (define-erc-module scrolltobottom nil - "This mode causes the prompt to stay at the end of the window. -You have to activate or deactivate it in already created windows -separately." - ((add-hook 'erc-mode-hook 'erc-add-scroll-to-bottom)) - ((remove-hook 'erc-mode-hook 'erc-add-scroll-to-bottom))) + "This mode causes the prompt to stay at the end of the window." + ((add-hook 'erc-mode-hook 'erc-add-scroll-to-bottom) + (dolist (buffer (erc-buffer-list)) + (with-current-buffer buffer + (erc-add-scroll-to-bottom)))) + ((remove-hook 'erc-mode-hook 'erc-add-scroll-to-bottom) + (dolist (buffer (erc-buffer-list)) + (with-current-buffer buffer + (remove-hook 'window-scroll-functions 'erc-scroll-to-bottom t))))) (defun erc-add-scroll-to-bottom () "A hook function for `erc-mode-hook' to recenter output at bottom of window. @@ -110,7 +118,46 @@ (put-text-property (point-min) (point-max) 'front-sticky t) (put-text-property (point-min) (point-max) 'rear-nonsticky t)) -;; Distinguish non-commands +;;; Move to prompt when typing text +(define-erc-module move-to-prompt nil + "This mode causes the point to be moved to the prompt when typing text." + ((add-hook 'erc-mode-hook 'erc-move-to-prompt-setup) + (dolist (buffer (erc-buffer-list)) + (with-current-buffer buffer + (erc-move-to-prompt-setup)))) + ((remove-hook 'erc-mode-hook 'erc-move-to-prompt-setup) + (dolist (buffer (erc-buffer-list)) + (with-current-buffer buffer + (remove-hook 'pre-command-hook 'erc-move-to-prompt t))))) + +(defun erc-move-to-prompt () + "Move the point to the ERC prompt if this is a self-inserting command." + (when (and erc-input-marker (< (point) erc-input-marker) + (eq 'self-insert-command this-command)) + (deactivate-mark) + (push-mark) + (goto-char (point-max)))) + +(defun erc-move-to-prompt-setup () + "Initialize the move-to-prompt module for XEmacs." + (add-hook 'pre-command-hook 'erc-move-to-prompt nil t)) + +;;; Keep place in unvisited channels +(define-erc-module keep-place nil + "Leave point above un-viewed text in other channels." + ((add-hook 'erc-insert-pre-hook 'erc-keep-place)) + ((remove-hook 'erc-insert-pre-hook 'erc-keep-place))) + +(defun erc-keep-place (ignored) + "Move point away from the last line in a non-selected ERC buffer." + (when (and (not (eq (window-buffer (selected-window)) + (current-buffer))) + (>= (point) erc-insert-marker)) + (deactivate-mark) + (goto-char (erc-beg-of-input-line)) + (forward-line -1))) + +;;; Distinguish non-commands (defvar erc-noncommands-list '(erc-cmd-ME erc-cmd-COUNTRY erc-cmd-SV @@ -496,8 +543,19 @@ See also `unmorse-region'." (goto-char (point-min)) - (when (re-search-forward "[.-]+\\([.-]+[/ ]\\)+[.-]+" nil t) - (unmorse-region (match-beginning 0) (match-end 0)))) + (when (re-search-forward "[.-]+\\([.-]*/? *\\)+[.-]+/?" nil t) + (save-restriction + (narrow-to-region (match-beginning 0) (match-end 0)) + ;; Turn " / " into " " + (goto-char (point-min)) + (while (re-search-forward " / " nil t) + (replace-match " ")) + ;; Turn "/ " into "/" + (goto-char (point-min)) + (while (re-search-forward "/ " nil t) + (replace-match "/")) + ;; Unmorse region + (unmorse-region (point-min) (point-max))))) ;;; erc-occur (defun erc-occur (string &optional proc)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-list.el Fri Jan 25 03:28:10 2008 +0000 @@ -0,0 +1,227 @@ +;;; erc-list.el --- /list support for ERC + +;; Copyright (C) 2008 Free Software Foundation, Inc. + +;; Author: Tom Tromey <tromey@redhat.com> +;; Version: 0.1 +;; Keywords: comm + +;; This file is part of ERC. + +;; ERC 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 3, or (at your option) +;; any later version. + +;; ERC 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 ERC; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides nice support for /list in ERC. + +;;; Code: + +(require 'erc) + +;; This is implicitly the width of the channel name column. Pick +;; something small enough that the topic has a chance of being +;; readable, but long enough that most channel names won't make for +;; strange formatting. +(defconst erc-list-nusers-column 25) + +;; Width of the number-of-users column. +(defconst erc-list-topic-column (+ erc-list-nusers-column 10)) + +;; The list buffer. This is buffer local in the server buffer. +(defvar erc-list-buffer nil) + +;; The argument to the last "/list". This is buffer local in the +;; server buffer. +(defvar erc-list-last-argument nil) + +;; The server buffer corresponding to the list buffer. This is buffer +;; local in the list buffer. +(defvar erc-list-server-buffer nil) + +;; Define module: +;;;###autoload (autoload 'erc-list-mode "erc-list") +(define-erc-module list nil + "List channels nicely in a separate buffer." + ((remove-hook 'erc-server-321-functions 'erc-server-321-message) + (remove-hook 'erc-server-322-functions 'erc-server-322-message)) + ((erc-with-all-buffers-of-server nil + #'erc-open-server-buffer-p + (remove-hook 'erc-server-322-functions 'erc-list-handle-322 t)) + (add-hook 'erc-server-321-functions 'erc-server-321-message t) + (add-hook 'erc-server-322-functions 'erc-server-322-message t))) + +;; Format a record for display. +(defun erc-list-make-string (channel users topic) + (concat + channel + (erc-propertize " " + 'display (list 'space :align-to erc-list-nusers-column) + 'face 'fixed-pitch) + users + (erc-propertize " " + 'display (list 'space :align-to erc-list-topic-column) + 'face 'fixed-pitch) + topic)) + +;; Insert a record into the list buffer. +(defun erc-list-insert-item (channel users topic) + (save-excursion + (let ((buffer-read-only nil)) + (goto-char (point-max)) + (insert (erc-list-make-string channel users topic) "\n")))) + +(defun erc-list-join () + "Join the irc channel named on this line." + (interactive) + (unless (eobp) + (beginning-of-line) + (unless (looking-at "\\([&#+!][^ \n]+\\)") + (error "Not looking at channel name?")) + (let ((chan (match-string 1))) + (with-current-buffer erc-list-server-buffer + (erc-join-channel chan))))) + +(defun erc-list-kill () + "Kill the current ERC list buffer." + (interactive) + (kill-buffer (current-buffer))) + +(defun erc-list-revert () + "Refresh the list of channels." + (interactive) + (with-current-buffer erc-list-server-buffer + (erc-cmd-LIST erc-list-last-argument))) + +(defun erc-list-menu-sort-by-column (&optional e) + "Sort the channel list by the column clicked on." + (interactive (list last-input-event)) + (if e (mouse-select-window e)) + (let* ((pos (event-start e)) + (obj (posn-object pos)) + (col (if obj + (get-text-property (cdr obj) 'column-number (car obj)) + (get-text-property (posn-point pos) 'column-number)))) + (let ((buffer-read-only nil)) + (if (= col 1) + (sort-fields col (point-min) (point-max)) + (sort-numeric-fields col (point-min) (point-max)))))) + +(defvar erc-list-menu-mode-map nil + "Local keymap for `erc-list-mode' buffers.") + +(unless erc-list-menu-mode-map + (setq erc-list-menu-mode-map (make-keymap)) + (suppress-keymap erc-list-menu-mode-map) + (define-key erc-list-menu-mode-map "k" 'erc-list-kill) + (define-key erc-list-menu-mode-map "j" 'erc-list-join) + (define-key erc-list-menu-mode-map "g" 'erc-list-revert) + (define-key erc-list-menu-mode-map "n" 'next-line) + (define-key erc-list-menu-mode-map "p" 'previous-line) + (define-key erc-list-menu-mode-map "q" 'quit-window)) + +(defvar erc-list-menu-sort-button-map nil + "Local keymap for ERC list menu mode sorting buttons.") + +(unless erc-list-menu-sort-button-map + (let ((map (make-sparse-keymap))) + (define-key map [header-line mouse-1] 'erc-list-menu-sort-by-column) + (define-key map [follow-link] 'mouse-face) + (setq erc-list-menu-sort-button-map map))) + +;; Helper function that makes a buttonized column header. +(defun erc-list-button (title column) + (erc-propertize title + 'column-number column + 'help-echo "mouse-1: sort by column" + 'mouse-face 'highlight + 'keymap erc-list-menu-sort-button-map)) + +(define-derived-mode erc-list-menu-mode nil "ERC-List" + "Major mode for editing a list of irc channels." + (setq header-line-format + (concat + (erc-propertize " " + 'display '(space :align-to 0) + 'face 'fixed-pitch) + (erc-list-make-string (erc-list-button "Channel" 1) + (erc-list-button "# Users" 2) + "Topic"))) + (setq truncate-lines t)) + +(put 'erc-list-menu-mode 'mode-class 'special) + +;; Handle a "322" response. This response tells us about a single +;; channel. +(defun erc-list-handle-322 (proc parsed) + (let* ((args (cdr (erc-response.command-args parsed))) + (channel (car args)) + (nusers (car (cdr args))) + (topic (erc-response.contents parsed))) + (when (buffer-live-p erc-list-buffer) + (with-current-buffer erc-list-buffer + (erc-list-insert-item channel nusers topic)))) + ;; Don't let another hook run. + t) + +;; Helper function to install our 322 handler and make our buffer. +(defun erc-list-install-322-handler (server-buffer) + (with-current-buffer server-buffer + ;; Arrange for 322 responses to insert into our buffer. + (add-hook 'erc-server-322-functions 'erc-list-handle-322 t t) + ;; Arrange for 323 (end of list) to end this. + (erc-once-with-server-event + 323 + '(progn + (remove-hook 'erc-server-322-functions 'erc-list-handle-322 t))) + ;; Find the list buffer, empty it, and display it. + (set (make-local-variable 'erc-list-buffer) + (get-buffer-create (concat "*Channels of " + erc-server-announced-name + "*"))) + (with-current-buffer erc-list-buffer + (erc-list-menu-mode) + (setq buffer-read-only nil) + (erase-buffer) + (set (make-local-variable 'erc-list-server-buffer) server-buffer) + (setq buffer-read-only t)) + (pop-to-buffer erc-list-buffer)) + t) + +;; The main entry point. +(defun erc-cmd-LIST (&optional line) + "Show a listing of channels on the current server in a separate window. + +If LINE is specified, include it with the /LIST command. It +should usually be one or more channels, separated by commas. + +Please note that this function only works with IRC servers which conform +to RFC and send the LIST header (#321) at start of list transmission." + (erc-with-server-buffer + (set (make-local-variable 'erc-list-last-argument) line) + (erc-once-with-server-event + 321 + (list 'progn + (list 'erc-list-install-322-handler (current-buffer))))) + (erc-server-send (concat "LIST :" (or (and line (substring line 1)) + "")))) +(put 'erc-cmd-LIST 'do-not-parse-args t) + +;;; erc-list.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End:
--- a/lisp/erc/erc-networks.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-networks.el Fri Jan 25 03:28:10 2008 +0000 @@ -28,9 +28,7 @@ ;; ;; Usage: ;; -;; Put into your .emacs: -;; -;; (require 'erc-networks) +;; This is the "networks" module. ;; ;; M-x erc-server-select provides an alternative way to connect to servers by ;; choosing networks. @@ -351,6 +349,7 @@ ("Relicnet: Random server" Relicnet "irc.relic.net" 6667) ("Rezosup: Random server" Rezosup "irc.rezosup.org" 6667) ("Risanet: Random server" Risanet "irc.risanet.com" ((6667 6669))) + ("Rizon: Random server" Rizon "irc.rizon.net" (6633 (6660 6669) 6697 7000 8080 9999)) ("Rubiks: Random server" Rubiks "irc.rubiks.net" 6667) ("Rusnet: EU, RU, Tomsk" Rusnet "irc.tsk.ru" ((6667 6669) (7770 7775) )) ("Rusnet: EU, RU, Vladivostok" Rusnet "irc.vladivostok.ru" ((6667 6669) (7770 7775) )) @@ -765,9 +764,14 @@ (setq erc-network nil) nil) -(add-hook 'erc-server-375-functions 'erc-set-network-name) -(add-hook 'erc-server-422-functions 'erc-set-network-name) -(add-hook 'erc-disconnected-hook 'erc-unset-network-name) +(define-erc-module networks nil + "Provide data about IRC networks." + ((add-hook 'erc-server-375-functions 'erc-set-network-name) + (add-hook 'erc-server-422-functions 'erc-set-network-name) + (add-hook 'erc-disconnected-hook 'erc-unset-network-name)) + ((remove-hook 'erc-server-375-functions 'erc-set-network-name) + (remove-hook 'erc-server-422-functions 'erc-set-network-name) + (remove-hook 'erc-disconnected-hook 'erc-unset-network-name))) (defun erc-ports-list (ports) "Return a list of PORTS.
--- a/lisp/erc/erc-page.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-page.el Fri Jan 25 03:28:10 2008 +0000 @@ -104,5 +104,11 @@ (provide 'erc-page) +;;; erc-page.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + ;; arch-tag: 82fd2e0e-6060-4dd2-9788-8c1411e844de -;;; erc-page.el ends here
--- a/lisp/erc/erc-replace.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-replace.el Fri Jan 25 03:28:10 2008 +0000 @@ -1,6 +1,7 @@ ;; erc-replace.el -- wash and massage messages inserted into the buffer -;; Copyright (C) 2001, 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 2001, 2002, 2004, 2006, 2007, +;; 2008 Free Software Foundation, Inc. ;; Author: Andreas Fuchs <asf@void.at> ;; Maintainer: Mario Lang (mlang@delysid.org) @@ -88,5 +89,11 @@ (provide 'erc-replace) +;;; erc-replace.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + ;; arch-tag: dd904a59-d8a6-47f8-ac3a-76b698289a18 -;;; erc-replace.el ends here
--- a/lisp/erc/erc-services.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-services.el Fri Jan 25 03:28:10 2008 +0000 @@ -123,6 +123,10 @@ '(("autodetect") ("nick-change") ("both")) nil t)))) (add-hook 'erc-server-NOTICE-functions 'erc-nickserv-identification-autodetect) + (unless erc-networks-mode + ;; Force-enable networks module, because we need it to set + ;; erc-network for us. + (erc-networks-enable)) (cond ((eq mode 'autodetect) (setq erc-nickserv-identify-mode 'autodetect) (add-hook 'erc-server-NOTICE-functions @@ -187,6 +191,7 @@ (const iip) (const OFTC) (const QuakeNet) + (const Rizon) (const SlashNET) (symbol :tag "Network name")) (repeat :tag "Nickname and password" @@ -256,6 +261,12 @@ "NickServ" "IDENTIFY" nil nil "You\\s-are\\s-successfully\\s-identified\\s-as\\s-") + (Rizon + "NickServ!service@rizon.net" + "This\\s-nickname\\s-is\\s-registered\\s-and\\s-protected." + "NickServ" + "IDENTIFY" nil nil + "Password\\s-accepted\\s--\\s-you\\s-are\\s-now\\s-recognized.") (QuakeNet nil nil "Q@CServe.quakenet.org"
--- a/lisp/erc/erc-track.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-track.el Fri Jan 25 03:28:10 2008 +0000 @@ -101,9 +101,13 @@ :group 'erc-track :type 'boolean) -(defcustom erc-track-exclude-types '("NICK") +(defcustom erc-track-exclude-types '("NICK" "333" "353") "*List of message types to be ignored. -This list could look like '(\"JOIN\" \"PART\")." +This list could look like '(\"JOIN\" \"PART\"). + +By default, exclude changes of nicknames (NICK), display of who +set the channel topic (333), and listing of users on the current +channel (353)." :group 'erc-track :type 'erc-message-type) @@ -175,15 +179,32 @@ :type 'boolean) (defcustom erc-track-faces-priority-list - '(erc-error-face erc-current-nick-face erc-keyword-face erc-pal-face - erc-nick-msg-face erc-direct-msg-face erc-button erc-dangerous-host-face - erc-default-face erc-action-face erc-nick-default-face erc-fool-face - erc-notice-face erc-input-face erc-prompt-face) + '(erc-error-face + (erc-nick-default-face erc-current-nick-face) + erc-current-nick-face + erc-keyword-face + (erc-nick-default-face erc-pal-face) + erc-pal-face + erc-nick-msg-face + erc-direct-msg-face + (erc-button erc-default-face) + (erc-nick-default-face erc-dangerous-host-face) + erc-dangerous-host-face + erc-nick-default-face + (erc-nick-default-face erc-default-face) + erc-default-face + erc-action-face + (erc-nick-default-face erc-fool-face) + erc-fool-face + erc-notice-face + erc-input-face + erc-prompt-face) "A list of faces used to highlight active buffer names in the modeline. If a message contains one of the faces in this list, the buffer name will be highlighted using that face. The first matching face is used." :group 'erc-track - :type '(repeat face)) + :type '(repeat (choice face + (repeat :tag "Combination" face)))) (defcustom erc-track-priority-faces-only nil "Only track text highlighted with a priority face. @@ -193,6 +214,7 @@ will be ignored while all other channels will be tracked as normal. Other options are 'all, to apply this to all channels or nil, to disable this feature. + Note: If you have a lot of faces listed in `erc-track-faces-priority-list', setting this variable might not be very useful." :group 'erc-track @@ -200,17 +222,38 @@ (repeat string) (const all))) +(defcustom erc-track-faces-normal-list + '((erc-button erc-default-face) + (erc-nick-default-face erc-dangerous-host-face) + erc-dangerous-host-face + erc-nick-default-face + (erc-nick-default-face erc-default-face) + erc-default-face + erc-action-face) + "A list of faces considered to be part of normal conversations. +This list is used to highlight active buffer names in the modeline. + +If a message contains one of the faces in this list, and the +previous modeline face for this buffer is also in this list, then +the buffer name will be highlighted using the face from the +message. This gives a rough indication that active conversations +are occurring in these channels. + +The effect may be disabled by setting this variable to nil." + :group 'erc-track + :type '(repeat (choice face + (repeat :tag "Combination" face)))) + (defcustom erc-track-position-in-mode-line 'before-modes "Where to show modified channel information in the mode-line. Setting this variable only has effects in GNU Emacs versions above 21.3. Choices are: -'before-modes - add to the beginning of `mode-line-modes' -'after-modes - add to the end of `mode-line-modes' -t - add to the end of `global-mode-string'. -nil - don't add to mode line -" +'before-modes - add to the beginning of `mode-line-modes', +'after-modes - add to the end of `mode-line-modes', +t - add to the end of `global-mode-string', +nil - don't add to mode line." :group 'erc-track :type '(choice (const :tag "Just before mode information" before-modes) (const :tag "Just after mode information" after-modes) @@ -443,7 +486,7 @@ ;;; Test: -(erc-assert +(assert (and ;; verify examples from the doc strings (equal (let ((erc-track-shorten-aggressively nil)) @@ -560,13 +603,15 @@ :global t :group 'erc-track) -(defun erc-track-minor-mode-maybe () +(defun erc-track-minor-mode-maybe (&optional buffer) "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))) + (when (and (not 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 + (or (and (buffer-live-p buffer) + (with-current-buffer buffer (eq major-mode 'erc-mode))) + (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-@")))) @@ -616,6 +661,7 @@ (add-hook 'erc-insert-post-hook 'erc-track-modified-channels) (add-hook 'erc-disconnected-hook 'erc-modified-channels-update)) ;; enable the tracking keybindings + (add-hook 'erc-connect-pre-hook 'erc-track-minor-mode-maybe) (erc-track-minor-mode-maybe))) ;; Disable: ((when (boundp 'erc-track-when-inactive) @@ -637,6 +683,7 @@ (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update) (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels)) ;; disable the tracking keybindings + (remove-hook 'erc-connect-pre-hook 'erc-track-minor-mode-maybe) (when erc-track-minor-mode (erc-track-minor-mode -1))))) @@ -821,15 +868,36 @@ (defun erc-track-find-face (faces) "Return the face to use in the modeline from the faces in FACES. If `erc-track-faces-priority-list' is set, the one from FACES who is -first in that list will be used." - (let ((candidates erc-track-faces-priority-list) - candidate face) - (while (and candidates (not face)) - (setq candidate (car candidates) - candidates (cdr candidates)) - (when (memq candidate faces) - (setq face candidate))) - face)) +first in that list will be used. + +If `erc-track-faces-normal-list' is non-nil, use it to produce a +blinking effect that indicates channel activity when the first +element in FACES and the highest-ranking face among the rest of +FACES are both members of `erc-track-faces-normal-list'. + +If `erc-track-faces-priority-list' is not set, the first element +in FACES will be used. + +If one of the faces is a list, then it will be ranked according +to its highest-tanking face member. A list of faces including +that member will take priority over just the single member +element." + (let ((choice (catch 'face + (dolist (candidate erc-track-faces-priority-list) + (when (member candidate faces) + (throw 'face candidate))))) + (no-first (and erc-track-faces-normal-list + (catch 'face + (dolist (candidate erc-track-faces-priority-list) + (when (member candidate (cdr faces)) + (throw 'face candidate))))))) + (cond ((null choice) + (car faces)) + ((and (member choice erc-track-faces-normal-list) + (member no-first erc-track-faces-normal-list)) + no-first) + (t + choice)))) (defun erc-track-modified-channels () "Hook function for `erc-insert-post-hook' to check if the current @@ -898,14 +966,15 @@ "Return a list of all faces used in STR." (let ((i 0) (m (length str)) - (faces (erc-list (get-text-property 0 'face str)))) + (faces (erc-list (get-text-property 0 'face str))) + cur) (while (and (setq i (next-single-property-change i 'face str m)) (not (= i m))) - (dolist (face (erc-list (get-text-property i 'face str))) - (add-to-list 'faces face))) + (when (setq cur (get-text-property i 'face str)) + (add-to-list 'faces cur))) faces)) -(erc-assert +(assert (let ((str "is bold")) (put-text-property 3 (length str) 'face '(bold erc-current-nick-face) @@ -935,7 +1004,7 @@ (let ((count 0)) (catch 'done (dolist (item erc-track-faces-priority-list) - (if (eq item face) + (if (equal item face) (throw 'done t) (setq count (1+ count))))) count))
--- a/lisp/erc/erc-xdcc.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc-xdcc.el Fri Jan 25 03:28:10 2008 +0000 @@ -62,6 +62,11 @@ :group 'erc-dcc :type '(repeat (repeat :tag "Message" (choice string sexp)))) +;;;###autoload (autoload 'erc-xdcc-mode "erc-xdcc") +(define-erc-module xdcc nil + "Act as an XDCC file-server." + nil nil) + ;;;###autoload (defun erc-xdcc-add-file (file) "Add a file to `erc-xdcc-files'." @@ -126,5 +131,11 @@ (provide 'erc-xdcc) +;;; erc-xdcc.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + ;; arch-tag: a13b62fe-2399-4562-af4e-f18a8dd4b9c8 -;;; erc-xdcc.el ends here
--- a/lisp/erc/erc.el Fri Jan 25 02:46:19 2008 +0000 +++ b/lisp/erc/erc.el Fri Jan 25 03:28:10 2008 +0000 @@ -66,7 +66,7 @@ ;;; Code: -(defconst erc-version-string "Version 5.3 (devel)" +(defconst erc-version-string "Version 5.3 (RC 1)" "ERC version. This is used by function `erc-version'.") (eval-when-compile (require 'cl)) @@ -1167,7 +1167,12 @@ See the variable `erc-command-indicator'." :group 'erc-faces) -(defface erc-notice-face '((t (:bold t :foreground "SlateBlue"))) +(defface erc-notice-face + (if (featurep 'xemacs) + '((t (:bold t :foreground "blue"))) + '((((class color) (min-colors 88)) + (:bold t :foreground "SlateBlue")) + (t (:bold t :foreground "blue")))) "ERC face for notices." :group 'erc-faces) @@ -1465,18 +1470,23 @@ "IRC port to use if it cannot be detected otherwise.") (defcustom erc-join-buffer 'buffer - "Determines how to display the newly created IRC buffer. -'window - in another window, -'window-noselect - in another window, but don't select that one, -'frame - in another frame, -'bury - bury it in a new buffer, -any other value - in place of the current buffer." + "Determines how to display a newly created IRC buffer. + +The available choices are: + + 'window - in another window, + 'window-noselect - in another window, but don't select that one, + 'frame - in another frame, + 'bury - bury it in a new buffer, + 'buffer - in place of the current buffer, + any other value - in place of the current buffer." :group 'erc-buffers - :type '(choice (const window) - (const window-noselect) - (const frame) - (const bury) - (const buffer))) + :type '(choice (const :tag "Split window and select" window) + (const :tag "Split window, don't select" window-noselect) + (const :tag "New frame" frame) + (const :tag "Bury in new buffer" bury) + (const :tag "Use current buffer" buffer) + (const :tag "Use current buffer" t))) (defcustom erc-frame-alist nil "*Alist of frame parameters for creating erc frames. @@ -1804,8 +1814,8 @@ mods)))) (defcustom erc-modules '(netsplit fill button match track completion readonly - ring autojoin noncommands irccontrols - stamp menu) + networks ring autojoin noncommands irccontrols + move-to-prompt stamp menu list) "A list of modules which ERC should enable. If you set the value of this without using `customize' remember to call \(erc-update-modules) after you change it. When using `customize', modules @@ -1837,14 +1847,20 @@ (const :tag "completion: Complete nicknames and commands (programmable)" completion) (const :tag "hecomplete: Complete nicknames and commands (old)" hecomplete) + (const :tag "dcc: Provide Direct Client-to-Client support" dcc) (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 "keep-place: Leave point above un-viewed text" keep-place) + (const :tag "list: List channels in a separate buffer" list) (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 "move-to-prompt: Move to the prompt when typing text" + move-to-prompt) (const :tag "netsplit: Detect netsplits" netsplit) + (const :tag "networks: Provide data about IRC networks" networks) (const :tag "noncommands: Don't display non-IRC commands after evaluation" noncommands) (const :tag @@ -1866,6 +1882,7 @@ (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) + (const :tag "xdcc: Act as an XDCC file-server" xdcc) (repeat :tag "Others" :inline t symbol)) :group 'erc) @@ -2324,6 +2341,15 @@ I.e. any char in it has the `invisible' property set." (text-property-any 0 (length string) 'invisible t string)) +(defcustom erc-remove-parsed-property t + "Whether to remove the erc-parsed text property after displaying a message. + +The default is to remove it, since it causes ERC to take up extra +memory. If you have code that relies on this property, then set +this option to nil." + :type 'boolean + :group 'erc) + (defun erc-display-line-1 (string buffer) "Display STRING in `erc-mode' BUFFER. Auxiliary function used in `erc-display-line'. The line gets filtered to @@ -2364,7 +2390,10 @@ (save-restriction (narrow-to-region insert-position (point)) (run-hooks 'erc-insert-modify-hook) - (run-hooks 'erc-insert-post-hook)))))) + (run-hooks 'erc-insert-post-hook) + (when erc-remove-parsed-property + (remove-text-properties (point-min) (point-max) + '(erc-parsed nil)))))))) (erc-update-undo-list (- (or (marker-position erc-insert-marker) (point-max)) insert-position)))))) @@ -3161,14 +3190,35 @@ (t nil))) (put 'erc-cmd-QUOTE 'do-not-parse-args t) +(defcustom erc-query-display 'window + "Indicates how to display query buffers when using the /QUERY +command to talk to someone. + +The default behavior is to display the message in a new window +and bring it to the front. See the documentation for +`erc-join-buffer' for a description of the available choices. + +See also `erc-auto-query' to decide how private messages from +other people should be displayed." + :group 'erc-query + :type '(choice (const :tag "Split window and select" window) + (const :tag "Split window, don't select" window-noselect) + (const :tag "New frame" frame) + (const :tag "Bury in new buffer" bury) + (const :tag "Use current buffer" buffer) + (const :tag "Use current buffer" t))) + (defun erc-cmd-QUERY (&optional user) "Open a query with USER. The type of query window/frame/etc will depend on the value of -`erc-join-buffer'. If USER is omitted, close the current query buffer if one -exists - except this is broken now ;-)" +`erc-query-display'. + +If USER is omitted, close the current query buffer if one exists +- except this is broken now ;-)" (interactive (list (read-from-minibuffer "Start a query with: " nil))) - (let ((session-buffer (erc-server-buffer))) + (let ((session-buffer (erc-server-buffer)) + (erc-join-buffer erc-query-display)) (if user (erc-query user session-buffer) ;; currently broken, evil hack to display help anyway @@ -3707,8 +3757,9 @@ (read-from-minibuffer (concat "Set topic of " (erc-default-target) ": ") (when erc-channel-topic - (cons (apply 'concat (butlast (split-string erc-channel-topic "\C-o"))) - 0))))) + (let ((ss (split-string erc-channel-topic "\C-o"))) + (cons (apply 'concat (if (cdr ss) (butlast ss) ss)) + 0)))))) (let ((topic-list (split-string topic "\C-o"))) ; strip off the topic setter (erc-cmd-TOPIC (concat (erc-default-target) " " (car topic-list))))) @@ -3841,20 +3892,22 @@ (erc-update-mode-line) buf)) -(defcustom erc-auto-query 'bury +(defcustom erc-auto-query 'window-noselect "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 -set to a symbol, to control how the new query window should -appear. See the documentation for `erc-join-buffer' for -available choices." +If the buffer doesn't already exist, it is created. + +This can be set to a symbol, to control how the new query window +should appear. The default behavior is to display the buffer in +a new window, but not to select it. See the documentation for +`erc-join-buffer' for a description of the available choices." :group 'erc-query - :type '(choice (const nil) - (const buffer) - (const window) - (const window-noselect) - (const bury) - (const frame))) + :type '(choice (const :tag "Don't create query window" nil) + (const :tag "Split window and select" window) + (const :tag "Split window, don't select" window-noselect) + (const :tag "New frame" frame) + (const :tag "Bury in new buffer" bury) + (const :tag "Use current buffer" buffer) + (const :tag "Use current buffer" t))) (defcustom erc-query-on-unjoined-chan-privmsg t "If non-nil create query buffer on receiving any PRIVMSG at all. @@ -5822,7 +5875,7 @@ ;; Mode line handling -(defcustom erc-mode-line-format "%s %a" +(defcustom erc-mode-line-format "%S %a" "A string to be formatted and shown in the mode-line in `erc-mode'. The string is formatted using `format-spec' and the result is set as the value @@ -5833,12 +5886,16 @@ %l: The estimated lag time to the server %m: The modes of the channel %n: The current nick name +%N: The name of the network %o: The topic of the channel %p: The session port %t: The name of the target (channel, nickname, or servername:port) %s: In the server-buffer, this gets filled with the value of `erc-server-announced-name', in a channel, the value of - (erc-default-target) also get concatenated." + (erc-default-target) also get concatenated. +%S: In the server-buffer, this gets filled with the value of + `erc-network', in a channel, the value of (erc-default-target) + also get concatenated." :group 'erc-mode-line-and-header :type 'string) @@ -5932,6 +5989,29 @@ (server-name server-name) (t (buffer-name (current-buffer)))))) +(defun erc-format-network () + "Return the name of the network we are currently on." + (let ((network (and (fboundp 'erc-network-name) (erc-network-name)))) + (if (and network (symbolp network)) + (symbol-name network) + ""))) + +(defun erc-format-target-and/or-network () + "Return the network or the current target and network combined. +If the name of the network is not available, then use the +shortened server name instead." + (let ((network-name (or (and (fboundp 'erc-network-name) (erc-network-name)) + (erc-shorten-server-name + (or erc-server-announced-name + erc-session-server))))) + (when (and network-name (symbolp network-name)) + (setq network-name (symbol-name network-name))) + (cond ((erc-default-target) + (concat (erc-string-no-properties (erc-default-target)) + "@" network-name)) + (network-name network-name) + (t (buffer-name (current-buffer)))))) + (defun erc-format-away-status () "Return a formatted `erc-mode-line-away-status-format' if `erc-away' is non-nil." @@ -5975,9 +6055,11 @@ ?l (erc-format-lag-time) ?m (erc-format-channel-modes) ?n (or (erc-current-nick) "") + ?N (erc-format-network) ?o (erc-controls-strip erc-channel-topic) ?p (erc-port-to-string erc-session-port) ?s (erc-format-target-and/or-server) + ?S (erc-format-target-and/or-network) ?t (erc-format-target))) (process-status (cond ((and (erc-server-process-alive) (not erc-server-connected))