# HG changeset patch # User Karoly Lorentey # Date 1138644382 0 # Node ID 9b150bc96d33b1c78db475225134066bc2ec0855 # Parent dbd791ef90a1d99134f0fda2bfe42fdad62cff7e# Parent fdd35a71542e2c6e843a676b6ce804d78280a482 Merged from miles@gnu.org--gnu-2005 (patch 187, 704) Patches applied: * emacs@sv.gnu.org/emacs--devo--0--base-0 tag of miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704 * emacs@sv.gnu.org/emacs--devo--0--patch-1 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-2 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-3 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-4 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-5 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-6 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-7 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-8 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-9 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-10 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-11 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-12 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-13 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-14 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-15 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-16 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-17 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-18 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-19 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-20 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-21 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-22 Install ERC. * emacs@sv.gnu.org/emacs--devo--0--patch-23 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-24 Fix ERC compiler warnings. * emacs@sv.gnu.org/emacs--devo--0--patch-25 Use utf-8 encoding in ERC ChangeLogs. * emacs@sv.gnu.org/emacs--devo--0--patch-26 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-27 Merge ERC-related Viper hacks into Viper. * emacs@sv.gnu.org/emacs--devo--0--patch-28 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-29 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-30 Merge from erc--main--0 * emacs@sv.gnu.org/gnus--rel--5.10--base-0 tag of miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187 * emacs@sv.gnu.org/gnus--rel--5.10--patch-1 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-2 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-3 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-4 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-5 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-6 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-7 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-704 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-187 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-501 diff -r dbd791ef90a1 -r 9b150bc96d33 ChangeLog --- a/ChangeLog Sun Jan 29 00:17:11 2006 +0000 +++ b/ChangeLog Mon Jan 30 18:06:22 2006 +0000 @@ -1,3 +1,21 @@ +2006-01-29 Michael Olson + + * Makefile.in (install-arch-indep, uninstall): Add ERC. + * info/dir (ERC): New entry. + +2006-01-29 Eli Zaretskii + + * info/dir: Fix last change. + +2006-01-28 Luc Teirlinck + + * Makefile.in (install-arch-indep, uninstall): Add rcirc. + +2006-01-27 Eli Zaretskii + + * info/dir: Untabify the whole file. + (Rcirc): New entry. + 2006-01-12 Andreas Schwab * configure.in: Move AC_AIX and AC_GNU_SOURCE before first compile diff -r dbd791ef90a1 -r 9b150bc96d33 Makefile.in --- a/Makefile.in Sun Jan 29 00:17:11 2006 +0000 +++ b/Makefile.in Mon Jan 30 18:06:22 2006 +0000 @@ -497,7 +497,7 @@ chmod a+r ${infodir}/dir); \ fi; \ cd ${srcdir}/info ; \ - for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url*; do \ + for f in ada-mode* autotype* calc* ccmode* cl* dired-x* ebrowse* ediff* efaq* eintr* elisp* emacs* emacs-mime* emacs-xtra* eshell* eudc* flymake* forms* gnus* idlwave* info* message* mh-e* newsticker* org* pcl-cvs* pgg* reftex* sc* ses* sieve* speedbar* tramp* vip* widget* woman* smtpmail* url* rcirc* erc*; do \ (cd $${thisdir}; \ ${INSTALL_DATA} ${srcdir}/info/$$f ${infodir}/$$f; \ chmod a+r ${infodir}/$$f); \ @@ -507,7 +507,7 @@ thisdir=`/bin/pwd`; \ if [ `(cd ${srcdir}/info && /bin/pwd)` != `(cd ${infodir} && /bin/pwd)` ]; \ then \ - for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url; do \ + for f in ada-mode autotype calc ccmode cl dired-x ebrowse ediff efaq elisp eintr emacs emacs-mime emacs-xtra eshell eudc flymake forms gnus idlwave info message mh-e newsticker org pcl-cvs pgg reftex sc ses sieve speedbar tramp vip viper widget woman smtpmail url rcirc erc; do \ (cd $${thisdir}; \ ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/$$f); \ done; \ @@ -573,7 +573,7 @@ done (cd ${archlibdir} && rm -f fns-*) -rm -rf ${libexecdir}/emacs/${version} - (cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url*) + (cd ${infodir} && rm -f cl* ada-mode* autotype* calc* ccmode* ebrowse* efaq* eintr elisp* eshell* eudc* idlwave* message* pcl-cvs* reftex* speedbar* tramp* widget* woman* dired-x* ediff* emacs* emacs-xtra* flymake* forms* gnus* info* mh-e* newsticker* org* sc* ses* vip* smtpmail* url* rcirc* erc*) (cd ${man1dir} && rm -f emacs${manext} emacsclient${manext} etags${manext} ctags${manext}) (cd ${bindir} && rm -f $(EMACSFULL) $(EMACS)) diff -r dbd791ef90a1 -r 9b150bc96d33 admin/ChangeLog --- a/admin/ChangeLog Sun Jan 29 00:17:11 2006 +0000 +++ b/admin/ChangeLog Mon Jan 30 18:06:22 2006 +0000 @@ -1,3 +1,7 @@ +2006-01-27 Chong Yidong + + * FOR-RELEASE: string allocation bugs fixed. + 2005-12-13 Bill Wohler * FOR-RELEASE: Ensure MH-E 8.0 has been released. diff -r dbd791ef90a1 -r 9b150bc96d33 admin/FOR-RELEASE --- a/admin/FOR-RELEASE Sun Jan 29 00:17:11 2006 +0000 +++ b/admin/FOR-RELEASE Mon Jan 30 18:06:22 2006 +0000 @@ -41,17 +41,8 @@ a bitmap appearence. [Assigned to KFS] -* FATAL ERRORS - -** Investigate reported crashes in compact_small_strings. - -** Investigate reported crashes related to using an -invalid pointer from string_free_list. - * BUGS -** Ronan Keryell's Sep 23 bug about "tramp sudo:: and version control on RCS" - ** TCP server processes do not work on Windows. TCP/IP server processes created with `make-network-process' consume diff -r dbd791ef90a1 -r 9b150bc96d33 etc/ChangeLog --- a/etc/ChangeLog Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/ChangeLog Mon Jan 30 18:06:22 2006 +0000 @@ -1,3 +1,25 @@ +2006-01-29 Michael Olson + + * NEWS: Add entry for ERC. + +2006-01-27 Chong Yidong + + * TODO: Make SYNC_INPUT the default. + +2006-01-25 Nick Roberts + + * images/gud/pstar.xpm: Make background transparent. + +2006-01-24 Noah Friedman + + * emacs-buffer.gdb: Replace all references to `cdr' field of + conses with `u.cdr', per change Andreas Schwab 2005-11-15 + of src/lisp.h. + +2006-01-23 Michael Albinus + + * NEWS: tramp can be removed by M-x tramp-unload-tramp. + 2006-01-15 Dan Nicolaescu * e/eterm-color.ti: Re-enable the ri entry. Add kich1. diff -r dbd791ef90a1 -r 9b150bc96d33 etc/ERC-NEWS --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/etc/ERC-NEWS Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,599 @@ +ERC NEWS -*- outline -*- + +* Changes since ERC 5.0.4 + +** Improve XEmacs compatibility. + +** Namespace changes + +*** Now ERC doesn't use global variable space. +Renamed all variables that didn't start with "erc-". + + o `away' is now `erc-away' + + o `current-nick' is now `erc-server-current-nick' + + o `last-peers' is now `erc-server-last-peers' + + o `last-ping-time' is now `erc-server-last-ping-time' + + o `last-sent-time' is now `erc-server-last-sent-time' + + o `lines-sent' is now `erc-server-lines-sent' + + o `quitting' is now `erc-server-quitting' + +*** Remove the `with-erc-channel-buffer' function. + +** Bugfixes + +*** Don't inadvertently destroy face properties. + +*** Load erc scripts in a safer way. + +*** Don't insert a timestamp if text at point is invisible. + +*** Don't hide messages from those in `erc-fools' by default. +Color their nicks instead. + +*** Use a more foolproof method of encoding and decoding strings +before sending to a channel. + +** Backend changes + +*** Renamed some server-specific variables + + o `erc-announced-server-name' is now `erc-server-announced-name' + + o `erc-auto-reconnect' is now `erc-server-auto-reconnect' + + o `erc-connect-function' is now `erc-server-connect-function' + + o `erc-default-coding-system' is now `erc-server-coding-system' + + o `erc-duplicate-timeout' is now `erc-server-duplicate-timeout' + + o `erc-duplicates' is now `erc-server-duplicates' + + o `erc-lag' is now `erc-server-lag' + + o `erc-prevent-duplicates' is now `erc-server-prevent-duplicates' + + o `erc-previous-read' is now `erc-server-filter-data' + + o `erc-process' is now `erc-server-process' + + o `erc-ping-handler' is now `erc-server-send-ping-handler' + + o `erc-ping-interval' is now `erc-server-send-ping-interval' + +*** Renamed some functions + + o `erc-connect' is now `erc-server-connect' + + o `erc-process-filter' is now `erc-server-filter-function' + + o `erc-send-command' is now `erc-server-send' + + o `erc-send-single-line' is now `erc-send-input' + + o `erc-setup-periodical-server-ping' is now + `erc-server-setup-periodical-server-ping' + + o `erc-split-command is now `erc-split-line' + +*** New options + + o erc-server-flood-margin, erc-server-flood-penalty: New options + that allow tweaking of flood control. + + o erc-split-line-length: The maximum line length of a single + message. + +*** New variables + + o erc-server-flood-last-message, erc-server-flood-queue, + erc-server-flood-timer: Flood control. + + o erc-server-processing-p: Indicate when we're currently processing + a message. + +*** Remove some options + + o `erc-flood-limit' + o `erc-flood-limit2' + +** New customization group `erc-server' for dealing with IRC servers. + +** ERC can now be installed by doing `make install' from the command line. + +** ERC now has a manual in erc.texi. +Type `make doc' to generate HTML and Info versions of it. + +** ERC no longer depends on cl.el. +Only the macros in cl-macs.el are used. + +** Fix an edge case when quitting as new messages come in. + +** Make flood protection toggle-able as on/off, removing the 'strict option. + +** If possible, re-use channel buffers when reconnecting to a server. + +** Text in ERC buffers is now read-only by default. +To get the previous behavior, + +** Changes and additions to modules + +*** Auto-join (erc-autojoin.el) + +**** Recognize the Azzurra server. + +*** BBDB (erc-bbdb.el) + +**** When the user types /WHOIS, ask for a record to merge to. + +**** Store the displayed name of a BitlBee contact. +The new `erc-bbdb-bitlbee-name-field' option specifies the field to use +to store this information. + +**** Don't prompt for a name on /JOIN or /NICK. + +*** Button (erc-button.el) + +**** Fix customization of `erc-button-alist' + +**** New option `erc-button-nickname-face' determines the face to use +when coloring ERC nicknames. + +*** Channel tracking (erc-track.el) + +**** Remove channels from the modified channels list if not currently +connected. This should remove residue from the mode line after +quitting ERC. + +**** Recognize buttonized text + +*** Highlighting (erc-match.el) + +**** Highlight current nickname by default. + +**** Added the option of beeping when certain matches occur. +Add `erc-beep-on-match' to `erc-text-matched-hook' to enable +beeping. Set the new variable `erc-beep-match-types' which match +types that make beeps. + +*** Nicklist (erc-nicklist.el) + +**** Fix a couple of errors. + +**** Make sure a stray mouse click doesn't trigger an error. + +**** Insert icons from the /images directory next to nicks. +This indicates their away status. The location is customizable via +the new `erc-nicklist-icons-directory' option. + +If you do not want these icons, set `erc-nicklist-use-icons' to nil. + +*** Nickserv identification (erc-nickserv.el) + +**** Recognize Azzurra and OFTC networks. + +*** Old completion (erc-complete.el) + +**** Disable by default. + +*** Programmable completion (erc-pcomplete.el) + +**** Enable by default. + +*** Timestamps (erc-stamp.el) + +**** On Emacs22, align right timestamps perfectly, even if variable-width +characters are used. If we aren't using Emacs22, move text farther +away from the right margin when variable-width characters are used. +It is considered better to misalign the stamp by a bit than to go past +the right margin. + +**** Enable by default + +** New modules + +*** Spell-checking (erc-spelling.el) + +**** Use flyspell in ERC. + +*** Viper compatibility (erc-viper.el) + +**** Helps ERC work correctly in viper-mode. + +* Fixes since ERC 5.0.3 + +** Fix a problem with undo in channels. + +* Fixes since ERC 5.0.2 + +** Fix typo in the `ctcp-request-to' entry of the English catalog. + +** Debugging with edegug has been made easier in all of the +erc-with-* and with-erc* macros. + +** Non-ASCII character sets should be better supported when sending +and processing messages. + +** A load failure with erc-autoaway.el and Emacs21 has been fixed. + +** A few XEmacs warnings were fixed. + +** Changes and additions to modules + +*** Backend (erc-backend.el) + +**** Move the check for hidden messages into `erc-display-message' +so there isn't so much replicated code. + +**** Add `definition-name' property to constructed symbols so that +`find-function' and `find-variable' will be able to locate them. + +**** Make sure logs are inserted info the correct channel buffers. +There was previously an error when using `erc-insert-log-on-open' in +combination with autojoin to multiple channels. + +*** Button (erc-button.el) + +**** The layering of `erc-button-face' on other faces in ERC buffers +has been improved. + +*** Channel tracking (erc-track.el) + +**** Use optimal amount of whitespace around modified channels +indicator. Previously, there was an additional unnecessary space. + +**** Fix an error that occurred when unchecked buffers existed when +invoking /QUIT. + +* Fixes since ERC 5.0.1 + +** If a channel key is required for a certain channel, ERC will prompt +for one if `erc-prompt-for-channel-key' is non-nil. + +** ERC doesn't try to reconnect if the network connection is refused +when using `open-network-stream-nowait' as the `erc-connect-function'. + +** Messages from multiple servers will not go to the currently active +buffer. The messages from each server will be contained in the most +recently active channel/server buffer that corresponds with the +server. + +** Some text messages were cleaned up slightly. + +** Button faces should no longer "cover" other faces. + +** Made some XEmacs compatibility fixes. + +** Nicknames containing a backslash are now correctly highlighted as +current-nick and buttonized as nicks. + +** `erc-server-select' doesn't offer networks without servers as a +choice anymore. + +** Non-ASCII character support has been improved. + +** Changes and additions to modules + +*** Menu (erc-menu.el) + +**** You can now save logs and truncate buffers from the menu-bar. + +* Fixes since ERC 5.0 + +** Narrowing in ERC buffers no longer causes formatting errors. + +** The BBDB module now loads correctly when customizing `erc-modules'. + +** The value of `erc-button-face' is now respected. + +** Fixed a bug which caused a read-only error during connection. + +** Server buffers are now tracked correctly. +This means that `erc-track-priority-faces-only', `erc-track-exclude', +and `erc-track-exclude-types' now work with server buffers. + +* Changes since ERC 4.0 + +** Channel members are now stored as a hash-table. +`erc-server-users' and `erc-channel-users' are now hash-tables, rather +than alists. This significantly increases performance, especially in +large channels. Each channel member is stored as an `erc-server-user' +struct, with additional information about the channels they are on +stored in an `erc-channel-user' struct. Code using old alist-style +channel members needs to be updated to work with hash-tables. +This new code also removes the need for erc-members.el, which has been +removed. + +** The way ERC deals with input from the server has changed. +All server response code is now in a new file, erc-backend.el. There +should be no real user visible changes. There are, however, a few +major changes for implementers, and module writers: + +*** The PARSED response that all handlers get called with is + no longer a vector, but an `erc-response' struct. + + This means LESS MAGIC NUMBERS in the ERC source code, but a few + changes in how you get at parsed responses. + + The sender is accessed via `erc-response.sender'. + + The command is accessed via `erc-response.command'. + + The arguments to the command (everything after the command and + before the colon) are accessed via `erc-response.command-args'. + This is a /list/ of arguments in the order they appear in the + unparsed response. + + The contents of the response is accessed via + `erc-response.contents'. + + Should, for some reason, you want to do something with the + /unparsed/ response, you can get it via `erc-response.unparsed'. + +*** The `erc-server-hook-list' mechanism is gone. + + All server response handlers should be defined with + `define-erc-response-handler'. This defines functions and + corresponding hook variables. + + The mapping of server commands to hook variables is no longer + done via `erc-event-to-hook', but through an #'equal hashtable, + `erc-server-responses'. In order to find a hook you do: + + (erc-get-hook command) + + See the docstring of `define-erc-response-handler' for more + information. + +*** ALL hook variables have been renamed. + + In accordance with recommendations in the Emacs Lisp manual, + the hook variables are no longer called `erc-server-FOO-hook', + but rather `erc-server-FOO-functions'. This is to indicate + that the functions they call take arguments. + + All the modules in ERC have been updated to reflect this change, + but external module authors should beware. + +** The values of `erc-mode-line-format' and `erc-header-line-format' +are now defined as strings to be formatted using `format-spec'. +`erc-mode-line-format' does not replace the whole mode-line anymore, +only `mode-line-buffer-identification' is set. This way, personal +mode-line configurations are not modified and all key bindings work as +expected. The process status (connecting, closed) is now shown in +`mode-line-process'. + +** Customization of ERC variables has been made easier. Variables +have been split into more groups for better organization. + +** New variables + + o `erc-send-whitespace-lines' - Set this to send lines even if they + are empty. + + o `erc-manual-set-nick-on-bad-nick-p' - If the nickname you chose is + already taken or not allowed, your nick is not changed and you can + try again manually if this is non-nil. + + o `erc-mode-line-away-status-format' - You can now set what is shown + in the mode-line when you are away. + + o `erc-header-line-uses-help-echo-p' - The header-line now uses the + help-echo property. You can set this to nil to disable it. + + o `erc-format-query-as-channel-p' - Set this to nil to have messages + in the query buffer formatted like private messages. + + o `erc-show-channel-key-p' - The channel key is now shown with the + other channel modes in the header line. Set this to nil if you + want it hidden. + + o `erc-prompt-for-channel-key' - Set this if you want to be prompted + for the channel key (channel's mode is +k) when you call + `erc-join-channel' interactively. + + o `erc-kill-server-buffer-on-quit' - If non-nil, kill the server + buffer automatically when you quit. + +** New hooks + + o `erc-join-hook' - Called when you join a channel. + + o `erc-kick-hook' - Called when you are kicked from a channel. The + channel's buffer is sent as an argument to functions called from + this hook. + + o `erc-nick-changed-functions' - Whenever your nickname changes + successfully, the functions in this hook are run with the + arguments NEW-NICK and OLD-NICK. + +** New command /WHOAMI - Do a /WHOIS on your current nickname. + +** The key binding for changing channel modes is now C-c C-o. + +** Removed variables + + o `erc-echo-notices-in-minibuffer-flag' and + `erc-echo-notices-in-current-buffer' - You should use + `erc-echo-notice-hook' and `erc-echo-notice-always-hook' instead. + + o `erc-prompt-interactive-input' has been removed (commented out) + because nickname completion does not work with it. + + o All INFO buffer-related variables and functions have been removed. + +** You can now disable modules by setting `erc-modules' with the +customization interface. + +** Changes and additions to modules + +*** Autoaway (erc-autoaway.el) + +**** New variable `erc-autoaway-no-auto-back-regexp' - Add text which, +when you type anything matching it, will not automatically discard +your away status when `erc-auto-discard-away' is non-nil. + +*** Filling (erc-fill.el) + +**** New variable `erc-fill-variable-maximum-indentation' - Don't +indent more than this many characters when indenting a message from a +user with a long nickname. + +*** Goodies (erc-goodies.el) + +**** Miscellaneous small modules have been moved from erc.el. +The functions erc-add-scroll-to-bottom, erc-make-read-only, +erc-send-distinguish-noncommands, erc-interpret-controls, erc-unmorse, +erc-smiley, and erc-occur, which were defined in the main erc.el file +have been moved to erc-goodies.el and have mostly been translated to +the modules scrolltobottom, readonly, noncommands, irccontrols, smiley +and unmorse. + +**** New variables + + o `erc-input-line-position' - The line number to use with + `erc-scroll-to-bottom'. + + o `erc-beep-p' - Beep if there is a \C-g control character in a + message. + +*** Channel lists (erc-list.el) + +**** New variable `erc-chanlist-highlight-face' - A face used for +highlighting the current line. + +*** Highlighting (erc-match.el) + +**** `erc-current-nick-highlight-type' has new options: 'keyword and +'nick-or-keyword. + +*** Menu (erc-menu.el) + +**** The `IRC' menu is now automatically added to `erc-mode' buffers. + +*** Networks (erc-nets.el) + +**** The functions for determining current network are in this file. +There were a couple of functions spread about in different files which +each had a different way of determining the current network. The +methods have been combined, and the big list of known networks +(`erc-networks-alist') is being put to use. You can access the +network's name by calling the new function `erc-network'. This +returns the name of the current network as a symbol or 'Unknown if it +could not determine which network it is. + +*** Nicklist (erc-nicklist.el) + +**** ERC has a new way of displaying nicknames in a channel. +The new file erc-nicklist.el defines a new command `erc-nicklist' +which pops up a small Emacs window showing the nicknames of all +members of the current channel. The implementation is not complete +and is rather proof-of-concept for now. The result is something a bit +like erc-speedbar, but not quite as invasive, and doesn't require use +of a new frame. + +*** Internet services / Nickserv (erc-nickserv.el) + +**** Network detection is now taken care of by erc-nets.el. +The function `erc-current-network' is deprecated, use `erc-network' +instead. The variable `erc-networks' has been removed, use +`erc-networks-alist'. The network symbols used in +`erc-nickserv-alist' now match those in `erc-networks-alist'. + +**** New variable `erc-nickserv-identify-mode' - Choose which method +to use for automatic identification: you can wait for Nickserv to ask +you to identify (the default), or send an identify message +automatically after you change your nickname. + +*** Speedbar (erc-speedbar.el) + +**** New variable `erc-speedbar-sort-users-type' - Sort users in a +channel by activity, alphabetically, or not at all. + +*** Timestamps (erc-stamp.el) + +**** `erc-timestamp-only-if-changed-flag' now works when +`erc-insert-timestamp-function' is set to 'erc-insert-timestamp-left. + +**** New variable `erc-timestamp-intangible' - Set this to nil if +timestamps should not have the 'intangible property. + +*** Channel tracking (erc-track.el) + +**** Using faces to indicate channel activity in the modeline now works +in XEmacs. + +**** New variables + + o `erc-track-priority-faces-only' - Ignore changes in a channel + unless there is a face from the `erc-track-faces-priority-list' in + the message. + + o `erc-track-exclude-server-buffer' - Ignore changes in the server + buffer. + + o `erc-track-position-in-mode-line' - Set the position in the + mode-line where modified channels are shown (only works in GNU + Emacs versions above 21.3). + +* Changes since ERC 3.0.cvs.20030119 + +** The module system has again changed a lot. You can now customize + the variable `erc-modules' and define once and for all which + extension modules you want to use. This unfortunately may require + you to change your current erc initialisation code a bit, if you + have some existing customsations. On the other hand, this change + makes the configuration of extension modules a lot easier for new + users. In theory, you should be able to configure all aspects of + ERC by using the customize interface, you should no longer really + need to write Lisp code for trivial customizations. + + By default, the following modules are now loaded: (pcomplete + netsplit fill track ring button autojoin) + + Please use M-x customize-variable RET erc-modules RET to change the + default if it does not suite your needs. + +** THe symbol used in `erc-nickserv-passwords' for debian.org IRC servers + (formerly called OpenProjects, now FreeNode) has changed from + openprojects to freenode. You may need to update your configuration + for a successful automatic nickserv identification. + +* Changes since ERC 2.93.cvs.20020819 + +** New module erc-dcc: + +This finally implements DCC. It requires server sockets to fully work +in both directions. This feature is currently only available in Emacs +21.3.50 (CVS). Here is a short list of what should work though. + +** Compatibility: + * Emacs 21.2, DCC get, and accepting DCC chat offers. + * XEmacs 21, Only accepting DCC chat offers. + +** erc is switching to global-minor-modes for activation of submodules. + +This allows you to customize such a mode and get automatic loading of +the module. No longer putting a lot of require statments in .emacs. +At least this is the long-term plan, not all modules are converted +yet. + +** The most important user visible change is that you now need to activate +erc-completion-mode, to get TAB completion. The new completion code +is based on pcomplete. To get the old code, manually load +erc-complete and bind TAB to erc-complete in erc-mode-map. + +To activate completion on startup, put (erc-completion-mode 1) in your +.emacs file. + +Same applies to timestamps. You no longer need to (require +'erc-stamp), you can customize the variable `erc-timestamp-mode', and +the rest should be automatic. + +arch-tag: 2b21b387-6cdc-4192-889c-6743cfffdcb1 diff -r dbd791ef90a1 -r 9b150bc96d33 etc/NEWS --- a/etc/NEWS Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/NEWS Mon Jan 30 18:06:22 2006 +0000 @@ -1461,8 +1461,8 @@ ** Xterm support: --- -*** Emacs now responds to mouse-clicks on the mode-line, header-line and -display margin, when run in an xterm. +*** If you enable Xterm Mouse mode, Emacs will respond to mouse clicks +on the mode line, header line and display margin, when run in an xterm. --- *** Improved key bindings support when running in an xterm. @@ -1504,6 +1504,17 @@ * New Modes and Packages in Emacs 22.1 +** ERC is now part of the Emacs distribution. + +ERC is a powerful, modular, and extensible IRC client for Emacs. + +To see what modules are available, type +M-x customize-option erc-modules RET. + +To start an IRC session, type M-x erc-select, and follow the prompts +for server, port, and nick. + +--- ** Rcirc is now part of the Emacs distribution. Rcirc is an Internet relay chat (IRC) client. It supports @@ -1785,6 +1796,9 @@ (setq tramp-default-method "ftp") +Removing Tramp, and re-enabling Ange-FTP, can be achieved by M-x +tramp-unload-tramp. + --- ** The URL package (which had been part of W3) is now part of Emacs. @@ -1876,9 +1890,9 @@ `scheme-untrace-command' and `scheme-expand-current-form'. --- -** Makefile mode has submodes for automake, gmake, makepp and BSD make. - -The former two couldn't be differentiated before, and the latter two +** Makefile mode has submodes for automake, gmake, makepp, BSD make and imake. + +The former two couldn't be differentiated before, and the latter three are new. Font-locking is robust now and offers new customizable faces. diff -r dbd791ef90a1 -r 9b150bc96d33 etc/TODO --- a/etc/TODO Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/TODO Mon Jan 30 18:06:22 2006 +0000 @@ -9,6 +9,8 @@ * Small but important fixes needed in existing features: +** buffer-offer-save should be a permanent local. + ** revert-buffer should eliminate overlays and the mark. ** erase-buffer should perhaps disregard read-only properties of text. @@ -54,6 +56,10 @@ ** The toolbar should show keyboard equivalents in its tooltips. +** Modify allout.el to use overlays, like outline.el. + +** M-! M-n should fetch the buffer-file-name as the default. + * Important features: ** Provide user-friendly ways to list all available font families, @@ -438,6 +444,13 @@ For use by sml-mode, python-mode, tex-mode, scheme-mode, lisp-mode, haskell-mode, tuareg-mode, ... +** Make SYNC_INPUT the default. + All loops using immediate_quit need to be checked to ensure that + C-g can interrupt them, in case of an infinite loop. Once we + switch to using SYNC_INPUT, we can remove the BLOCK_INPUTs in the + allocation functions (allocate_string etc.) without worrying about + data munging. + * Other known bugs: ** a two-char comment-starter whose two chars are symbol constituents will diff -r dbd791ef90a1 -r 9b150bc96d33 etc/emacs-buffer.gdb --- a/etc/emacs-buffer.gdb Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/emacs-buffer.gdb Mon Jan 30 18:06:22 2006 +0000 @@ -1,9 +1,12 @@ # emacs-buffer.gdb --- gdb macros for recovering buffers from emacs coredumps -# Copyright (C) 2005 Free Software Foundation, Inc. +# Copyright (C) 2005, 2006 Free Software Foundation, Inc. # Maintainer: Noah Friedman -# Status: tested with Emacs 22 +# Status: Works with Emacs 22.0.51.1 (prerelease) as of 2006-01-12. +# Older cvs snapshots, and released versions, will not work due to +# changes in lisp data structures. But there are older versions of +# this gdb script which work with those versions. # Created: 2005-04-28 # This file is part of GNU Emacs. @@ -29,8 +32,8 @@ # an Emacs coredump; they may not always be file-backed or have a recent # autosave. # -# The Emacs executable must have debugging symbols for this to work. But -# you never strip Emacs, right? Right! +# The Emacs executable must have debugging symbols for this to work. +# But you never strip Emacs, right? # # The main commands of interest are `ybuffer-list', `yfile-buffers', # `ysave-buffer', and `ybuffer-contents'. The `y' prefix avoids any @@ -98,11 +101,11 @@ while $alist != Qnil ygetptr $alist set $this = ((struct Lisp_Cons *) $ptr)->car - set $alist = ((struct Lisp_Cons *) $ptr)->cdr + set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr # Vbuffer_alist elts are pairs of the form (name . buffer) ygetptr $this - set $buf = ((struct Lisp_Cons *) $ptr)->cdr + set $buf = ((struct Lisp_Cons *) $ptr)->u.cdr ygetptr $buf set $buf = (struct buffer *) $ptr @@ -150,7 +153,7 @@ set $alist = Vbuffer_alist while ($alist != Qnil && $i > 0) ygetptr $alist - set $alist = ((struct Lisp_Cons *) $ptr)->cdr + set $alist = ((struct Lisp_Cons *) $ptr)->u.cdr set $i-- end @@ -160,7 +163,7 @@ # Get the buffer object ygetptr $this - set $this = ((struct Lisp_Cons *) $ptr)->cdr + set $this = ((struct Lisp_Cons *) $ptr)->u.cdr ygetptr $this set $ycurrent_buffer = (struct buffer *) $ptr diff -r dbd791ef90a1 -r 9b150bc96d33 etc/images/gud/pstar.xpm --- a/etc/images/gud/pstar.xpm Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/images/gud/pstar.xpm Mon Jan 30 18:06:22 2006 +0000 @@ -1,7 +1,7 @@ /* XPM */ static char * pstar_xpm[] = { "24 24 2 1", -" c #BDBDBEBEBDBD", +" c None", ". c #000000000000", " ", " ", diff -r dbd791ef90a1 -r 9b150bc96d33 etc/orgcard.ps --- a/etc/orgcard.ps Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/orgcard.ps Mon Jan 30 18:06:22 2006 +0000 @@ -10,7 +10,7 @@ %DVIPSWebPage: (www.radicaleye.com) %DVIPSCommandLine: dvips -t landscape -o orgcard.ps orgcard.dvi %DVIPSParameters: dpi=600, compressed -%DVIPSSource: TeX output 2006.01.13:1223 +%DVIPSSource: TeX output 2006.01.20:1449 %%BeginProcSet: texc.pro %! /TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S @@ -352,210 +352,204 @@ CCBD1F58ABBF1F53AD21E3BFF25EEEB046F66A924E5F431EBD7228050BE2DF43 0B9B538DAAD511EED97630CD9A9C05CC49DC251325A93EA842C6D07B44BE620F 08E66B611F54314B0177E299304F2294F8DEDE9914736944F125A50B5007373E -588AD80D9983CE7824DA30CEE5DC3114D69D7ACEC0758D8201805B82925EF3C2 -C87A1A169C5ADE44B561EC1660E617FB39D1B1547B33C0FEB33C3A1D7340A62A -CD9CEFA49481F19B39A704A53A0B98A11744143CDDA0E668E6325935C6497A9F -AFF471194932AFECBF25B441AD55A43751FBAB76F3E544C4254AEC4BEB5CFE4C -C1318C3A0FAD0E8C1BABEE20B203E1DD9412E66BC55BEBD6FBBEBA84F56604FD -85D50F733D9794611F4137EC10ACB4C4ECA5A81CAACC45213E92ED3C26726BBE -91430E7633A2BDB8EA3D0C55259D7DBE468AC0964A63728C9B8EA4E15CF0EEA3 -2E754B9170EAE6B8818DCCDDAD643B9F6C91C3C5B245CD442358C60AF390DC76 -342E659D4EC45552626F069F346F46B18062CE26D5912336C6B29FCBFA5C3113 -ED86E44B529CD95B7B5B934D899762C4F3457F56ACCC763BCCD5BD08975EB5F1 -C5216DA4CBF3409EC71054B0145183F7DFB31517D199EB16D4C6DB0AF05E5720 -10B06F395BE3C8C59CEEBCEA1E00F9EA3FD880AC197508CEC11E33B6B6EABE3C -0FAEBF246743F62D280875D052656696AA88DABB918F79279A980754F3DCFBEF -7999E7FB7C9E7F88CB15E1596F08E48FA74F1CB613B587BFE72717437E38D08A -C8B160982A6F92CD0BAD7E033766BB1D92F78F22FE5750D002AB2C7A101A57D6 -3E7ABA9BD4B8C0A4F2820123BBCCD520B9608AFD4372366D876F848ED068245B -6BC1DDF4B826E4A9FEC4390CEB2DAAA63D9D013B706059347709F3E996C3682A -F88D827B8B7E1206BF2B2A394AFB00B1207819DAE82D1132989702B219E4EA71 -A2BD6EDA183C552C874DBD142E826B583311784EEBFBE96D3716E0DA9C4B1CD1 -C7D649FE269C801411290846EB69BECFA24AACFE8895AC574ED538951B84CDBE -4D935C15DADFFD2179C53655CE2728B017DCBAA14D7B7140AA7B42492E7C568A -C718B186FE248F58148FBEAC7CF56A67E1B7CF6E5A3D6B5675AA8005BDD71A6F -40B90E5B304E43F0BCBAE31238B09B65AA17F09B0CEB3A609156CF83E92AB27B -BD1E80DCCF305D627821FB110676D0BA0F02790A51804686143AB72EAB98AAC7 -CB4E052BC8A19362655F0DD0AC4B8578BB227830D9D713116725A3BB05CB2F84 -9A84884D80116E47E5FA2802EBE7439A8484A9FF18A5F5838731C6C55EF3B749 -ECEDADC2671F81A2787323E372AC20D3E02849D3096C64EB86393B374DB0DFBC -393E9F0364F58CF81BC788C7B779BA0ED32A26389CBDE9E5A96E79D014C0B5F2 -D57F9B968ED9FE793AA0E1A02432E1A5075947D96909DC06A06C467CB86F428B -BCFB5149725BAFAD34F733692AD90AFCE2B3A9281CEBDE9EFD67DA0A79BC0AA6 -E6C47F2FD4E8698109A28915DAA6CBA5FCBD52EAEAC8087796A4309EBCFB2DE6 -295ED1CE5C51255C05F9258F958E9F7A7A5AD52F8D9715B99CC3CDD77A5212FD -BFAC311D3E5699D5D5BAD6DE8C425B118D9636F4AD4EEA8FBA4BDF3B15C2A939 -926162F94D522B0990E7204BF3A81E3E72C9A80D7688BA28DEE8F88155F8CB15 -02EF6C6BD3C9A961B591DC80C24CE9E9BE24254911D558534A7B4AE0CEB01487 -B6451320B37891175CAE2F534828978831AFC6846CDF9A2B86FC209A5DC8983B -1A6B5BD7D9D33AAF2D7340ACACD7E03CB238D0366E83852B2BBE428063A4FCEF -B6E48332E6633F790971A587A3F038A256D181B5584691A9405732D33A2F55FE -8BD68E07E6E01A27FC74BCC9946204A478D13C51490E9D76C4EE375190026156 -FD879EBC0A579DBCB69058B252735F3A864B0C42B7555ADD028DCB937087EE86 -7108667781A85ED8A09260BE52B90B1BB8B6A268169D09AFEFD0C58085ED5550 -58866429B1FFB47465BB91C94DD392DF00A1900E021990C23952430AAC50E079 -5685C686685BB26743FCE9E9ED88D3A523AA10E4317703BF7EA74C15B3ECD49E -33216F52B45B23195E133522498B357511593C41D45660503B93A02FE7DFA71B -51FC7E10E28F60367293388C4D143F49AADD411685A9BF60B6D544E32B8C0902 -8ECA67229D25B79A56639B67A4E40B8A2CEE1B92CEC3121F869520F469BBEA38 -B6E631B249E53EB6A8A886ED97E5C09372B31F724F165A5BEE9385CF89FEFCF9 -F6CD28226E6D60A32A6C2ECFF8E473F816F6CC1A90C1783A3E6303B99B11959B -510B684B9257617EFBE7DB72BAF6F5756B22110B675CE11A2A88148DE330AD84 -C8DBF2C79BB6D2199F42677B85F30C0D6885B0A316B1E53CFB32675179AA088A -45995F1A1D323CF8BDB3E769B851F5BFB6C619CA74CEFE9650F58C96EC512385 -F7A8C8B0CA55F030B7CEB6A7CF577A544744B62424A403A69A4BB6C5EA42375B -DDFD2D1D74FFE633474D4ABA14C24EB7F44BB6E69F759E23FF799E07733E4C7A -F142DD6563A83DB58E7FA1BB7BA82776441875E6B0D44801762E3CA70C8B738A -2B52E48BEC09C29544B6D24513708C7C86AEA3BB56AD0675CBB8CD6E41AD01E4 -DD6F54B5D6CC95AEB2D7D4C1C45D6274DD3FD7449982BDB5609BD3ADB64A73C4 -6F9C5897CFF003130758DB267EB173CF4DBF412C3F69012675FDCA9A8E8D2353 -5C272A4843F249A8CA0E03CB00B503AEB6C1BEC84B87420520EAD65AC7FEF5B9 -0489D803DCCB72AD4F7875335165467D04BDA6CACADBAF5A8BB8B26C153A491D -AFDBD9695BDA29BC2FEEB2849CEE6F4C22FE5C40044105ED2288FE0C96865CF4 -093D21C3A6930538DD2ADBFCDF61072F55156267A7069A0E3025090B2CEB4C7D -9303AC8A31EE3274BAFCF6A1A069D506D4DCE7051C33292C8087DAE14E1D0A9F -40293446B6C01DB83E64E57705AF674684C1BE9527F8B4E242B3CAF61C77E3E4 -AB8EF5BC4CCDEFBBFDA737A7931354DB5AB2A94EBF0EF06E535F03CEC3CA2F2A -568426AFB6B49CB5AB4D5571C9BDA39649E652B44A6A2B140B4E33639ED32A6A -ECDBDCD764AE3428091516C10F4F350A801452AE6BB44D990640AB2A54976F26 -13780C2757C57691D4F47B2538C532F5769ED5CC1BCD4A9285209B7306109F0F -C864E491D5F0FBEE125BF87807951FBA44D152F99FDB9B79A927AD91C423AEF4 -1E7AD1BB32D54808200E350F0F75B2C74574B6A752F3227B2005D768299C755F -07A94926A42A5806B21C44A01983B93B2AF6C916693939A8E917E4CE81A8B007 -9475395D9E2D4696D216AB1D23F022DEFDCF1B31CB06045BA1A7545F921F1088 -B863CD5848A20DEDD289A2D7B05AD6DD68F9FF8F2C4D9145042A1CD985DC1E4E -C2F6C2446DE2E7DD577E3E4378DD6180F79444A7DC8A3FAC02970E2009484816 -1E88FB6188486646B178C7119CA520CCA3503481D895D23D73B5598130AF4FF5 -5E6ECC3EA740B1030BE7CB8343FB90E0FF74D76FE27AE3B799BE36103748518C -6CDB243CE716A0CF5FAC0A5F18E2328EC5190B4B00D14A9D71E135E5A13B7DA2 -476FE03E36B5B56E0B561CA963B25CA77DCEAE2952FA2D1EC8CB7DCCD4DA7A35 -485550BD92A50948436E12DD1FB75003B4B851DC45E41A2461FCD300A2811430 -57EFC3E99C44FB0DD0BAD0B7BA4F97E1B752731C02FAB1CD9038F63A358ED8A2 -5BB20E431A2A41731F167962426AA59FC40F87C820F3990557147A24CB69579D -ED6E60D5EC6FEDEBBECC5BA12B07D4F72C47D306AE8194791D2EAF9A65457ECF -63C187646D3A224B810CE2D1BB39FB02FDC1011C1840CB1632B9850E1C562CD1 -11F9456D74E001D63E3D5FC3E43B7F063089A5647A9021DD30D44E63933A5F1B -607A9BBD0F40DCEC2AEC59D2C408E0BBB369BA8B9893F44A6DC0485EFA64C339 -352CA32A841600C551C528EF69319293CEF00DE4E2481C98FEAED5E3232F316B -564446846604D48232DC65D721F780D0A11154DC5A305366F729782EFFE96B1E -FFF2D987570DB27A22F3322108CF43AD05CF27052FE2B9E964CF01CF5F0B8E19 -6E024C1557959972FC95341E057E1659850B20F565FC0EA76C2ADC7FDEBE4F2E -D4E9001F81BB6A4B8F7351831FF0D5EFB01B298C7E24B2FB493B1BF54875AC38 -8D80014166113412DECE47EFBBE682078A1B5E05A6FB2BB3E93364BDB3DB352F -781773B3E905AB5C5AC04D8111E9AAB5A213CE077435090CFB6DDCB3EC0A4DD2 -F9F946E2EB070E75C0512664014B4E090188526C471DA6F83BBEF74FE52D5597 -063400F44E7016615D743E90F10B54336BEF61F5234B1DF4860A4A4074A96263 -6854BD1E4AF82CB7D7A8DC04E4FB6C34557C9BA80C8743EF343C404228D71DE0 -E5A5A519D3BF01A08A967DCCF44ED06A889FE2107A3DA114E941621D2CB3E8A5 -F4E3DA4B76C3D1BAF6A5CDDBC8513AAFF9F1D22E7DF630EBB82116A075F890F9 -BF73E9777D380CF92C9B1762FA23407E03DD26642FADB9C85944D0E15CA82FDD -5638C26B10B9B94E74DD979BF5A6B6C0AC54C94C6E6716246612627CE4DA4C17 -3AE7772E2B93562AEFB3184A7A9F866FA10901DA58E3BEB70831FC9C1C886EE4 -9DDF0D69B286EB138EE735A382BF96D9B7EC33546F2C788128A3B1ED4CD2AC7D -76C5F3B82DCAFB8AB073256A7F98C1530BE8C94FF9213FDCA56ADC17E6F56552 -87D1313366EE7CCC237857C93401628B7A0F4704720FD4966F16AFA4A764358E -EB0AD53B9C8104070E2D23E9AB793E9F67A2313DC6622213DD8E32FF245C6214 -FC6D5021A48367398061976699FA83F0FE81854D55204CE03258CB6333231FD5 -8852B52D255EFA8F6D6527D7F1C900C991026DDEF6E79B74921BB404D4F1410B -9D2950BA20EF04FC230CA4E8D6E703F63F3A8207BDCC5D1E9BADF8C6D9E2283C -A9D500BEF4E00A29D1005B2D5E80C60EE5B35CB347DA7B7973692F41BA6B4C5B -16E0A6B2B96CAE2BB0AC882FFA9DB50247804437B19B05EC3249A8F6C19D1E58 -4729BBE4925537B69F58ED323A77A860E8ED78D3C4E86C45F8F427EFF375E618 -E4FDBB7CFF3A4E2C9C37EA3004AC75BA08FB2D116455267F37D817AF272C4CF9 -A3DB2C3F683E088B4B743220BEB2106E18D8BD9DBFFC1DB72430AD9F641AD4E1 -5ACE49F9114948A9C8B48055C969711F3EB2B7F725E6441C7A86E1F0C4E53958 -947F12FEE137D5611395B5D4AF05F55BFD8B5D9620580749CC37DD096E7871E3 -B2009A73FE91BC2E23CAC6F815038CBFC911A4B400A30BBE38A7622F51BDA1AF -893065EAC1AE86A73F22A6E282ED1B46B35CA484748BDEE6C056FF6263920E85 -EF4A82D8CB9F9BA7D20B11E928EAE18971183438BBAD0041D3A843F019E23173 -3B13DF0B9D24C86693AAA4CDB5FA11C5BAA449F68AE47DDEFB80E99F59B8E7E8 -0E8A083E0BBAAB211CF82B37B92B2513FAD2E847FDA67C25305610BB86008BF5 -30D2BBC717E071B373EB848AA0E871A0C09C9488F744AE6A46F3BE82106508FC -50C748514FE65F96F52FA865CA60C831A0F4C11E1C500C6C6113EEDC75AD2051 -67E4DB9A5B1555F9614B6C0C3D1B12DB6194BE578E985E53679C66AAEDD60C68 -0E3AC42E06CC5AEF1167DB0002D79973AAFAE17B083ACD5CF95F661054525867 -FEE6E96EBB0FB243371CDB940534214E9C6EB160A18EAD2ADBFBA1CDC709845D -FE9DF2ABB313BD9809DC40FE278A7FAA6C61B7E3DBF96EEE2C7F17F20581362C -E9EEE3D4E7B3057509F5498AFF226AC267CDD6EFBE12F4573301D4535D0C2AAC -C82FDD61E39357478A30431CFC9040FE2BFE4509DA82C54241307E5EB39BB22C -D604C6091038278EB66053EDAAF62DFBA92946772C64A12D814D907563C30D50 -5924AD6C0F10DD0F721B91AE8B9654FB5B86375DA94D595AD1999CD46C94E3E1 -F1DBADA3287C010DBCC163FC68D3584E1067ECD33CBF6C231E27B27BF89548F1 -71DE0EDBD2AC2AAEF09A56461F30C2286BF98A49AEE50B9DE275D8D04CAAE61D -3BC5688432C09BBF7673D72D308172D9F04101966E9231A2A19C92DAA8BD21DC -B88284250523E122A154CC8072271F53EE8F4EE562AD06C10D0F5BF0C635DE44 -D198EB6B947B7DC15465F08C5CA3466339B6FA18F7B95708A9BCF8AB81D1F9C5 -570EDF54B50D657A89415719D03B15D582DD66D5FBF26449E4D26DC46ED4F454 -9081D0DB9B054D69874E868E3810D1696D5E381AA4D788154E21B0D28CF90CB7 -AE0BE0D6F5E62A82BEE840DB125672C93BBCC46632765684444E0FE4B2BEC283 -D5075E0E5A34D26250B128F5AB178D11BE1BA8E561276BF49FA3B58C02BF5DB5 -0A505D1F8815F6C7BB7F4774A97B114E89F222A08E5EB8676A320728CD2826C0 -EA8816874C355C40D0AED9D1CFFACB1501C592678E3C111D94E3F7189CE094AD -B9DFDBB44AA289349CFD2A9993BDDF072B7A3EDAE60531C593453575D9742CED -FF2ECF2B12CD59CA4FD7952462303F6081D0232084DA9DB8A4693FD2D3AAFE7D -A2A61015F67FF76683FA6EC38B25198EED132AC393394129BCF0AF0E6F048A09 -E5E5D074B2B1C49F9B86DFDD559F243F270A6190816D4E86A11E1BECE43C0E7A -1BB7E691DC79DB786617EE61B907E4A8DD71BF94B4F032229CB18E1A4A803B38 -D9943851ACA9B591416E20975B8EB628BF751CFC42F929AF5D04813EF388DA71 -B23B0AFA8BE1A9B36A19681DD00FEEA84AA6D65CBD7990877D1A4119051B81F3 -6350A67EF0DFB24F5890D539B63EA6DE95C5583A8320B3924934F9A68C1BF5D3 -6FD4FB3EB40AEAE4B3E85A382AF9735FE1AAE7FC6B66FCB1E33D04E7A89F35E4 -5D855A455541209543EE482D0ABAAF77D76E4F2278AD4A59EBEB2C921E83C28E -38F7BDA6500188BCC8E7B4BDE917FD343B5DC6E74994D8A9332EA7622335BF9D -2CB069AFBAA4E01ECDC4D5DB0B34337A12B6168DD40FAF8801A17BF219A63938 -4779A96B9A7F1E670531956F374C727DD893CDD06C3EBBC48AA8C7FCE062C19E -6DFF6F14DCB27EE097771E83AC8CCA0BB363FC98ED29DDA10459E5AAD3BC1415 -651C347A04466E35C1B3744ADC671C461120D2359C4DBFD0D243555D9B182CFD -189022DED77374687BA5758C88FC19E3A6149E526E11E87A9CAD9B19CB47E00D -70CB4E4B0172AA46DDF138EF9A4A94D7B59252D9E8E170CDB048BB7CA28F4538 -CC3A0B72913DD82E327A3A62E7EE1E950976E5228BAADEA7A1C761175556FA84 -FAFAFA55C9A9A5F9F2340FDB199105E4CCA0CF364099EB3227BC0A8AA7189DFE -3CEF5E1B68EBFFA7D8E603A3414CBC37D5E5A1261F66E5B739D6BA2F52877435 -FEB61C789D6CC48482A28679707F9C8E0073B75072B9E10AE09FAA28184A8C00 -66FE6FECC229635097E1E5A8DDF889AC85F6AA555C433A0C7E7A73D2F683D887 -45225F82587B6EDC9F24A18C24699ED304E05F7B0A5C5F20A6DB61EC2F8EE502 -814CBB41B0481B3BBAC69AA4B4F6A251B41B5ECD0F04E9C256813DAF5374D9D1 -8A5057894B93A1F5A9BBC56E63EC2B11B09818D20E984D37943047E7F010FA87 -74E4918D3E56679FF00FDC1D94B0C52206B4D570FA3CAC26FCF17FE89D73DA9E -7AAFE36245EDD811F91D9E83C96704CFE68A29778677A6C02820EF9B09D471F6 -D03191013A6334CDA003270C92CE05DE4B6194BACBFE4CBB80FF15D9A31A4DF9 -82BC8BFCFCA725B26874D1B26456F6FE83216F677210469963DC5683DB7BBFAC -ED2DE1ACAC4AB4E24195E19C447EB4744E5026326EEC560DEF375749AEE07A4E -78C8FAFB5056731503FBC10F47FB37D49F3855582FDB5F8D1B204AEE50D11458 -CF253A7D990A84F4C89295C72AF21FCEDCA1C0CEAAED6B1DE83FD59573A2A566 -16C90BE27AF719832E6E5A98E9BE7DC65108AD80F40B52EFCEC672D1D94E299E -8EC5DAE81EF454BDE9184A00F5F8BB51BF564603214B23D41C026BD751308706 -3BD8678F5794641193D38F99EFC088E5C9B5639374951D050D19CB54BDA58EAF -636DD6C8B5664EC1529C2E964DB260652DB183CE0887450F1AEDA8D9575C5B32 -EBCB5F71C9C1DBD6341AD5AC442220026A32805085E0BFCAC682C09483AF5CD9 -47ABE381D20A2F905E533D297BDF5AF066A7925DE0223321DAC4C282C79E1856 -3090310656A17D312F7BB259742B7549A27DB6CEDD2803794642BA7C78EC96DD -A8DD2E13E16E81512FF2AD34F123EAC904FE853780C2400234D36FB8ABB07319 -0D46D294513300E318D23766FAB236ECFE7A93705FBC960341AA7E2163DC9D81 -5E2A578EB0FDD05E41885E6A5D88A946025B27767CF4F495A787592F0235D22D -9923308AADB018D6ED705F29B38EAEB3473BC53BB341DDA4C1D62F5CAD1C22AF -192338BAD441B3B7616D78B717920C005EBBC853612A0A7E41426DD96194BC2C -3ECD5784183D76AADF3EDE1828165A3A5B8D864CA7DF794C80C40E766C3A6410 -20DAC3B63B9BC698487D7E1AAC34F10E0799636C45AC6AA60B4CCBF9979D67B0 -F2EBF45561323648A125BDFD4E34B23E9C63CEEF8723A50D35C9DA31F829113B -B3F4E2C999B1A31865E09A9279B006ECDB6613894A2509C19D6AE205BD7E9315 -0D973B8E82227C6499A9FFF9AF0F5282812EA44B1BCED229D17590713A2DA5AD -30C6C6BDD8D321B17CAC678FE0ED8951B6CFE4AE7FB2FE96594A5086DD767696 -CA6DE0CC91DE3A68CE8EDEDE33E4B49E5E0E3B6AD558E7585BD5A1AE4F1D16C3 -202F267953CD390FF26200E172CB890782E0C43B51C95C55EFA95DA98CF4CA5A -B189838F3832ADF48D8AEB00909D5C07587B26F63BA03A13B0345E9B99E7B1D0 -47427A74353825472C5AB49DD95A90D253CEB066C49D6A4356E072DF5BBF394F -3FA04F54C4A822DFC7FF45AA337B9006BA63DF5D6AFCC7870B2D1AB4A954DB76 -C5B93562408402578D610DD64A09ED30D71D9341F1CFB44922F42DCDACFEE2FE -B8E0EA576DC60840FC3269FF313FEBC57C5D958016C859D2D80BB270E6E93738 -D314BFD28BDACD48697001CF13E9B29D1D1C5785ECF6040F43DA204FD29A924C -E32C8A2AA8ED8BA00C16D46A4EED8CCE9AF13393E8FB6F5FFFEC3A421105F8AD -FF596DA77FAC7567745BFCAAEDE63F080F24AC62A05DD8934D616D1B6A336AE9 -B1ACE43ACBB79549204AC02B7F4ADA2B29E8B081EE02152C7778954F9F61FB67 -6014CF4FFAA5A446334847DBFD348DF16BFFA90B0A8D5E76721E62CC46903CE4 -4C076460459EE651504D119F10D5D046FBF7BCAA97E7D0CCD822A6D442B9BC8B -9EA43A5BC643998A7FE6C97C967B3AEF0019270BEB8EAB12F396CB363D43F70D -7AA971F68B33F1158663FA39DD34934884F5DE842F +588AD80D9983CE7824DA30CEE5DC3114D69D7ACEC0758D8201805B82925EF3C1 +3A6757674B84D9B585F981DDFFB42163EADF90346248E014A74E3FB3E6276FC1 +B4289FCDB4FDBE9C70CAF38E410965A3610F649DF8F81C73B87FBE27D44A3CA6 +D7883821CA22795E3EED184F4F59AC687AC06DC4DE7FD098E0EA61C494A5E960 +643D78025B1D18B4B7FBACCE2DEA453E35C08A6AC093F45FA0B1DE132F743CBA +75F2E7BE0311132C0E63C69D5182B98AEFC610F61D1E1EA51120D8A9F5DFFA8C +37C0ECCA2120E1DF7A551343BD7573FA24144A8D59CA684FF9FCC1E023A3401E +9797D658E92CED2255A273E429FAF43B0355E27EC83974BA4675520B2DC70DDA +DF783452C679BB77759479CB02FF3377BCCD8580E3D87D34CD579AA3F89AAB44 +E526EE761B0D371E27B5A02A5C494C5169651FA79795D332045B3E7F2CA100FA +FA8ADA74DCA851DA1BC7531E58EE08FC22F2F35E94D5DA013A4C9669B2825D26 +021982566B4347E518E82602B0CE5CBA1CD38E8B3CEBBFDF9E9811C896313F37 +51D5F7162441E4B2DF18A7A34326114950BE85B3E5AB465D54652575AAC03DF3 +E50E9FE8D184D33534E12AB92DF20BD72DC129A86CCC24981FF82E297D0B0F9E +0B66137443B501B5FA711C7DF380DB1F64404DA241D1EF5F2D012A0293405302 +F828BF879F46962DFAF75F44D4A394DB9D42E4874477097FF6F8DB9BC8712BC8 +661A95A2467073355FE697CBE1D8E298569935E5405C22555C40DB775A808F54 +642939D8E4F76C61B2FE966F4FB55319873127C8EEB05732A1538FE03EC2D8CB +9089DE328A396DAB3908179FEA2FC3F2ECC48593049FD23114A04B474FF4FBED +4D3B8835148CCB742574F4914B7201CE41A57A42EF61099509E5C42B744611C2 +B40581A6BCF6FA223E5B5221B8BB16AC6EEE3774130E121F23A04E1548F58899 +41C9DD31E720AE7392E4E2CE0ED4B691620CDB0228D3BEE1F4BA6E289E33B7A5 +6DFDA767F5927F00BD22D4BA6397B37BBDE84BF9017C01DD5319AC7D33F8C007 +AF43EF247FDF67CE6627D4A0B0F00A3E58DF6323BDF1100660FF18496649C2EE +6BF1D9940404E2E4B7BB00C807808BACEFF0581E38B9A7F03888BA67E73E002F +871DA37277AB6ED4FB27AF66B9A02C62313495E94113D667CB3FA94DE087C6FA +2481136385B557165CDEA492CE335DB20BFAFE7A3015C95D8C88F6F3065D7F72 +5484F8B665295CAF3E207C758FD9533889D7EE5E16D08577A97185871BAB4CFE +CC58C88B3B0BA4130727C2800D2C305855369729B8CD09AFF83FFFCC3A85014E +7358281AD0C842CC1FB985DB59470AE90BE27190DE79134F2C18447150A6706F +5597A256370F4EFCDF59A7EA8C9BFA2A194DC5F1975D7E875F036BBA686FDC22 +8E9934A3ECE619598C0CD24B3226D55BDC6BF23ED4659DE24072454622A47FC1 +ECDF8D1B202F9178BC1075A4AD29D85545F9C08E16F5BC07C7218FE4C8914D89 +BC259609E90B47B956DE309C40E2943ED6CD471A8506FD38066AB96F573E7922 +B77B4386FDFBB8AC7154342C810D452827169AB8FDB73F50AB7EB6E38A930807 +F91212373CDDBE84FFF86ABAFBAE766F519D1DA26404D7EDFFA803DCB8382EFE +DA1C3D22D195805069C848619646B126333D0605BD76497030E0D3E32EFFAD65 +F84003741FCCC4DFF67CA124B41DA9F0CAD27A1A46E38DA588B443C4301216DA +5DA7A473F9C5F04B2B47446168A2017136ABFA92F6EE9C5DA2B1A92CE664659A +027899D7BE0B322ACC0EF38EA681B4D90F5073C4B4064F8053AC54ABC1594883 +E4D836FD382F00043D97ECE2DEDDFE704F10CC450E4451679E373041B9814AF1 +0D2FE34CC22F7938562B506BC63C03AC904943C4CDCEE5D25F9B65816561962A +68EC20E9BD6E4964226F8C64DC410AEE5DF5F607ACC023BB583D471EAD0B8190 +912DC0D8BFFA623F944AA1AB0BB1545DFBA26229F161201DADB7E07FBFA9040F +5D6D30EBAF57A2EF4A82A30D67825A35E24F350F9F700B42BC926ADF418F6375 +A7C7AE27FF720E9A71817E395F33E8341B70DEF491B6C4AE4051D825B09535D3 +4A0E7B0853CC42956A0A2F1A7421FEBB020D1F178371271DA9893AA2082DED36 +F834704E1CDCACEEC30EFC5514FA218E88E8C9EBD5814124D637221AE0D898D1 +2EFDDF9296D8AD971873D821B5E972F89E24659DADC4D82EE284F6247933EBD6 +643E846894BF9F2A272965E7D3E1466C1AD086099C214CD475F5191FFA282F92 +6EE857FE6AFDD3FF7664E82E0E265CD5487389254F38042EBB5F9866C5B24154 +DA003C177D7E9384E8426D7B88D5701AE7C530A50F6D027904C041F690143008 +D6246306E4644AED88E76F83949352CE1329B1A5D07A1FDA04DA0BBE5F30A925 +740235EAC5DD32F81545836873EC429AD95E7F56BFE4DF70399A7AD2476EF29E +45517385D898071118D2DE56D7A2294CB12D3E22EA35234E752DF7F061A5FF8F +5765C7C13FC74144738679B42351E3B82CA2C91F619B5D06C1FD36661F4397B0 +7540457CCB3D2FB735BBD9ADAA24756DAD45CD5921AAB588DCC80103E1C50290 +204EC4F7F5DF74D8CFF0EEA530CA2D0E88C86431F22062276E9BF9BD68FB8517 +7245261F180FEB9CD574A82A17B8A134BBBDC9B5B7954831DCFA68E0B4266C6C +F99588BF404005CE59C53E94B767B9EFDC1E5674970D097CC221C0C3BC825F17 +62D9F00A1B46B915BC8F0BF7AB31B3F688C9C968F516FC3DEEB149981EED2A47 +C51C8E8CA61F1744B31F483A52ECBE76606F24D90B13569A546420032EAE0F29 +0A564955B4BE1058A9E6EA3B320A15282EE2449E928C8E405BF3FECE131B30E3 +77FC3A735A6E2242C1E4A27793A0E1BB63FF7F6958E5312FE1549DDDD8E15BD1 +7BB07C6564D029C830B89880B4F49207C1602EE590898896EC49BE45DA8906B7 +380D59CE86D7AAB6B0762F624C88D886488B7F6AE9F1328FC400869CE4EEFD7E +7BF55C3DFD059FA20338C9BB33D807236EA2EF6E1C0C1E9EB095DA69FE2831FA +4A0F750418D935F1F0E45AECAA61ADE9D96012511981710FC4225F5C7660A2F7 +0A417E5910F4F05D43E8AE0872B16F4E46554848927F59BDA1EBC5724ACA6B1B +6A62FA03E86D85104E88ADCBD253734F9D078543E3A9F1985FA4D4A77DF2C55C +6F5E9257851A953F1BEF7192B89A409B5566AAC7DDA66F6DE4D89FDF39994611 +5B95857B8B6362BAEA1C939F638E527CA9F58683236B1886E5763B518D5A9F50 +012A1D991AECF0E327594A12476A68C715130D197C1EE81CEEB4DE9E05F7F4EB +0F06054BA90F9CC30C27BE06803ADBE520115F0FB8BA26B0DA1E5A8D28F1CB00 +F7808BD2B0D629A0BE002C11FEAD0A59555E90851E47D466BD87069845B2A6E8 +53E054711A465359DAF057550B8EE9F11F8CA6DEFE6FA70FCAC9856ED992244D +B6D8DF2428F1D09C54C41F54F939DB26081DC63D0E8AC0690E72E76EF2F004B3 +7204E227BD70421CE589A5689FA540C2889BE8B9841193BC020FC07B7B245580 +996EB478FDB9C2F3F7CF02CAFAF3005F12CC496EA254D56F4A26D841E31B2360 +8A1716DBC1A0312F66A2B19A55399BFD9D80DF17982829C3A5F790634FD86DAB +542413C0E19CC1F40FBFB296DCF1DAD4135F688AE11C2A5896EF0C8A54F298B8 +B9C21D82E15BE4B03C7F4D0D6861F28E86D25D98292D7C7C38EE483C2D6AE68F +5CC883C30B92FFDE6D60FD21E9E0E3441C317EE946448D26F8D169A074C92CD7 +D2FE4ADA122D99FDBACEC5D884F728266B21A6B5974B74A21884CC847747F648 +1CF5A52ADB32B3CA4DF108D086734E7F57E2DD6800F22D73F1A579B06EBE6F81 +BD6DBEFF758FC63934F89E8CCE37101AC52AE651F3BD8BC6689297E04D740F6D +56543897EFD747491B65582F6C2896FF3C8521E6948745BA255720AD93C36766 +5669C5C91E00A093608D3376F3107F2536046299BEFE221929CE0414E50D8054 +F07AA336F93C01F28FFF407F6B726155F48F339D97E10D628DE2D5E0A2ECF9AC +6E17695CFBEC59A0EAF50110EDE388579FE3C3EEC98A1F0414F2EC9D3A1612E2 +849A21EB33FFED0B4A753D44B6CCF61D7DA8603513059E5A5523D2FE01D2E970 +EFC7152105BB94A40C08792A75D94EF8333B6A392C51F6FF1BE5904B5877B655 +28E17551A83463B9DD6D6B2F419BD21119B7A9D14325311066AC1A20DB8986C5 +4DB51E16782B5AE654F4C0C9A92C5A1555FB54B1B7E70DADF9A303514E7F7E7B +E99C885DF161FA302CF928BC04535666D5508D2E01514B2DC740E3715BFD603C +D1CEF587FA9AF69D6D8019A2DF5DC33D61F1D324037A06563AE6985CA5DE4C61 +28663AAF1815F8F0B1266C2EDF1A3322FF108170DFCBC13DF794B6A4E64D7202 +E4200951568C73DCF0F2153D724DBC35F1EDA6B31FBF8E1E35C6781A47D1899C +5710361657554359A7B07794967936966E29765A4E2B4741165EABA8A0ED123D +13B77EA9CAFD065B3DF2967F1FC142B0435583E6D221FD15307C8A388E2CD9F2 +F7012BC7BF2D910F639F60F55508AF5A479FA963E7AA049F23A1D8EC24A90BAF +3537A956F8F16D2242300ADCAFE145B44F89DD449B2AE64F41BB4F92DD45F6C3 +CC091487708BD252CDF835D511714F4B51749BBD34A5D812700EFBDF072A40BD +6CE38DFC9A196589D6FC09FCCBCB7CA871FCC35B25354537B959F01E84C1F959 +9E8397B308A3BCCDFA304213116594C3D1925A815B57AA7C631773B5FD518EF6 +238F548ABA462BC1D0A17E76B53CCB2BBF7E8A785620B41C8018109CB45CE895 +BDAD0F89B25B81E4A0478D4A242D3A7A4406D932C0E9FD28E65C57CC3F146E1F +09867E0FCE83F7C2083ADDA5C5A9FB5BF48F89DA0C4BBD45E7120016314098B4 +C6D2C37F5F7709AD5822EAC452FBA28CFEB01E3BF2DAF25C1B559F07152FAEFD +96641B74A4249E88962604CC67F39881A685491DA88705585A7EAA097A2688CB +FC4A8E722D560B2442B3E7EB02F34E30A8A049705DC0C1D181438E85EE53C3D9 +EB5A320A83315AD4B4D26443754B49EA70A16FFCCF753F7B1E6C7EEAD9F7ED75 +7005A52BAC977F57287B77DA642B1467B580E481D97938D1B57519B1970351E6 +A752CE77704369B0E3FA910874DC76415AD1FB4E605F0C806A1A044F300C859C +9A76CFCF2B65CA446AC2CAFF3D9148D662EB88B39D854A4A799DEBB1BF06F120 +D0DF95A54D183ABB65041EBEB986A132B2543EF98EE749F8976279A5448CD151 +896074E5140A766A0A9E95B73C737D09FB6DE3EF8E85B87F477935A04476B0E8 +50CE7A918AB5DEB38BFB8525587CC5B6759CD3C82C2623F628C116A40D3B2AB1 +AEC0D515C14191760DFDAC3BC2154A356211A12A7EE704096F258C66F786311C +03E84B5C05C311B04F1BCBF61FA40B6BB8E2E080B42178F225F37CC1A96CDCC0 +4ACD792C9F0AC7E7E3992238C0E4E88B04A93797E17ACBF04FCE6494299AA9B0 +37A73C4059FFBC949ADDBC0AF181B728AC3369CC6DCE58F7AC4A52A686B74C08 +56C30D0BF291B127F7435F8AA711F98342423BD6DD25D69E3D6E197AEBF90AC5 +E9675FFE7BF93DD5E6C8A89780ECC425B3D735A89C671FA5D70125CFE3B72DF3 +A54F27293135BD071CA5D2365A135A3395D39A508CD434F45793A610852E3D62 +1C717D529A82D93B90E2FF31629413B7AC1DF1EC4D6577980C34357F47899BE2 +CC95866E2140CD64D51AECA4BAF717F4D4BA13F1310F51AE6CF80689F7A1BD04 +1474C8E2B7A640DFCDCDECB7FF9690E8E6FF62FA9842293A1264D9C4AA5FC6DE +84C36FB9334F5F9CA1B3DC4516D4CA3BD116605F5C5D0FB2F30FA080F83891DF +1A23D9C420B3F204085591E4C88C7B26452B329DD0B1F9EDC7B065F21A4B6F60 +349D37A85C5985667040DDE858B27C832CB50CCE7BB9E1EC9C2D5C1B0F05D027 +65A743C13523FFFD455B9C8DE573E76522A8912AF192008DF97D7DED77FB56E6 +FC220D2E27CA29ABE1A138D3FEF84A0306D4DE8ABA3B65D6AACCF1E456C14293 +13A2E52EEAD3CE4D2980714C087C0606768FCE35D9F84873379C90A118B9F4D3 +6008721909002435E6242C5BDB4F85AD82D5C9D548B5786F50821A59FA41D0CC +F096FD004329DDB25C494E4E1D63065EF6CE62C5C59084082182E139109B0E25 +09B500940B0B254F6E76445AB01617C35831FF74DDEA2C582D7E1B736A23322A +4564662F5D21F638CE58055212A66C29755303AF713D54BC4EF5BDD0AF37FE84 +04986F5DB72899B3642B53E80BE87161B5106E8C0114A985CD72DB6E6D3171C0 +8AC789185A6608C45889D19C9574E8B1042846B5E53F303273ACD9985F92874B +0395250173AABA938AF4551E955106AF3D1FAB12AEF599E758278C9C4B0B6EAC +346765F34498198FDB4D2ED8EE4399921A3D380DA97F573E76588A46A927E56B +02EBBE1A628EAD4DCF52726AB2D444450598904C10C0BEEA4D4D313B03ED8BB8 +D5E1125C7F4A24F3F4757365B838BBBB93E232CEB9E8A02531B4E9D116D56E7D +5A9D547E7A00301433B3B8906D494A47B358C51E09BF70DCBE06D594E4A27C54 +83020848F8052038C052AC353AEF3E9D3EBBCD74357873ACDA704659A7962538 +B2D7829C4808D58E17B2DB2E20E464B53445674ED6B373CDE6DFC48AF4268447 +7DA072CB3B480B0D1C26B9753F5A34BAC7380F43ADE718172C399D335A2E88B3 +F14DBF6F091FA427B89FD51C12401441AD767AEEB19CCC2643FEA6BFAF53A057 +F7594CFB89E5DAECDFE36D1CA884C287B5AD943EEC86FB91BCE72693E7586E59 +F594D067F101A95A1CFE062799F9B6AE9E14E1CEE9A9AC23975B534749D9912E +B5190AF0CBA729B70BCBF2433BC8C2808CB6A3A64E87A140E4532AF41F55CE51 +2BF9B4EF348B1F8CC7500847A076EAA125670223BA1BBDC979707493F7DE73CC +78D79A4CF61F4AB8A819F9DF633BE00ACFACFC63438BD5F9CB65F7DBE1C1A99E +AE9E8141EB065D30C17A79C2FC3686F2D13A187C69353374DDE142619D7C6989 +9414C36749E400F0D56C0DD786448421F4D638A1D545BDA0DA9637953D299743 +7A4519B437DEAB7461B69C96DC33B3834897568ACF6C66628DEF7AE597ACCFBB +E273232CC0BFE67E9B89B7F0AC82F5C629E512411A9060D02623BAB507671545 +09EA818A7C0A94A01007DD0D7DD286C22B9ED463836B1D328290B3836FAB5F25 +380917C153901773BBE997031F8267CC91FE3C1916DF6AC46E44791A0863198F +8FB8478724C22BB2732F945B39E4541C0168C45FC18FC7CCAC13FBEA39A93806 +6DEF0FBD7507AD086EA89EB278DB92A9F44D9A8584754643FFFF9C411587D22A +C317E99C08DD469A3A2CB264C3899725338B923F660E1DB69BDC42D5C8BE2193 +B3139B8F53777949C20CFFE8918249DA5606C5F826997E18664085BCFC8FE460 +8D8B5EE4D0EF5D9C2F78246F757F01D2C2CE8EE265DA8038A276EA69BB8651A5 +2418E8479CB00E750644F3745408AE4ECF34B6774AA58D43D28C46DF56A9CCE0 +D7EB1B3E4010F1914A6AD8B0ED7A9104A16A1B2DED8937A5779B2B7E6F724FCF +FBAFD79D2B7840E3F6E4378CE20185DAF51CD5DCDA7F797E5EF992C9B7BD2089 +FEB3A7165FA82A23E5CB0C99003BD75E3B9B00D5308C5C71FA9A4B2E3FC31B84 +35AC901ABEF4AEDBD785E30DEB848014955D1D0B25932AD4420B4FA52830FC10 +EFDABB03B27E85BBBFA667C76E4B5A68F4BC2D2F0BF631E43DC0A18522911998 +834B89CBFE29DEF493B9E87B93D7D9D886FAAC41023231E069E6B0FE3BF904A6 +7149D092E733AA2CA5442C49CC496662F11EA262C67CD191E9BB8FCDF54DEFC5 +ABF141056F515EB48AE9DD502F285F2488119652DA821EA3BF2E7D9895601DBA +0B042D7D2CB609A542734B3F63FC3AF4FDA552BA15DA5E02C23CEB0F0BB14DB5 +2100EC71E868218241E86741638AA14DC1FCE8C1CB035D61C1F9F67EE3D85BFD +BF9EA07AEC4787D7C40557DCA541E7CBDCCDA950AE2E95ABF82633E20F2A58CF +14D205265FF7A1A3524562F62C4C3FA62043B4518AFB0616BEA02145B679BEE9 +CF367A8E5C053F22A004B8ECC26CE1FD6C425A37F9F7EA73AF4A9E9E2366B573 +BA26C25CA60D1436CB40824EF20C87734EBF7FB87EFE47C0292750EA29667BFC +5DA8A01867A94332D779082BDC1114E128ACC6518F8D9B3A21AD8AF7463A42E2 +FB7E29BBBA59189421BAF708893FBB471406F264DEF7F9CA2C42A4956F8CA7D5 +BAC73FCB2B21D6F16836D2E5BC7ED04638ED3D0C480B0E057B05075C0A92464C +6F6E151C818246B845E5056ABD9DBD8219D4086DF9BE0E13F594450B737C0512 +DE7BCF813764645FC7696D572A873CF1075B1627279D6E3EC493627E06DBD02B +C978BB7D39F80CF960354B963F4302281538C6EB420E55E899D9D101798D5CD9 +3E8FC2675D6A5CB2F2423542FB62CDD78A962EB2D63833E6DE848FEE15430A66 +AD244BD768A3BC8307C833997EFD0735A852B6539E7E873A62461F32820B062E +ED77AF1F260D9B4EC55C60C0B2658528C088357C039DF1F3F85AE16917C77273 +55CE42CAC9C5499E07508FEC82BA810C6AF5AB0F597F3174F91DDD9007100491 +1859D303E60AE00ECED21FF7258B613B342C57C22947D60DA3143C3FBC073FB4 +E41E8268DA25ED1D3E030915576519155CCDA8053BBA3BDFBA018C368A077545 +DB789190EC4E7D7EB9AAB77E54F49B07783EEF138026C7101CD5315D14E0F9FB +2BEFC34B5B1A03D2449A1ED3F26DCB75EA542C995EFE140B51B9508737817A9C +962FE2A0B3650F7770C6310F8A0DDD48EC86BA3958F5343C61A2971B413B52F2 +38E66EC71F73DBC29E6798DF7CFCB3103F1841A4D8FCE51983F03EA288BC0045 +0D3565C494E7BFF2178F273FD714ECF7DCD6519A9BB36F95E05A3F2449F89DD9 +E564458349C34A3CD770EFF268495183A0 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 @@ -2313,8 +2307,8 @@ @start /Fa 242[61 13[{ TeXbbad153fEncoding ReEncodeFont }1 49.8132 /CMSY6 rf /Fb 134[32 1[43 32 34 24 24 24 1[34 30 34 50 18 32 1[18 34 30 19 27 34 27 34 30 13[34 44 -1[41 47 1[54 3[22 1[47 39 2[43 1[45 6[18 3[30 1[30 30 -30 1[30 1[18 21 18 44[{ TeXf7b6d320Encoding ReEncodeFont }41 +1[41 47 1[54 3[22 1[47 39 2[43 1[45 6[18 3[30 1[30 1[30 +1[30 1[18 21 18 44[{ TeXf7b6d320Encoding ReEncodeFont }40 49.8132 /CMR6 rf /Fc 135[33 3[24 29 4[40 58 18 2[22 36 2[33 36 33 33 36 50[22 46[{ TeX74afc74cEncoding ReEncodeFont }14 66.4176 /CMTI8 rf /Fd 134[43 43 59 43 45 32 32 34 1[45 @@ -2353,7 +2347,7 @@ %%Page: 1 1 TeXDict begin @landscape 1 0 bop -169 -357 a Fj(Org-Mo)t(de)45 b(Reference)h(Card)g(\(1/2\))546 -242 y Fi(\(for)23 b(v)n(ersion)h -(4.03\))-150 -39 y Fh(Getting)37 b(Started)-150 89 y +(4.04\))-150 -39 y Fh(Getting)37 b(Started)-150 89 y Fg(\(add-to-list)i('auto-mode-alist)h('\("\\\\.org$")e(.)e (org-mode\)\))-150 172 y(\(define-key)i(global-map)h("\\C-cl")e ('org-store-link\))1504 148 y Ff(2)-150 254 y Fg(\(define-key)h @@ -2566,7 +2560,7 @@ %%Page: 2 2 TeXDict begin @landscape 2 1 bop -169 -357 a Fj(Org-Mo)t(de)45 b(Reference)h(Card)g(\(2/2\))546 -242 y Fi(\(for)23 b(v)n(ersion)h -(4.03\))-150 -36 y Fh(Agenda)37 b(Views)-150 120 y Fi(add/mo)n(v)n(e)25 +(4.04\))-150 -36 y Fh(Agenda)37 b(Views)-150 120 y Fi(add/mo)n(v)n(e)25 b(curren)n(t)f(\014le)g(to)g(fron)n(t)g(of)f(agenda)197 b Fg(C-c)36 b([)-150 190 y Fi(remo)n(v)n(e)24 b(curren)n(t)g(\014le)g (from)f(y)n(our)g(agenda)299 b Fg(C-c)36 b(])-150 259 @@ -2761,7 +2755,7 @@ Fg(org-CUA-compatibility)p Fi(.)4535 3770 y Fb(Cop)n(yrigh)n(t)4838 3768 y(c)4821 3770 y Fa(\015)d Fb(2006)i(F)-5 b(ree)21 b(Soft)n(w)n(are)i(F)-5 b(oundation,)20 b(Inc.)4795 3826 -y(v4.03)h(for)h(Org-Mo)r(de)e(4.03,)i(2006)4912 3882 +y(v4.04)h(for)h(Org-Mo)r(de)e(4.04,)i(2006)4912 3882 y(Author:)k(Philip)18 b(Ro)r(ok)n(e)4473 3937 y(based)j(on)g(refcard)g (design)g(and)f(format)i(b)n(y)f(Stephen)f(Gildea)4242 4022 y(P)n(ermission)28 b(is)f(gran)n(ted)i(to)f(mak)n(e)h(and)e diff -r dbd791ef90a1 -r 9b150bc96d33 etc/orgcard.tex --- a/etc/orgcard.tex Sun Jan 29 00:17:11 2006 +0000 +++ b/etc/orgcard.tex Mon Jan 30 18:06:22 2006 +0000 @@ -1,4 +1,4 @@ -% Reference Card for Org Mode 4.03 +% Reference Card for Org Mode 4.04 % %**start of header \newcount\columnsperpage @@ -58,7 +58,7 @@ % Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik % for their many good ideas. -\def\orgversionnumber{4.03} +\def\orgversionnumber{4.04} \def\year{2006} \def\shortcopyrightnotice{\vskip 1ex plus 2 fill diff -r dbd791ef90a1 -r 9b150bc96d33 info/dir --- a/info/dir Sun Jan 29 00:17:11 2006 +0000 +++ b/info/dir Mon Jan 30 18:06:22 2006 +0000 @@ -20,51 +20,54 @@ * Menu: -* Info: (info). How to use the documentation browsing system. +* Info: (info). How to use the documentation browsing system. Emacs -* Emacs: (emacs). The extensible self-documenting text editor. -* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs. +* Emacs: (emacs). The extensible self-documenting text editor. +* Emacs FAQ: (efaq). Frequently Asked Questions about Emacs. * Emacs Lisp Introduction: (eintr). - A simple introduction to Emacs Lisp programming. -* Elisp: (elisp). The Emacs Lisp Reference Manual. + A simple introduction to Emacs Lisp programming. +* Elisp: (elisp). The Emacs Lisp Reference Manual. -* CL: (cl). Partial Common Lisp support for Emacs Lisp. +* CL: (cl). Partial Common Lisp support for Emacs Lisp. * Dired-X: (dired-x). Dired Extra Features. -* Ediff: (ediff). A visual interface for comparing and merging programs. +* Ediff: (ediff). A visual interface for comparing and merging programs. * Emacs-Xtra: (emacs-xtra). Specialized Emacs features. -* Org Mode: (org). Outline-based notes management and organizer. -* PCL-CVS: (pcl-cvs). Emacs front-end to CVS. -* Speedbar: (speedbar). File/Tag summarizing utility. +* Org Mode: (org). Outline-based notes management and organizer. +* PCL-CVS: (pcl-cvs). Emacs front-end to CVS. +* Speedbar: (speedbar). File/Tag summarizing utility. * Ada mode: (ada-mode). Emacs mode for editing Ada code. -* CC mode: (ccmode). Emacs mode for editing C, C++, Objective-C, - Java, Pike, and IDL code. -* Ebrowse: (ebrowse). A C++ class browser for Emacs. +* CC mode: (ccmode). Emacs mode for editing C, C++, Objective-C, + Java, Pike, and IDL code. +* Ebrowse: (ebrowse). A C++ class browser for Emacs. +* ERC: (erc). Powerful, modular, and extensible IRC client + for Emacs. * Flymake: (flymake). An on-the-fly syntax checker for Emacs. -* IDLWAVE: (idlwave). Major mode and shell for IDL and WAVE/CL files. +* IDLWAVE: (idlwave). Major mode and shell for IDL and WAVE/CL files. -* Gnus: (gnus). The news reader Gnus. -* Message: (message). Mail and news composition mode that goes with Gnus. -* MH-E: (mh-e). Emacs interface to the MH mail system. +* Gnus: (gnus). The news reader Gnus. +* Message: (message). Mail and news composition mode that goes with Gnus. +* MH-E: (mh-e). Emacs interface to the MH mail system. * MIME: (emacs-mime). Emacs MIME de/composition library. * Newsticker: (newsticker). A News ticker for Emacs. -* PGG: (pgg). Emacs interface to various PGP implementations. -* SC: (sc). Supercite lets you cite parts of messages you're - replying to, in flexible ways. +* PGG: (pgg). Emacs interface to various PGP implementations. +* Rcirc: (rcirc). Internet Relay Chat (IRC) client. +* SC: (sc). Supercite lets you cite parts of messages you're + replying to, in flexible ways. * SMTP: (smtpmail). Emacs library for sending mail via SMTP. * Sieve: (sieve). Managing Sieve scripts in Emacs. * Autotype: (autotype). Convenient features for text that you enter frequently in Emacs. -* Calc: (calc). Advanced desk calculator and mathematical tool. -* Eshell: (eshell). A command shell implemented in Emacs Lisp. -* EUDC: (eudc). An Emacs client for directory servers (LDAP, PH). -* Forms: (forms). Emacs package for editing data bases - by filling in forms. -* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. +* Calc: (calc). Advanced desk calculator and mathematical tool. +* Eshell: (eshell). A command shell implemented in Emacs Lisp. +* EUDC: (eudc). An Emacs client for directory servers (LDAP, PH). +* Forms: (forms). Emacs package for editing data bases + by filling in forms. +* RefTeX: (reftex). Emacs support for LaTeX cross-references and citations. * SES: (ses). Simple Emacs Spreadsheet -* Tramp: (tramp). Transparent Remote (file) Access, Multiple Protocol. +* Tramp: (tramp). Transparent Remote (file) Access, Multiple Protocol. Edit remote files via a remote shell (rsh, ssh, telnet). * URL: (url). URL loading package. @@ -75,4 +78,4 @@ * VIPER: (viper). The newest Emacs VI-emulation mode. (also, A VI Plan for Emacs Rescue or the VI PERil.) -* VIP: (vip). An older VI-emulation for Emacs. +* VIP: (vip). An older VI-emulation for Emacs. diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/ChangeLog --- a/lisp/ChangeLog Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/ChangeLog Mon Jan 30 18:06:22 2006 +0000 @@ -1,3 +1,526 @@ +2006-01-30 Nick Roberts + + * thumbs.el (thumbs-marked-list): Make buffer-local and + permanent-local. + (thumbs-insert-thumb): Make help-echo non-sticky. + (thumbs-file-alist): Use eolp as check for (non)-image. + +2006-01-30 Juanma Barranquero + + * textmodes/org.el (org-allow-space-in-links, org-closed-string) + (org-quote-string, org-calendar-to-agenda-key) + (org-agenda-sorting-strategy, org-agenda-use-time-grid) + (org-show-following-heading, org-tags-column) + (org-use-tag-inheritance, org, org-allow-space-in-links) + (org-usenet-links-prefer-google, org-file-apps-defaults-gnu) + (org-enable-table-editor, org-calc-default-modes) + (org-table-allow-automatic-line-recalculation) + (org-export-html-style, org-export-with-fixed-width) + (org-export-with-sub-superscripts, org-special-keyword) + (org-formula, org-time-grid, org-table-may-need-update) + (org-mode, org-goto-ret, org-goto-left, org-goto-right) + (org-goto-quit, org-get-indentation, org-end-of-item) + (org-move-item-down, org-move-item-up) + (org-renumber-ordered-list, org-todo, org-log-done, org-occur) + (org-remove-occur-highlights, org-read-date, org-goto-calendar) + (org-agenda, org-agenda-day-view, org-agenda-previous-date-line) + (org-agenda-log-mode, org-agenda-toggle-diary) + (org-agenda-toggle-time-grid, org-agenda-cleanup-fancy-diary) + (org-agenda-file-to-end, org-agenda-no-heading-message) + (org-agenda-get-closed, org-format-agenda-item) + (org-cmp-priority, org-cmp-category, org-cmp-time) + (org-agenda-change-all-lines, org-agenda-diary-entry) + (org-scan-tags, org-after-todo-state-change-hook, org-tags-view) + (org-link-search, org-camel-to-words, org-open-file) + (org-remember-handler, org-table-convert-region) + (org-table-move-row-down, org-table-move-row-up) + (org-table-copy-region, org-table-wrap-region) + (org-table-toggle-vline-visibility) + (org-table-get-vertical-vector, org-table-modify-formulas) + (org-table-get-specials, org-recalc-commands) + (org-table-rotate-recalc-marks, org-table-eval-formula) + (orgtbl-make-binding, org-in-invisibility-spec-p, org-cycle) + (org-level-color-stars-only, org-insert-heading): + Fix typos in docstrings. + (last-arg): Add defvar. + + * makefile.w32-in (WINS): Add erc. + (MH_E_SRC): Update (copied from lisp/Makefile.in). + +2006-01-29 Bill Wohler + + * Makefile.in (MH_E_SRC): Add mh-compat.el, mh-folder.el, + mh-letter.el, mh-limit.el, mh-scan.el, mh-show.el, mh-thread.el, + mh-tool-bar.el, mh-xface.el. Remove mh-customize.el, mh-init.el. + (mh-autoloads): Don't use comments on otherwise empty lines. + +2006-01-29 Edward O'Connor + + * emulation/viper.el (viper-major-mode-modifier-list): Add + insert-state and vi-state entries for erc-mode. + (viper-go-away, viper-set-hooks): Add and remove + viper-comint-mode-hook from erc-mode-hook as appropriate. + + * emulation/viper.el (viper-insert-state-mode-list): Add erc-mode. + +2006-01-29 Juanma Barranquero + + * bs.el (bs--format-aux): Implement `middle' alignment as + described in the docstring for `bs-attributes-list'. + (bs--get-name): Simplify. Don't pad the buffer name. + +2006-01-27 Agustin Martin + + * textmodes/ispell.el (ispell-find-aspell-dictionaries): If no + English aspell dictionary is installed, use the first entry of + ispell-dictionary-alist-1. + +2006-01-27 Kevin Rodgers + + * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): + Doc fix. + +2006-01-27 Michael Albinus + + * net/tramp-vc.el (vc-user-login-name): Wrap defadvice with a test + for `process-file', in order to let it work for older Emacsen too. + +2006-01-27 Eli Zaretskii + + * international/latexenc.el: Add a suitable `coding:' tag. + (latexenc-find-file-coding-system): Undo last change. + +2006-01-27 Arne J,bx(Brgensen + + * international/latexenc.el (latexenc-find-file-coding-system): + Make sure latexenc-main-file is a regular file and is readable. + +2006-01-27 Andre Spiegel + + * vc-rcs.el (vc-rcs-fetch-master-state, vc-rcs-consult-headers): + Pass FILE to vc-user-login-name. + + * vc-sccs.el (vc-sccs-state): Pass FILE to vc-user-login-name. + +2006-01-27 Nick Roberts + + * thumbs.el (thumbs-do-thumbs-insertion): Suppress message when + there are no more images to display. + (thumbs-mark, thumbs-unmark): Revert change so that they move to + the next image. + +2006-01-26 Richard M. Stallman + + * cus-edit.el (custom-mode): Doc: Use advertised-widget-backward. + + * wid-edit.el (advertised-widget-backward): New alias. + (widget-keymap): Use advertised-widget-backward for S-TAB. + + * tumme.el: Correct the keywords. + (tumme-dir-max-size): Use defvar. + (tumme-setup-dired-keybindings, tumme-dired): Add autoload cookie. + + * simple.el (move-beginning-of-line): Take account of fields. + (clone-indirect-buffer-other-window): Take args like + clone-indirect-buffer, and work like it. + + * help-fns.el (describe-function): Don't pass `nil' as default. + + * files.el (risky-local-variable-p): Follow var aliases. + + * subr.el (lazy-completion-table): Doc fix. + + * mail/rmailsum.el (rmail-make-summary-line-1): Don't set + global binding of `line'. + +2006-01-25 Andre Spiegel + + * vc-hooks.el (vc-user-login-name): Rewritten to handle access via + Tramp. + + * vc.el (vc-default-dired-state-info): Pass FILE to + vc-user-login-name. + (vc-default-update-changelog): Don't use vc-user-login-name, we + don't need it here. + + * tramp-vc.el (vc-user-login-name): Comment out defadvice, it is + no longer necessary. + +2006-01-25 Kenichi Handa + + * international/mule.el (decode-char): Avoid the overhead of + calling utf-lookup-subst-table-for-decode if + utf-translate-cjk-mode is nil. + (encode-char): Avoid the overhead of calling + utf-lookup-subst-table-for-encode if utf-translate-cjk-mode is + nil. + +2006-01-22 Kenichi Handa + + * international/mule.el (make-subsidiary-coding-system): Reset + `coding-system-define-form' property of subsidiaries to nil. + Avoid duplicated entry in coding-system-alist. + (make-coding-system): Avoid duplicated entry in + coding-system-alist. + (define-coding-system-alias): Likewise. + +2006-01-24 Luc Teirlinck + + * completion.el: Minor fixes in introductory comment. + (completion-def-wrapper): Fix alist. + +2006-01-25 Nick Roberts + + * thumbs.el (thumbs-new-image-size): New function. + (thumbs-increment-image-size-element) + (thumbs-decrement-image-size-element, thumbs-increment-image-size) + (thumbs-decrement-image-size): Delete. + (thumbs-resize-image-1): Rename from thumbs-resize-image. Keep old + temp files and use to resize. + (thumbs-resize-image): Rename from thumbs-resize-image-interactive. + Use increment argument to enlarge/shrink. Preserve point. + (thumbs-shrink-image): Rename from thumbs-resize-image-size-down. + (thumbs-enlarge-image): Rename from thumbs-resize-image-size-up + (thumbs-show-thumbs-list): Set thumbs-buffer to current-buffer. + (thumbs-mark, thumbs-unmark): Preserve point. + (thumbs-modify-image): Keep old temp files and use to modify. + Cleanup old temp files at load time. Preserve point. + (thumbs-view-image-mode-map): Use new command names. + +2006-01-24 Stefan Monnier + + * log-view.el (log-view-minor-wrap): First rev is the one at point. + + * calendar/cal-menu.el: Avoid macros from calendar.el so as to break + the nastiest part of the cyclic dependency. + (cal-menu-update): Use dotimes and calendar-increment-month. + + * calendar/calendar.el: Remove unnecessary leading stars in docstrings. + (calendar-week-start-day): Add an :initializer. + (calendar-mode-map): Use suppress-keymap, and command remapping. + (describe-calendar-mode): Setup xref-stack info for the back button. + (calendar-star-date): Insert before delete. + (calendar-set-mode-line): Add file-modified info if applicable. + (calendar-increment-month): New function. + +2006-01-24 Tobias C. Rittweiler (tiny change) + + * font-lock.el (lisp-font-lock-keywords-2): + Recognize "& keywords" only at word boundaries. + +2006-01-24 Nick Roberts + + * thumbs.el (thumbs-extra-images): New variable. Make it buffer-local + and permanent-local. + (thumbs-max-image-number): New variable. + (thumbs-do-thumbs-insertion): Use them. + (thumbs-per-line): Change default to 4. + (thumbs-marked-list): Rename from thumbs-markedL. + (thumbs-cleanup-thumbsdir, thumbs-delete-images) + (thumbs-rename-images): Use -list instead of L for internal variables. + (thumbs-call-convert): Use call-process instead of shell-command. + (thumbs-insert-thumb): Add filename as help-echo to each image. + (thumbs-show-from-dir): Rename from thumbs-show-all-from-dir. + Give dir to thumbs-show-thumbs-list. + (thumbs-show-thumbs-list): Set default-directory to that of images. + (thumbs-dired-show): Rename from thumbs-dired-show-all. + (thumbs-display-thumbs-buffer, thumbs-show-more-images): New functions. + (thumbs-mode-map): Bind "+" to thumbs-show-more-images. + (thumbs-view-image-mode-map): Bind "^" to thumbs-display-thumbs-buffer. + +2006-01-23 Stefan Monnier + + * ses.el (ses-read-cell): Provide a default value. + +2006-01-23 Juanma Barranquero + + * term/w32-win.el (image-library-alist): Add additional names for + GIF library. + +2006-01-23 Arne J,Ax(Brgensen + + * international/latexenc.el (latexenc-find-file-coding-system): + Add file-regular-p check. + +2006-01-22 Stefan Monnier + + * simple.el (clone-buffer): Don't show the new buffer in the same + window. + +2006-01-23 Juri Linkov + + * faces.el (link, link-visited): New faces based on default values + of `info-xref' and `info-xref-visited'. + + * info.el (info-xref): Inherit from `link'. + (info-xref-visited): Inherit from `link-visited'. + + * cus-edit.el (custom-buffer-create-internal): Use widget type + `custom-manual' instead of `info-link' and don't set properties + `button-face' and `mouse-face' explicitly. + (custom-browse-group-tag, custom-browse-variable-tag) + (custom-browse-face-tag): Inherit from widget class + `custom-group-link' instead of `push-button'. + (custom-button-unraised): Inherit from `underline' face. + (custom-link): Inherit from `link' face. Fix doc and group. + (custom-add-parent-links, custom-group-value-create): Don't set + properties `button-face' and `mouse-face' explicitly for + `custom-group-link' widget. + (custom-group-link): Add properties `button-face' and `mouse-face' + to widget definition. + (custom-field-keymap): New variable. Put `custom-field-keymap' to + editable-field's :keymap property. + (custom-mode): Fix docstring: substitute keybindings for + `widget-forward' and `widget-backward' from `widget-keymap', + `widget-complete' from `custom-field-keymap', replace old + `Custom-move-and-invoke' with `widget-move-and-invoke'. Untabify. + + * desktop.el (desktop-load-file): Check for `fboundp' before + calling `symbol-function'. + + * simple.el (clone-buffer, clone-indirect-buffer) + (clone-indirect-buffer-other-window): Use `read-buffer' instead of + `read-string'. Fix prompts. + + * play/doctor.el (doctor-mode-map): Rename from `doc-mode-map'. + +2006-01-23 Nick Roberts + + * thumbs.el (thumbs-file-alist): Avoid creating duplicate entries. + +2006-01-22 Luc Teirlinck + + * startup.el (inhibit-splash-screen, initial-scratch-message): + Doc fixes. + +2006-01-22 Michael Albinus + + Sync with Tramp 2.0.52. + + * net/tramp.el, net/tramp-ftp.el, net/tramp-util.el, + net/tramp-vc.el: Add code for unloading Tramp. See comment before + `tramp-unload-tramp' for checklist. + + * net/tramp.el: Require `timer-funcs' instead of `timer' if in + XEmacs. Contributed by Steve Youngs . + (tramp-unload-file-name-handler-alist) + (tramp-unload-tramp): New defuns. + (tramp-advice-PC-expand-many-files): New defadvice. + (tramp-save-PC-expand-many-files, tramp-setup-complete) Defuns + removed. + (tramp-handle-expand-file-name): Remove double slash. + (tramp-handle-file-attributes-with-ls): Return t as 9th attribute. + It doesn't matter, because it will be converted later on. + (tramp-handle-file-ownership-preserved-p): Rewritten. The old + implementation was just heuristic. + (tramp-post-connection): Set uid and gid properties. + (tramp-convert-file-attributes): Set file's gid change bit. + (tramp-get-remote-uid, tramp-get-remote-gid): New defuns. + (tramp-handle-expand-file-name): Use "~root" for tilde expansion + in case of su(do)? methods. The home directory of the local user + will be taken else. + (tramp-open-connection-telnet) + (tramp-open-connection-rsh, tramp-open-connection-su) + (tramp-open-connection-multi): Set PS1 to "$ ". Otherwise, a + local shell prompt could hurt. Reported by Romain Francoise + . + (tramp-let-maybe): Add `edebug-form-spec' property. + (tramp-handle-expand-file-name): Bind `default-directory' locally + to "/" in order to avoid problems with UNC shares or Cygwin + mounts. + (tramp-md5-function): Fix typo in error message. + + * net/tramp-ftp.el (tramp-ftp-enable-ange-ftp): New defun. + + * net/tramp-util.el (top): Apply `ignore' instead of `identity' + for byte-compiler pacification. + +2006-01-22 Andre Spiegel + + * vc-rcs.el (vc-rcs-state-heuristic): Use file-attributes with + ID-FORMAT `string'. This allows us to get rid of + `vc-user-login-name UID'. + + * vc-sccs.el (vc-sccs-state-heuristic): Likewise. + +2006-01-22 John Paul Wallington + + * hl-line.el (hl-line-highlight, hl-line-move): Doc fixes. + +2006-01-21 Martin Rudalics + + * emacs-lisp/find-func.el (find-definition-noselect) + (find-variable-noselect): Search variables in C source code too. + (find-function-C-source, find-function-noselect, find-function) + (find-function-other-frame, find-variable-noselect, find-variable) + (find-variable-other-frame, find-variable-at-point): + Fix docstrings. + +2006-01-21 Francesco Potorti` + + * mail/rmailout.el (rmail-output): Don't use content-type if it is nil. + +2006-01-21 Agustin Martin + + * textmodes/flyspell.el (flyspell-emacs-popup, flypell-xemacs-popup): + Default to disabling the "Save affix" question. + +2006-01-21 Marien Zwart (tiny change) + + * progmodes/python.el (python-mode) : Pass nil as + the first arg to run-python. + +2006-01-21 Eli Zaretskii + + * startup.el (command-line-1): Handle --no-desktop if desktop.el + is not loaded. + +2006-01-20 Jay Belanger + + * calc/calcalg2.el (calc-sum-rec): Fix the sum when the lower + limit is 0. + + * calc/calc-arith.el (math-add-symb-fancy): Check the length of + the correct variable. + +2006-01-20 Carsten Dominik + + * textmodes/org.el (org-open-at-point): Fixed bug with matching a + link. Fixed buggy argument sequence in call to `org-view-tags'. + (org-compile-prefix-format): Set `org-prefix-has-tag'. + (org-prefix-has-tag): New variable. + (org-format-agenda-item): Remove tags from headline if + appropriate. + (org-agenda-remove-tags-when-in-prefix): New option. + (org-get-tags-at): New function. + +2006-01-20 Nick Roberts + + * thumbs.el (thumbs-buffer): New variable. Make it buffer local. + (thumbs-find-image): Move image name and number from buffer name + to mode name. Set thumbs-buffer. Preserve point so that large + images remain visible. + (thumbs-file-alist): Construct list in thumbs-buffer and reverse + order. + (thumbs-show-image-num): Get image from thumbs-file-alist. Set + mode name. + (thumbs-next-image, thumbs-previous-image): Make them work. + +2006-01-19 Luc Teirlinck + + * cus-edit.el (custom-buffer-create-internal): State in the text above + the whole buffer buttons that they do not operate on hidden items. + (custom-face-menu): Use `custom-face-save' instead of + `custom-face-save-command'. + (custom-face-save-command): Make it an alias for `custom-face-save' + and declare it obsolete. + (custom-face-save): Doc fix. + + * dired.el (dired-no-confirm): Add quote. + (dired-subdir-alist-pre-R): Add quote in + `make-variable-buffer-local' form and remove unbalanced parenthesis. + +2006-01-19 Stefan Monnier + + * textmodes/table.el (table-mode-indicator): Typo in last change. + +2006-01-19 Richard M. Stallman + + * outline.el (hide-leaves): Don't call outline-end-of-heading. + Fixes bug reported in Nov 2005. + + * isearch.el (isearch-forward): Doc fix. + + * dired.el (dired-move-to-filename-regexp): Define as alias. + (dired-no-confirm): Use defcustom. + (dired-subdir-alist-pre-R): Put defvar at top level. + + * battery.el (battery-linux-proc-acpi): Handle "last full capacity". + + * textmodes/bibtex.el (bibtex-strings, bibtex-reference-keys): + Mark as risky. + + * simple.el (set-mark-command): Doc fix. + (clone-indirect-buffer-other-window): + Read arg like clone-indirect-buffer. + (move-beginning-of-line): Skip invisible newlines. + +2006-01-19 Masatake YAMATO + + * progmodes/cpp.el (cpp-edit-load): Make the order of + listed conditions in a base C code buffer and its associate + CPP Edit buffer the same. + +2006-01-19 Kenichi Handa + + * mail/rmail.el (rmail-enable-mime): Docstring fixed. + (rmail-mime-feature): Likewise. + (rmail-require-mime-maybe): Use display-warning to show a warning + message. + + * international/mule.el (auto-coding-regexp-alist-lookup): New fun. + (find-auto-coding): Use auto-coding-regexp-alist-lookup. + +2006-01-18 Stefan Monnier + + * array.el: Move defvars out of eval-when-compile. + (array-make-template): Replace undeclared global var with a local one. + (array-mode): Inline initialization functions. + (array-init-local-variables, array-init-max-row) + (array-init-max-column, array-init-columns-per-line) + (array-init-field-width, array-init-rows-numbered) + (array-init-line-length, array-init-lines-per-row): Remove. + + * play/doctor.el: Move defvars out of eval-when-compile. Use dolist. + (doc-mode-map): Define explicitly. + (doctor-txtype): Use mapc. + + * textmodes/table.el: Move defvars out of eval-when-compile. + Remove harmful code meant to avoid byte-compiler warnings. + (table-fixed-mode-indicator): Remove. Use a more complex mode-line + specification that checks table-fixed-width-mode directly. + (table-recognize-region, table-recognize-cell): + Use restore-buffer-modified-p. + (table-fixed-width-mode): Remove code that refreshes + table-fixed-mode-indicator. + (*table--cell-describe-bindings, *table--cell-describe-mode): + Avoid obsolete name print-help-return-message. + (table--test-cell-list): Don't use replace-regexp from elisp. + (table--point-entered-cell-function, table--point-left-cell-function): + Don't set table-fixed-mode-indicator, use force-mode-line-update. + + * textmodes/org.el: Move defvars out of eval-when-compile. Move code + that was after the end of file. Use buffer-file-name variable. + (org-timestamp-change): Use with-current-buffer. + (org-todo-list): Don't unnecessarily define a new buffer-local var. + (org-agenda-file-to-end, org-agenda-file-to-front): Remove unused arg + `file'. + + * progmodes/fortran.el: Move defvars out of eval-when-compile. + (fortran-break-line): Remove unused var `opoint'. + (fortran-abbrev-start): Obey help-event-list. + +2006-01-18 Jesper Harder + + * mail/smtpmail.el (smtpmail-send-it): Use insert-buffer-substring. + +2006-01-18 Masatake YAMATO + + * progmodes/make-mode.el (makefile-imake-mode): New mode + derived from makefile-mode. + (makefile-imake-mode-syntax-table): New syntax table + derived from makefile-mode-syntax-table. + (makefile-mode): Write about makefile-imake-mode in doc string. + (makefile-mode-map): Bind "\C-c\C-m\C-i" to makefile-imake-mode. + (makefile-imake-font-lock-keywords): New font lock keywords. + + * files.el (auto-mode-alist): Add Imakefile. + +2006-01-17 Agustin Martin + + * textmodes/flyspell.el (ispell-kill-ispell-hook): Add to the hook when + loading the file rather than when turning on flyspell-mode. + 2006-01-16 Luc Teirlinck * cus-edit.el (customize-rogue): Minor doc fix. @@ -41,6 +564,8 @@ * buff-menu.el (buffer-menu-buffer) : Renamed from Buffer-menu-buffer. Doc fix. (Buffer-menu-buffer): Face alias to buffer-menu-buffer. + (list-buffers-noselect): Use `buffer-menu-buffer' face instead of + `Buffer-menu-buffer'. * info.el (Info-mode-line-node-keymap): New defvar. (Info-set-mode-line): Use `stringp' to check Info-current-file. @@ -52,8 +577,7 @@ 2006-01-16 Kenichi Handa - * international/code-pages.el: Add autoload cookies for - cp125[0345678]. + * international/code-pages.el: Add autoload cookies for cp125[0345678]. * language/european.el (cp1252): New alias for windows-1252. @@ -67,14 +591,13 @@ (term-mode): Make variables local here instead of doing it in `term-emulate-terminal'. (term-emulate-terminal): Delete incorrect optimization for cr+lf. - Scroll reverse needs to take into account the scroll - region. Saving and restoring the cursor should save the color - attributes too. + Scroll reverse needs to take into account the scroll region. + Saving and restoring the cursor should save the color attributes too. (term-reset-terminal): Reset the scroll region. (term-handle-ansi-escape): Cursor up and down should take into account the scroll region. - (term-set-scroll-region): Renamed from `term-scroll-region'. Move - to 0,0 after setting the region. + (term-set-scroll-region): Rename from `term-scroll-region'. + Move to 0,0 after setting the region. (term-handle-scroll): Handle scroll up. (term-down): Fix off by one error. (term-delete-lines): Do not delete outside the scroll region. @@ -98,6 +621,10 @@ (Custom-reset-saved): Do not ask for confirmation in single option buffers. +2006-01-13 Richard M. Stallman + + * font-lock.el (lisp-font-lock-keywords-1): Minor rearrangement. + 2006-01-13 Romain Francoise * add-log.el (add-change-log-entry, change-log-merge): @@ -134,7 +661,7 @@ Use `org-expand-wide-chars'. (org-open-file): Fix bug in program launch. (org-get-time-of-day): Fix bug with times before 1am. - (org-agenda-menu): Addes tags commands. + (org-agenda-menu): Add tags commands. 2006-01-13 Agustin Martin @@ -345,7 +872,7 @@ * emacs-lisp/find-func.el (find-definition-noselect): Fix typo in the doc string: "functoin" => "function". - ldefs-boot.el: Likewise. + * ldefs-boot.el: Likewise. * textmodes/bibtex.el (bibtex-validate-globally): Fix typo in a message text: "Duplicat" => "Duplicate". @@ -658,7 +1185,7 @@ that we set completion-ignore-case (i.e., binding via let is not sufficient). (bibtex-complete): Always set completion-ignore-case and - choose-completion-string-functions. The latter is needed because + choose-completion-string-functions. The latter is needed because choose-completion-string-functions keeps its value if we quit the *Completions* buffer without requesting a completion. @@ -720,7 +1247,7 @@ (bibtex-beginning-first-field): New functions. (bibtex-skip-to-valid-entry): Use bibtex-valid-entry. Fix regexp. (bibtex-map-entries): Fix docstring. - (bibtex-flash-head): New arg prompt. Simplify. + (bibtex-flash-head): New arg prompt. Simplify. (bibtex-enclosing-field): Include code of bibtex-inside-field. (bibtex-insert-kill): Simplify. Always insert text past the current field or entry. @@ -756,7 +1283,7 @@ * progmodes/gud.el (gud-tooltip-dereference): Rename from toggle-gud-tooltip-dereference. (gud-tooltip-print-command): Move concatenation of "*" to expr to... - (gud-tooltip-tips): ...here when dereferencing.. + (gud-tooltip-tips): ...here when dereferencing. 2005-12-28 Bill Wohler @@ -1007,7 +1534,7 @@ * menu-bar.el (menu-find-file-existing): New function. (menu-bar-file-menu): Use menu-find-file-existing for Open. - * tool-bar.el (tool-bar-setup): open changed to menu-find-file-existing. + * tool-bar.el (tool-bar-setup): Open changed to menu-find-file-existing. 2005-12-22 Stefan Monnier @@ -1268,7 +1795,7 @@ * simple.el (last-buffer): Move here. (get-next-valid-buffer): New function. (next-buffer): Use frame-local buffer list, maintain buried buffer list. - (prev-buffer): Ditto. Rename to `previous-buffer'. + (prev-buffer): Ditto. Rename to `previous-buffer'. * menu-bar.el (menu-bar-update-buffers): Update uses of `prev-buffer'. * bindings.el (global-map): Ditto. @@ -1297,8 +1824,8 @@ (ispell-buffer-local-dict): Don't set spell-personal-dictionary after killing process. (ispell-buffer-local-words): Don't clear out ispell-buffer-local-name. - (ispell-tex-skip-alists) - (ispell-html-skip-alists, ispell-skip-region-alist): Mark as risky. + (ispell-tex-skip-alists, ispell-html-skip-alists) + (ispell-skip-region-alist): Mark as risky. * net/newsticker.el (newsticker--retrieval-timer-list) (newsticker--display-timer, newsticker-running-p) @@ -1537,7 +2064,7 @@ * progmodes/gud.el (gud-tooltip-modes, gud-tooltip-display): Add the gud groupname. (gud-tooltip-mode): Add the tooltip groupname. - (gud-tooltip-echo-area): Add the gud groupname. Remove tag to + (gud-tooltip-echo-area): Add the gud groupname. Remove tag to avoid conflict with tooltip-use-echo-area. 2005-12-10 Romain Francoise @@ -1560,7 +2087,7 @@ 2005-12-10 David Koppelman - * hi-lock.el: (hi-lock-mode) Renamed from hi-lock-buffer-mode; + * hi-lock.el (hi-lock-mode): Rename from hi-lock-buffer-mode; react if global-hi-lock-mode seems intended. (global-hi-lock-mode) Renamed from hi-lock-mode. (hi-lock-archaic-interface-message-used) @@ -1570,7 +2097,7 @@ (hi-lock-find-patterns, hi-lock-font-lock-hook): Replace hi-lock-buffer-mode with hi-lock-mode. -2005-12-10 Kevin Rodgers +2005-12-10 Kevin Rodgers * emacs-lisp/lisp.el (lisp-complete-symbol): Regenerate the completion list, even after a partial completion has been @@ -1703,8 +2230,8 @@ 2005-12-08 Kim F. Storm - * emulation/cua-rect.el (cua--rectangle-aux-replace): Fix - indention of text on right side of replaced rectangle. + * emulation/cua-rect.el (cua--rectangle-aux-replace): + Fix indention of text on right side of replaced rectangle. 2005-12-09 Nick Roberts @@ -1740,7 +2267,7 @@ * progmodes/cc-defs.el: (i) Load cc-fix.elc for `push' and `pop' (for GNU Emacs 20.4) - * progmodes/cc-cmds.el (c-show-syntactic-information): change the + * progmodes/cc-cmds.el (c-show-syntactic-information): Change the highlighting mechanism so it will work in XEmacs too. * progmodes/cc-defs.el: Insert c-int-to-char. @@ -1770,8 +2297,8 @@ * progmodes/cc-mode.el: Bind c-subword-mode to C-c C-w. - * progmodes/cc-subword.el, cc-cmds.el, cc-mode.el: Rename - "c-subword-move-mode" as "c-subword-mode". + * progmodes/cc-subword.el, cc-cmds.el, cc-mode.el: + Rename "c-subword-move-mode" as "c-subword-mode". * progmodes/cc-mode.el: Added tty suitable bindings for C-c and C-c C-. (To the c-hungry- delete functions). @@ -1803,8 +2330,8 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-fonts.el, cc-vars.el - (gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection, - gtkdoc-font-lock-keywords): GtkDoc patterns contributed by + (gtkdoc-font-lock-doc-comments, gtkdoc-font-lock-doc-protection) + (gtkdoc-font-lock-keywords): GtkDoc patterns contributed by Masatake YAMATO. (c-doc-comment-style): Made GtkDoc default in C mode. @@ -1828,7 +2355,7 @@ c-syntactic-context for calls to "criteria functions", for consistency with other calls to user functions. - * progmodes/cc-cmds.el (c-indent-command): expunge use of + * progmodes/cc-cmds.el (c-indent-command): Expunge use of `current-prefix-arg', since this might be the prefix arg to a command which calls c-indent-command as a function. Change the interactive spec from "p" to "P". @@ -1847,14 +2374,14 @@ 2005-12-08 Alan Mackenzie - * progmodes/cc-cmds.el (c-mask-paragraph): correct, so that + * progmodes/cc-cmds.el (c-mask-paragraph): Correct, so that auto-fill doesn't split a c-comment's last word from a hanging "*/" when a space is typed between them after fill-column. * progmodes/cc-defs.el: New macro c-delete-and-extract-region. - * progmodes/cc-styles.el (c-set-style, - c-setup-paragraph-variables): Abort the command if we're not in a + * progmodes/cc-styles.el (c-set-style) + (c-setup-paragraph-variables): Abort the command if we're not in a CC Mode buffer. * progmodes/cc-align.el (c-lineup-C-comments): Correct indentation @@ -1885,25 +2412,25 @@ 2005-12-08 Martin Stjernholm - * progmodes/cc-fonts.el (c-basic-matchers-before, - c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used + * progmodes/cc-fonts.el (c-basic-matchers-before) + (c-complex-decl-matchers): Fixed the "not-arrow-prefix" regexp used in Pike. * progmodes/cc-langs.el (c-other-op-syntax-tokens): Only C++ has digraphs. * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el - (c-cpp-message-directives, c-cpp-include-directives, - c-opt-cpp-macro-define, c-opt-cpp-macro-define-start, - c-cpp-expr-directives): Introduced new language constants to + (c-cpp-message-directives, c-cpp-include-directives) + (c-opt-cpp-macro-define, c-opt-cpp-macro-define-start) + (c-cpp-expr-directives): Introduced new language constants to control cpp syntax in a cleaner way. (c-cpp-expr-functions): Renamed from c-cpp-defined-fns. (c-cpp-matchers, c-forward-to-cpp-define-body): Use them. - * progmodes/cc-langs.el, cc-fonts.el (c-string-escaped-newlines, - c-multiline-string-start-char): New language constants and + * progmodes/cc-langs.el, cc-fonts.el (c-string-escaped-newlines) + (c-multiline-string-start-char): New language constants and variables to specify how newlines in string literals work. (c-font-lock-invalid-string): Use them. @@ -1919,15 +2446,15 @@ * progmodes/cc-engine.el, cc-langs.el (c-opt-op-identifier-prefix): New language constant and variable. - (c-just-after-func-arglist-p, c-after-special-operator-id, - c-search-decl-header-end, c-inside-bracelist-p): Use it. + (c-just-after-func-arglist-p, c-after-special-operator-id) + (c-search-decl-header-end, c-inside-bracelist-p): Use it. * progmodes/cc-align.el, cc-engine.el (c-after-special-operator-id): New helper to handle C++ operator identifiers. - (c-lineup-topmost-intro-cont, c-just-after-func-arglist-p, - c-guess-basic-syntax): Handle C++ operator identifiers in + (c-lineup-topmost-intro-cont, c-just-after-func-arglist-p) + (c-guess-basic-syntax): Handle C++ operator identifiers in declarations. * progmodes/cc-langs.el (c-assignment-operators): Added the @@ -1997,7 +2524,7 @@ (c-point-syntax): Add a check for "virtual semicolons" in AWK mode, so that the tentative extra newline doesn't change the syntax of the following brace. - (c-electric-brace): restructure by extracting the above functions. + (c-electric-brace): Restructure by extracting the above functions. Tidy up the coding somewhat. (c-electric-semi&comma, c-electric-colon, c-electric-paren): restructure a bit. @@ -2022,9 +2549,9 @@ * progmodes/cc-subword.el: New functions and minor mode to handle SillyCapsedStyleIndentifiers, contributed by Masatake YAMATO: - (c-forward-subword, c-backward-subword, c-mark-subword, - c-kill-subword, c-backward-kill-subword, c-transpose-subwords, - c-capitalize-subword, c-downcase-subword, c-upcase-subword): + (c-forward-subword, c-backward-subword, c-mark-subword) + (c-kill-subword, c-backward-kill-subword, c-transpose-subwords) + (c-capitalize-subword, c-downcase-subword, c-upcase-subword): Functions corresponding to the standard word handling functions. (c-subword-move-mode): Minor mode that replaces all the standard @@ -2045,7 +2572,7 @@ Introduce an "awk" style, mainly for auto-newline and clean-ups. - * progmodes/cc-align.el: new function c-snug-1line-defun-close + * progmodes/cc-align.el: New function c-snug-1line-defun-close * progmodes/cc-cmds.el: In c-electric-brace, add code for new clean-up one-liner-defun. @@ -2068,8 +2595,8 @@ * progmodes/cc-defs.el (c-tnt-chng-record-state): Don't signal an error if the mark isn't set. - * progmodes/cc-engine.el (c-guess-continued-construct, - c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more + * progmodes/cc-engine.el (c-guess-continued-construct) + (c-guess-basic-syntax): Use `c-forward-decl-or-cast-1' to more accurately detect functions inside functions. * progmodes/cc-engine.el (c-at-expression-start-p): New function @@ -2090,8 +2617,8 @@ (c-forward-objc-directive): New function to move over any ObjC directive. - (c-just-after-func-arglist-p, c-guess-basic-syntax, - c-basic-matchers-before): Use it. + (c-just-after-func-arglist-p, c-guess-basic-syntax) + (c-basic-matchers-before): Use it. (c-font-lock-objc-iip-decl): Removed. @@ -2101,8 +2628,8 @@ * progmodes/cc-styles.el (c-style-alist): Fixed several inconsistencies in the Whitesmith style. - * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): New - lineup function to get lines after Whitesmith style blocks + * progmodes/cc-align.el (c-lineup-after-whitesmith-blocks): + New lineup function to get lines after Whitesmith style blocks correctly indented. (c-lineup-whitesmith-in-block): Backed out the compensation for @@ -2137,10 +2664,10 @@ 2005-12-08 Alan Mackenzie * progmodes/cc-awk.el: Change the terminology of regexps: A char - list is now - [asdf], a char class [:alpha:]. Include code for char classes. - Set c-awk-NL-prop on lines ending in open strings. (Bug fix.) - Add character classes (e.g. "[:alpha:]") into AWK Mode's regexps. + list is now [asdf], a char class [:alpha:]. Include code for char + classes. Set c-awk-NL-prop on lines ending in open strings. (Bug + fix.) Add character classes (e.g. "[:alpha:]") into AWK Mode's + regexps. Remove (nearly all of) the cruft associated with AWK Mode's former concept of "virtual semicolons": @@ -2162,7 +2689,7 @@ adapted for virtual semicolons. * progmodes/cc-engine.el: - (c-ws*-string-limit-regexp): new regexp. + (c-ws*-string-limit-regexp): New regexp. (c-forward-single-comment, c-backward-single-comment): Comment out the (now redundant) "special" AWK stuff. @@ -2174,9 +2701,8 @@ * progmodes/cc-fonts.el (c-font-lock-declarations): Always narrow to the fontified region so that fontification doesn't occur - outside it - (could happen e.g. when fontifying a line with an unfinished - declaration). + outside it (could happen e.g. when fontifying a line with an + unfinished declaration). 2005-12-08 Alan Mackenzie @@ -2289,7 +2815,7 @@ initialised in c-setup-paragraph-variables, used in string scanning subroutines of c-beginning-of-statement. - * progmodes/cc-cmds.el (c-electric-brace): don't delete a comment + * progmodes/cc-cmds.el (c-electric-brace): Don't delete a comment which precedes the newly inserted `{'. 2005-12-08 Martin Stjernholm @@ -2325,8 +2851,8 @@ * progmodes/cc-engine.el (c-guess-basic-syntax): Simplified case 16D - can't be a class-close at that point. - * progmodes/cc-engine.el (c-guess-basic-syntax, - c-add-class-syntax): Don't narrow out the enclosing declaration + * progmodes/cc-engine.el (c-guess-basic-syntax) + (c-add-class-syntax): Don't narrow out the enclosing declaration level. This makes everything a lot easier, and it was actually only four small places that needed it to work. Some places that previously did `widen' are removed now, which has the effect that @@ -2352,7 +2878,7 @@ * progmodes/cc-langs.el (c-symbol-start): Include `@' in ObjC. - (c-decl-start-re): No no longer any need for special treatment of + (c-decl-start-re): No longer any need for special treatment of ObjC due to the above. (c-other-block-decl-kwds): Handle "extern" in ObjC too since it @@ -2364,8 +2890,8 @@ (c-opt-identifier-prefix-key): New internal language constant. - (c-opt-identifier-concat-key, c-opt-after-id-concat-key, - c-identifier-start, c-identifier-key): Now completely calculated + (c-opt-identifier-concat-key, c-opt-after-id-concat-key) + (c-identifier-start, c-identifier-key): Now completely calculated from other constants. (c-identifier-last-sym-match): Decommissioned since it's no longer @@ -2382,10 +2908,10 @@ * progmodes/cc-langs.el (c-filter-ops): New helper function to simplify access to `c-operators' and its likes. - (c-operator-list, c-all-op-syntax-tokens, - c-nonsymbol-token-regexp, c-<>-multichar-token-regexp, - c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds, - c-primary-expr-regexp, c-cast-parens): Use it. + (c-operator-list, c-all-op-syntax-tokens) + (c-nonsymbol-token-regexp, c-<>-multichar-token-regexp) + (c-<-op-cont-regexp, c->-op-cont-regexp, c-expr-kwds) + (c-primary-expr-regexp, c-cast-parens): Use it. * progmodes/cc-defs.el (c-lang-const): Fixes to allow use without an explicit language in functions. @@ -2399,8 +2925,8 @@ (c-type-decl-prefix-key): Removed some now unnecessary cruft from the Pike value. - * progmodes/cc-engine.el (c-on-identifier, - c-simple-skip-symbol-backward): Small fix for handling "-" + * progmodes/cc-engine.el (c-on-identifier) + (c-simple-skip-symbol-backward): Small fix for handling "-" correctly in `skip-chars-backward'. Affected the operator lfun syntax in Pike. @@ -2410,8 +2936,8 @@ * progmodes/cc-langs.el (c-paren-nontype-kwds): The GCC keyword "__attribute__" is followed by a parenthesis. - (c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re, - c-specifier-key, c-not-decl-init-keywords): Some cleanup using new + (c-type-start-kwds, c-prefix-spec-kwds, c-prefix-spec-kwds-re) + (c-specifier-key, c-not-decl-init-keywords): Some cleanup using new language constants `c-type-start-kwds' and `c-prefix-spec-kwds'. * progmodes/cc-fonts.el, cc-langs.el, cc-engine.el: Internal @@ -2422,12 +2948,12 @@ declarations that can start anywhere. Used for class declarations in Pike. - (c-specifier-key, c-not-decl-init-keywords, - c-decl-prefix-or-start-re, c-find-decl-prefix-search, - c-find-decl-spots): Implement `c-decl-start-kwds'. - - (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds, - c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the + (c-specifier-key, c-not-decl-init-keywords) + (c-decl-prefix-or-start-re, c-find-decl-prefix-search) + (c-find-decl-spots): Implement `c-decl-start-kwds'. + + (c-other-decl-kwds, c-postfix-decl-spec-kwds, c-decl-hangon-kwds) + (c-decl-hangon-key, c-forward-decl-or-cast-1): Separated the handling of the compiler specific extension keywords into a new language constant `c-decl-hangon-kwds' that defines keyword clauses to be ignored in declarations. @@ -2437,10 +2963,10 @@ Necessary to stop at the declared identifier in e.g. IDL valuetype declarations. - (c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds, - c-prefix-spec-kwds-re, c-postfix-spec-kwds, - c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key, - c-forward-decl-or-cast-1): Recognize the declared identifier in + (c-typedef-decl-kwds, c-typeless-decl-kwds, c-type-list-kwds) + (c-prefix-spec-kwds-re, c-postfix-spec-kwds) + (c-after-suffixed-type-decl-key, c-opt-postfix-decl-spec-key) + (c-forward-decl-or-cast-1): Recognize the declared identifier in class and enum declarations as such and not as part of the type. (c-forward-decl-or-cast-1, c-forward-label): Relaxed the @@ -2456,24 +2982,24 @@ * progmodes/cc-engine.el (c-maybe-labelp): Provide no default value - this variable is always dynamically bound. - * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el, - cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el, - cc-cmds.el, cc-defs.el: Changed the policy for marking up + * progmodes/cc-engine.el, cc-fonts.el, cc-langs.el, cc-menus.el + * cc-mode.el, cc-styles.el, cc-vars.el, cc-align.el, cc-awk.el + * cc-cmds.el, cc-defs.el: Changed the policy for marking up functions that might do hidden buffer changes: All such internal functions are now marked instead of those that don't. - (c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments, - c-(forward|backward)-single-comment, c-parse-state, c-on-identifier, - c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments, - c-literal-type): Allow these functions to make hidden buffer changes, + (c-beginning-of-macro, c-end-of-macro, c-(forward|backward)-comments) + (c-(forward|backward)-single-comment, c-parse-state, c-on-identifier) + (c-(fast-|slow-|)in-literal, c-literal-limits, c-collect-line-comments) + (c-literal-type): Allow these functions to make hidden buffer changes, so that they are free to use text property caching later on. - (c-electric-backspace, c-electric-delete-forward, c-electric-pound, - c-electric-brace, c-electric-slash, c-electric-star, - c-electric-semi&comma, c-electric-colon, c-electric-lt-gt, - c-electric-paren, c-electric-continued-statement, c-indent-command, - c-indent-region, c-mask-paragraph, c-indent-new-comment-line, - c-context-line-break): Added `c-save-buffer-state' calls to comply + (c-electric-backspace, c-electric-delete-forward, c-electric-pound) + (c-electric-brace, c-electric-slash, c-electric-star) + (c-electric-semi&comma, c-electric-colon, c-electric-lt-gt) + (c-electric-paren, c-electric-continued-statement, c-indent-command) + (c-indent-region, c-mask-paragraph, c-indent-new-comment-line) + (c-context-line-break): Added `c-save-buffer-state' calls to comply with the changed semantics of the functions above. * progmodes/cc-engine.el (c-beginning-of-statement-1): Fixed a bug @@ -2488,10 +3014,10 @@ (completed statement) with `}' (statement completed by closing brace or semicolon) and `$' (statement completed by EOL). - (c-awk-virtual-semicolon-ends-prev-line-p, - c-awk-virtual-semicolon-ends-line-p, - c-awk-skip-semantic-ws-forward, c-awk-skip-semantic-ws-backward, - c-awk-at-statement-end-p): new functions + (c-awk-virtual-semicolon-ends-prev-line-p) + (c-awk-virtual-semicolon-ends-line-p) + (c-awk-skip-semantic-ws-forward, c-awk-skip-semantic-ws-backward) + (c-awk-at-statement-end-p): New functions. * progmodes/cc-cmds.el: Simplify the structure of functions c-forward-over-illiterals, c-back-over-illiterals. Enhance these @@ -2563,8 +3089,8 @@ * progmodes/cc-align.el (c-lineup-arglist): Fixed bug when the first argument starts with a special brace list. - * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1, - c-font-lock-declarations): Broke out the declaration and cast + * progmodes/cc-engine.el, cc-fonts.el (c-forward-decl-or-cast-1) + (c-font-lock-declarations): Broke out the declaration and cast recognition from `c-font-lock-declarations' to a new function, so that it can be used in the indentation engine. @@ -2573,16 +3099,16 @@ wrong side of the search limit that could happen when the start position is inside a literal. - * progmodes/cc-engine.el (c-parse-state, - c-invalidate-state-cache): Modified the use of `c-state-cache-end' + * progmodes/cc-engine.el (c-parse-state) + (c-invalidate-state-cache): Modified the use of `c-state-cache-end' so that it's kept a little bit back to increase the hit rate. (c-parse-state): Changed the macro handling and fixed some glitches. Macro context is checked more often than necessary now, but otoh less garbage conses are generated. - * progmodes/cc-engine.el (c-parse-state, - c-invalidate-state-cache): Cache the last position where + * progmodes/cc-engine.el (c-parse-state) + (c-invalidate-state-cache): Cache the last position where `c-state-cache' applies. This can speed up refontification quite a bit in blocks where there are many non-brace parens before the point. @@ -2607,8 +3133,8 @@ * progmodes/cc-engine.el (c-add-stmt-syntax): Narrowed down the special case for "else if" clauses. - * progmodes/cc-engine.el (c-looking-at-inexpr-block, - c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. + * progmodes/cc-engine.el (c-looking-at-inexpr-block) + (c-add-stmt-syntax): Use `c-recognize-paren-inexpr-blocks'. * progmodes/cc-langs.el (c-recognize-paren-inexpr-blocks): New language variable to recognize the gcc extension with statement @@ -2625,8 +3151,8 @@ `c-beginning-of-statement-1' instead of duplicating parts of it. This fixes bogus label recognition. - * progmodes/cc-engine.el (c-add-type, c-check-type, - c-forward-name, c-forward-type): Improved storage of template + * progmodes/cc-engine.el (c-add-type, c-check-type) + (c-forward-name, c-forward-type): Improved storage of template types in `c-found-types' so that they can be recognized better. (c-syntactic-content): Added option to skip past nested parens. @@ -2639,8 +3165,8 @@ (c-forward-type): Handle that `c-last-identifier-range' might be nil from `c-forward-name'. - * progmodes/cc-defs.el: (c-safe-scan-lists, - c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. + * progmodes/cc-defs.el (c-safe-scan-lists) + (c-(go-)?(up|down)-list-(forward|backward)): Added limit arguments. * progmodes/cc-defs.el (c-save-buffer-state): Use `unwind-protect' to work even if the form fails. @@ -2672,20 +3198,20 @@ * progmodes/cc-langs.el (c-unterminated-block-comment-regexp): Fixed a bug in the regexp that caused extreme backtracking. - * progmodes/cc-langs.el (c-block-comment-starter, - c-block-comment-ender): New language constants to specify in a + * progmodes/cc-langs.el (c-block-comment-starter) + (c-block-comment-ender): New language constants to specify in a single place how block comments look. - (c-comment-start-regexp, c-block-comment-start-regexp, - comment-start, comment-end, comment-start-skip, - c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws, - c-syntactic-ws, c-nonempty-syntactic-ws, - c-single-line-syntactic-ws, c-syntactic-eol): Now built from + (c-comment-start-regexp, c-block-comment-start-regexp) + (comment-start, comment-end, comment-start-skip) + (c-syntactic-ws-start, c-syntactic-ws-end, c-nonwhite-syntactic-ws) + (c-syntactic-ws, c-nonempty-syntactic-ws) + (c-single-line-syntactic-ws, c-syntactic-eol): Now built from `c-line-comment-starter', `c-block-comment-starter' and `c-block-comment-ender'. - (c-block-comment-regexp, c-unterminated-block-comment-regexp): New - language constants to break up things a bit. + (c-block-comment-regexp, c-unterminated-block-comment-regexp): + New language constants to break up things a bit. (c-simple-ws): New language constant for simple whitespace. @@ -2877,14 +3403,13 @@ 2005-12-08 Martin Stjernholm * progmodes/cc-defs.el, cc-engine.el (c-mode-is-new-awk-p): - Removed; - (c-major-mode-is 'awk-mode) can be used instead now. + Removed; (c-major-mode-is 'awk-mode) can be used instead now. * progmodes/cc-mode.el: Always set up AWK mode since emacsen where it doesn't work no longer are supported. - * progmodes/cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el, - cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now + * progmodes/cc-mode.el, cc-styles.el, cc-vars.el, cc-defs.el + * cc-engine.el, cc-fonts.el, cc-langs.el, cc-cmds.el: CC Mode now requires support for the syntax-table' text property, which rules out Emacs 19 and XEmacs < 21.4. Removed various compatibility cruft associated with those versions. @@ -2901,9 +3426,9 @@ variable and use an extra quoted face name instead. All the emacsen flavors handle that correctly. - * progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare, - c-font-lock-declarators, c-font-lock-declarations, - c-complex-decl-matchers, c-basic-matchers-after): Use a text + * progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare) + (c-font-lock-declarators, c-font-lock-declarations) + (c-complex-decl-matchers, c-basic-matchers-after): Use a text property to mark the items in in declarator lists to handle refontification inside multiline declarations better. @@ -2967,7 +3492,7 @@ 2005-12-07 Bill Wohler - * files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary, + * files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary, and causes problems with non-MH users (such as Gnus users). 2005-12-08 Nick Roberts @@ -2984,12 +3509,12 @@ 2005-12-07 Kim F. Storm - * ido.el (ido-completion-map): Renamed from ido-mode-map. + * ido.el (ido-completion-map): Rename from ido-mode-map. (ido-common-completion-map, ido-file-completion-map) (ido-file-dir-completion-map, ido-buffer-completion-map): - Renamed from ido-mode-....-map. - (ido-init-completion-maps): Renamed from ido-init-mode-maps. - (ido-setup-completion-map): Renamed from ido-define-mode-map. + Rename from ido-mode-....-map. + (ido-init-completion-maps): Rename from ido-init-mode-maps. + (ido-setup-completion-map): Rename from ido-define-mode-map. (ido-read-internal): Bind minibuffer-local-filename-completion-map to ido-completion-map. @@ -3043,7 +3568,7 @@ * progmodes/cc-defs.el (c-emacs-features): Don't assume point-min==1. -2005-12-06 Nozomu Ando (tiny patch) +2005-12-06 Nozomu Ando (tiny patch) * mail/smtpmail.el (smtpmail-try-auth-methods): Make password prompts work for AUTH PLAIN. Also reported by Steve Allan @@ -3082,7 +3607,7 @@ (org-agenda-get-deadlines, org-agenda-get-scheduled) (org-agenda-get-blocks): Use `org-get-category'. (org-context-in-file-links): Rename from - `org-line-numbers-in-file-links' . + `org-line-numbers-in-file-links'. 2005-12-06 Romain Francoise @@ -3226,7 +3751,7 @@ 2005-12-02 Ken Manheimer - * allout.el:(eval-when-compile): Remove unnecessary load of cl. + * allout.el (eval-when-compile): Remove unnecessary load of cl. Add fset of allout-real-isearch-abort during compile to fix byte-compilation warnings. (allout-mode-p): Move definition of this macro above all uses, or @@ -3636,8 +4161,8 @@ (hi-lock-face-phrase-buffer): Call hi-lock-buffer-mode. Use new arguments for hi-lock-set-pattern. - (hi-lock-unface-buffer, hi-lock-set-file-patterns): Call - font-lock-fontify-buffer. + (hi-lock-unface-buffer, hi-lock-set-file-patterns): + Call font-lock-fontify-buffer. (hi-lock-find-file-hook, hi-lock-current-line) (hi-lock-refontify, hi-lock-set-patterns): Delete unused functions. @@ -3666,8 +4191,8 @@ (org-plain-list-ordered-item-terminator): New options. (org-at-item-p, org-beginning-of-item, org-end-of-item) (org-get-indentation, org-get-string-indentation) - (org-maybe-renumber-ordered-list, org-renumber-ordered-list): New - functions. + (org-maybe-renumber-ordered-list, org-renumber-ordered-list): + New functions. (org-move-item-down, org-move-item-up): New commands. (org-export-as-html): New classes for CSS support. Bug fix in regular expression detecting fixed-width regions. Respect @@ -3851,7 +4376,7 @@ * man.el (Man-highlight-references): Doc fix. Reformat code in a more Lisp-ish way. -2005-11-19 Slawomir Nowaczyk (tiny change) +2005-11-19 Slawomir Nowaczyk (tiny change) * ls-lisp.el (ls-lisp-format-file-size): Format file size with 9 digits, not 8, to avoid misalignment for files larger than 100MB. @@ -3881,15 +4406,15 @@ (org-export-icalendar): Use `org-icalendar-combined-name'. (org-cycle-agenda-files, org-agenda-file-to-end) (org-agenda-file-to-front): New commands. - (org-table-tab-jumps-over-hlines,org-export-html-style): New - options. + (org-table-tab-jumps-over-hlines, org-export-html-style): + New options. (org-table-next-field): Use `org-table-tab-jumps-over-hlines'. - (org-at-table.el-p, org-set-autofill-regexps,org-html-protect): + (org-at-table.el-p, org-set-autofill-regexps, org-html-protect): New functions. (org-fill-paragraph): Call `org-table-align' in tables. (org-mode): Call `org-set-autofill-regexps'. (org-export-as-html): Support for local handformatted lists. - Modified to produce valid HTML 4.0. Use `org-export-html-style'. + Modified to produce valid HTML 4.0. Use `org-export-html-style'. (org-export-local-list-max-depth): New option. (org-html-expand): Use `org-html-protect'. @@ -4337,9 +4862,9 @@ (apropos-variable): Doc fix. Use apropos-read-pattern. (apropos-command): Doc fix. Use apropos-read-pattern and apropos-parse-pattern. Call apropos-print with nosubst=t. - (apropos, apropos-value): Doc fix. Use apropos-read-pattern and + (apropos, apropos-value): Doc fix. Use apropos-read-pattern and apropos-parse-pattern. - (apropos-documentation): Doc fix. Use apropos-read-pattern and + (apropos-documentation): Doc fix. Use apropos-read-pattern and apropos-parse-pattern. Locally bind apropos-sort-by-scores to apropos-documentation-sort-by-scores. Call apropos-print with nosubst=t. @@ -4407,7 +4932,7 @@ 2005-11-10 Masatake YAMATO * add-log.el (add-log-current-defun): Handle class::method - notation of c++. Fix incorrect comment. + notation of c++. Fix incorrect comment. 2005-11-10 Alan Mackenzie @@ -4541,7 +5066,7 @@ * replace.el (occur-engine): Add marker at end of line, too. -2005-11-04 Ken Manheimer +2005-11-04 Ken Manheimer * pgg-pgp.el (pgg-pgp-encrypt-region, pgg-pgp-decrypt-region) (pgg-pgp-encrypt-symmetric-region, pgg-pgp-encrypt-symmetric) @@ -4566,7 +5091,7 @@ * font-lock.el: Don't deal with font-lock-face-attributes here, move the code ... - * startup.el (command-line): ... here. Use face-spec-set instead + * startup.el (command-line): ... here. Use face-spec-set instead of custom-declare-face. * faces.el (face-spec-set): Reset the face if spec is not nil. @@ -4583,7 +5108,7 @@ 2005-11-04 Ulf Jasper - * newsticker.el: Commentary updated. Code formatting changed. + * newsticker.el: Commentary updated. Code formatting changed. (newsticker-version): Change to "1.9". (newsticker, newsticker-feed): Doc fix. (newsticker-url-list): Doc fix. Add option "Weekly". @@ -4603,7 +5128,7 @@ (newsticker-mode): Doc fix. (newsticker-mode): Change mode-line-format. (newsticker-start): Remove debug output. - (newsticker-start-ticker): Doc fix. Add Autoload cookie. + (newsticker-start-ticker): Doc fix. Add autoload cookie. (newsticker-w3m-show-inline-images): Code formatting. (newsticker-next-item): Call `force-mode-line-update'. (newsticker-previous-item): Call `force-mode-line-update'. @@ -4756,8 +5281,8 @@ 2005-11-04 Henrik Enberg (rcirc-browse-url-map, rcirc-browse-url-at-point) - (rcirc-browse-url-at-mouse, rcirc-mangle-text): Make urls - mouse and RET clickable. + (rcirc-browse-url-at-mouse, rcirc-mangle-text): + Make urls mouse and RET clickable. 2005-11-04 Henrik Enberg @@ -4908,7 +5433,7 @@ * progmodes/fortran.el (fortran-blink-match): Use `blink-matching-delay'. -2005-11-02 John Mongan (tiny change) +2005-11-02 John Mongan (tiny change) * progmodes/f90.el (f90-match-end): Use `blink-matching-delay'. @@ -4948,7 +5473,7 @@ * vc-sccs.el: Update copyright year. * ezimage.el: Likewise. -2005-11-01 KOBAYASHI Yasuhiro (tiny change) +2005-11-01 KOBAYASHI Yasuhiro (tiny change) * info.el (Info-fontify-node): Use `string-width' for fontifying underlined titles. @@ -5179,7 +5704,7 @@ * pgg.el (pgg-encrypt-region, pgg-encrypt-symmetric-region) (pgg-encrypt-symmetric, pgg-encrypt, pgg-decrypt-region) (pgg-decrypt, pgg-sign-region, pgg-sign): Add optional - 'passphrase' argument, so the passphrase can be managed externally + `passphrase' argument, so the passphrase can be managed externally and then passed in to the system. * pgg.el (pgg-read-passphrase, pgg-add-passphrase-cache) @@ -5195,7 +5720,7 @@ externally and passed in to the system. * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Add optional - 'notruncate' argument, so the passphrase cache can be used + `notruncate' argument, so the passphrase cache can be used reliably with identifiers besides a pgp packet's key id. 2005-10-29 Sascha Wilde @@ -5262,12 +5787,12 @@ (pgg-decrypt): Convey provided passphrase in subordinate call to pgg-decrypt-region. -2005-10-20 Ken Manheimer +2005-10-20 Ken Manheimer * pgg.el (pgg-encrypt-region, pgg-encrypt-symmetric-region) (pgg-encrypt-symmetric, pgg-encrypt, pgg-decrypt-region) (pgg-decrypt, pgg-sign-region, pgg-sign): Add optional - 'passphrase' argument, so the passphrase can be managed externally + `passphrase' argument, so the passphrase can be managed externally and then passed in to the system. * pgg.el (pgg-read-passphrase, pgg-add-passphrase-cache) @@ -5283,7 +5808,7 @@ externally and passed in to the system. * pgg-gpg.el (pgg-gpg-possibly-cache-passphrase): Add optional - 'notruncate' argument, so the passphrase cache can be used + `notruncate' argument, so the passphrase cache can be used reliably with identifiers besides a pgp packet's key id. 2005-10-29 Sascha Wilde @@ -5300,7 +5825,7 @@ 2005-10-28 Bill Wohler - * help-mode.el (help-url): New button type. Calls browse-url. + * help-mode.el (help-url): New button type. Calls browse-url. (help-xref-url-regexp): New regexp to recognize URLs in docstring. Similar to Info nodes: URL `url'. (help-make-xrefs): Create help-url buttons for @@ -5359,7 +5884,7 @@ * calc/calc-arith.el (calc-mul-symb-fancy): Add checks for multiplication by an identity matrix; don't turn multiplication by an inverse matrix into division. - (math-div-symbol-fancy): Replace division by matrices with + (math-div-symbol-fancy): Replace division by matrices with multiplication by inverse. * calc/calc-misc.el (calcFunc-inv): Check for symbolic matrices. @@ -5492,7 +6017,7 @@ * progmodes/gdb-ui.el (gdb-ann3): Bind mouse-3 in left fringe to gdb-mouse-toggle-breakpoint-fringe. (gdb-mouse-toggle-breakpoint-margin): Rename from - gdb-mouse-toggle-breakpoint. Fix doc. + gdb-mouse-toggle-breakpoint. Fix doc. (gdb-mouse-toggle-breakpoint-fringe): New defun. (gdb-put-string): Add optional SPROPS arg. Add props to string. (gdb-put-breakpoint-icon): Add gdb-bptno and gdb-enabled @@ -5736,7 +6261,7 @@ (outlineify-sticky, outlinify-sticky): Add autoload cookie. (my-mark-marker): Use `(featurep 'xemacs)'. -2005-10-23 Lars Hansen +2005-10-23 Lars Hansen * emacs-lisp/bytecomp.el (byte-compile-lambda): New arg add-lambda. (byte-compile-file-form-defmumble, byte-compile-defun) @@ -6024,7 +6549,7 @@ * calc/calc-units.el (math-standard-units): Add units, adjust symbols and update values. - (math-unit-prefixes): Add more prefixes. + (math-unit-prefixes): Add more prefixes. 2005-10-19 Romain Francoise @@ -6103,12 +6628,12 @@ lisp/toolbar/tool-bar to lisp and "delete" lisp/toolbar. Place the low resolution images in their own directory (low-color). - * toolbar/attach.*, toolbar/cancel.*, toolbar/close.*, - * toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.*: - * toolbar/help.*, toolbar/home.*, toolbar/index.*, toolbar/info.*: - * toolbar/mail.*, toolbar/new.*, toolbar/open.*, toolbar/paste.*: - * toolbar/preferences.*, toolbar/print.*, toolbar/save.*: - * toolbar/saveas.*, toolbar/search.*, toolbar/search-replace.*: + * toolbar/attach.*, toolbar/cancel.*, toolbar/close.* + * toolbar/copy.*, toolbar/cut.*, toolbar/diropen.*, toolbar/exit.* + * toolbar/help.*, toolbar/home.*, toolbar/index.*, toolbar/info.* + * toolbar/mail.*, toolbar/new.*, toolbar/open.*, toolbar/paste.* + * toolbar/preferences.*, toolbar/print.*, toolbar/save.* + * toolbar/saveas.*, toolbar/search.*, toolbar/search-replace.* * toolbar/spell.*, toolbar/undo.*: Move to etc/images. * toolbar/lc-copy.*: Move to etc/images/low-color/copy.*. @@ -6208,7 +6733,7 @@ * diff-mode.el (diff-mode): Doc fix. -2005-10-16 David Reitter +2005-10-16 David Reitter * mail/sendmail.el (send-mail-function): Use mailclient-send-it as default on darwin and windows systems. @@ -6400,8 +6925,8 @@ 2005-10-12 Bill Wohler - * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads. - (mh-autoloads): New. Builds mh-e/mh-loaddefs.el. Rebuilds if any + * makefile.w32-in (MH-E-SRC): New. Used by mh-autoloads. + (mh-autoloads): New. Builds mh-e/mh-loaddefs.el. Rebuilds if any files in MH-E-SRC have been updated. (updates, compile, recompile, bootstrap): Depend on mh-autoloads. @@ -7040,7 +7565,7 @@ * toolbar/rescan.*: Move and rename to etc/images/refresh.*. -2005-09-30 Eric M. Ludlam +2005-09-30 Eric M. Ludlam * speedbar.el: New version 1.0pre3. @@ -7242,7 +7767,7 @@ color rxvt terminals by using the code xterm.el used to use before 2005-04-09 in order to match the colors used by rxvt. -2005-09-24 Emanuele Giaquinta (tiny change) +2005-09-24 Emanuele Giaquinta (tiny change) * term/rxvt.el (rxvt-register-default-colors): Add support for 88 colors rxvt-unicode terminals by using the same code as xterm.el. @@ -8025,7 +8550,7 @@ 2005-09-02 Dan Nicolaescu * term/xterm.el (terminal-init-xterm): Add eval-when-compile to - fix compilation warning. Reorder the key definitions to group + fix compilation warning. Reorder the key definitions to group together keys emitted by the current version of xterm. * progmodes/vhdl-mode.el (vhdl-highlight-faces) @@ -8107,7 +8632,7 @@ (vhdl-get-visible-signals): Fix signal name searching. (vhdl-port-flatten, vhdl-port-reverse-direction): Better message. (vhdl-fixup-whitespace-region): Fix for character - literals (e.g. ':'). + literals (e.g. `:'). 2005-08-31 Juanma Barranquero @@ -8900,7 +9425,7 @@ 2005-08-10 Lars Hansen * desktop.el (desktop-buffer-mode-handlers): - Make non-customizable. Add autoload cookie. Change initial value to + Make non-customizable. Add autoload cookie. Change initial value to nil; add elements in respective modules instead. Fix doc string. (desktop-load-file): New function. (desktop-minor-mode-handlers): New autoloaded variable. @@ -8916,7 +9441,7 @@ indicate-buffer-boundaries, indicate-empty-lines and show-trailing-whitespace. (desktop-clear): Allow desktop-clear-preserve-buffers to contain - regexps. Don't use desktop-clear-preserve-buffers-regexp. + regexps. Don't use desktop-clear-preserve-buffers-regexp. (desktop-clear-preserve-buffers-regexp): Delete. (desktop-clear-preserve-buffers): Update initial value and docstring. (desktop-save-buffer): Fix doc string. @@ -9542,7 +10067,7 @@ not `bookmark-exit-hooks'. Fix docstring. (bookmark-bmenu-select): "?\ " -> "?\s". -2005-07-25 Ari Roponen (tiny change) +2005-07-25 Ari Roponen (tiny change) * startup.el (command-line): Fix typo. @@ -9591,7 +10116,7 @@ (xterm-rxvt-set-background-mode): Remove, not used anymore. * term/rxvt.el (function-key-map): Use substitute-key-definition - to bind {C,S,C-S}-{f1-f10}. Add a few missing key bindings. + to bind {C,S,C-S}-{f1-f10}. Add a few missing key bindings. * term/cygwin.el: New file. @@ -10305,7 +10830,7 @@ (mac-services-mail-to): New functions. (mac-application-menu-map): Bind them. -2005-07-12 wulei (tiny change) +2005-07-12 wulei (tiny change) * progmodes/gdb-ui.el: Add note about buffering with Windows. @@ -12593,7 +13118,7 @@ * textmodes/ispell.el (ispell-check-version): Use match-string-no-properties. - (ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict) + (ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict) (ispell-buffer-local-words): Likewise. * progmodes/make-mode.el (makefile-shell-face): Make this a no-op @@ -14793,12 +15318,12 @@ with mode-require-final-newline. (mode-require-final-newline): Doc fix. -2005-05-01 Stefan Monnier +2005-05-01 Stefan Monnier * international/latexenc.el (latexenc-find-file-coding-system): Fix regular expressions. -2005-05-01 David Kastrup +2005-05-01 David Kastrup * international/latexenc.el (latexenc-find-file-coding-system): Fix regular expressions. @@ -14865,7 +15390,7 @@ (org-prefix-format-compiled): New variable. (org-compile-prefix-format): New function. (org-timeline, org-agenda, org-diary): Call org-compile-prefix-format. - (org-agenda-prefix-format,org-timeline-prefix-format): New options. + (org-agenda-prefix-format, org-timeline-prefix-format): New options. (org-agenda-get-scheduled): Check if file is opened in `org-mode'. (org-get-entries-from-diary): Use `org-get-time-of-day' for consistency with entries from `org-mode' files. @@ -15476,7 +16001,7 @@ (org-mode): Insert first line "*-* mode: org-mode -*-" when called interactively in empty file and option `org-insert-mode-line-in-empty-file' has been set. - (org-agenda-todo,org-agenda-priority): Modify to use + (org-agenda-todo, org-agenda-priority): Modify to use `org-agenda-change-all-lines'. (org-warning-face): Change color on dark background @@ -16623,16 +17148,16 @@ 2005-03-25 Werner Lemberg - * calc/calc-forms.el, calc/calc-sel.el: - * midnight.el, vc-cvs.el: - * emacs-lisp/cl-macs.el: - * emulation/vip.el: - * eshell/esh-io.el, eshell/esh-var.el: - * mail/supercite.el: + * calc/calc-forms.el, calc/calc-sel.el + * midnight.el, vc-cvs.el + * emacs-lisp/cl-macs.el + * emulation/vip.el + * eshell/esh-io.el, eshell/esh-var.el + * mail/supercite.el * progmodes/ebnf-abn.el, progmodes/ebnf-bnf.el * progmodes/ebnf-ebx.el, progmodes/ebnf-dtd.el, progmodes/ebnf-iso.el * progmodes/ebnf-yac.el, progmodes/ebnf2ps.el, progmodes/idlwave.el - * progmodes/sh-script.el, progmodes/xscheme.el: + * progmodes/sh-script.el, progmodes/xscheme.el * textmodes/refbib.el, textmodes/refer.el, textmodes/reftex-cite.el * textmodes/reftex-index.el, textmodes/reftex-parse.el * textmodes/reftex-ref.el, textmodes/reftex-vars.el @@ -16749,7 +17274,7 @@ 2005-03-23 David Ponce - * recentf.el: (recentf-keep): New option. + * recentf.el (recentf-keep): New option. (recentf-menu-action): Default to `find-file'. (recentf-keep-non-readable-files-flag) (recentf-keep-non-readable-files-p) @@ -17948,9 +18473,9 @@ 2005-02-19 Michael Kifer * ediff.el (ediff-set-diff-overlays-in-one-buffer) - (ediff-set-fine-overlays-in-one-buffer,ediff-goto-word): Make sure + (ediff-set-fine-overlays-in-one-buffer, ediff-goto-word): Make sure we use the syntax table of the correct buffer. - (ediff-same-file-contents,ediff-same-contents): Enhancements thanks to + (ediff-same-file-contents, ediff-same-contents): Enhancements thanks to Felix Gatzemeier. * ediff-init.el (ediff-hide-face): Check for definedness of functions. @@ -18824,7 +19349,7 @@ (rmail-movemail-variant-in-use): New variables. (rmail-remote-password, rmail-remote-password-required): New customization variables. - (rmail-probe,rmail-autodetect, rmail-movemail-variant-p): New funs. + (rmail-probe, rmail-autodetect, rmail-movemail-variant-p): New funs. (rmail-parse-url): New function. (rmail-get-new-mail, rmail-insert-inbox-text): Update for use with GNU mailutils movemail. diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/ChangeLog.10 --- a/lisp/ChangeLog.10 Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/ChangeLog.10 Mon Jan 30 18:06:22 2006 +0000 @@ -19133,6 +19133,10 @@ * menu-bar.el (menu-bar-showhide-menu): Rename functions for toggling. +2002-02-10 Stephen J. Turnbull + + * ediff-init.el (ediff-has-gutter-support): What was this? + 2002-02-10 Michael Kifer * viper-util.el (viper-read-key-sequence): Fix so it'll read @@ -19142,8 +19146,6 @@ * viper.el (describe-key, describe-key-briefly): Get rid of viper-events-to-keys. - * ediff-init.el (ediff-has-gutter-support): Steven Turnbull's patch. - * ediff-wind.el (ediff-setup-control-frame): Use ediff-has-gutter-support. diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/Makefile.in --- a/lisp/Makefile.in Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/Makefile.in Mon Jan 30 18:06:22 2006 +0000 @@ -221,19 +221,23 @@ # the autoloads for the MH-E entry points, which are already in # loaddefs.el. MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \ - $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-comp.el \ - $(lisp)/mh-e/mh-customize.el $(lisp)/mh-e/mh-e.el \ - $(lisp)/mh-e/mh-funcs.el $(lisp)/mh-e/mh-identity.el \ - $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-init.el \ - $(lisp)/mh-e/mh-junk.el $(lisp)/mh-e/mh-mime.el \ - $(lisp)/mh-e/mh-print.el $(lisp)/mh-e/mh-search.el \ - $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-speed.el \ - $(lisp)/mh-e/mh-utils.el + $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-compat.el \ + $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-e.el \ + $(lisp)/mh-e/mh-folder.el $(lisp)/mh-e/mh-funcs.el \ + $(lisp)/mh-e/mh-gnus.el $(lisp)/mh-e/mh-identity.el \ + $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-junk.el \ + $(lisp)/mh-e/mh-letter.el $(lisp)/mh-e/mh-limit.el \ + $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-print.el \ + $(lisp)/mh-e/mh-scan.el $(lisp)/mh-e/mh-search.el \ + $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-show.el \ + $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-thread.el \ + $(lisp)/mh-e/mh-tool-bar.el $(lisp)/mh-e/mh-utils.el \ + $(lisp)/mh-e/mh-xface.el mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el $(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC) echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@ - echo ";;" >> $@ + echo "" >> $@ echo ";; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc." >> $@ echo ";; Author: Bill Wohler " >> $@ echo ";; Keywords: mail" >> $@ diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/array.el --- a/lisp/array.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/array.el Mon Jan 30 18:06:22 2006 +0000 @@ -1,7 +1,7 @@ ;;; array.el --- array editing commands for GNU Emacs ;; Copyright (C) 1987, 2000, 2002, 2003, 2004, -;; 2005 Free Software Foundation, Inc. +;; 2005, 2006 Free Software Foundation, Inc. ;; Author David M. Brown ;; Maintainer: FSF @@ -42,21 +42,19 @@ ;;; Code: -(eval-when-compile - (defvar array-max-column) - (defvar array-columns-per-line) - (defvar array-buffer-column) - (defvar array-line-length) - (defvar array-buffer-line) - (defvar array-lines-per-row) - (defvar array-max-row) - (defvar array-field-width) - (defvar array-row) - (defvar array-column) - (defvar array-rows-numbered) - (defvar array-copy-string) - (defvar array-init-field) - (defvar array-respect-tabs)) +(defvar array-max-column nil "Number of columns in the array.") +(defvar array-columns-per-line nil "Number of array columns per line.") +(defvar array-buffer-column nil "Current column number of point in the buffer.") +(defvar array-line-length nil "Length of a line in the array.") +(defvar array-buffer-line nil "Current line number of point in the buffer.") +(defvar array-lines-per-row nil "Number of lines per array row.") +(defvar array-max-row nil "Number of rows in the array.") +(defvar array-field-width nil "Width of a field in the array.") +(defvar array-row nil "Current array row location of point.") +(defvar array-column nil "Current array column location of point.") +(defvar array-rows-numbered nil "Are rows numbered in the buffer?") +(defvar array-copy-string nil "Current field string being copied.") +(defvar array-respect-tabs nil "Should TAB conversion be prevented?") ;;; Internal information functions. @@ -107,7 +105,7 @@ array-column (or a-column (array-current-column)))) (defun array-update-buffer-position () - "Set array-buffer-line and array-buffer-column to their current values." + "Set `array-buffer-line' and `array-buffer-column' to their current values." (setq array-buffer-line (current-line) array-buffer-column (current-column))) @@ -606,33 +604,34 @@ (interactive) ;; If there is a conflict between array-field-width and init-string, resolve it. (let ((check t) - (len)) + (len) + init-field) (while check - (setq array-init-field (read-string "Initial field value: ")) - (setq len (length array-init-field)) + (setq init-field (read-string "Initial field value: ")) + (setq len (length init-field)) (if (/= len array-field-width) (if (y-or-n-p (format "Change field width to %d? " len)) (progn (setq array-field-width len) (setq check nil))) - (setq check nil)))) - (goto-char (point-min)) - (message "Working...") - (let ((this-row 1)) - ;; Loop through the rows. - (while (<= this-row array-max-row) - (if array-rows-numbered - (insert (format "%d:\n" this-row))) - (let ((this-column 1)) - ;; Loop through the columns. - (while (<= this-column array-max-column) - (insert array-init-field) - (if (and (zerop (% this-column array-columns-per-line)) - (/= this-column array-max-column)) - (newline)) - (setq this-column (1+ this-column)))) - (setq this-row (1+ this-row)) - (newline))) - (message "Working...done") + (setq check nil))) + (goto-char (point-min)) + (message "Working...") + (let ((this-row 1)) + ;; Loop through the rows. + (while (<= this-row array-max-row) + (if array-rows-numbered + (insert (format "%d:\n" this-row))) + (let ((this-column 1)) + ;; Loop through the columns. + (while (<= this-column array-max-column) + (insert init-field) + (if (and (zerop (% this-column array-columns-per-line)) + (/= this-column array-max-column)) + (newline)) + (setq this-column (1+ this-column)))) + (setq this-row (1+ this-row)) + (newline))) + (message "Working...done")) (array-goto-cell 1 1)) (defun array-reconfigure-rows (new-columns-per-line new-rows-numbered) @@ -874,97 +873,39 @@ (interactive) (kill-all-local-variables) - ;; Number of rows in the array. - (make-local-variable 'array-max-row) - ;; Number of columns in the array. - (make-local-variable 'array-max-column) - ;; Number of array columns per line. - (make-local-variable 'array-columns-per-line) - ;; Width of a field in the array. - (make-local-variable 'array-field-width) - ;; Are rows numbered in the buffer? - (make-local-variable 'array-rows-numbered) - ;; Length of a line in the array. - (make-local-variable 'array-line-length) - ;; Number of lines per array row. - (make-local-variable 'array-lines-per-row) - ;; Current line number of point in the buffer. (make-local-variable 'array-buffer-line) - ;; Current column number of point in the buffer. (make-local-variable 'array-buffer-column) - ;; Current array row location of point. (make-local-variable 'array-row) - ;; Current array column location of point. (make-local-variable 'array-column) - ;; Current field string being copied. (make-local-variable 'array-copy-string) - ;; Should TAB conversion be prevented? - (make-local-variable 'array-respect-tabs) - (setq array-respect-tabs nil) - (array-init-local-variables) + (set (make-local-variable 'array-respect-tabs) nil) + (set (make-local-variable 'array-max-row) + (read-number "Number of array rows: ")) + (set (make-local-variable 'array-max-column) + (read-number "Number of array columns: ")) + (set (make-local-variable 'array-columns-per-line) + (read-number "Array columns per line: ")) + (set (make-local-variable 'array-field-width) + (read-number "Field width: ")) + (set (make-local-variable 'array-rows-numbered) + (y-or-n-p "Rows numbered? ")) + (set (make-local-variable 'array-line-length) + (* array-field-width array-columns-per-line)) + (set (make-local-variable 'array-lines-per-row) + (+ (floor (1- array-max-column) array-columns-per-line) + (if array-rows-numbered 2 1))) + (message "") (setq major-mode 'array-mode) (setq mode-name "Array") (force-mode-line-update) - (make-local-variable 'truncate-lines) - (setq truncate-lines t) + (set (make-local-variable 'truncate-lines) t) (setq overwrite-mode 'overwrite-mode-textual) (use-local-map array-mode-map) (run-mode-hooks 'array-mode-hook)) -;;; Initialization functions. These are not interactive. - -(defun array-init-local-variables () - "Initialize the variables associated with the array in this buffer." - (array-init-max-row) - (array-init-max-column) - (array-init-columns-per-line) - (array-init-field-width) - (array-init-rows-numbered) - (array-init-line-length) - (array-init-lines-per-row) - (message "")) - -(defun array-init-max-row (&optional arg) - "Initialize the value of `array-max-row'." - (setq array-max-row - (or arg (string-to-number (read-string "Number of array rows: "))))) - -(defun array-init-max-column (&optional arg) - "Initialize the value of `array-max-column'." - (setq array-max-column - (or arg (string-to-number (read-string "Number of array columns: "))))) - -(defun array-init-columns-per-line (&optional arg) - "Initialize the value of `array-columns-per-line'." - (setq array-columns-per-line - (or arg (string-to-number (read-string "Array columns per line: "))))) - -(defun array-init-field-width (&optional arg) - "Initialize the value of `array-field-width'." - (setq array-field-width - (or arg (string-to-number (read-string "Field width: "))))) - -(defun array-init-rows-numbered (&optional arg) - "Initialize the value of `array-rows-numbered'." - (setq array-rows-numbered - (or arg (y-or-n-p "Rows numbered? ")))) - -(defun array-init-line-length (&optional arg) - "Initialize the value of `array-line-length'." - (setq array-line-length - (or arg - (* array-field-width array-columns-per-line)))) - -(defun array-init-lines-per-row (&optional arg) - "Initialize the value of `array-lines-per-row'." - (setq array-lines-per-row - (or arg - (+ (floor (1- array-max-column) array-columns-per-line) - (if array-rows-numbered 2 1))))) - (provide 'array) -;;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80 +;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80 ;;; array.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/battery.el --- a/lisp/battery.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/battery.el Mon Jan 30 18:06:22 2006 +0000 @@ -271,6 +271,8 @@ %h Remaining time in hours %t Remaining time in the form `h:min'" (let ((design-capacity 0) + (last-full-capacity 0) + full-capacity (warn 0) (low 0) capacity rate rate-type charging-state minutes hours) @@ -310,18 +312,25 @@ (when (re-search-forward "design capacity: +\\([0-9]+\\) m[AW]h$" nil t) (incf design-capacity (string-to-number (match-string 1)))) + (when (re-search-forward "last full capacity: +\\([0-9]+\\) m[AW]h$" + nil t) + (incf last-full-capacity (string-to-number (match-string 1)))) (when (re-search-forward "design capacity warning: +\\([0-9]+\\) m[AW]h$" nil t) (incf warn (string-to-number (match-string 1)))) (when (re-search-forward "design capacity low: +\\([0-9]+\\) m[AW]h$" nil t) (incf low (string-to-number (match-string 1))))))) + (setq full-capacity (if (> last-full-capacity 0) + last-full-capacity design-capacity)) (and capacity rate (setq minutes (if (zerop rate) 0 (floor (* (/ (float (if (string= charging-state "charging") - (- design-capacity capacity) - capacity)) rate) 60))) + (- full-capacity capacity) + capacity)) + rate) + 60))) hours (/ minutes 60))) (list (cons ?c (or (and capacity (number-to-string capacity)) "N/A")) (cons ?L (or (when (file-exists-p "/proc/acpi/ac_adapter/AC/state") @@ -368,10 +377,10 @@ (cons ?t (or (and minutes (format "%d:%02d" hours (- minutes (* 60 hours)))) "N/A")) - (cons ?p (or (and design-capacity capacity + (cons ?p (or (and full-capacity capacity (number-to-string (floor (/ capacity - (/ (float design-capacity) 100))))) + (/ (float full-capacity) 100))))) "N/A"))))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/bs.el --- a/lisp/bs.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/bs.el Mon Jan 30 18:06:22 2006 +0000 @@ -1332,17 +1332,9 @@ for mouse highlighting. START-BUFFER is the buffer where we started buffer selection. ALL-BUFFERS is the list of buffer appearing in Buffer Selection Menu." - (let ((name (copy-sequence (buffer-name)))) - (add-text-properties - 0 (length name) - '(mouse-face highlight - help-echo - "mouse-2: select this buffer, mouse-3: select in other frame") - name) - (if (< (length name) bs--name-entry-length) - (concat name - (make-string (- bs--name-entry-length (length name)) ? )) - name))) + (propertize (buffer-name) + 'help-echo "mouse-2: select this buffer, mouse-3: select in other frame" + 'mouse-face 'highlight)) (defun bs--get-mode-name (start-buffer all-buffers) "Return the name of mode of current buffer for Buffer Selection Menu. @@ -1399,12 +1391,12 @@ (defun bs--format-aux (string align len) "Generate a string with STRING with alignment ALIGN and length LEN. ALIGN is one of the symbols `left', `middle', or `right'." - (let ((length (length string))) - (if (>= length len) - string - (if (eq 'right align) - (concat (make-string (- len length) ? ) string) - (concat string (make-string (- len length) ? )))))) + (let* ((width (length string)) + (len (max len width))) + (format (format "%%%s%ds" (if (eq align 'right) "" "-") len) + (if (eq align 'middle) + (concat (make-string (/ (- len width) 2) ?\s) string) + string)))) (defun bs--show-header () "Insert header for Buffer Selection Menu in current buffer." diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/buff-menu.el --- a/lisp/buff-menu.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/buff-menu.el Mon Jan 30 18:06:22 2006 +0000 @@ -796,7 +796,7 @@ (int-to-string (nth 3 buffer)) `(buffer-name ,(nth 2 buffer) buffer ,(car buffer) - font-lock-face Buffer-menu-buffer + font-lock-face buffer-menu-buffer mouse-face highlight help-echo "mouse-2: select this buffer")) " " diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/calc/calc-arith.el --- a/lisp/calc/calc-arith.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/calc/calc-arith.el Mon Jan 30 18:06:22 2006 +0000 @@ -1201,7 +1201,7 @@ (and (math-known-scalarp b) (math-add (nth 1 a) b)))) (and (eq (car-safe b) 'calcFunc-idn) - (= (length a) 2) + (= (length b) 2) (or (and (math-square-matrixp a) (math-add a (math-mimic-ident (nth 1 b) a))) (and (math-known-scalarp a) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/calc/calcalg2.el --- a/lisp/calc/calcalg2.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/calc/calcalg2.el Mon Jan 30 18:06:22 2006 +0000 @@ -2012,7 +2012,7 @@ n (1+ n) t1 (cdr t1))) (setq n (math-build-polynomial-expr poly high)) - (if (memq low '(0 1)) + (if (= low 1) n (math-sub n (math-build-polynomial-expr poly (math-sub low 1)))))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/calendar/cal-menu.el --- a/lisp/calendar/cal-menu.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/calendar/cal-menu.el Mon Jan 30 18:06:22 2006 +0000 @@ -1,6 +1,6 @@ ;;; cal-menu.el --- calendar functions for menu bar and popup menu support -;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005 +;; Copyright (C) 1994, 1995, 2001, 2002, 2003, 2004, 2005, 2006 ;; Free Software Foundation, Inc. ;; Author: Edward M. Reingold @@ -42,7 +42,9 @@ (defvar displayed-month) (defvar displayed-year) -(eval-when-compile (require 'calendar)) +;; Don't require calendar because calendar requires us. +;; (eval-when-compile (require 'calendar)) +(defvar calendar-mode-map) (define-key calendar-mode-map [menu-bar edit] 'undefined) (define-key calendar-mode-map [menu-bar search] 'undefined) @@ -211,14 +213,14 @@ (condition-case nil (if (eq major-mode 'calendar-mode) (let ((l)) - (calendar-for-loop;; Show 11 years--5 before, 5 after year of - ;; middle month - i from (- displayed-year 5) to (+ displayed-year 5) do - (setq l (cons (vector (format "For Year %s" i) - (list (list 'lambda 'nil '(interactive) - (list 'list-holidays i i))) - t) - l))) + ;; Show 11 years--5 before, 5 after year of middle month + (dotimes (i 11) + (let ((y (+ displayed-year -5 i))) + (push (vector (format "For Year %s" y) + (list (list 'lambda 'nil '(interactive) + (list 'list-holidays y y))) + t) + l))) (setq l (cons ["Mark Holidays" mark-calendar-holidays t] (cons ["Unmark Calendar" calendar-unmark t] (cons "--" l)))) @@ -231,22 +233,18 @@ (calendar-date-string (calendar-current-date) t t)) . cal-menu-today-holidays)) (let ((title - (let ((m1 displayed-month) - (y1 displayed-year) - (m2 displayed-month) - (y2 displayed-year)) - (increment-calendar-month m1 y1 -1) - (increment-calendar-month m2 y2 1) - (if (= y1 y2) + (let ((my1 (calendar-increment-month -1)) + (my2 (calendar-increment-month 1))) + (if (= (cdr my1) (cdr my2)) (format "%s-%s, %d" - (calendar-month-name m1 'abbrev) - (calendar-month-name m2 'abbrev) - y2) + (calendar-month-name (car my1) 'abbrev) + (calendar-month-name (car my2) 'abbrev) + (cdr my2)) (format "%s, %d-%s, %d" - (calendar-month-name m1 'abbrev) - y1 - (calendar-month-name m2 'abbrev) - y2))))) + (calendar-month-name (car my1) 'abbrev) + (cdr my1) + (calendar-month-name (car my2) 'abbrev) + (cdr my2)))))) (define-key calendar-mode-map [menu-bar Holidays 3-month] `(,(format "For Window (%s)" title) . list-calendar-holidays))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/calendar/calendar.el --- a/lisp/calendar/calendar.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/calendar/calendar.el Mon Jan 30 18:06:22 2006 +0000 @@ -1,7 +1,7 @@ ;;; calendar.el --- calendar functions ;; Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, -;; 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ;; Author: Edward M. Reingold ;; Maintainer: Glenn Morris @@ -98,11 +98,10 @@ ;;; Code: -(eval-when-compile - (defvar displayed-month) - (defvar displayed-year) - (defvar calendar-month-name-array) - (defvar calendar-starred-day)) +(defvar displayed-month) +(defvar displayed-year) +(defvar calendar-month-name-array) +(defvar calendar-starred-day) (defun calendar-version () (interactive) @@ -146,7 +145,7 @@ ;;;###autoload (defcustom calendar-offset 0 - "*The offset of the principal month from the center of the calendar window. + "The offset of the principal month from the center of the calendar window. 0 means the principal month is in the center (default), -1 means on the left, +1 means on the right. Larger (or smaller) values push the principal month off the screen." @@ -155,7 +154,7 @@ ;;;###autoload (defcustom view-diary-entries-initially nil - "*Non-nil means display current date's diary entries on entry to calendar. + "Non-nil means display current date's diary entries on entry to calendar. The diary is displayed in another window when the calendar is first displayed, if the current date is visible. The number of days of diary entries displayed is governed by the variable `number-of-diary-entries'. This variable can @@ -165,14 +164,14 @@ ;;;###autoload (defcustom mark-diary-entries-in-calendar nil - "*Non-nil means mark dates with diary entries, in the calendar window. + "Non-nil means mark dates with diary entries, in the calendar window. The marking symbol is specified by the variable `diary-entry-marker'." :type 'boolean :group 'diary) ;;;###autoload (defcustom calendar-remove-frame-by-deleting nil - "*Determine how the calendar mode removes a frame no longer needed. + "Determine how the calendar mode removes a frame no longer needed. If nil, make an icon of the frame. If non-nil, delete the frame." :type 'boolean :group 'view) @@ -224,7 +223,7 @@ (if (not (display-color-p)) "+" 'diary) - "*How to mark dates that have diary entries. + "How to mark dates that have diary entries. The value can be either a single-character string or a face." :type '(choice string face) :group 'diary) @@ -233,7 +232,7 @@ (if (not (display-color-p)) "=" 'calendar-today) - "*How to mark today's date in the calendar. + "How to mark today's date in the calendar. The value can be either a single-character string or a face. Marking today's date is done only if you set up `today-visible-calendar-hook' to request that." @@ -244,14 +243,14 @@ (if (not (display-color-p)) "*" 'holiday) - "*How to mark notable dates in the calendar. + "How to mark notable dates in the calendar. The value can be either a single-character string or a face." :type '(choice string face) :group 'calendar) ;;;###autoload (defcustom view-calendar-holidays-initially nil - "*Non-nil means display holidays for current three month period on entry. + "Non-nil means display holidays for current three month period on entry. The holidays are displayed in another window when the calendar is first displayed." :type 'boolean @@ -259,14 +258,14 @@ ;;;###autoload (defcustom mark-holidays-in-calendar nil - "*Non-nil means mark dates of holidays in the calendar window. + "Non-nil means mark dates of holidays in the calendar window. The marking symbol is specified by the variable `calendar-holiday-marker'." :type 'boolean :group 'holidays) ;;;###autoload (defcustom all-hebrew-calendar-holidays nil - "*If nil, show only major holidays from the Hebrew calendar. + "If nil, show only major holidays from the Hebrew calendar. This means only those Jewish holidays that appear on secular calendars. If t, show all the holidays that would appear in a complete Hebrew calendar." @@ -275,7 +274,7 @@ ;;;###autoload (defcustom all-christian-calendar-holidays nil - "*If nil, show only major holidays from the Christian calendar. + "If nil, show only major holidays from the Christian calendar. This means only those Christian holidays that appear on secular calendars. If t, show all the holidays that would appear in a complete Christian @@ -285,7 +284,7 @@ ;;;###autoload (defcustom all-islamic-calendar-holidays nil - "*If nil, show only major holidays from the Islamic calendar. + "If nil, show only major holidays from the Islamic calendar. This means only those Islamic holidays that appear on secular calendars. If t, show all the holidays that would appear in a complete Islamic @@ -294,13 +293,13 @@ :group 'holidays) (defcustom diary-file-name-prefix-function (function (lambda (str) str)) - "*The function that will take a diary file name and return the desired prefix." + "The function that will take a diary file name and return the desired prefix." :type 'function :group 'diary) ;;;###autoload (defcustom all-bahai-calendar-holidays nil - "*If nil, show only major holidays from the Baha'i calendar. + "If nil, show only major holidays from the Baha'i calendar. These are the days on which work and school must be suspended. If t, show all the holidays that would appear in a complete Baha'i @@ -310,14 +309,14 @@ ;;;###autoload (defcustom calendar-load-hook nil - "*List of functions to be called after the calendar is first loaded. + "List of functions to be called after the calendar is first loaded. This is the place to add key bindings to `calendar-mode-map'." :type 'hook :group 'calendar-hooks) ;;;###autoload (defcustom initial-calendar-window-hook nil - "*List of functions to be called when the calendar window is first opened. + "List of functions to be called when the calendar window is first opened. The functions invoked are called after the calendar window is opened, but once opened is never called again. Leaving the calendar with the `q' command and reentering it will cause these functions to be called again." @@ -326,7 +325,7 @@ ;;;###autoload (defcustom today-visible-calendar-hook nil - "*List of functions called whenever the current date is visible. + "List of functions called whenever the current date is visible. This can be used, for example, to replace today's date with asterisks; a function `calendar-star-date' is included for this purpose: (setq today-visible-calendar-hook 'calendar-star-date) @@ -346,7 +345,7 @@ ;;;###autoload (defcustom today-invisible-calendar-hook nil - "*List of functions called whenever the current date is not visible. + "List of functions called whenever the current date is not visible. The corresponding variable `today-visible-calendar-hook' is the list of functions called when the calendar function was called when the current @@ -360,7 +359,7 @@ ;;;###autoload (defcustom calendar-move-hook nil - "*List of functions called whenever the cursor moves in the calendar. + "List of functions called whenever the cursor moves in the calendar. For example, @@ -372,7 +371,7 @@ ;;;###autoload (defcustom diary-file "~/diary" - "*Name of the file in which one's personal diary of dates is kept. + "Name of the file in which one's personal diary of dates is kept. The file's entries are lines beginning with any of the forms specified by the variable `american-date-diary-pattern', by default: @@ -480,37 +479,37 @@ ;;;###autoload (defcustom diary-nonmarking-symbol "&" - "*Symbol indicating that a diary entry is not to be marked in the calendar." + "Symbol indicating that a diary entry is not to be marked in the calendar." :type 'string :group 'diary) ;;;###autoload (defcustom hebrew-diary-entry-symbol "H" - "*Symbol indicating a diary entry according to the Hebrew calendar." + "Symbol indicating a diary entry according to the Hebrew calendar." :type 'string :group 'diary) ;;;###autoload (defcustom islamic-diary-entry-symbol "I" - "*Symbol indicating a diary entry according to the Islamic calendar." + "Symbol indicating a diary entry according to the Islamic calendar." :type 'string :group 'diary) ;;;###autoload (defcustom bahai-diary-entry-symbol "B" - "*Symbol indicating a diary entry according to the Baha'i calendar." + "Symbol indicating a diary entry according to the Baha'i calendar." :type 'string :group 'diary) ;;;###autoload (defcustom diary-include-string "#include" - "*The string indicating inclusion of another file of diary entries. + "The string indicating inclusion of another file of diary entries. See the documentation for the function `include-other-diary-files'." :type 'string :group 'diary) (defcustom diary-glob-file-regexp-prefix "^\\#" - "*The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers." + "The regular expression that gets pre-pended to each of the attribute-regexp's for file-wide specifiers." :type 'regexp :group 'diary) @@ -531,7 +530,7 @@ ;;; (" *\\[box:\\([-a-z]+\\)\\]$" 1 :box) ;;; (" *\\[stipple:\\([-a-z]+\\)\\]$" 1 :stipple) ) - "*A list of (regexp regnum attr attrtype) lists where the + "A list of (regexp regnum attr attrtype) lists where the regexp says how to find the tag, the regnum says which parenthetical sub-regexp this regexp looks for, and the attr says which attribute of the face (or that this _is_ a face) is being @@ -546,14 +545,14 @@ ;;;###autoload (defcustom sexp-diary-entry-symbol "%%" - "*The string used to indicate a sexp diary entry in `diary-file'. + "The string used to indicate a sexp diary entry in `diary-file'. See the documentation for the function `list-sexp-diary-entries'." :type 'string :group 'diary) ;;;###autoload (defcustom abbreviated-calendar-year t - "*Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. + "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD. For the Gregorian calendar; similarly for the Hebrew, Islamic and Baha'i calendars. If this variable is nil, years must be written in full." @@ -562,7 +561,7 @@ ;;;###autoload (defcustom european-calendar-style nil - "*Use the European style of dates in the diary and in any displays. + "Use the European style of dates in the diary and in any displays. If this variable is t, a date 1/2/1990 would be interpreted as February 1, 1990. The default European date styles (see `european-date-diary-pattern') are @@ -589,7 +588,7 @@ (monthname " *" day "[^,0-9]") (monthname " *" day ", *" year "[^0-9]") (dayname "\\W")) - "*List of pseudo-patterns describing the American patterns of date used. + "List of pseudo-patterns describing the American patterns of date used. See the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" :value (backup . nil) @@ -609,7 +608,7 @@ (backup day " *" monthname "\\W+\\<\\([^*0-9]\\|\\([0-9]+[:aApP]\\)\\)") (day " *" monthname " *" year "[^0-9]") (dayname "\\W")) - "*List of pseudo-patterns describing the European patterns of date used. + "List of pseudo-patterns describing the European patterns of date used. See the documentation of `diary-date-forms' for an explanation." :type '(repeat (choice (cons :tag "Backup" :value (backup . nil) @@ -626,7 +625,7 @@ (if european-calendar-style european-date-diary-pattern american-date-diary-pattern) - "*List of pseudo-patterns describing the forms of date used in the diary. + "List of pseudo-patterns describing the forms of date used in the diary. The patterns on the list must be MUTUALLY EXCLUSIVE and should not match any portion of the diary entry itself, just the date component. @@ -664,7 +663,7 @@ ;;;###autoload (defcustom european-calendar-display-form '((if dayname (concat dayname ", ")) day " " monthname " " year) - "*Pseudo-pattern governing the way a date appears in the European style. + "Pseudo-pattern governing the way a date appears in the European style. See the documentation of `calendar-date-display-form' for an explanation." :type 'sexp :group 'calendar) @@ -672,7 +671,7 @@ ;;;###autoload (defcustom american-calendar-display-form '((if dayname (concat dayname ", ")) monthname " " day ", " year) - "*Pseudo-pattern governing the way a date appears in the American style. + "Pseudo-pattern governing the way a date appears in the American style. See the documentation of `calendar-date-display-form' for an explanation." :type 'sexp :group 'calendar) @@ -681,7 +680,7 @@ (if european-calendar-style european-calendar-display-form american-calendar-display-form) - "*Pseudo-pattern governing the way a date appears. + "Pseudo-pattern governing the way a date appears. Used by the function `calendar-date-string', a pseudo-pattern is a list of expressions that can involve the keywords `month', `day', and `year', all @@ -722,7 +721,7 @@ ;;;###autoload (defcustom print-diary-entries-hook 'lpr-buffer - "*List of functions called after a temporary diary buffer is prepared. + "List of functions called after a temporary diary buffer is prepared. The buffer shows only the diary entries currently visible in the diary buffer. The default just does the printing. Other uses might include, for example, rearranging the lines into order by day and time, saving the buffer @@ -732,7 +731,7 @@ ;;;###autoload (defcustom list-diary-entries-hook nil - "*List of functions called after diary file is culled for relevant entries. + "List of functions called after diary file is culled for relevant entries. It is to be used for diary entries that are not found in the diary file. A function `include-other-diary-files' is provided for use as the value of @@ -763,14 +762,14 @@ ;;;###autoload (defcustom diary-hook nil - "*List of functions called after the display of the diary. + "List of functions called after the display of the diary. Can be used for appointment notification." :type 'hook :group 'diary) ;;;###autoload (defcustom diary-display-hook nil - "*List of functions that handle the display of the diary. + "List of functions that handle the display of the diary. If nil (the default), `simple-diary-display' is used. Use `ignore' for no diary display. @@ -796,7 +795,7 @@ ;;;###autoload (defcustom nongregorian-diary-listing-hook nil - "*List of functions called for listing diary file and included files. + "List of functions called for listing diary file and included files. As the files are processed for diary entries, these functions are used to cull relevant entries. You can use either or both of `list-hebrew-diary-entries', `list-islamic-diary-entries' and @@ -810,7 +809,7 @@ ;;;###autoload (defcustom mark-diary-entries-hook nil - "*List of functions called after marking diary entries in the calendar. + "List of functions called after marking diary entries in the calendar. A function `mark-included-diary-files' is also provided for use as the `mark-diary-entries-hook'; it enables you to use shared diary files together @@ -828,7 +827,7 @@ ;;;###autoload (defcustom nongregorian-diary-marking-hook nil - "*List of functions called for marking diary file and included files. + "List of functions called for marking diary file and included files. As the files are processed for diary entries, these functions are used to cull relevant entries. You can use either or both of `mark-hebrew-diary-entries', `mark-islamic-diary-entries' and @@ -842,7 +841,7 @@ ;;;###autoload (defcustom diary-list-include-blanks nil - "*If nil, do not include days with no diary entry in the list of diary entries. + "If nil, do not include days with no diary entry in the list of diary entries. Such days will then not be shown in the fancy diary buffer, even if they are holidays." :type 'boolean @@ -850,7 +849,7 @@ ;;;###autoload (defcustom holidays-in-diary-buffer t - "*Non-nil means include holidays in the diary display. + "Non-nil means include holidays in the diary display. The holidays appear in the mode line of the diary buffer, or in the fancy diary buffer next to the date. This slows down the diary functions somewhat; setting it to nil makes the diary display faster." @@ -880,7 +879,7 @@ (holiday-fixed 10 31 "Halloween") (holiday-fixed 11 11 "Veteran's Day") (holiday-float 11 4 4 "Thanksgiving")) - "*General holidays. Default value is for the United States. + "General holidays. Default value is for the United States. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -891,7 +890,7 @@ (defcustom oriental-holidays '((if (fboundp 'atan) (holiday-chinese-new-year))) - "*Oriental holidays. + "Oriental holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -900,7 +899,7 @@ (put 'local-holidays 'risky-local-variable t) ;;;###autoload (defcustom local-holidays nil - "*Local holidays. + "Local holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -909,7 +908,7 @@ (put 'other-holidays 'risky-local-variable t) ;;;###autoload (defcustom other-holidays nil - "*User defined holidays. + "User defined holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1013,7 +1012,7 @@ ;;;###autoload (defcustom hebrew-holidays (append hebrew-holidays-1 hebrew-holidays-2 hebrew-holidays-3 hebrew-holidays-4) - "*Jewish holidays. + "Jewish holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1064,7 +1063,7 @@ (holiday-fixed 12 25 "Christmas") (if all-christian-calendar-holidays (holiday-julian 12 25 "Eastern Orthodox Christmas"))) - "*Christian holidays. + "Christian holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1099,7 +1098,7 @@ (holiday-islamic 10 1 "Id-al-Fitr")) (if all-islamic-calendar-holidays (holiday-islamic 12 10 "Id-al-Adha"))) - "*Islamic holidays. + "Islamic holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1141,7 +1140,7 @@ (holiday-fixed 11 26 "Day of the Covenant")) (if all-bahai-calendar-holidays (holiday-fixed 11 28 "Ascension of `Abdu'l-Baha"))) - "*Baha'i holidays. + "Baha'i holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1173,7 +1172,7 @@ (/ calendar-daylight-savings-ends-time (float 60)) calendar-daylight-time-zone-name) "")))) - "*Sun-related holidays. + "Sun-related holidays. See the documentation for `calendar-holidays' for details." :type 'sexp :group 'holidays) @@ -1184,7 +1183,7 @@ (append general-holidays local-holidays other-holidays christian-holidays hebrew-holidays islamic-holidays bahai-holidays oriental-holidays solar-holidays) - "*List of notable days for the command \\[holidays]. + "List of notable days for the command \\[holidays]. Additional holidays are easy to add to the list, just put them in the list `other-holidays' in your .emacs file. Similarly, by setting any @@ -1304,6 +1303,15 @@ (and (< macro-y 0) (> ,mon 1) (setq ,yr (1- ,yr))) (if (< ,yr 1) (setq ,yr (1- ,yr))))) ; 0 AD -> -1 BC, etc +(defun calendar-increment-month (n &optional mon yr) + "Return the Nth month after MON/YR. +The return value is a pair (MONTH . YEAR). +MON defaults to `displayed-month'. YR defaults to `displayed-year'." + (unless mon (setq mon displayed-month)) + (unless yr (setq mon displayed-year)) + (increment-calendar-month mon yr n) + (cons mon yr)) + (defmacro calendar-for-loop (var from init to final do &rest body) "Execute a for loop." (declare (debug (symbolp "from" form "to" form "do" body))) @@ -1313,6 +1321,7 @@ (defmacro calendar-sum (index initial condition expression) "For INDEX = INITIAL et seq, as long as CONDITION holds, sum EXPRESSION." + (declare (debug (symbolp form form form))) `(let ((,index ,initial) (sum 0)) (while ,condition @@ -2140,7 +2149,7 @@ ;;;###autoload (defcustom calendar-week-start-day 0 - "*The day of the week on which a week in the calendar begins. + "The day of the week on which a week in the calendar begins. 0 means Sunday (default), 1 means Monday, and so on. If you change this variable directly (without using customize) @@ -2148,160 +2157,159 @@ update the calendar display to reflect the change, otherwise movement commands will not work correctly." :type 'integer + ;; Change the initialize so that if you reload calendar.el, it will not + ;; cause a redraw (which may fail, e.g. with "invalid byte-code in + ;; calendar.elc" because of the "byte-compile-dynamic"). + :initialize 'custom-initialize-default :set (lambda (sym val) (set sym val) (redraw-calendar)) :group 'calendar) (defcustom calendar-debug-sexp nil - "*Turn debugging on when evaluating a sexp in the diary or holiday list." + "Turn debugging on when evaluating a sexp in the diary or holiday list." :type 'boolean :group 'calendar) (defvar calendar-mode-map nil) (if calendar-mode-map nil - (setq calendar-mode-map (make-sparse-keymap)) - (require 'cal-menu) - (calendar-for-loop i from 0 to 9 do - (define-key calendar-mode-map (int-to-string i) 'digit-argument)) - (let ((l (list 'narrow-to-region 'mark-word 'mark-sexp 'mark-paragraph - 'mark-defun 'mark-whole-buffer 'mark-page - 'downcase-region 'upcase-region 'kill-region - 'copy-region-as-kill 'capitalize-region 'write-region))) - (while l - (substitute-key-definition (car l) 'calendar-not-implemented - calendar-mode-map global-map) - (setq l (cdr l)))) - (define-key calendar-mode-map "-" 'negative-argument) - (define-key calendar-mode-map ">" 'scroll-calendar-right) - (define-key calendar-mode-map "\C-x>" 'scroll-calendar-right) - (define-key calendar-mode-map [prior] 'scroll-calendar-right-three-months) - (define-key calendar-mode-map "\ev" 'scroll-calendar-right-three-months) - (define-key calendar-mode-map "<" 'scroll-calendar-left) - (define-key calendar-mode-map "\C-x<" 'scroll-calendar-left) - (define-key calendar-mode-map [next] 'scroll-calendar-left-three-months) - (define-key calendar-mode-map "\C-v" 'scroll-calendar-left-three-months) - (define-key calendar-mode-map "\C-b" 'calendar-backward-day) - (define-key calendar-mode-map "\C-p" 'calendar-backward-week) - (define-key calendar-mode-map "\e{" 'calendar-backward-month) - (define-key calendar-mode-map "\C-x[" 'calendar-backward-year) - (define-key calendar-mode-map "\C-f" 'calendar-forward-day) - (define-key calendar-mode-map "\C-n" 'calendar-forward-week) - (define-key calendar-mode-map [left] 'calendar-backward-day) - (define-key calendar-mode-map [up] 'calendar-backward-week) - (define-key calendar-mode-map [right] 'calendar-forward-day) - (define-key calendar-mode-map [down] 'calendar-forward-week) - (define-key calendar-mode-map "\e}" 'calendar-forward-month) - (define-key calendar-mode-map "\C-x]" 'calendar-forward-year) - (define-key calendar-mode-map "\C-a" 'calendar-beginning-of-week) - (define-key calendar-mode-map "\C-e" 'calendar-end-of-week) - (define-key calendar-mode-map "\ea" 'calendar-beginning-of-month) - (define-key calendar-mode-map "\ee" 'calendar-end-of-month) - (define-key calendar-mode-map "\e<" 'calendar-beginning-of-year) - (define-key calendar-mode-map "\e>" 'calendar-end-of-year) - (define-key calendar-mode-map "\C-@" 'calendar-set-mark) - ;; Many people are used to typing C-SPC and getting C-@. - (define-key calendar-mode-map [?\C- ] 'calendar-set-mark) - (define-key calendar-mode-map "\C-x\C-x" 'calendar-exchange-point-and-mark) - (define-key calendar-mode-map "\e=" 'calendar-count-days-region) - (define-key calendar-mode-map "gd" 'calendar-goto-date) - (define-key calendar-mode-map "gD" 'calendar-goto-day-of-year) - (define-key calendar-mode-map "gj" 'calendar-goto-julian-date) - (define-key calendar-mode-map "ga" 'calendar-goto-astro-day-number) - (define-key calendar-mode-map "gh" 'calendar-goto-hebrew-date) - (define-key calendar-mode-map "gi" 'calendar-goto-islamic-date) - (define-key calendar-mode-map "gb" 'calendar-goto-bahai-date) - (define-key calendar-mode-map "gC" 'calendar-goto-chinese-date) - (define-key calendar-mode-map "gk" 'calendar-goto-coptic-date) - (define-key calendar-mode-map "ge" 'calendar-goto-ethiopic-date) - (define-key calendar-mode-map "gp" 'calendar-goto-persian-date) - (define-key calendar-mode-map "gc" 'calendar-goto-iso-date) - (define-key calendar-mode-map "gw" 'calendar-goto-iso-week) - (define-key calendar-mode-map "gf" 'calendar-goto-french-date) - (define-key calendar-mode-map "gml" 'calendar-goto-mayan-long-count-date) - (define-key calendar-mode-map "gmpc" 'calendar-previous-calendar-round-date) - (define-key calendar-mode-map "gmnc" 'calendar-next-calendar-round-date) - (define-key calendar-mode-map "gmph" 'calendar-previous-haab-date) - (define-key calendar-mode-map "gmnh" 'calendar-next-haab-date) - (define-key calendar-mode-map "gmpt" 'calendar-previous-tzolkin-date) - (define-key calendar-mode-map "gmnt" 'calendar-next-tzolkin-date) - (define-key calendar-mode-map "Aa" 'appt-add) - (define-key calendar-mode-map "Ad" 'appt-delete) - (define-key calendar-mode-map "S" 'calendar-sunrise-sunset) - (define-key calendar-mode-map "M" 'calendar-phases-of-moon) - (define-key calendar-mode-map " " 'scroll-other-window) - (define-key calendar-mode-map (kbd "DEL") 'scroll-other-window-down) - (define-key calendar-mode-map "\C-c\C-l" 'redraw-calendar) - (define-key calendar-mode-map "." 'calendar-goto-today) - (define-key calendar-mode-map "o" 'calendar-other-month) - (define-key calendar-mode-map "q" 'exit-calendar) - (define-key calendar-mode-map "a" 'list-calendar-holidays) - (define-key calendar-mode-map "h" 'calendar-cursor-holidays) - (define-key calendar-mode-map "x" 'mark-calendar-holidays) - (define-key calendar-mode-map "u" 'calendar-unmark) - (define-key calendar-mode-map "m" 'mark-diary-entries) - (define-key calendar-mode-map "d" 'diary-view-entries) - (define-key calendar-mode-map "D" 'view-other-diary-entries) - (define-key calendar-mode-map "s" 'show-all-diary-entries) - (define-key calendar-mode-map "pd" 'calendar-print-day-of-year) - (define-key calendar-mode-map "pC" 'calendar-print-chinese-date) - (define-key calendar-mode-map "pk" 'calendar-print-coptic-date) - (define-key calendar-mode-map "pe" 'calendar-print-ethiopic-date) - (define-key calendar-mode-map "pp" 'calendar-print-persian-date) - (define-key calendar-mode-map "pc" 'calendar-print-iso-date) - (define-key calendar-mode-map "pj" 'calendar-print-julian-date) - (define-key calendar-mode-map "pa" 'calendar-print-astro-day-number) - (define-key calendar-mode-map "ph" 'calendar-print-hebrew-date) - (define-key calendar-mode-map "pi" 'calendar-print-islamic-date) - (define-key calendar-mode-map "pb" 'calendar-print-bahai-date) - (define-key calendar-mode-map "pf" 'calendar-print-french-date) - (define-key calendar-mode-map "pm" 'calendar-print-mayan-date) - (define-key calendar-mode-map "po" 'calendar-print-other-dates) - (define-key calendar-mode-map "id" 'insert-diary-entry) - (define-key calendar-mode-map "iw" 'insert-weekly-diary-entry) - (define-key calendar-mode-map "im" 'insert-monthly-diary-entry) - (define-key calendar-mode-map "iy" 'insert-yearly-diary-entry) - (define-key calendar-mode-map "ia" 'insert-anniversary-diary-entry) - (define-key calendar-mode-map "ib" 'insert-block-diary-entry) - (define-key calendar-mode-map "ic" 'insert-cyclic-diary-entry) - (define-key calendar-mode-map "ihd" 'insert-hebrew-diary-entry) - (define-key calendar-mode-map "ihm" 'insert-monthly-hebrew-diary-entry) - (define-key calendar-mode-map "ihy" 'insert-yearly-hebrew-diary-entry) - (define-key calendar-mode-map "iid" 'insert-islamic-diary-entry) - (define-key calendar-mode-map "iim" 'insert-monthly-islamic-diary-entry) - (define-key calendar-mode-map "iiy" 'insert-yearly-islamic-diary-entry) - (define-key calendar-mode-map "iBd" 'insert-bahai-diary-entry) - (define-key calendar-mode-map "iBm" 'insert-monthly-bahai-diary-entry) - (define-key calendar-mode-map "iBy" 'insert-yearly-bahai-diary-entry) - (define-key calendar-mode-map "?" 'calendar-goto-info-node) - (define-key calendar-mode-map "tm" 'cal-tex-cursor-month) - (define-key calendar-mode-map "tM" 'cal-tex-cursor-month-landscape) - (define-key calendar-mode-map "td" 'cal-tex-cursor-day) - (define-key calendar-mode-map "tw1" 'cal-tex-cursor-week) - (define-key calendar-mode-map "tw2" 'cal-tex-cursor-week2) - (define-key calendar-mode-map "tw3" 'cal-tex-cursor-week-iso) - (define-key calendar-mode-map "tw4" 'cal-tex-cursor-week-monday) - (define-key calendar-mode-map "tfd" 'cal-tex-cursor-filofax-daily) - (define-key calendar-mode-map "tfw" 'cal-tex-cursor-filofax-2week) - (define-key calendar-mode-map "tfW" 'cal-tex-cursor-filofax-week) - (define-key calendar-mode-map "tfy" 'cal-tex-cursor-filofax-year) - (define-key calendar-mode-map "ty" 'cal-tex-cursor-year) - (define-key calendar-mode-map "tY" 'cal-tex-cursor-year-landscape)) + (let ((map (make-keymap))) + (suppress-keymap map) + (dolist (c '(narrow-to-region mark-word mark-sexp mark-paragraph + mark-defun mark-whole-buffer mark-page + downcase-region upcase-region kill-region + copy-region-as-kill capitalize-region write-region)) + (define-key map (vector 'remap c) 'calendar-not-implemented)) + (define-key map ">" 'scroll-calendar-right) + (define-key map "\C-x>" 'scroll-calendar-right) + (define-key map [prior] 'scroll-calendar-right-three-months) + (define-key map "\ev" 'scroll-calendar-right-three-months) + (define-key map "<" 'scroll-calendar-left) + (define-key map "\C-x<" 'scroll-calendar-left) + (define-key map [next] 'scroll-calendar-left-three-months) + (define-key map "\C-v" 'scroll-calendar-left-three-months) + (define-key map "\C-b" 'calendar-backward-day) + (define-key map "\C-p" 'calendar-backward-week) + (define-key map "\e{" 'calendar-backward-month) + (define-key map "\C-x[" 'calendar-backward-year) + (define-key map "\C-f" 'calendar-forward-day) + (define-key map "\C-n" 'calendar-forward-week) + (define-key map [left] 'calendar-backward-day) + (define-key map [up] 'calendar-backward-week) + (define-key map [right] 'calendar-forward-day) + (define-key map [down] 'calendar-forward-week) + (define-key map "\e}" 'calendar-forward-month) + (define-key map "\C-x]" 'calendar-forward-year) + (define-key map "\C-a" 'calendar-beginning-of-week) + (define-key map "\C-e" 'calendar-end-of-week) + (define-key map "\ea" 'calendar-beginning-of-month) + (define-key map "\ee" 'calendar-end-of-month) + (define-key map "\e<" 'calendar-beginning-of-year) + (define-key map "\e>" 'calendar-end-of-year) + (define-key map "\C-@" 'calendar-set-mark) + ;; Many people are used to typing C-SPC and getting C-@. + (define-key map [?\C- ] 'calendar-set-mark) + (define-key map "\C-x\C-x" 'calendar-exchange-point-and-mark) + (define-key map "\e=" 'calendar-count-days-region) + (define-key map "gd" 'calendar-goto-date) + (define-key map "gD" 'calendar-goto-day-of-year) + (define-key map "gj" 'calendar-goto-julian-date) + (define-key map "ga" 'calendar-goto-astro-day-number) + (define-key map "gh" 'calendar-goto-hebrew-date) + (define-key map "gi" 'calendar-goto-islamic-date) + (define-key map "gb" 'calendar-goto-bahai-date) + (define-key map "gC" 'calendar-goto-chinese-date) + (define-key map "gk" 'calendar-goto-coptic-date) + (define-key map "ge" 'calendar-goto-ethiopic-date) + (define-key map "gp" 'calendar-goto-persian-date) + (define-key map "gc" 'calendar-goto-iso-date) + (define-key map "gw" 'calendar-goto-iso-week) + (define-key map "gf" 'calendar-goto-french-date) + (define-key map "gml" 'calendar-goto-mayan-long-count-date) + (define-key map "gmpc" 'calendar-previous-calendar-round-date) + (define-key map "gmnc" 'calendar-next-calendar-round-date) + (define-key map "gmph" 'calendar-previous-haab-date) + (define-key map "gmnh" 'calendar-next-haab-date) + (define-key map "gmpt" 'calendar-previous-tzolkin-date) + (define-key map "gmnt" 'calendar-next-tzolkin-date) + (define-key map "Aa" 'appt-add) + (define-key map "Ad" 'appt-delete) + (define-key map "S" 'calendar-sunrise-sunset) + (define-key map "M" 'calendar-phases-of-moon) + (define-key map " " 'scroll-other-window) + (define-key map (kbd "DEL") 'scroll-other-window-down) + (define-key map "\C-c\C-l" 'redraw-calendar) + (define-key map "." 'calendar-goto-today) + (define-key map "o" 'calendar-other-month) + (define-key map "q" 'exit-calendar) + (define-key map "a" 'list-calendar-holidays) + (define-key map "h" 'calendar-cursor-holidays) + (define-key map "x" 'mark-calendar-holidays) + (define-key map "u" 'calendar-unmark) + (define-key map "m" 'mark-diary-entries) + (define-key map "d" 'diary-view-entries) + (define-key map "D" 'view-other-diary-entries) + (define-key map "s" 'show-all-diary-entries) + (define-key map "pd" 'calendar-print-day-of-year) + (define-key map "pC" 'calendar-print-chinese-date) + (define-key map "pk" 'calendar-print-coptic-date) + (define-key map "pe" 'calendar-print-ethiopic-date) + (define-key map "pp" 'calendar-print-persian-date) + (define-key map "pc" 'calendar-print-iso-date) + (define-key map "pj" 'calendar-print-julian-date) + (define-key map "pa" 'calendar-print-astro-day-number) + (define-key map "ph" 'calendar-print-hebrew-date) + (define-key map "pi" 'calendar-print-islamic-date) + (define-key map "pb" 'calendar-print-bahai-date) + (define-key map "pf" 'calendar-print-french-date) + (define-key map "pm" 'calendar-print-mayan-date) + (define-key map "po" 'calendar-print-other-dates) + (define-key map "id" 'insert-diary-entry) + (define-key map "iw" 'insert-weekly-diary-entry) + (define-key map "im" 'insert-monthly-diary-entry) + (define-key map "iy" 'insert-yearly-diary-entry) + (define-key map "ia" 'insert-anniversary-diary-entry) + (define-key map "ib" 'insert-block-diary-entry) + (define-key map "ic" 'insert-cyclic-diary-entry) + (define-key map "ihd" 'insert-hebrew-diary-entry) + (define-key map "ihm" 'insert-monthly-hebrew-diary-entry) + (define-key map "ihy" 'insert-yearly-hebrew-diary-entry) + (define-key map "iid" 'insert-islamic-diary-entry) + (define-key map "iim" 'insert-monthly-islamic-diary-entry) + (define-key map "iiy" 'insert-yearly-islamic-diary-entry) + (define-key map "iBd" 'insert-bahai-diary-entry) + (define-key map "iBm" 'insert-monthly-bahai-diary-entry) + (define-key map "iBy" 'insert-yearly-bahai-diary-entry) + (define-key map "?" 'calendar-goto-info-node) + (define-key map "tm" 'cal-tex-cursor-month) + (define-key map "tM" 'cal-tex-cursor-month-landscape) + (define-key map "td" 'cal-tex-cursor-day) + (define-key map "tw1" 'cal-tex-cursor-week) + (define-key map "tw2" 'cal-tex-cursor-week2) + (define-key map "tw3" 'cal-tex-cursor-week-iso) + (define-key map "tw4" 'cal-tex-cursor-week-monday) + (define-key map "tfd" 'cal-tex-cursor-filofax-daily) + (define-key map "tfw" 'cal-tex-cursor-filofax-2week) + (define-key map "tfW" 'cal-tex-cursor-filofax-week) + (define-key map "tfy" 'cal-tex-cursor-filofax-year) + (define-key map "ty" 'cal-tex-cursor-year) + (define-key map "tY" 'cal-tex-cursor-year-landscape) + (setq calendar-mode-map map) + ;; Require cal-menu after initializing calendar-mode-map because it uses it. + (require 'cal-menu))) (defun describe-calendar-mode () "Create a help buffer with a brief description of the `calendar-mode'." (interactive) - (with-output-to-temp-buffer "*Help*" + (help-setup-xref (list #'describe-calendar-mode) (interactive-p)) + (with-output-to-temp-buffer (help-buffer) (princ (format "Calendar Mode:\nFor a complete description, type %s\n%s\n" (substitute-command-keys "\\\\[describe-mode] from within the calendar") (substitute-command-keys "\\{calendar-mode-map}"))) - (save-excursion - (set-buffer standard-output) - (help-mode)) (print-help-return-message))) ;; Calendar mode is suitable only for specially formatted data. @@ -2451,12 +2459,11 @@ (s (car strings)) (strings (cdr strings)) (i 0)) - (while strings + (dolist (string strings) (setq s (concat s (make-string (max 0 (/ (+ n i) m)) char) - (car strings))) - (setq i (1+ i)) - (setq strings (cdr strings))) + string)) + (setq i (1+ i))) (substring s 0 length))) (defun update-calendar-mode-line () @@ -2478,7 +2485,7 @@ list) (walk-windows (lambda (w) (if (memq (window-buffer w) calendar-buffers) - (setq list (cons w list)))) + (push w list))) nil t) list)) @@ -2488,15 +2495,12 @@ (buffers (list "*Yahrzeits*" lunar-phases-buffer holiday-buffer fancy-diary-buffer diary-buffer calendar-buffer other-calendars-buffer)) - (buffer-list nil) - b) - (while buffers - (setq b (car buffers)) + (buffer-list nil)) + (dolist (b buffers) (setq b (cond ((stringp b) (get-buffer b)) ((bufferp b) b) (t nil))) - (if b (setq buffer-list (cons b buffer-list))) - (setq buffers (cdr buffers))) + (if b (push b buffer-list))) buffer-list)) (defun exit-calendar () @@ -2642,7 +2646,7 @@ (let ((date (calendar-cursor-to-date t))) (if (null arg) (progn - (setq calendar-mark-ring (cons date calendar-mark-ring)) + (push date calendar-mark-ring) ;; Since the top of the mark ring is the marked date in the ;; calendar, the mark ring in the calendar is one longer than ;; in other buffers to get the same effect. @@ -2949,16 +2953,18 @@ "Replace the date under the cursor in the calendar window with asterisks. This function can be used with the `today-visible-calendar-hook' run after the calendar window has been prepared." - (let ((inhibit-read-only t)) - (make-local-variable 'calendar-starred-day) + (let ((inhibit-read-only t) + (modified (buffer-modified-p))) (forward-char 1) - (setq calendar-starred-day - (string-to-number - (buffer-substring (point) (- (point) 2)))) + (set (make-local-variable 'calendar-starred-day) + (string-to-number + (buffer-substring (point) (- (point) 2)))) + ;; Insert before deleting, to better preserve markers. + (insert "**") + (forward-char -2) (delete-char -2) - (insert "**") - (backward-char 1) - (set-buffer-modified-p nil))) + (forward-char 1) + (restore-buffer-modified-p modified))) (defun calendar-mark-today () "Mark the date under the cursor in the calendar window. @@ -3048,48 +3054,48 @@ (interactive) (let* ((date (calendar-cursor-to-date t))) (with-current-buffer (get-buffer-create other-calendars-buffer) - (setq buffer-read-only nil) - (calendar-set-mode-line - (concat (calendar-date-string date) " (Gregorian)")) - (erase-buffer) - (insert - (mapconcat 'identity - (list (calendar-day-of-year-string date) - (format "ISO date: %s" (calendar-iso-date-string date)) - (format "Julian date: %s" - (calendar-julian-date-string date)) - (format - "Astronomical (Julian) day number (at noon UTC): %s.0" - (calendar-astro-date-string date)) - (format "Fixed (RD) date: %s" - (calendar-absolute-from-gregorian date)) - (format "Hebrew date (before sunset): %s" - (calendar-hebrew-date-string date)) - (format "Persian date: %s" - (calendar-persian-date-string date)) - (let ((i (calendar-islamic-date-string date))) - (if (not (string-equal i "")) - (format "Islamic date (before sunset): %s" i))) - (let ((b (calendar-bahai-date-string date))) - (if (not (string-equal b "")) - (format "Baha'i date (before sunset): %s" b))) - (format "Chinese date: %s" - (calendar-chinese-date-string date)) - (let ((c (calendar-coptic-date-string date))) - (if (not (string-equal c "")) - (format "Coptic date: %s" c))) - (let ((e (calendar-ethiopic-date-string date))) - (if (not (string-equal e "")) - (format "Ethiopic date: %s" e))) - (let ((f (calendar-french-date-string date))) - (if (not (string-equal f "")) - (format "French Revolutionary date: %s" f))) - (format "Mayan date: %s" - (calendar-mayan-date-string date))) - "\n")) - (goto-char (point-min)) - (set-buffer-modified-p nil) - (setq buffer-read-only t) + (let ((inhibit-read-only t) + (modified (buffer-modified-p))) + (calendar-set-mode-line + (concat (calendar-date-string date) " (Gregorian)")) + (erase-buffer) + (apply + 'insert + (delq nil + (list + (calendar-day-of-year-string date) "\n" + (format "ISO date: %s\n" (calendar-iso-date-string date)) + (format "Julian date: %s\n" + (calendar-julian-date-string date)) + (format "Astronomical (Julian) day number (at noon UTC): %s.0\n" + (calendar-astro-date-string date)) + (format "Fixed (RD) date: %s\n" + (calendar-absolute-from-gregorian date)) + (format "Hebrew date (before sunset): %s\n" + (calendar-hebrew-date-string date)) + (format "Persian date: %s\n" + (calendar-persian-date-string date)) + (let ((i (calendar-islamic-date-string date))) + (if (not (string-equal i "")) + (format "Islamic date (before sunset): %s\n" i))) + (let ((b (calendar-bahai-date-string date))) + (if (not (string-equal b "")) + (format "Baha'i date (before sunset): %s\n" b))) + (format "Chinese date: %s\n" + (calendar-chinese-date-string date)) + (let ((c (calendar-coptic-date-string date))) + (if (not (string-equal c "")) + (format "Coptic date: %s\n" c))) + (let ((e (calendar-ethiopic-date-string date))) + (if (not (string-equal e "")) + (format "Ethiopic date: %s\n" e))) + (let ((f (calendar-french-date-string date))) + (if (not (string-equal f "")) + (format "French Revolutionary date: %s\n" f))) + (format "Mayan date: %s\n" + (calendar-mayan-date-string date))))) + (goto-char (point-min)) + (restore-buffer-modified-p modified)) (display-buffer other-calendars-buffer)))) (defun calendar-print-day-of-year () @@ -3099,11 +3105,15 @@ (defun calendar-set-mode-line (str) "Set mode line to STR, centered, surrounded by dashes." - (setq mode-line-format - (calendar-string-spread - (list str) ?- + (let* ((edges (window-edges)) ;; As per doc of window-width, total visible mode-line length. - (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges)))))) + (width (- (nth 2 edges) (nth 0 edges)))) + (setq mode-line-format + (if buffer-file-name + `("-" mode-line-modified + ,(calendar-string-spread (list str) ?- (- width 6)) + "---") + (calendar-string-spread (list str) ?- width))))) (defun calendar-mod (m n) "Non-negative remainder of M/N with N instead of 0." diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/completion.el --- a/lisp/completion.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/completion.el Mon Jan 30 18:06:22 2006 +0000 @@ -82,11 +82,11 @@ ;; SAVING/LOADING COMPLETIONS ;; Completions are automatically saved from one session to another ;; (unless save-completions-flag or enable-completion is nil). -;; Activating this minor-mode calling completion-initialize) causes Emacs -;; to load a completions database for a saved completions file +;; Activating this minor-mode (calling completion-initialize) loads +;; a completions database for a saved completions file ;; (default: ~/.completions). When you exit, Emacs saves a copy of the -;; completions that you -;; often use. When you next start, Emacs loads in the saved completion file. +;; completions that you often use. When you next start, Emacs loads in +;; the saved completion file. ;; ;; The number of completions saved depends loosely on ;; *saved-completions-decay-factor*. Completions that have never been @@ -2250,13 +2250,14 @@ TYPE is the type of the wrapper to be added. Can be :before or :under." (put function-name 'completion-function (cdr (assq type - '((:separator 'use-completion-before-separator) - (:before 'use-completion-before-point) - (:backward-under 'use-completion-backward-under) - (:backward 'use-completion-backward) - (:under 'use-completion-under-point) - (:under-or-before 'use-completion-under-or-before-point) - (:minibuffer-separator 'use-completion-minibuffer-separator)))))) + '((:separator . use-completion-before-separator) + (:before . use-completion-before-point) + (:backward-under . use-completion-backward-under) + (:backward . use-completion-backward) + (:under . use-completion-under-point) + (:under-or-before . use-completion-under-or-before-point) + (:minibuffer-separator + . use-completion-minibuffer-separator)))))) (defun use-completion-minibuffer-separator () (let ((completion-syntax-table completion-standard-syntax-table)) @@ -2354,7 +2355,7 @@ (if dynamic-completion-mode (add-hook (car x) (cdr x)) (remove-hook (car x) (cdr x)))) - + ;; "Complete" Key Keybindings. We don't want to use a minor-mode ;; map because these have too high a priority. We could/should ;; probably change the interpretation of minor-mode-map-alist such diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/cus-edit.el --- a/lisp/cus-edit.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/cus-edit.el Mon Jan 30 18:06:22 2006 +0000 @@ -1470,22 +1470,19 @@ (if custom-raised-buttons "`Raised' text indicates" "Square brackets indicate"))) - (widget-create 'info-link + (widget-create 'custom-manual :tag "Custom file" - :button-face 'custom-link - :mouse-face 'highlight "(emacs)Saving Customizations") (widget-insert " for information on how to save in a different file.\n See ") - (widget-create 'info-link + (widget-create 'custom-manual :tag "Help" - :button-face 'custom-link - :mouse-face 'highlight :help-echo "Read the online help." "(emacs)Easy Customization") (widget-insert " for more information.\n\n") - (widget-insert "Operate on everything in this buffer:\n ")) + (widget-insert "Operate on all settings in this buffer that \ +are not marked HIDDEN:\n ")) (widget-insert " ")) (widget-create 'push-button :tag "Set for Current Session" @@ -1496,10 +1493,8 @@ (if (not custom-buffer-verbose-help) (progn (widget-insert " ") - (widget-create 'info-link + (widget-create 'custom-manual :tag "Help" - :button-face 'custom-link - :mouse-face 'highlight :help-echo "Read the online help." "(emacs)Easy Customization"))) (when (or custom-file user-init-file) @@ -1647,7 +1642,7 @@ (let ((custom-buffer-style 'tree)) (custom-toggle-parent widget))) -(define-widget 'custom-browse-group-tag 'push-button +(define-widget 'custom-browse-group-tag 'custom-group-link "Show parent in other window when activated." :tag "Group" :tag-glyph "folder" @@ -1657,7 +1652,7 @@ (let ((parent (widget-get widget :parent))) (customize-group-other-window (widget-value parent)))) -(define-widget 'custom-browse-variable-tag 'push-button +(define-widget 'custom-browse-variable-tag 'custom-group-link "Show parent in other window when activated." :tag "Option" :tag-glyph "option" @@ -1667,7 +1662,7 @@ (let ((parent (widget-get widget :parent))) (customize-variable-other-window (widget-value parent)))) -(define-widget 'custom-browse-face-tag 'push-button +(define-widget 'custom-browse-face-tag 'custom-group-link "Show parent in other window when activated." :tag "Face" :tag-glyph "face" @@ -2009,13 +2004,7 @@ :group 'custom-faces) (defface custom-button-unraised - '((((min-colors 88) - (class color) (background light)) :foreground "blue1" :underline t) - (((class color) (background light)) :foreground "blue" :underline t) - (((min-colors 88) - (class color) (background dark)) :foreground "cyan1" :underline t) - (((class color) (background dark)) :foreground "cyan" :underline t) - (t :underline t)) + '((t :inherit underline)) "Face for custom buffer buttons if `custom-raised-buttons' is nil." :version "22.1" :group 'custom-faces) @@ -2070,15 +2059,10 @@ (put 'custom-state-face 'face-alias 'custom-state) (defface custom-link - '((((min-colors 88) - (class color) (background light)) :foreground "blue1" :underline t) - (((class color) (background light)) :foreground "blue" :underline t) - (((min-colors 88) - (class color) (background dark)) :foreground "cyan1" :underline t) - (((class color) (background dark)) :foreground "cyan" :underline t) - (t :underline t)) - "Face for Info links in customization buffers." - :group 'info) + '((t :inherit link)) + "Face for links in customization buffers." + :version "22.1" + :group 'custom-faces) (define-widget 'custom 'default "Customize a user option." @@ -2245,8 +2229,6 @@ (insert " ") (push (widget-create-child-and-convert widget 'custom-group-link - :button-face 'custom-link - :mouse-face 'highlight :tag (custom-unlispify-tag-name symbol) symbol) buttons) @@ -3323,7 +3305,7 @@ (defvar custom-face-menu `(("Set for Current Session" custom-face-set) ,@(when (or custom-file user-init-file) - '(("Save for Future Sessions" custom-face-save-command))) + '(("Save for Future Sessions" custom-face-save))) ("Undo Edits" custom-redraw (lambda (widget) (memq (widget-get widget :custom-state) '(modified changed)))) @@ -3448,13 +3430,8 @@ (custom-face-state-set widget) (custom-redraw-magic widget))) -(defun custom-face-save-command (widget) +(defun custom-face-save (widget) "Save in `.emacs' the face attributes in WIDGET." - (custom-face-save widget) - (custom-save-all)) - -(defun custom-face-save (widget) - "Prepare for saving WIDGET's face attributes, but don't write `.emacs'." (let* ((symbol (widget-value widget)) (child (car (widget-get widget :children))) (value (custom-post-filter-face-spec (widget-value child))) @@ -3480,6 +3457,10 @@ (custom-face-state-set widget) (custom-redraw-magic widget))) +;; For backward compatibility. +(define-obsolete-function-alias 'custom-face-save-command 'custom-face-save + "22.1") + (defun custom-face-reset-saved (widget) "Restore WIDGET to the face's default attributes." (let* ((symbol (widget-value widget)) @@ -3607,6 +3588,8 @@ (define-widget 'custom-group-link 'link "Show parent in other window when activated." + :button-face 'custom-link + :mouse-face 'highlight :help-echo "Create customization buffer for this group." :action 'custom-group-link-action) @@ -3805,8 +3788,6 @@ (if (eq custom-buffer-style 'links) (push (widget-create-child-and-convert widget 'custom-group-link - :button-face 'custom-link - :mouse-face 'highlight :tag "Go to Group" symbol) buttons) @@ -4400,6 +4381,15 @@ ["Erase Customization" Custom-reset-standard t] ["Info" (info "(emacs)Easy Customization") t])) +(defvar custom-field-keymap + (let ((map (copy-keymap widget-field-keymap))) + (define-key map "\C-c\C-c" 'Custom-set) + (define-key map "\C-x\C-s" 'Custom-save) + map) + "Keymap used inside editable fields in customization buffers.") + +(widget-put (get 'editable-field 'widget-type) :keymap custom-field-keymap) + (defun Custom-goto-parent () "Go to the parent group listed at the top of this buffer. If several parents are listed, go to the first of them." @@ -4425,17 +4415,18 @@ The following commands are available: -Move to next button or editable field. \\[widget-forward] -Move to previous button or editable field. \\[widget-backward] -\\\ +\\\ +Move to next button, link or editable field. \\[widget-forward] +Move to previous button, link or editable field. \\[advertised-widget-backward] +\\\ Complete content of editable text field. \\[widget-complete] \\\ -Invoke button under the mouse pointer. \\[Custom-move-and-invoke] -Invoke button under point. \\[widget-button-press] +Invoke button under the mouse pointer. \\[widget-move-and-invoke] +Invoke button under point. \\[widget-button-press] Set all options from current text. \\[Custom-set] Make values in current text permanent. \\[Custom-save] -Make text match actual option values. \\[Custom-reset-current] -Reset options to permanent settings. \\[Custom-reset-saved] +Make text match actual option values. \\[Custom-reset-current] +Reset options to permanent settings. \\[Custom-reset-saved] Erase customizations; set options and buffer text to the standard values. \\[Custom-reset-standard] diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/desktop.el --- a/lisp/desktop.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/desktop.el Mon Jan 30 18:06:22 2006 +0000 @@ -966,7 +966,7 @@ (defun desktop-load-file (function) "Load the file where auto loaded FUNCTION is defined." (when function - (let ((fcell (symbol-function function))) + (let ((fcell (and (fboundp function) (symbol-function function)))) (when (and (listp fcell) (eq 'autoload (car fcell))) (load (cadr fcell)))))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/dired.el --- a/lisp/dired.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/dired.el Mon Jan 30 18:06:22 2006 +0000 @@ -286,6 +286,9 @@ This is an alist of the form (SUBDIR . SWITCHES).") (make-variable-buffer-local 'dired-switches-alist) +(defvaralias 'dired-move-to-filename-regexp + 'directory-listing-before-filename-regexp) + (defvar dired-subdir-regexp "^. \\([^\n\r]+\\)\\(:\\)[\n\r]" "Regexp matching a maybe hidden subdirectory line in `ls -lR' output. Subexpression 1 is the subdirectory proper, no trailing colon. @@ -2514,11 +2517,18 @@ (set-window-start w2 1) ))) -(defvar dired-no-confirm nil +(defcustom dired-no-confirm nil "A list of symbols for commands Dired should not confirm. Command symbols are `byte-compile', `chgrp', `chmod', `chown', `compress', `copy', `delete', `hardlink', `load', `move', `print', `shell', `symlink', -`touch' and `uncompress'.") +`touch' and `uncompress'." + :group 'dired + :type '(set (const byte-compile) (const chgrp) + (const chmod) (const chown) (const compress) + (const copy) (const delete) (const hardlink) + (const load) (const move) (const print) + (const shell) (const symlink) (const touch) + (const uncompress))) (defun dired-mark-pop-up (bufname op-symbol files function &rest args) "Return FUNCTION's result on ARGS after showing which files are marked. @@ -3091,9 +3101,9 @@ (if (eq major-mode 'dired-mode) (dired-sort-set-modeline)) (or no-revert (revert-buffer))) -(make-variable-buffer-local - (defvar dired-subdir-alist-pre-R nil - "Value of `dired-subdir-alist' before -R switch added.")) +(defvar dired-subdir-alist-pre-R nil + "Value of `dired-subdir-alist' before -R switch added.") +(make-variable-buffer-local 'dired-subdir-alist-pre-R) (defun dired-sort-R-check (switches) "Additional processing of -R in ls option string SWITCHES. diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/emacs-lisp/find-func.el --- a/lisp/emacs-lisp/find-func.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/emacs-lisp/find-func.el Mon Jan 30 18:06:22 2006 +0000 @@ -165,7 +165,7 @@ defined in C.") (defun find-function-C-source (fun-or-var file type) - "Find the source location where SUBR-OR-VAR is defined in FILE. + "Find the source location where FUN-OR-VAR is defined in FILE. TYPE should be nil to find a function, or `defvar' to find a variable." (unless find-function-C-source-directory (setq find-function-C-source-directory @@ -243,7 +243,7 @@ (defun find-function-noselect (function) "Return a pair (BUFFER . POINT) pointing to the definition of FUNCTION. -Finds the Emacs Lisp library containing the definition of FUNCTION +Finds the source file containing the definition of FUNCTION in a buffer and the point of the definition. The buffer is not selected. @@ -335,7 +335,7 @@ (defun find-function (function) "Find the definition of the FUNCTION near point. -Finds the Emacs Lisp library containing the definition of the function +Finds the source file containing the definition of the function near point (selected by `function-called-at-point') in a buffer and places point before the definition. Set mark before moving, if the buffer already existed. @@ -356,7 +356,7 @@ ;;;###autoload (defun find-function-other-frame (function) - "Find, in ananother frame, the definition of FUNCTION near point. + "Find, in another frame, the definition of FUNCTION near point. See `find-function' for more details." (interactive (find-function-read)) @@ -364,24 +364,25 @@ ;;;###autoload (defun find-variable-noselect (variable &optional file) - "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. + "Return a pair `(BUFFER . POINT)' pointing to the definition of VARIABLE. -Finds the Emacs Lisp library containing the definition of SYMBOL -in a buffer, and the point of the definition. It does not switch -to the buffer or display it. +Finds the library containing the definition of VARIABLE in a buffer and +the point of the definition. The buffer is not selected. The library where VARIABLE is defined is searched for in FILE or `find-function-source-path', if non nil, otherwise in `load-path'." (if (not variable) - (error "You didn't specify a variable")) - (let ((library (or file (symbol-file variable 'defvar)))) - (find-function-search-for-symbol variable 'defvar library))) + (error "You didn't specify a variable") + (let ((library (or file + (symbol-file variable 'defvar) + (help-C-file-name variable 'var)))) + (find-function-search-for-symbol variable 'defvar library)))) ;;;###autoload (defun find-variable (variable) "Find the definition of the VARIABLE near point. -Finds the Emacs Lisp library containing the definition of the variable +Finds the library containing the definition of the variable near point (selected by `variable-at-point') in a buffer and places point before the definition. @@ -403,7 +404,7 @@ ;;;###autoload (defun find-variable-other-frame (variable) - "Find, in annother frame, the definition of VARIABLE near point. + "Find, in another frame, the definition of VARIABLE near point. See `find-variable' for more details." (interactive (find-function-read 'defvar)) @@ -412,18 +413,22 @@ ;;;###autoload (defun find-definition-noselect (symbol type &optional file) "Return a pair `(BUFFER . POINT)' pointing to the definition of SYMBOL. -TYPE says what type of definition: nil for a function, -`defvar' or `defface' for a variable or face. This function -does not switch to the buffer or display it. +TYPE says what type of definition: nil for a function, `defvar' for a +variabke, `defface' for a face. This function does not switch to the +buffer nor display it. The library where SYMBOL is defined is searched for in FILE or `find-function-source-path', if non nil, otherwise in `load-path'." - (if (not symbol) - (error "You didn't specify a symbol")) - (if (null type) - (find-function-noselect symbol) + (cond + ((not symbol) + (error "You didn't specify a symbol")) + ((null type) + (find-function-noselect symbol)) + ((eq type 'defvar) + (find-variable-noselect symbol file)) + (t (let ((library (or file (symbol-file symbol type)))) - (find-function-search-for-symbol symbol type library)))) + (find-function-search-for-symbol symbol type library))))) ;; For symmetry, this should be called find-face; but some programs ;; assume that, if that name is defined, it means something else. @@ -480,7 +485,7 @@ ;;;###autoload (defun find-variable-at-point () - "Find directly the function at point in the other window." + "Find directly the variable at point in the other window." (interactive) (let ((symb (variable-at-point))) (when (and symb (not (equal symb 0))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/emulation/viper.el --- a/lisp/emulation/viper.el Sun Jan 29 00:17:11 2006 +0000 +++ b/lisp/emulation/viper.el Mon Jan 30 18:06:22 2006 +0000 @@ -458,6 +458,7 @@ '(internal-ange-ftp-mode comint-mode inferior-emacs-lisp-mode + erc-mode eshell-mode shell-mode) "*A list of major modes that should come up in Vi Insert state." @@ -494,6 +495,8 @@ (gnus-summary-mode emacs-state viper-gnus-modifier-map) (Info-mode emacs-state viper-slash-and-colon-map) (Buffer-menu-mode emacs-state viper-slash-and-colon-map) + (erc-mode insert-state viper-comint-mode-modifier-map) + (erc-mode vi-state viper-comint-mode-modifier-map) ) "List specifying how to modify the various major modes to enable some Viperisms. The list has the structure: ((mode viper-state keymap) (mode viper-state @@ -768,6 +771,7 @@ ;; remove all hooks set by viper (mapatoms 'viper-remove-hooks) (remove-hook 'comint-mode-hook 'viper-comint-mode-hook) + (remove-hook 'erc-mode-hook 'viper-comint-mode-hook) (remove-hook 'minibuffer-setup-hook 'viper-minibuffer-setup-sentinel) (remove-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel) (remove-hook 'post-command-hook 'viper-minibuffer-post-command-hook) @@ -913,6 +917,7 @@ ;; Emacs shell, ange-ftp, and comint-based modes (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint + (add-hook 'erc-mode-hook 'viper-comint-mode-hook) ; ERC (add-hook 'eshell-mode-hook (lambda () (setq viper-auto-indent nil))) diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/.cvsignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/.cvsignore Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,3 @@ +{arch} +.arch-ids +*.elc diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,367 @@ +2006-01-30 Michael Olson + + * erc-stamp.el (erc-timestamp-right-align-by-pixel): New option + that determines whether to use pixel values to align right + timestamps. The default is not to do so, since it only works with + Emacs22 on X, and even then some people have trouble. + (erc-insert-aligned): Use `erc-timestamp-right-align-by-pixel'. + +2006-01-29 Michael Olson + + * ChangeLog, ChangeLog.2005, ChangeLog.2004, ChangeLog.2003, + ChangeLog.2002, ChangeLog.2001: Add "See ChangeLog.NNNN" line for + earlier changes. Use utf-8 encoding. Fix some accent typos. + + * erc-speedbar.el (erc-speedbar-buttons): Fix reference to free + variable. + (erc-speedbar-goto-buffer): Fix compiler warning. + + * erc-ibuffer.el: Use `define-ibuffer-filter' instead of + `ibuffer-degine-limiter'. Use `define-ibuffer-column' instead of + `ibuffer-define-column'. Require 'ibuf-ext so that the macros + work without compiler warnings. + + * man/erc.texi (Obtaining ERC, Installation): Note that these + sections may be skipped if using the version of ERC that comes + with Emacs. + +2006-01-29 Edward O'Connor + + * erc-viper.el: Remove. Now that ERC is included in Emacs, these + work-arounds live in Viper itself. + +2006-01-28 Michael Olson + + * erc-*.el, erc.texi, NEWS: Add Arch taglines as per Emacs + guidelines. + + * erc-*.el: Space out copyright years like the rest of Emacs. Use + the Emacs copyright statement. Refer to ourselves as ERC rather + than "Emacs IRC Client", since there are now several IRC clients + for Emacs. + + * erc-compat.el (erc-emacs-build-time): Define as a variable. + + * erc-log.el (erc-log-setup-logging): Use write-file-functions. + + * erc-ibuffer.el: Require 'erc. + + * erc-stamp.el (erc-insert-aligned): Only use the special text + property when window-system is X. + + * erc.texi: Adapt for inclusion in Emacs. + +2006-01-28 Johan Bockgård + + * erc.el (erc-format-message): More `cl' breakage; don't use + `oddp'. + +2006-01-27 Michael Olson + + * debian/changelog: Update for new release. + + * debian/control (Description): Update. + + * debian/rules: Concatenate ChangeLog for 2005. + + * Makefile (MISC): Include ChangeLog.2005 and erc.texi. + (debrelease, release): Copy images directory. + + * NEWS: Spelling fixes. Add items for recent changes. + + * erc.el (erc): Move call to erc-update-modules before the call to + erc-mode. This should fix a timestamp display issue. + (erc-version-string): Release ERC 5.1. + +2006-01-26 Michael Olson + + * erc-stamp.el (erc-insert-aligned): New function that inserts + text in an perfectly-aligned way relative to the right margin. It + only works well with Emacs22. A sane fallback is provided for + other versions of Emacs. + (erc-insert-timestamp-right): Use the new function. + +2006-01-25 Edward O'Connor + + * erc.el (erc-modules): Ensure that `erc-button-mode' gets enabled + before `erc-match-mode'. + + * erc-match.el (match): Append `erc-match-message' to + `erc-insert-modify-hook'. + +2006-01-25 Michael Olson + + * FOR-RELEASE: Mark last release requirement as done. + + * Makefile (realclean, distclean): Remove docs. + + * erc.texi: Take care of all pre-5.1 items. + + * erc-backend.el (erc-server-send, erc-server-send-queue): Wrap + `process-send-string' in `condition-case' to avoid an error when + quitting ERC. + + * erc-stamp.el (erc-insert-timestamp-right): Try to deal with + variable-width characters in the timestamp and on the same line. + The latter is a kludge, but it seems to work with most of the + input I've thrown at it so far. It's certainly better than going + past the end of line consistently when we have variable-width + characters on the same line. When `erc-timestamp-intangible' is + non-nil, add intangible properties to the whitespace as well, so + that hitting does what you'd expect. + + * erc.el (erc-flood-protect, erc-toggle-flood-control): Update + this to only use boolean values for `erc-flood-protect'. Update + documentation. + (erc-cmd-QUIT): Set the active buffer to be the server buffer, so + that any QUIT-related messages go there. + (erc): Try to be more clever about re-using channel buffers when + automatically re-connecting. Thanks to e1f for noticing. + +2006-01-23 Michael Olson + + * ChangeLog.2005: Remove erroneous line. + + * FOR-RELEASE: Make that the Makefile tweaking is complete. + (NEWS): Mark as done. + + * Makefile (MANUAL): New option indicating the name of the manual. + (PREFIX, ELISPDIR, INFODIR): New options that specify the + directories to install lisp code and info manuals to. PREFIX is + used only by ELISPDIR and INFODIR. + (all): Call `lisp' and create the manual. + (lisp): Compile lisp code. + (%.info, %.html): New rules that make Info files and HTML files, + respectively, from a TexInfo source. + (doc): Create both the Info and HTML versions of the manual. This + is for the user -- we never call it automatically. + (install-info): Install Info files. + (install-bin): Install compiled and source Lisp files. + (todo): Remove, since it seems pointless. + + * NEWS: Update. + + * README: Add Installation instructions. Tweak layout. + + * erc.texi: Work on some pre-5.1 items. + + * erc-stamp.el, erc-track.el: Move some functions and options in + order to get rid of a few compiler warnings. + + * erc.el (erc-modules): Enable readonly by default. This will + prevent new users from accidentally removing old messages, which + could be disconcerting. Also enable stamp by default, since + timestamps are a fairly standard feature among IRC clients. + + * erc-button.el: Munge whitespace. + + * erc-identd.el (erc-identd-start): Instead of throwing an error, + just try to use the obsolete function. + +2006-01-22 Michael Olson + + * erc-backend.el (erc-decode-string-from-target): Make sure that + we have a string as an argument. If not, coerce it to the empty + string. Hopefully, this will work painlessly around an edge case + related to quitting ERC around the same time a message comes in. + +2006-01-22 Johan Bockgård + + * erc-track.el: Use `(eval-when-compile (require 'cl))' (for + `case'). Doc fixes. + (erc-find-parsed-property): Simplify. + (erc-track-get-active-buffer): Fix logic. Simplify. + (erc-track-switch-buffer): Remove unused variable `dir'. Simplify. + + * erc-speak.el: Doc fixes. + (erc-speak-region): `propertize' --> `erc-propertize'. + + * erc-dcc.el (erc-dcc-chat-parse-output): `propertize' --> + `erc-propertize'. + + * erc-button.el (erc-button-add-button): Take erc-fill-prefix into + account when wrapping URLs. + + * erc-bbdb.el (erc-bbdb-elide-display): Doc fix. + + * erc-backend.el (define-erc-response-handler): Doc fix. + +2006-01-22 Michael Olson + + * erc.el (erc-update-modules): Use `require' instead of `load', + but prevent it from causing errors, in order to preserve the + previous behavior. + +2006-01-21 Michael Olson + + * FOR-RELEASE (Source): Mark cl task as done. + + * Makefile (erc-auto.el): Call erc-generate-autoloads rather than + generate-autoloads. + (erc-auto.el, %.elc): Don't show command, just its output. + + * NEWS: Add items from 2005-01-01 to 2005-08-13. + + * debian/copyright (Copyright): Update. + + * erc-auto.in (erc-generate-autoloads): Rename from + generate-autoloads. + + * erc.el, erc-autoaway.el, erc-backend.el: Use + erc-server-process-alive instead of erc-process-alive. + + * erc.el, erc-backend.el, erc-ezbounce.el, erc-list.el, + erc-log.el, erc-match.el, erc-nets.el, erc-netsplit.el, + erc-nicklist.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el: + Use (eval-when-compile (require 'cl)), so that compilation doesn't + fail. + + * erc-fill.el, erc-truncate.el: Whitespace munging. + + * erc.el: Update copyright notice. Remove eval-after-load code. + (erc-with-buffer): Docfix. + (erc-once-with-server-event, erc-once-with-server-event-global) + (erc-with-buffer, erc-with-all-buffers-of-server): Use erc-gensym + instead of gensym. + (erc-banlist-update): Use erc-delete-if instead of delete-if. + (erc): Call `erc-update-modules' here. + + * erc-backend.el: Require 'erc-compat to minimize compiler + warnings. + (erc-decode-parsed-server-response): Docfix. + (erc-server-process-alive): Move here from erc.el and rename from + `erc-process-alive'. + (erc-server-send, erc-remove-channel-users): Make sure process is + alive before sending data to it. + + * erc-bbdb.el: Update copyright years. + (erc-bbdb-whois): Remove overexuberant comment. + + * erc-button.el: Require erc-fill, since we make liberal use of + `erc-fill-column'. + + * erc-compat.el (erc-const-expr-p, erc-list*, erc-assert): New + functions, the latter of which provides an `assert' equivalent. + (erc-remove-if-not): New function that provides a simple + implementation of `remove-if-not'. + (erc-gensym): New function that provides a simple implementation + of `gensym'. + (erc-delete-if): New function that provides a simple + implementation of `delete-if'. + (erc-member-if): New function that provides a simple + implementation of `member-if'. + (field-end): Remove this, since it is unused, and later versions + of XEmacs have this function already. + (erc-function-arglist): Moved here from erc.el. + (erc-delete-dups): New compatibility function for dealing with + XEmacs. + (erc-subseq): New function copied from cl-extra.el. + + * erc-dcc.el: Require pcomplete during compilation to avoid + compiler warnings. + (erc-unpack-int, erc-dcc-send-filter) + (erc-dcc-get-filter): Use erc-assert instead of assert. + (pcomplete/erc-mode/DCC): Use erc-remove-if-not instead of + remove-if-not. + + * erc-match.el (erc-log-matches): Fix compiler warning. + + * erc-nicklist.el: Update copyright notice. + (erc-nicklist-menu): Change use of caadr to (car (cadr ...)). + (erc-nicklist-bitlbee-connected-p): Remove. + (erc-nicklist-insert-medium-name-or-icon): Accept channel + argument. Use it to determine whether we are on bitlbee. Now + that bitlbee names its channel "&bitlbee", this is trivial. + (erc-nicklist-insert-contents): Pass channel as specified above. + Don't try to determine whether we are on bitlbee here. + (erc-nicklist-channel-users-info): Use erc-remove-if-not instead + of remove-if-not. + (erc-nicklist-search-for-nick): Use erc-member-if instead of + member-if. + + * erc-notify.el (erc-notify-QUIT): Use erc-delete-if with a + partially-evaluated lambda expression instead of `delete' and + `find'. + + * erc-track.el: Use erc-assert. + (erc-track-modified-channels): Remove use of `return'. + (erc-track-modified-channels): Use `cadr' instead of `second', + since otherwise we would need yet another eval-when-compile line. + +2006-01-19 Michael Olson + + * erc-backend.el (erc-process-sentinel-1): Remove attempt to + detect SIGPIPE, since it doesn't work. + +2006-01-10 Diane Murray + + * erc-spelling.el: Updated copyright years. + (define-erc-module): Enable/disable `flyspell-mode' for all open + ERC buffers as well. + (erc-spelling-dictionaries): Reworded customize description. + + * erc.el (erc-command-symbol): New function. + (erc-extract-command-from-line): Use `erc-command-symbol'. This + fixes a bug where "Symbol's function definition is void: + erc-cmd-LIST" would be shown after typing /list at the prompt (the + command was interned because erc-menu.el uses it and is enabled by + default whereas erc-list.el is not). + + * NEWS: Started a list of renamed variables. + + * erc.el: Reworded the message sent when defining variable + aliases. + (erc-command-indicator-face): Doc fix. + (erc-modules): Enable the match module by default which makes + current nickname highlighting on as the default. + + * erc-button.el: Updated copyright years. + (erc-button): New face. + (erc-button-face): Use `erc-button'. + (erc-button-nickname-face): New customizable variable. + (erc-button-add-nickname-buttons, erc-button-add-buttons-1): Send + new argument to `erc-button-add-button'. + (erc-button-add-button): Doc fix. Added new argument to function + definition, NICK-P. If it's a nickname, use + `erc-button-nickname-face', otherwise use `erc-button-face'. This + makes channel tracking and buttons work better together when + `erc-button-buttonize-nicks' is enabled, since there is a nickname + on just about every line. + + * erc-track.el (erc-track-use-faces): Doc fix. + (erc-track-faces-priority-list): Added `erc-button' to list. + (erc-track-priority-faces-only): Doc fix. + +2006-01-09 Diane Murray + + * erc-button.el (erc-button-url-regexp): Use `concat' so the + regexp is not one long line. + (erc-button-alist): Fixed so that customizing works correctly. + Reorganized. Removed lambda functions with more than two lines. + Doc fix. + (erc-button-describe-symbol, erc-button-beats-to-time): New + functions. Moved from `erc-button-alist'. + +2006-01-07 Michael Olson + + * erc-backend.el (erc-process-sentinel-1): Don't try to re-open a + process if a SIGPIPE occurs. This happens when a new message + comes in at the same time a /quit is requested. + (erc-process-sentinel): Use string-match rather than string= to do + these comparisons. Matching literal newlines makes me nervous. + + * erc-track.el (erc-track-remove-from-mode-line): Handle case + where global-mode-string is not a list. Emacs22 permits this. + + +See ChangeLog.2005 for earlier changes. + + Copyright (C) 2006 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: 865a75f6-2bcb-46df-bf0c-b514dadf688a diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog.2001 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.2001 Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,1046 @@ +2001-12-18 Mario Lang + + * erc.el 1.176: * Added missing 747 numreply (banned) + +2001-12-15 Gergely Nagy + + * debian/scripts/install 1.4, debian/rules 1.6: + updated to 2.1.cvs.20011215-1 + + * debian/changelog 1.12: Debian version 2.1.cvs.20011215-1 + +2001-12-11 Andreas Fuchs + + * erc.el 1.175: + * applied a nicer version of mhp's patch to remove the last prompt from + saved logs + + * erc-replace.el 1.1: * Initial checkin + +2001-12-11 Mario Lang + + * erc.el 1.174: + * fixed bug triggered when reuse-buffer was enabled (the default). + Another silly port type problem. Maybe we should unify that once and for all sometimes... + +2001-12-10 Mario Lang + + * erc.el 1.173: * erc-message-english: New QUIT and s004 entries. + * erc-save-buffer-on-part: New variable. + * erc-kill-buffer-on-part: New variable. + * (erc-server-PART): Use above variables. + * (erc-join-channel): Use DEF argument instead of initial input for completing-read. + +2001-12-08 Tijs van Bakel + + * erc.el 1.172: added defcustom erc-nick-uniquifier ^ (i prefer _) + +2001-12-07 Gergely Nagy + + * debian/changelog 1.11: changelog for version 2.1.cvs.20011208-1 + +2001-12-07 Tijs van Bakel + + * erc.el 1.171: + Added erc-scroll-to-bottom as an erc-insert-hook function. It still bugs a bit, so please test it, thanks + +2001-12-07 Mario Lang + + * erc.el 1.170: * Fixed silly bug in erc-server-TOPIC (thanks mhp) + + * erc-speak.el 1.17: + * Fix non-greedy matching bug. That one somehow swallowed text + + * erc.el 1.169: + Fix Emacs20 problem. For now, we disable erc-track-modified-channels-minor-mode in emacs20 + +2001-12-07 Andreas Fuchs + + * erc-fill.el 1.5: + * Fix another stupid one-off error. This time it really works! + (Until I find the next bug. I guess you can hold your breath) (-: + +2001-12-06 Andreas Fuchs + + * erc-fill.el 1.4: * Fixed static filling: + ** No more \ed (continued on next line) lines anymore + ** Fixed bug with previous version where longer lines wouldn't get + filled correctly (i.e. at all) + +2001-12-06 Gergely Nagy + + * debian/changelog 1.10: changelog for 2.1.cvs.20011206-1 added + +2001-12-06 Andreas Fuchs + + * erc.el 1.168: + * Don't discard away status when identifying to NickServ + * Modify `erc-already-logged-in': check for port, too. + + * erc-fill.el 1.3: + * Fix stupid loop non-termination error in erc-fill-static when filling + one-line regions. + * Make erc-count-lines return meaningful values + +2001-12-05 Mario Lang + + * erc.el 1.167: + * (erc-process-input): Make ' /command' work for quoting /commands + + * erc-speak.el 1.16: see changelog + + * erc-fill.el 1.2: see erc.el changelog + + * erc.el 1.166: + * erc-insert-hook: Changed strategy completely, no start end parameters any more. + We narrow-to-region now, thats much cleaner. + * rename erc-fill-region to erc-fill and change the autoload + ** You'll probably need to restart Emacs + +2001-12-04 Mario Lang + + * erc.el 1.165: + * (erc-send-current-line): Fixed long outstanding bug. XEmacs users with erc-fill-region on erc-insert-hook knew that one a long time. + + * erc.el 1.164: fix order of attack + + * erc.el 1.163: * macroexpanded define-minor-mode for XEmacs + + * erc.el 1.162: First try to make channel tracking mouse sensitive + + * erc.el 1.161: * More erc-message-format conversion. + erc-format-message-english-PART as an example on how to use functions to format message + * (erc-format-message): Fallback mechanism to use english catalog if variable is not bound + +2001-12-03 Mario Lang + + * erc.el 1.160: * (erc-iswitchb): Rewrite, docfix. + Make it use erc-modified-channels as default if available. + + * erc-menu.el 1.2: + * Fixage related to erc-track-modified-channels-minor-mode rewrite + + * erc.el 1.159: + * erc-track-modified-channels-minor-mode: Use buffer objects instead of erc-default-target return value for internal state keeping. + + * erc.el 1.158: * Made reconnect behave nicer (erc-process-sentinel) + * Rewrote erc-modified-channels-tracking completely. + Its now a minor mode (erc-track-modified-channels-minor-mode) + It uses a list as internal representation now, so all silly string-parsing + related bugs should be gone. + Use (erc-track-modified-channels-minor-mode t) now to toggle this functionality. + Dont set the erc-track-modified-channels-minor-mode variable yourself, use the toggle function + +2001-11-29 Gergely Nagy + + * debian/changelog 1.9: final version + +2001-11-29 Mario Lang + + * erc.el 1.157: + * (erc-channel-p): Make it work with string and buffer as parameter. buffer. + * (erc-format-message): Add a check for functionp. This allows a format-specifier also to be a function name, which gets called with args applied and needs to return the actual format string. + * Converted some formats, JOIN, JOIN-you, MODE, ... + +2001-11-28 Mario Lang + + * erc.el 1.156: + * (erc-prepare-mode-line-format): Added sanity checks to prevent it from having problems with server buffers where the connection failed + + * erc-bbdb.el 1.7: + * (erc-bbdb-JOIN): regexp-quote the fingerhost before searching, some people have really strange characters as their user names + + * erc.el 1.155: Remove a stupid debug like (message ...) call + +2001-11-28 Gergely Nagy + + * debian/changelog 1.8: draft of 2.1.cvs.20011128-1 + + * debian/rules 1.5: simplify for the all-in-one erc package + + * debian/control 1.3: integrated erc-speak back into erc + + * debian/maint/conffiles 1.3, debian/maint/conffiles.in 1.2, debian/maint/postinst 1.3, + debian/maint/postinst.in 1.2, debian/maint/prerm 1.3, debian/maint/prerm.in 1.2, + debian/scripts/install 1.3, debian/scripts/install.in 1.3, debian/scripts/remove 1.3, + debian/scripts/remove.in 1.2, debian/scripts/startup.erc-speak 1.2: + since erc-speak is gone, resurrect the static files, and update them to support the latest erc + +2001-11-28 Mario Lang + + * erc.el 1.154: * (erc-mode): Shouldn't be interactive. + * (erc-info-mode): Ditto. + + * erc.el 1.153: * (erc-server-352): Added hopcount parsing. + Added call to erc-update-channel-member to fill in channel-members information + on /WHO if the channel is joined. + +2001-11-27 Mario Lang + + * erc-speedbar.el 1.6: *** empty log message *** + + * erc-speedbar.el 1.5: * (erc-speedbar-expand-user): New function. + Used when more information than just the nick name is available about a dude. + + * erc.el 1.152: * Fixed stupid edit,checkin,save cycle error :) + + * erc.el 1.151: + * (erc-generate-log-file-name-default): Renamed to -long + Doc fix. + * (erc-generate-log-file-name-old): Renamed to -long + Doc fix. + * erc-generate-log-file-name-function: Set default to ...-long + Doc fixes + + * erc-speedbar.el 1.4: *** empty log message *** + +2001-11-26 Mario Lang + + * erc-speedbar.el 1.3: * Integrated channel names list + what else do we need to replace info buffers??? + please test that code and comment on erc-ehlp, thanks + + * erc-speedbar.el 1.2: + * Added erc-speedbar-goto-buffer and therefore enable switching to the buffers from speedbar + + * erc-speedbar.el 1.1: + I had to check this in, it works !! sort of,, megaalphagammaversion, first version. test, play, submit ideas/patches + +2001-11-26 Gergely Nagy + + * erc.el 1.150 (erc-mode): moved erc-last-saved-position here + moved buffer naming code from here.. + (erc): ...to here + (erc-generate-log-file-name-old): only prepend target if it exists + + made erc-log-insert-log-on-open a defcustom + +2001-11-26 Mario Lang + + * erc.el 1.149: + * Applied antifuchs/mhp patches, the latest on erc-help, unmodified + * New variable: erc-reuse-buffers default to t. + * Modified erc-generate-new-buffer-name to use it. it checks if server and port are the same, + then one can assume thats the same channel/query target again. + +2001-11-23 Mario Lang + + * erc-bbdb.el 1.6: + * new function erc-BBDB-NICK to handle nickname anotation on a nick-change event of a known record + + * erc.el 1.148: * Remove erc-rename-buffer, its no longer necessary + * Remove erc-autoop-*. it was broken, and needed rewrite anyway + * write erc-already-logged-in in terms of erc-buffer-list and make the duplicate login check work again + + * erc.el 1.147: * Fixed stupid typo + +2001-11-22 Mario Lang + + * erc.el 1.146: * New local variable, erc-announced-server-name + * erc-mode-line-format supports a new symbol, target-and/or-server + * The mode-line displays the announced server name now (for autojoin later..., + greets Adam) + * New macro, erc-server-hook-list for a nice way to define the defcustoms of the erc-server-*-hook's + Thanks go to the guy from #emacs who helped with that + * erc-fill-region is now autoloaded from erc-fill.el + * erc-fill.el implements a new fill method, erc-fill-static + (setq erc-fill-function 'erc-fill-static) + * Some other things I forgot right now + + * erc-bbdb.el 1.5: *** empty log message *** + + * erc-fill.el 1.1: Initial version. + + * erc-complete.el 1.4: + Applied antifuchs patch to make completion work with (string= erc-prompt "") + + * erc-complete.el 1.3: + added function erc-nick-completion-exclude-myself + you can set erc-nick-completion to 'erc-nick-completion-exclude-myself to use it + +2001-11-21 Mario Lang + + * erc-bbdb.el 1.4: + * Changed usage of 'finger-host to bbdb-finger-host-field + + * erc-bbdb.el 1.3: + * Changed WHOIS to use finger-host instead of net field. + * Added 'visible as option to erc-bbdb-popup-p to only pop-up the bbdb buffer if a join happened in a visible buffer on any visible frame. + * Added (regexp-quote ...) for nickname search in erc-bbdb-JOIN + +2001-11-20 Mario Lang + + * erc-bbdb.el 1.2: * Added JOIN support + +2001-11-19 Mario Lang + + * erc.el 1.145: + Initial message catalog code. converted erc-action-format usage to use it + + * erc.el 1.144: * erc-play-sound: Added XEmacs related check + + * erc-bbdb.el 1.1: * Initial version, many thanks to Andreas Fuchs + + * erc.el 1.143: * Fixed silly problem with whois/was handling + + * erc.el 1.142: * Renamed prev-rd to erc-previous-read + * Removed erc-next-line-add-newlines and s next-line-add-newlines to nil in defun erc by default + + * erc.el 1.141: + fixed xemacs compatibility prob with delete, thanks Adam + +2001-11-18 Mario Lang + + * erc.el 1.140: numreplies 301 & 461 + +2001-11-13 Tijs van Bakel + + * erc.el 1.139: + Added code for error reply 421 "Unknown command", to test the new server parsing system. + This was really easy! Thanks ZenIRC guys & delysid :-) + +2001-11-13 Mario Lang + + * erc.el 1.138: * Allow connecting to SSL enabled irc servers. + Ugly hack, but it works for now. Be sure to use the numeric irc port 994 so that erc can recognize what you want + good example is + irc server: ircs.segfault.net + port: 994 + + meet me there, I am still delYsid :) + + * erc.el 1.137: * some more numreply handlers + * cleanup in erc-process-away-p + * new function erc-display-error-notice + + * erc.el 1.136: * numreply 501 and 221 + + * erc.el 1.135: + removed obsolete old hook variables. Your functions may break, but it is easy to hook them up to the new hooks. + erc-part-hook: use erc-server-PART-hook instead + erc-kick-hook: use erc-server-KICK-hook instead + and so on + + * erc.el 1.134: + fixed serious bug which cause privmsgs vanishing when erc-auto-query was set to nil + + * erc.el 1.133: cleaned up erc-process-filter + + * erc.el 1.132: * 401 and 320 numreplies implemented + + * erc.el 1.131: * Removed old/now obsolete code + + * erc.el 1.130: * Fixed bug in erc-server-MODE + +2001-11-12 Mario Lang + + * erc.el 1.129: fixed it + + * erc.el 1.128: + *** We switched over. New server message parsing/handling is running now. Thansk to the zenirc developers for the great ideas I got from the code!!!!! Go and test it, poke at it, bug me on irc about problems + + * erc.el 1.127: *** empty log message *** + +2001-11-12 Tijs van Bakel + + * erc.el 1.125: + Fixed bug in erc-get-buffer, now channel names are compared in + a case-insensitive way. + +2001-11-12 Mario Lang + + * erc.el 1.124: erc-server-353 + +2001-11-12 Tijs van Bakel + + * erc.el 1.123: Fixed docstring for erc-get-buffer. + Added erc-process to a lot of calls to erc-get-buffer, so + that only the local process is searched. + +2001-11-12 Mario Lang + + * erc.el 1.122: * erc-buffer-filter: do it differently + + * erc.el 1.121: ugly but working fix for mhp's query problem + + * erc.el 1.120: * erc-server-PRIVMSG-or-NOTICE + Now, all the server word replies are finished. Going to numreplies now + + * erc.el 1.119: + * debugging fascilities for the transition. C-x 2 C-x o M-x ielm RET erc-server-vectors RET ; to get a list of all server messages currently not handled in the new code. Feel free to pick one and implement it + + * erc.el 1.118: * erc-server-KICK and erc-server-TOPIC. new functions + * erc-server-305-or-306 and erc-server-311-or-314 + + * erc.el 1.117: + * ported PART and QUIT msgs to the new scheme, many to go. but it is a easy task. does someone wanna try and start with numreplies? + + * erc.el 1.116: * erc-server-JOIN + + * erc.el 1.115: * Ported erc-server-INVITE code + + * erc.el 1.114: * erc-server-ERROR and erc-server-MODE + +2001-11-11 Mario Lang + + * erc.el 1.113: * zen + + * erc.el 1.112: * New variable erc-connect-function. + + * erc.el 1.111: + * New function erc-channel-p and use it where appropriate + + * erc.el 1.110: * Removed the variable erc-buffer-list completely now + * Moved erc-dbuf around a bit + + * erc.el 1.109: * Fix silly change in quit/rename msg handling + + * erc.el 1.108: thanks mhp, fixed + + * erc.el 1.107: * Tijs van Bakel's work from 10th Nov. merged in + * My additions to that idea merged in too + Basicly, this is a major rewrite, if you are scared and want avoid problems, + stay at your current version. It seems fairly stable though. + That changed? erc-buffer-name handling was completely rewritten, + and erc-buffer-list local variable handling removed. + Simplifies alot of code. Poke at it. read the diff. report bug/send patches! + + * erc.el 1.106: * Added variable listing when /set is used without args + +2001-11-10 Mario Lang + + * erc.el 1.105: + * Comment/structure cleanup, removal of unnecessary code + + * erc.el 1.104: only some code beautification + + * erc-imenu.el 1.2: + remove add-hook call, thats done in erc.el now for autoloadability + + * erc.el 1.103: * Make erc-imenu autoloadable + + * erc.el 1.102: + * The long promised erc-mode-line-format handling rewrite + Poke at it, try it, play with it, report bugs + + * erc.el 1.101: + some regex-quote fixes, new function erc-cmd-set, and minor things + +2001-11-08 Mario Lang + + * erc.el 1.100: + * added second timestamp-format (erc-away-timestamp-format) for marking msgs when being away + + * erc-complete.el 1.2: fixed silly deffun + + * erc.el 1.99: * Rewrote erc-load-irc-script (simplified) + * Removed depricated code + + * erc-speak.el 1.15: * reflect changes in erc.el + + * erc.el 1.98: + * Moved completion related functions into erc-complete.el + placed an autoload instead into erc.el. That quite cool, + because erc-complete.el only gets loaded when you use + TAB first time in erc. + + * erc-complete.el 1.1: _ Initial checkin + + * erc.el 1.97: * New function: erc-chain-hook-with-args + * Changed calls to erc-insert-hook to use it + +2001-11-07 Mario Lang + + * erc.el 1.96: * Patch from Fabien Penso + Make completion case insensitive. try it! its cool + + * erc.el 1.95: * Reduction patch 2 + This time, we move the input ring handling into erc-ring.el + Remember that you need (require 'erc-ring) in your .emacs to get the input handling as a feature + And remeber, that you dont need it if you dont use input ring :-) + + * erc-ring.el 1.1: * Initial checkin + + * erc.el 1.94: * The great reduction patch :-) + moved relevant function from erc.el to new file erc-menu.el and erc-imenu.el + + * erc-imenu.el 1.1: nitial version + + * erc-menu.el 1.1: * Initial version + + * erc.el 1.93: * wording change suggested by Benjamin Drieu + +2001-11-07 Tijs van Bakel + + * erc.el 1.92: Added Emacs version to /SV + +2001-11-07 Mario Lang + + * erc.el 1.91: * Hookification patch, read the diff + + * erc.el 1.90: too tired for a changelog :) + +2001-11-06 Mario Lang + + * erc.el 1.89: + * make erc-cmd-op and erc-cmd-deop take multiple nicknames as argument + +2001-11-06 Gergely Nagy + + * debian/changelog 1.7: sync + + * debian/rules 1.4: fixed a typo: PKGDIR, not PKIDR + +2001-11-06 Mario Lang + + * erc.el 1.88: + * Changed timestamping when away to use erc-timestamp-format and append the timestamp instead of prepending it.. + * minor cleanup, s/(if (not /(unless/ and thelike + +2001-11-06 Tijs van Bakel + + * erc.el 1.87: Fixed OP and DEOP commands to return T. + Added SV say-version command. + Added erc-send-message utility function, but it's not used everywhere yet. + +2001-11-05 Mario Lang + + * erc.el 1.86: stupid delYsid, forgot require 'format-spec. good nite + + * erc.el 1.85: + * new variable erc-action-format. Some erc-notice-prefix fixes again + + * erc.el 1.84: * erc-minibuffer-privmsg defaults to t + + * erc.el 1.83: + * Small fix in relation to the transition to erc-make-notice + +2001-11-05 Tijs van Bakel + + * erc.el 1.82: + Renamed erc-message-notices to erc-minibuffer-notice, and renamed erc-prevent-minibuffer-privmsg to erc-minibuffer-privmsg, inverting its functionality + + * erc.el 1.81: Added support for channel names starting with & + and !. + Also, many changes partially discussed on the mailinglist: + + * erc.el (cl): Add requirement for cl package. + (erc-buffer-list): Make this variable global again. + (erc-default-face): Fix typo. + (erc-timestamp-face): Add face for timestamps. + (erc-join-buffer, erc): Add a 'bury option. + (erc-send-action): Add timestamp. + (erc-command-table): Add /CLEAR, /DEOP, /OP, /Q. + (erc-send-current-line): Add timestamp. + (erc-send-current-line): Add call to erc-insert-hook. + (erc-cmd-clear): New command to clear buffer contents. + (erc-cmd-whois): Fix cut'n'paste-o. + (erc-cmd-deop): New command to deop a user. + (erc-cmd-op): New command to op a user. + (erc-make-notice): Moved a lot of duplicate code here. Perhaps + this should also be done for erc-highlight-error. + (erc-parse-line-from-server): Now NOTICE will also open a new + query, just as PRIVMSG. + (erc-parse-line-from-server): Call erc-put-text-property on a + channel message/notice first, before concatenating nick and + timestamp &c. + (erc-message-notices): Add option to display notices in + minibuffer. + (erc-fill-region): No longer strip spaces in front of incoming + messages. + (erc-parse-current-line): No longer strip spaces in front of text + input by user. + + Hopefully I didn't break too much :( + +2001-11-05 Mario Lang + + * erc.el 1.80: + * New function erc-nickserv-identify-autodetect for erc-insert-hook. Added by default currently. + + * erc.el 1.79: + * Mini-fix in erc-process-num-reply (= n 353): Added @ as prefix character to make certain channels on opn work again nicely + +2001-10-31 Gergely Nagy + + * debian/changelog 1.6: updated to reflect changes + + * debian/scripts/install.in 1.2: + moved #PKGFLAG# before -f batch-byte-compile + +2001-10-29 Mario Lang + + * erc.el 1.78: + Imenu fixed somehow, added IRC services interactive function for indentify to NickServ. Read the diff + +2001-10-26 Gergely Nagy + + * debian/changelog 1.5: sigh. -2 + +2001-10-25 Gergely Nagy + + * debian/changelog 1.4: updated to reflect changes + + * debian/rules 1.3: handle conffiles.in too + + * debian/maint/conffiles.in 1.1: new file + + * debian/maint/conffiles 1.2: superceded by conffiles.in + + * debian/scripts/startup 1.2: superceded by startup.erc + +2001-10-25 Mario Lang + + * debian/scripts/startup.erc-speak 1.1: * Initial version + + * debian/scripts/startup.erc 1.1: * Added and fixes minimal typo + +2001-10-25 Gergely Nagy + + * debian/changelog 1.3: updated to reflect changes + + * debian/rules 1.2: + modified to be able to build the erc-speak package too + + * debian/control 1.2: added the new erc-speak package + + * debian/README.erc-speak 1.1, debian/maint/postinst.in 1.1, debian/maint/prerm.in 1.1, + debian/scripts/install.in 1.1, debian/scripts/remove.in 1.1: + new file + + * debian/maint/postinst 1.2, debian/maint/prerm 1.2, debian/scripts/install 1.2, + debian/scripts/remove 1.2: + removed, superceded by it's .in counterpart + +2001-10-25 Mario Lang + + * erc.el 1.77: * Fixed some defcustom :type 's + * Added erc-before-connect hook which gets called with server port and nick. + Use this hook to e.g. setup a tunnel before actually connecting. + something like (when (string= server "localhost") ...) + +2001-10-24 Mario Lang + + * erc.el 1.76: * Patch by smoke: fix erc-cmd-* commands and add aliases + +2001-10-23 Mario Lang + + * erc-speak.el 1.14: + * Added a new personality for channel name announcement, This makes streams of flooded channels much easier to listen to, + especially if you are on more than one channel simultaniously. + + * erc.el 1.75: + * Made the completion postfix customizable through erc-nick-completion-postfix + + * erc-speak.el 1.13, erc.el 1.74: + * Added erc-prevent-minibuffer-privmsg + + * erc-speak.el 1.12: + * Quickish hack to allow exclusion of timestamps from speaking. see erc-speak-filter-timestamps + +2001-10-21 Mario Lang + + * erc-speak.el 1.11: + * Removed now really obsolete code. Package size reduced by 50% + + * erc-speak.el 1.10: + * Very important fix! Now erc-speak is really complete. Messages dont get cut anymore. Be sure to use auditory icons, + it's reallllly cool now!!! + + * erc-speak.el 1.9: *** empty log message *** + + * erc-speak.el 1.5: * Major simplification. depends on erc.el,v 1.73 + * Things removed, read diff + +2001-10-21 Gergely Nagy + + * debian/changelog 1.2: oops, silly typo + + * debian/changelog 1.1, debian/control 1.1, debian/copyright 1.1, + debian/maint/conffiles 1.1, debian/maint/postinst 1.1, debian/maint/prerm 1.1, + debian/rules 1.1, debian/scripts/install 1.1, debian/scripts/remove 1.1, + debian/scripts/startup 1.1: + initial check-in + +2001-10-21 Mario Lang + + * erc.el 1.73: + * Changed erc-insert-hook to get two arguments, START and END of the region + which got inserted. CAREFUL! This could break stuff, but it makes the hook + much more useable. + + * erc.el 1.72: + * Made erc-smiley a new option, currently set to t to showoff this feature. :) + +2001-10-20 Mario Lang + + * erc.el 1.71: * Add missing erc-mode-hook variable + * Add smiley-support (preliminary test) + +2001-10-20 Alex Schroeder + + * erc.el 1.70: + Replaced all occurences of put-text-property with a call to + erc-put-text-property. + (erc-put-text-property): New function. + (erc-tracking-modified-channels): Moved to the front of the file such + that it is already defined when the menu is being defined. + (erc-modified-channel-string): Ditto. + +2001-10-18 Alex Schroeder + + * erc.el 1.69: Removed some commentary. The wiki page is the place to + put such information. + (erc-fill-prefix): Doc change. + (erc-notice-highlight-type): Doc change, now a user option. + (erc-pal-highlight-type): Doc change, now a user option. + (erc-fool-highlight-type): New option. + (erc-keyword-highlight-type): New option. + (erc-dangerous-host-highlight-type): New option. + (erc-uncontrol-input-line): Doc change. + (erc-interpret-controls-p): Doc change, now a user option. + (erc-multiline-input): Doc change. + (erc-auto-discard-away): Doc change. + (erc-pals): Changed from string to regexp. + (erc-fools): New option. + (erc-keywords): Renamed from erc-highlight-strings. WATCH OUT: + Not backwards compatible change! + (erc-dangerous-hosts): Renamed from erc-host-danger-highlight. + WATCH OUT: Not backwards compatible change! + (erc-menu-definition): Added menu entries for fools, keywords and + dangerous hosts. + (erc-mode-map): Changed keybindings from C-c to + various C-c combinations. + (erc-dangerous-host-face): Renamed from erc-host-danger-face. + WATCH OUT: Not backwards compatible change! + (erc-fool-face): New face. + (erc-keyword-face): Renamed from erc-highlight-face. WATCH OUT: + Not backwards compatible change! + (erc-parse-line-from-server): Fixed highlighting in the cases + where (equal erc-pal-highlight-type 'all), added code to handle + erc-fool-highlight-type, erc-dangerous-host-highlight-type + (erc-update-modes): Replaced erc-delete-string with delete. + (erc-keywords): Renamed from erc-highlight-strings, handle + erc-keyword-highlight-type. + (erc-delete-string): Removed. + (erc-list-match): New function. + (erc-pal-p): Use erc-list-match. + (erc-fool-p): New function. + (erc-keyword-p): New function. + (erc-dangerous-host-p): Renamed from erc-host-danger-p, use + erc-list-match. + (erc-directed-at-fool-p): New function. + (erc-add-entry-to-list): New function. + (erc-remove-entry-from-list): New function. + (erc-add-pal): Use erc-add-entry-to-list. + (erc-delete-pal): Use erc-remove-entry-from-list. + (erc-add-fool): New function. + (erc-delete-fool): New function. + (erc-add-keyword): New function. + (erc-delete-keyword): New function. + (erc-add-dangerous-host): New function. + (erc-delete-dangerous-host): New function. + +2001-10-07 Mario Lang + + * erc.el 1.68: * irc vs ircd default port fixed + + * erc.el 1.67: * Added topic-change to imenu + + * erc.el 1.66: * More imenu spiffyness + + * erc.el 1.65: * Added imenu support + + * erc.el 1.64: + * Fix to /topic to show topic instead of setting it to null :) + +2001-10-05 Mario Lang + + * erc.el 1.63: * First version of erc-rename-buffer + + * erc.el 1.62: * more header-line tricks. + + * erc.el 1.61: + * Small fix to do erc-update-mode-line-buffer in erc-update-channel-topic + + * erc.el 1.60: * Added erc-header-line-format + +2001-10-04 Mario Lang + + * erc.el 1.59: * mini-fix, add msgp to auto-query code + + * erc.el 1.58: * Added command-names to completion (erc-command-table) + * New variable erc-auto-query. When set, every arriving message to you + will open a query buffer for that sender if not already open. + * Compatibility function fo non-existing line-beginning|end-position functions in XEmacs. + +2001-10-03 Mario Lang + + * erc.el 1.57: + * Removed alot of (progn ...) where they were not necessary + * Changed some (if ...) without else part to (when ...) + * Some (while ...) to use (dolist ...) + * Fix for completion popup generating tracebacks. + * New function erc-arrange-session-in-mulptiple-windows + * Lots of other stuff, read the diff + +2001-10-02 Mario Lang + + * erc.el 1.56: * Added erc-kill-input and keybinding C-c C-u for it + +2001-10-01 Mario Lang + + * erc.el 1.55: * Another fix to nick-completion + * Additional checks in erc-track-modified-channels + +2001-09-26 Mario Lang + + * erc.el 1.54: * Fixed completion (alex) + * Now popup buffer doesnt destroy your window configuration. + * Fixed away handling (incomplete) + +2001-09-24 Mario Lang + + * erc.el 1.53: Fixed silly quoting-escape error + +2001-09-23 Mario Lang + + * erc.el 1.52: * Added auto-op support (unfinished) + * Added erc-latest-version. + * Added erc-ediff-latest-version. + +2001-09-21 Mario Lang + + * erc.el 1.51: + * Minor menu additions (invite only mode is now a checkbox) + +2001-09-20 Mario Lang + + * erc.el 1.50: + * Fix (erc-cmd-names): This should fix C-c C-n too, hoepfully it was the right fix and doesnt break anything else. + + * erc.el 1.49: * Fixes XEmacs easymenu usage (2nd time). + +2001-09-19 Mario Lang + + * erc.el 1.48: + * (erc-complete-nick): Add ": " only if one completes directly after the erc-prompt, otherwise, add just one space + + * erc.el 1.47: + * Changed menu-definition to use easymenu (hopefully this now works under Xemacs) + * Fix for custom problem with :must-match on XEmacs (thanks shapr) + * Added /COUNTRY command using (what-domain) from package mail-extr (shapr) + * Fix for case-sensitivity problem with pals (they are now all downcased) + * Different (erc-version) function which now can take prefix argument to insert the version information into the current buffer, + instead of just displaying it in the minibuffer. + +2001-09-10 Mario Lang + + * erc.el 1.46: Updated erc-version-string + + * erc.el 1.45: Version number change and last read-through... + +2001-09-04 Mario Lang + + * erc.el 1.44: Added some asterisks + +2001-08-24 Mario Lang + + * erc.el 1.43: + Fixed hidden channel buffer tracking (sort of), now using switch-to-buffer for advice. + This version is unofficially named 2.1prebeta1. Please test it and send + fixes to various problems you may encounter so that we can eventually + release 2.1 soon. + +2001-08-14 Mario Lang + + * erc.el 1.42: + Added function erc-bol and keybinding C-c C-a for it (contributed by Benjamin Rutt + + * erc.el 1.41: + Checked in lathis code and modified it slightly. Still unsure about set-window-buffer advice, current attempt doesnt seem to work. + Removed (nick -> #channel) from mode-line. (CLOSED) and (AWAY...) should still be displayed when appropriate + +2001-08-06 Mario Lang + + * erc.el 1.40: + added local-variable channel-list in session-buffers and make /LIST use it. + erc-join-channel can now do completion after /LIST was executed + +2001-08-05 Mario Lang + + * erc.el 1.39: Tweaked erc-join-channel and erc-part-from-channel + +2001-07-27 Mario Lang + + * erc.el 1.38: some more defcustom stuff + + * erc.el 1.37: Patch from Henrik Enberg : + Adds variables erc-frame-alist and erc-frame-dedicated-p. + + * erc.el 1.36: fixed erc-part-from-channel + + * erc.el 1.35: + fixed match-string problem and added interactive topic setting function. + + * erc.el 1.34: fixed silly string-match bug + + * erc.el 1.33: + Added erc-join-channel and erc-part-from-channel (interactive prompts), as well as keybindings. C-c C-j #emacs RET is now enough :) + +2001-07-27 Alex Schroeder + + * erc.el 1.32 (erc-display-line-buffer): Simplified filling. + (erc-fill-region): New function. + +2001-07-27 Mario Lang + + * erc.el 1.31: Added redundancy check in output + +2001-07-26 Alex Schroeder + + * erc.el 1.30 (erc-send-action): Add text-property stuff. + (erc-input-action): Removed text-property stuff. + (erc-command-table): Corrected command for DESCRIBE. Still + doesn't work though. No idea what it should do. Looks like a no op. + (erc-cmd-me): Doc change. + +2001-07-26 Mario Lang + + * erc.el 1.29: + fixed one occurence of a setq with only one argument (XEmacs didnt like that) + + * erc.el 1.28: + Added erc-next-line-add-newlines customisation possibility. + + * erc.el 1.27: + added erc-fill-prefix for defining your own way of filling and fixed filling somehow + + * erc.el 1.26: + fixed small incompatibility in erc-parse-line-from-server at (and (= n 353) regexp + +2001-07-25 Mario Lang + + * erc.el 1.25: + Added erc-filling and filling code to erc-display-line-buffer. + +2001-07-08 Alex Schroeder + + * erc.el 1.24 (try-complete-erc-nick): Make the ": " part of the + expansion + + * erc.el 1.23: require ring + +2001-07-08 Mario Lang + + * erc.el 1.22: *** empty log message *** + +2001-07-07 Mario Lang + + * erc.el 1.21: typo + + * erc.el 1.20: ommit + :wq + +2001-07-06 Alex Schroeder + + * erc.el 1.19 (erc-mode): Call erc-input-ring-setup. + (erc-send-current-line): Call erc-add-to-input-ring. + (erc-input-ring): New variable. Currently not buffer local. + (erc-input-ring-index): New variable. Currently not buffer local. + (erc-input-ring-setup): New function. + (erc-add-to-input-ring): New function. + (erc-previous-command): New function. + (erc-next-command): New function. + (erc-mode-map): Uncommented keybindings for erc-next-command and + erc-previous-command. + +2001-07-05 Alex Schroeder + + * erc.el 1.18 (erc-highlight-strings): Removed debug message. + + * erc.el 1.17 (erc-join-buffer): Changed default to 'buffer. + (erc-join-info-buffer): Changed default to 'disable. + (erc-nick-completion): Changed default to 'all. + +2001-07-04 uid31117 + + * erc.el 1.16: Resolved... + +2001-07-03 Alex Schroeder + + * erc.el 1.15 (erc-highlight-strings): New option and new function. + (erc-parse-line-from-server): Use it. + Various empty lines removed. Various doc strings fixed. + + * erc.el 1.14: Removed more empty lines. + + * erc.el 1.13 (erc-member-string): replaced by plain member + Otherwise, lots of deleting of empty lines... I'm not too happy with that + but I feel better when the code is "cleaned up". + +2001-07-03 Mario Lang + + * erc.el 1.12: Ugly hack, but looks nicer when giving commands + + * erc-speak.el 1.4: ugly hack, but looks nicer now + +2001-07-03 Alex Schroeder + + * erc.el 1.11 (try-complete-erc-nick): New function. + (erc-try-complete-nick): New function. + (erc-nick-completion): New option. + (erc-complete): Call hippie-expand such that erc-try-complete-nick + will be called eventually. Based on erc-nick-completion + try-complete-erc-nick will then complete on the nick at point. + +2001-07-02 Mario Lang + + * erc.el 1.10: + Insert (erc-current-nick) instead of (erc-display-prompt). good night :) + + * erc.el 1.9: + small, but it was anoying, so I just did it (defcustom for erc-join-buffer and erc-join-info-buffer) + +2001-06-29 Alex Schroeder + + * erc.el 1.8: Use defface to define all faces. + Removed some history from the commentary, as well as some other + commentary editing. + +2001-06-28 Mario Lang + + * erc.el 1.7: hmm, defcustom for erc-user-full-name + + * erc-speak.el 1.3, erc.el 1.6: *** empty log message *** + +2001-06-27 Mario Lang + + * erc.el 1.5: typo + + * erc.el 1.4: Some more defcustom + + * erc-speak.el 1.2: nothing, really + +2001-06-26 Mario Lang + + * erc.el 1.3: Some defcustom stuff. Still no defgroup though :) + + * erc.el 1.2: + Initial change to erc.el (2.0). Mainly list of ideas and features + and syntax-table entries. + + * erc-speak.el 1.1.1.1, erc.el 1.1.1.1: Initial Import + + * erc-speak.el 1.1, erc.el 1.1: New file. + + Copyright (C) 2001 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: 306c4b58-f9ae-4f3d-9fd9-db2d743f05a6 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog.2002 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.2002 Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,2607 @@ +2002-12-31 Francis Litterio + + * erc.el 1.398 (erc-split-command): + Removed assignment to free variable "continue". + (erc-strip-controls): New function. Takes a string, returns the string with + all IRC color/bold/underline/etc. control codes stripped out. + (erc-interpret-controls): If variable erc-interpret-controls-p is nil, now + uses erc-strip-controls to strip control codes. + (erc-ctcp-reply-ECHO): Changed reference and assignment to free variable "s" + into reference/assignment to "msg", which appears to be the original author's + intent. + + * erc-list.el 1.8 (erc-chanlist): + Changed to use the new erc-once-with-server-event function + instead of the old macro of the same name. + + * erc-notify.el 1.10 (erc-notify-timer): + Changed to use the new erc-once-with-server-event function + instead of the old macro of the same name. Also fixed a bug were variable + erc-last-ison was being read from a non-server buffer (thus giving its default + value instead of its per-server value). + + * erc.el 1.397 (erc-once-with-server-event): + This is now a function. It was a macro with a + bug (the call to gensym happened at byte-compile-time not macro-call-time). + (erc-toggle-debug-irc-protocol): Now [return] is bound to this function in + the *erc-protocol* buffer. + +2002-12-30 Alex Schroeder + + * erc-autoaway.el 1.10 (erc-autoaway-idletimer): Doc, + ref. erc-autoaway-use-emacs-idle. + (autoaway): Doc, explain different idle definitions. Reestablish + the idletimer only when erc-autoaway-use-emacs-idle is non-nil. + (erc-auto-set-away): Doc, ref erc-auto-discard-away. + (erc-auto-discard-away): Doc, ref erc-auto-set-away. + (erc-autoaway-use-emacs-idle): Doc, ref erc-autoaway-mode, and + added a note that this feature is currently broken. + (erc-autoaway-reestablish-idletimer): Doc. + (erc-autoaway-possibly-set-away): Split test such that + erc-time-diff is only computed when necessary, add a comment why + erc-process-alive is not necessary. + (erc-autoaway-set-away): Test for erc-process-alive. + +2002-12-29 Alex Schroeder + + * erc-autoaway.el 1.9: + Changed the order of defcustoms to avoid errors in the :set property + of erc-autoaway-idle-seconds. + +2002-12-29 Damien Elmes + + * erc-track.el 1.42: + * (erc-track-get-active-buffer): remove superflous (+ arg 0) + +2002-12-29 Alex Schroeder + + * erc-autoaway.el 1.8 (erc-autoaway): Moved the defgroup up to the + top, before the define-erc-module call. + (autoaway): Extended doc. + (erc-autoaway-idle-seconds): Use a :set property to handle + erc-autoaway-use-emacs-idle. + (erc-auto-set-away): Set default to t. Added doc strings where + necessary, reformatted doc strings such that the first line can + stand on its own. This is important for the output of M-x + apropos. + +2002-12-28 Jorgen Schaefer + + * erc-auto.in 1.3: + added (provide 'erc-auto), which is required for (require 'erc-auto) :) + + * erc.el 1.396 (erc-display-prompt): + Set the face property of the prompt to + everything but the last character. + + * erc.el 1.395 (erc-send-current-line): + Check wether point is in the input line. If + not, just beep and do nothing. + +2002-12-28 Alex Schroeder + + * erc.el 1.394 (erc-bol): + Fixed bug when there is only a prompt, and no property + change. + + * erc.el 1.393 (erc-display-prompt): Rewrote using a save-excursion + and erc-propertize. No longer use a field for the prompt, but a + plain text property called erc-prompt. + (erc-bol): Use the erc-prompt text property instead of a field. + Return point instead of t. + (erc-parse-current-line): No need to call point here, then, since + erc-bol now returns point. + + * Makefile 1.11: + make ChangeLog .PHONY, thus forcing it always to be rebuilt. + +2002-12-28 Jorgen Schaefer + + * erc.el 1.392 (erc-log-irc-protocol): + Removed check wether get-buffer-create + returned nil. "The value is never nil", says the docstring. + + * erc.el 1.391: Day Of The Small Changes + + (erc-display-prompt): Make the prompt 'front-sticky, which prevents it + from being modified. It *should* also make end-of-line move to the + end of the field (i.e. the end of the prompt) when point is at the + beginning of the prompt, but it doesn't. Dunno why. :( + +2002-12-27 Francis Litterio + + * Makefile 1.10: + Added "-f" to "rm" command in rule for target "realclean". + + * erc.el 1.390: + New function: erc-log-irc-protocol. Consolidates nearly duplicate code + from functions erc-send-command and erc-process-filter into one function. + + * erc.el 1.389 (erc-toggle-debug-irc-protocol): + Removed unneeded argument PREFIX and code + which referenced it at end of function. + (erc-send-command): Now we only append a newline to the logged copy + of output protocol text if it doesn't have one. + +2002-12-27 Jorgen Schaefer + + * erc.el 1.388 (erc-toggle-debug-irc-protocol): + Display buffer if it's not shown + already, and use view-mode. + (erc-toggle-debug-irc-protocol), (erc-send-command), + (erc-process-filter): inhibit-only t to insert into the + *erc-protocol* buffer (view-mode) + +2002-12-27 Francis Litterio + + * erc.el 1.387 (erc-mode-map): + Removed keybinding for erc-toggle-debug-irc-protocol. + (erc-toggle-debug-irc-protocol): Now used erc-make-notice to propertize the + face of the enabled/disabled messages in the *erc-protocol* buffer. + (erc-send-command): Now outgoing IRC protocol traffic is logged too. + + * erc.el 1.386: + Added user-customizable variable erc-debug-irc-protocol. + Added function erc-toggle-debug-irc-protocol. + (erc-process-filter): Now supports IRC protocol logging. If variable + erc-debug-irc-protocol is non-nil, all IRC protocol traffic is appended + to buffer *erc-protocol*, which is created if necessary. + +2002-12-27 Jorgen Schaefer + + * erc.el 1.385 (erc-display-prompt): + Don't make the prompt intangible; that didn't + make things that much better for the user, but confused ispell, + which checked the prompt when it should check the first word + +2002-12-27 Alex Schroeder + + * AUTHORS 1.4: fixed resolve's email add + + * AUTHORS 1.3: added damien + + * erc.el 1.384 (erc-truncate-buffer-on-save): + Removed documentation that + described behaviour now changed. It used to say "When nil, no + buffer is ever truncated." This is no longer true; even when + buffers are NOT truncated on save, they can be truncated, eg. by + adding erc-truncate-buffer to the hook. + (erc-logging-enabled): New function. + (erc-current-logfile): New function. + (erc): Use erc-logging-enabled and erc-current-logfile. + (erc-truncate-buffer-to-size): Rewrote it, and made sure to use a + (save-restriction (widen) ...) such that the truncation actually + runs in the whole buffer, not in the last message only (as + erc-insert-post-hook will do!). This should fix rw's + out-of-bounds error. + (erc-generate-log-file-name-short): Made all but the BUFFER + argument optional. Doc: Mention + erc-generate-log-file-name-function. + (erc-generate-log-file-name-long): Doc: Mention + erc-generate-log-file-name-function. + (erc-save-buffer-in-logs): Use erc-logging-enabled and + erc-current-logfile. Doc: Mention erc-logging-enabbled. + + (erc-encode-string-for-target): Only do the real work when + featurep mule; else just return the string unchanged. + +2002-12-27 Damien Elmes + + * erc.el 1.383: + erc-encoding-default: check for (coding-system-p) for older emacs versions + + * erc.el 1.382 (erc-connect): missing ()s added. "don't commit at 2am" + + * erc.el 1.381 (erc-connect): + check if (set-process-coding-system) is available before use + +2002-12-27 Alex Schroeder + + * AUTHORS 1.2: added franl + +2002-12-26 Alex Schroeder + + * erc-pcomplete.el 1.14 (pcomplete-parse-erc-arguments): + Reworked, and fixed a bug that had + caused completions to corrupt preceding text under some circumstances. + + * erc.el 1.380 (erc-encoding-default): New. + (erc-encode-string-for-target): Use it instead of a hard-coded ctext. + (erc-encoding-coding-alist): Doc. + +2002-12-26 Francis Litterio + + * erc.el 1.379: + Removed fix for bug 658552 recently checked-in, because it doesn't work. + + * erc.el 1.378 (erc-kill-buffer-function): + Removed check that connection is up + before running erc-kill-server-hook hooks. Those hooks should use + erc-process-alive to avoid interacting with the process. + + * erc.el 1.377: + Fixed erc-send-current-line so it no longer assigns the free variable "s", and + it doesn't move point to end-of-buffer in non-ERC buffers. Fixed + erc-kill-buffer-function so it doesn't run the erc-kill-server-hook hooks if the + server connection is closed. Fixed bug 658552, which is described in detail at + http://sourceforge.net/tracker/index.php?func=detail&aid=658552&group_id=30118&atid=398125 + +2002-12-26 Alex Schroeder + + * erc.el 1.376 (erc-cmd-SMV): Bug, now call erc-version-modules. + + * erc-pcomplete.el 1.13 (erc-pcomplete-version): New. + +2002-12-26 Francis Litterio + + * erc-pcomplete.el 1.12: + Fix for bug where you could not complete a nick when there was text following + the nick. + +2002-12-25 Alex Schroeder + + * erc.el 1.375 (erc-already-logged-in): Use erc-process-alive. + (erc-prepare-mode-line-format): Use erc-process-alive. + (erc-process-alive): Check erc-process for boundp and processp. + + * erc.el 1.374 (erc-kill-buffer-function): + Do not check wether the process is + alive before running the hook, because there might be functions on + the hook that need to run even when the process is dead. And + function that wants to check this, should use (erc-process-alive). + (erc-process-alive): New function. + (erc-kill-server): Use it. + (erc-kill-channel): Use it. + + * erc.el 1.373 (erc-kill-buffer-function): + Reverted ignore-error change. + ignore-error is dangerous because we might miss bugs in functions + on erc-kill-server-hook. + + * erc.el 1.372 (erc-kill-buffer-function): Use memq instead of member + when checking process-status. Added doc string with references to + the other hooks. + (erc-kill-server): Only send the command when the erc-process is + still alive. This prevents the error: "Process + erc-irc.openprojects.net-6667 not running" when killing the buffer + after having used /QUIT. + +2002-12-24 Jorgen Schaefer + + * erc.el 1.371 (erc-server-ERROR): + Show the error reason, not only the originating host. + + * erc.el 1.370 (erc-kill-buffer-function): + (ignore-errors ...) in 'erc-kill-server-hook. + When the process for this server does not exist anymore, the hook + will cause an error, effectively preventing the buffer from being + killed. + +2002-12-24 Francis Litterio + + * erc-notify.el 1.9: + Fixed erc-notify-timer so that it passes the correct nick to + the functions on erc-notify-signoff-hook. + +2002-12-24 Alex Schroeder + + * erc-track.el 1.41: Doc + + * erc-track.el 1.40 (erc-make-mode-line-buffer-name): Removed a + superfluous if construct around erc-track-showcount-string. + (erc-track-modified-channels): Use 1+. + Plus some doc and comment changes. + +2002-12-23 Mario Lang + + * erc.el 1.369: Fix (erc-version) string + +2002-12-23 Francis Litterio + + * erc.el 1.368: + Removed unnecessary assignment to free-variable "p" in erc-downcase. + + * erc.el 1.367: + Now /PART reason strings are generated the same way /QUIT reason strings + are generated (see variable erc-part-reason). Also, when a server buffer + is killed, a QUIT command is automatically sent to the server. + + * erc.el 1.366: + Changed erc-string-no-properties so that it is more efficient. Now it uses + set-text-properties instead of creating and deleting a temporary buffer. + +2002-12-21 Jorgen Schaefer + + * erc.el 1.365: + erc-kill-input: added a check to prevent a (ding) and an error when + there's nothing to kill (thanks to Francis Litterio, franl on IRC) + +2002-12-21 Mario Lang + + * erc.el 1.364: + AWAY notice duplication prevention. erc-prevent-duplicates now set to ("301") by default, and timeout to 60 + + * erc.el 1.363: erc-prevent-duplicates: New variable, see docstring + +2002-12-20 Jorgen Schaefer + + * erc-track.el 1.39: + erc-track-modified-channels: Use cddr of cell for old-face. cdr of + cell is '(1 . face-name), i have no idea why :) + +2002-12-20 Damien Elmes + + * erc.el 1.362 (erc-current-nick): + check the server buffer is active before using + + Also tabified and cleaned up some trailing whitespace + +2002-12-15 Mario Lang + + * erc-track.el 1.38: erc-track-count patch by az + +2002-12-14 Damien Elmes + + * erc.el 1.361: + last-peers: initialise to a cons. thanks to Francis Litterio + for the patch + + * erc.el 1.360: + erc-kill-channel-hook, erc-kill-buffer-hook, (erc-kill-channel): + both hooks now call erc-save-buffer-in-logs, so that query buffers are + saved properly now, and not just channel buffers. + +2002-12-13 Alex Schroeder + + * erc-track.el 1.37 (erc-unique-channel-names): Fix another #hurd + vs. #hurd-bunny bug. + + * erc-match.el 1.17 (match): No longer modify erc-send-modify-hook, + since it does not work without a parsed text property, anyway. + (erc-keywords): Allow cons cells. + (erc-remove-entry-from-list): Deal with cons cells. + (erc-keyword-p): Ditto. + (erc-match-message): Ditto. + + Moved nil to the beginning of the list, removed :tags for the + -type variables: + (erc-current-nick-highlight-type): Ditto. + (erc-pal-highlight-type): Ditto. + (erc-fool-highlight-type): Ditto. + (erc-keyword-highlight-type): Ditto. + (erc-dangerous-host-highlight-type): Ditto. + (erc-log-matches-flag): Moved nil to the beginning. + +2002-12-11 Jorgen Schaefer + + * erc.el 1.359: + erc-beg-of-input-line: Don't do (goto-char (beginning-of-line)), since + beginning-of-line always moves point and returns nil. Thanks to + franl on IRC for noting this. + + * erc-stamp.el 1.20: + erc-insert-timestamp-left, erc-insert-timestamp-right: Made the + timestamp a 'field named 'erc-timestamp. Now end-of-line and + beginning-of-line will move over the timestamp. + +2002-12-10 Damien Elmes + + * erc-button.el 1.34 (erc-button-add-button): + make the created button rear-nonsticky, to allow + cutting and pasting of buttons without worrying about the button properties + being inherited by the text typed afterwards. + + * erc.el 1.358: save logfile when killing buffer + +2002-12-09 Alex Schroeder + + * erc-track.el 1.36 (erc-modified-channels-display): Reworked. + (erc-track-face-more-important-p): Removed. + (erc-track-find-face): Return only one face. + (erc-track-modified-channels): Reworked. + (erc-modified-channels-string): Changed from (BUFFER FACE...) to + (BUFFER . FACE) + + * erc-stamp.el 1.19 (erc-insert-timestamp-right): Do not assume + erc-fill-column is available. + +2002-12-09 Jorgen Schaefer + + * erc.el 1.357: + erc-ech-notices-in-minibuffer-flag, erc-minibuffer-notice: Clarified + the difference in the docstrings. + +2002-12-08 Jorgen Schaefer + + * erc.el 1.356: erc-noncommands-list: added erc-cmd-SM and erc-cmd-SMV + +2002-12-08 Alex Schroeder + + * erc.el 1.355 (erc-cmd-SM): New. + (erc-cmd-SMV): New. + + * erc.el 1.354 (erc-modes): New. + +2002-12-08 Jorgen Schaefer + + * erc-compat.el 1.9: + field-end: use (not (fboundp 'field-end)) instead of (featurep 'xemacs) + +2002-12-08 Alex Schroeder + + * erc.el 1.353 (erc-version-modules): New. + +2002-12-08 Mario Lang + + * debian/changelog 1.19, debian/control 1.7, debian/scripts/startup.erc 1.3: + debian release 3.0.cvs.20021208 + +2002-12-08 Jorgen Schaefer + + * erc.el 1.352 (erc-split-command): Do the right thing with CTCPs. + +2002-12-08 Mario Lang + + * erc-stamp.el 1.18: Be a bit more functional + +2002-12-08 Jorgen Schaefer + + * erc-compat.el 1.8: + XEmacs doesn't seem to have field-end, so we provide our own version here. + +2002-12-08 Mario Lang + + * Makefile 1.9: Small fixes to debrelease target + +2002-12-08 Jorgen Schaefer + + * erc.el 1.351: + make-obsolete-variable: xemacs doesn't have the WHEN parameter, remove it. + +2002-12-07 Jorgen Schaefer + + * erc-imenu.el 1.5 (erc-create-imenu-index): + Use (forward-line 0) instead of + (beginning-of-line) now, sine the latter ignores fields (used in the + prompt). + + * erc.el 1.350: + Rewrite of the prompt stuff to use a field named 'erc-prompt: + + erc-prompt: Removed getter and setter functions. The properties were + already set (and overwritten) in erc-display-prompt. + (erc-prompt): Add the trailing space here, not all over the code. + (erc-display-prompt): Cleaned up a bit. The text-properties now are + valid on the whole prompt. Also, made the prompt 'intangible to + avoid confused users. + (erc-bol): Now use the field 'erc-prompt for finding the prompt + (erc-parse-current-line): Cleaned up considerably. Uses (erc-bol) now. + (erc-load-irc-script-lines): Adjusted for the new (erc-prompt). + (erc-save-buffer-in-logs): Adjusted for the new (erc-prompt). + + * erc.el 1.349: + erc-uncontrol-input-line: The comment said "Consider it deprecated", + so I removed it now. + erc-prompt-interactive-input: Marked obsolete as of 1.348 + + * erc.el 1.348: + erc-smiley, erc-unmorse: Put at the end to separate it from the + important parts of erc.el. + +2002-12-07 Alex Schroeder + + * erc-stamp.el 1.17 (erc-insert-timestamp-right): New algorithm. + +2002-12-07 Jorgen Schaefer + + * erc.el 1.347: + last-peers, erc-message: Explained what last-peers is used for. + +2002-12-07 Alex Schroeder + + * erc-page.el 1.3 (erc-cmd-PAGE): New function. + (erc-ctcp-query-PAGE): Use the catalog entry for the message, too. + (erc-ctcp-query-PAGE-hook): Added custom type. + (erc-page-function): Changed custom type from ... function-item to + ... function. + As well as doc strings. + +2002-12-06 Alex Schroeder + + * erc-page.el 1.2: provide feature at the end + +2002-12-06 Brian P Templeton + + * erc-nickserv.el 1.10: + Added austnet in erc-nickserv.el (thanks to Damien Elmes + ) + +2002-12-05 Mario Lang + + * erc-complete.el 1.13: Add autoload cookie + + * erc-speak.el 1.24: Small fix to make proper voice-changes + +2002-12-05 Alex Schroeder + + * erc-lang.el 1.1: New + +2002-12-03 Jorgen Schaefer + + * erc.el 1.346: + erc-mode-map: Put back C-c C-p (PART) and C-c C-q (QUIT) + +2002-12-02 Jorgen Schaefer + + * erc.el 1.345: + erc-insert-post-hook: Add :options erc-make-read-only, erc-save-buffer-in-logs + erc-send-post-hook: Add :options erc-make-read-only + + * erc.el 1.344: erc-insert-hook: Removed ("this hook is obsolescent") + erc-insert-post-hook: Added :options '(erc-truncate-buffer) + +2002-12-02 Mario Lang + + * erc.el 1.343: Add missing requires + +2002-11-29 Jorgen Schaefer + + * erc.el 1.342 (erc-quit-reason-normal): + Remove v before %s so it's "Version ..." not + "vVersion ..." + +2002-11-26 Alex Schroeder + + * erc-compat.el 1.7 (erc-encode-coding-string): Add second argument + coding-system, and for non-mule xemacsen, use a new defun instead + of identity. + + * erc.el 1.341: (define-erc-module): Use the appropriate group. + (erc-port): Changed custom type. + (erc-insert-hook): Custom group changed to erc-hooks. + (erc-after-connect): ditto + (erc-before-connect): ditto + (erc-disconnected-hook): ditto + + * erc-button.el 1.33 (erc-button): New group, changed all custom groups + from erc to erc-button, but left all erc-faces as-is. + + * erc-track.el 1.35 (erc-track): New group, changed all custom groups + from erc to erc-track. + +2002-11-26 Mario Lang + + * erc-macs.el 1.1: + Macros for erc-victim handling. Primary idea is to use setf and some fancy things to get nice syntax. have a look + +2002-11-26 Jorgen Schaefer + + * erc.el 1.340: + pings, erc-cmd-PING, erc-ctcp-reply-PING, catalog entry CTCP-PING: + Cleaned up. Removed buffer-local variable pings which stored a list of + all sent CTCP PING requests. Now send our full time with the CTCP PING + request and interpret the answer. + +2002-11-25 Jorgen Schaefer + + * erc.el 1.339: nick-stk: replaced by the local variable current-nick. + +2002-11-25 Alex Schroeder + + * erc.el 1.338 (erc-send-command): Use erc-encode-string-for-target. + (erc-encode-string-for-target): New. + + * erc-compat.el 1.6 (erc-encode-coding-string): Add second argument + coding-system, and for non-mule xemacsen, use a new defun instead + of identity. + + * erc-nickserv.el 1.9 (erc-nickserv-version): New. + +2002-11-25 Jorgen Schaefer + + * Makefile 1.8: + UNCOMPILED: erc-chess.el depends on chess-network.el, which might not + be installed. Don't compile it. + + * erc.el 1.337: + erc-mode-map: Added C-a as erc-bol (no reason why it shouldn't be), + and removed C-c C-p (part channel) and C-c C-q (quite server) as these + are a bit drastic in their consequences and easy to mistype. + +2002-11-24 Jorgen Schaefer + + * erc-track.el 1.34: erc-track-faces-priority-list: Extended list + + * erc.el 1.336: + channel-members: Updated docstring: We have a VOICE predicate, too. + + * erc-track.el 1.33 (erc-unique-substrings): + Don't shorten a single channel to "#", but + always give at least 2 chars (except when there are no two chars). + +2002-11-23 Jorgen Schaefer + + * erc-nickserv.el 1.8: + support for BrasNET. Thanks to rw on IRC for the settings. + +2002-11-23 Alex Schroeder + + * erc.el 1.335: (erc-default-recipients, erc-session-user-full-name) + (nick-stk, pings, erc-announced-server-name, erc-connected) + (channel-user-limit, last-peers, invitation, away, channel-list) + (last-sent-time, last-ping-time, last-ctcp-time, erc-lines-sent) + (erc-bytes-sent, quitting, bad-nick, erc-logged-in) + (erc-default-nicks): Defvars. + + * erc-compat.el 1.5: Switched tests to iso-8859-1 instead of latin-1. + + * erc-compat.el 1.4 (erc-compat-version): New. + +2002-11-22 Alex Schroeder + + * erc.el 1.334 (smiley): Smileys are a very small module, now. + +2002-11-22 Jorgen Schaefer + + * erc.el 1.333: + erc-event-to-hook, erc-event-to-hook-name: eval-and-compile these, + since we need them in a macro. ERC now compiles again! + + * erc-speak.el 1.23: + erc-minibuffer-privmsg: Removed setting this variable to nil, since it + was removed from erc.el. + + * erc.el 1.332 (erc-interactive-input-map): Added docstring. + (erc-wash-quit-reason): Extended docstring. + (erc-server-ERROR): Added docstring. + (erc-server-321): buffer-local variable channel-list probably + shouldn't be renamed erc-channel-list - removed FIXME. + + * erc.el 1.331: small cleanup. + ("was not used anymore" here means "not used in erc/*.el nor in + fsbot", thanks to deego for checking that.) + + erc-minibuffer-privmsg: Removed (was not used anymore) + (erc-reformat-command): Removed (was not used anymore) + (erc-strip-erc-parsed-property): Removed (was not used anymore) + (erc-process-ctcp-response): Removed (replaced by ctcp-query-XXX-hook) + (erc-send-paragraph): Removed ("Note that this function is obsolete, + erc-send-current-line handles multiline input.") + (erc-input-hook): Removed ("This hook is obsolete. See + `erc-send-pre-hook', `erc-send-modify-hook' and + `erc-send-post-hook' instead.") + (erc-message-hook): Removed ("This hook is obsolete. See + `erc-server-PRIVMSG-hook' and `erc-server-NOTICE-hook'.") + (erc-cmd-default-channel): Removed ("FIXME: no clue what this is + supposed to do." - it was supposed to prepend the default channel + to a command before sending it. E.g. typing "/FOO now!" would send + the IRC command "FOO #mycurrentchannel now!") + + * erc.el 1.330: + erc-ctcp-query-PING: Send the whole argument back, not just the first + number. This is required for many clients (e.g. irssi, BitchX, ...) + which send their ping times in two different numbers for microsecond + accuracy. + +2002-11-22 Alex Schroeder + + * erc-track.el 1.32 (erc-track-shorten-function): Allow nil. + +2002-11-21 Alex Schroeder + + * erc-track.el 1.31 (erc-unique-channel-names): Fixed bug that appeared + if one target name was a substring of another -- eg. #hurd and + #hurd-bunny. Added appropriate test. + +2002-11-20 Jorgen Schaefer + + * erc-track.el 1.30: + erc-unique-channel-names: Don't take a substring of channel that could + be longer than the channel, but at most (min (length candidate) + (length channel). (thanks to deego for noticing this) + +2002-11-19 Mario Lang + + * erc-notify.el 1.8: * (require pcomplete): Only when compiling. + +2002-11-19 Jorgen Schaefer + + * erc-track.el 1.29: + erc-track-faces-priority-list: New variable, defines what faces will + be shown in the modeline. If set to nil, the old behavior ("all") + remains. + erc-track-face-more-important-p: new function + erc-track-find-face: new function + +2002-11-19 Alex Schroeder + + * erc-fill.el 1.20 (erc-stamp): Require it. + + * erc-match.el 1.16 (away): devar for the compiler. + + * erc-stamp.el 1.16 (stamp): Moved. + + * erc.el 1.329 (erc-version-string): New version. + + * erc-autoaway.el 1.7 (erc-autoaway-idletimer): Moved to the front of + the file. + + * erc-auto.in 1.2: (generated-autoload-file, command-line-args-left): + Added defvar without value to silence byte compiler. + + * Makefile 1.7 (realclean): renamed fullclean to realclean. + (UNCOMPILED): New list, for erc-bbdb.el, erc-ibuffer.el, + erc-speak.el. + (SOURCE): Do not compile UNCOMPILED. + (release): New target. + (ChangeLog): New target. + (todo): New target. + + * erc-complete.el 1.12 (erc-match): Require it. + (hippie-exp): Require it. + + * erc-ezbounce.el 1.3 (erc): Require it. + + * erc-imenu.el 1.4 (imenu): Require it. + + * erc-nickserv.el 1.7 (erc-networks): Moved up. + + * erc-notify.el 1.7 (pcomplete): Require it. + + * erc-replace.el 1.5 (erc): Require it. + + * erc-sound.el 1.3 (sound): Typo -- define-key in erc-mode-map. + + * erc-speedbar.el 1.10 (dframe): Require it. + (speedbar): Require it. + + * erc-track.el 1.28 (erc-default-recipients): devar for the compiler. + + * README 1.1: New file. + +2002-11-18 Mario Lang + + * AUTHORS 1.1: File needed for mkChangeLog + + * mkChangeLog 1.1: Original code by mhp + +2002-11-18 Alex Schroeder + + * erc-button.el 1.32 (erc-button-list): Renamed to erc-list and moved + to erc.el. + + * erc.el 1.328 (erc-list): New. + + * erc-track.el 1.27 (erc-make-mode-line-buffer-name): Simplified. + (erc-modified-channels-display): Simplified. Now works with all + faces, and fixes the bug that when two faces where used (bold + erc-current-nick-face), then no faces was added. + + * erc-track.el 1.26: Lots of new tests. Moved some defuns around in + the file. + (erc-all-channel-names): Renamed. + (erc-all-buffer-names): New name, now include query buffers as + well. + (erc-modified-channels-update-inside): New variable. + (erc-modified-channels-update): Use it to prevent running display + if already inside it. This prevented debugging of + `erc-modified-channels-display'. + (erc-make-mode-line-buffer-name): Moved. + (erc-track-shorten-names): Don't test using erc-channel-p as that + failed with query buffers. + (erc-unique-substrings): Move setq i + 1 to the end of the while + loop, so that start is used as a default value instead of start + + 1. + +2002-11-18 Jorgen Schaefer + + * erc-track.el 1.25: + erc-unique-substrings: define this before using it in assert + + * erc.el 1.327: + with-erc-channel-buffer: Define *before* using this macro. This + hopefully fixes a bug noted on IRC. + + * erc-notify.el 1.6: + erc-notify-signon-hook, erc-notify-signoff-hook: New hooks. They're + even run when their name suggests! + +2002-11-18 Alex Schroeder + + * erc-list.el 1.7: Typo. + + * erc-speedbar.el 1.9: Whitespace only. + + * erc.el 1.326 (define-erc-module): Avoid defining an alias if name and + alias are the same. + + * erc-ibuffer.el 1.17: URL + + * erc-imenu.el 1.3 (erc-imenu-version): New constant. + + * erc-ibuffer.el 1.16 (erc-ibuffer-version): New constant. + + * erc-ibuffer.el 1.15: File header, comments. + + * erc-fill.el 1.19 (erc-fill-version): New constant. + + * erc-ezbounce.el 1.2 (erc-ezb-version): New constant. + + * erc-complete.el 1.11 (erc-complete-version): New constant. + + * erc-chess.el 1.21 (erc-chess-version): New constant. + + * erc-chess.el 1.20: Whitespace only. + + * erc-bbdb.el 1.20 (erc-bbdb-version): Typo. + + * erc-bbdb.el 1.19 (erc-bbdb-version): New constant. + Lots of whitespace changes. Changes to the header. + + * erc-track.el 1.24 (erc-track-shorten-aggressively): Doc. + (erc-all-channel-names): New function. + (erc-unique-channel-names): New function. + (unique-substrings): Renamed. + (erc-unique-substrings): New name + (unique-substrings-1): Renamed. + (erc-unique-substring-1): New name. Added lots of tests. + (erc-track-shorten-names): Call erc-unique-channel-names instead + + * erc-match.el 1.15 (match): Rewrote a as module. + +2002-11-17 Alex Schroeder + + * erc-netsplit.el 1.6 (erc-netsplit-version): New. + (netsplit): Defined as a module, replacing erc-netsplit-initialize + and erc-netsplit-destroy. + +2002-11-17 Jorgen Schaefer + + * erc-track.el 1.23 (erc-track-switch-buffer): + define-erc-module defines erc-track-mode, + not erc-track-modified-channels-mode. + + * erc.el 1.325: + Variables erc-play-sound, erc-sound-path, erc-default-sound, + erc-play-command, erc-ctcp-query-SOUND-hook and functions + erc-cmd-SOUND, erc-ctcp-query-SOUND, erc-play-sound, erc-toggle-sound + moved to erc-sound.el + + Variables erc-page-function, erc-ctcp-query-PAGE-hook and function + erc-ctcp-query-PAGE moved to erc-page.el + + * erc-page.el 1.1: + erc-page.el: New file. CTCP PAGE support for ERC, extracted from erc.el. + + * erc-sound.el 1.2: + defin-erc-module: Typo. Autoload should do erc-sound-mode and "erc-sound". + + * erc-sound.el 1.1: + erc-sound.el: New file. Contains all the CTCP SOUND stuff from erc.el. + + * erc.el 1.324 (erc-process-ctcp-request): + Removed (old-style CTCP handling) + (erc-join-autogreet): Removed (was broken anyways) + +2002-11-17 Alex Schroeder + + * erc-button.el 1.31 (erc-button-version): New constant. + + * erc-button.el 1.30 (button): rewrote as a module. + +2002-11-17 Jorgen Schaefer + + * erc.el 1.323: New functions: + (erc-event-to-hook), (erc-event-to-hook-name): Convert an event to the + corresponding hook. The latter only returns the name, while the former + interns the hook symbol and returns it. + +2002-11-17 Alex Schroeder + + * erc-replace.el 1.4: + Practically total rewrite. All smiley stuff deleted. + + * erc-track.el 1.22 (track): typo. + + * erc.el 1.322 (define-erc-module): Doc change. + +2002-11-17 Jorgen Schaefer + + * erc-autoaway.el 1.6: Changed to use define-erc-module. + + * erc.el 1.321 (define-erc-module): + Make the enable/disable functions interactive. + + * erc.el 1.320 (erc): + Don't use switch-to-buffer when we're in the minibuffer, + because that does not work. Use display-buffer instead. This leaves + two problems: The point does not advance to the end of the buffer for + whatever reason, and after leaving the minibuffer, the new window gets + buried. + +2002-11-17 Alex Schroeder + + * erc-stamp.el 1.15 (stamp): Doc change. + + * erc-stamp.el 1.14 (erc-stamp-version): New constant. + (stamp): downcase alias name of the mode. + + * erc.el 1.319 (define-erc-module): Added defalias option, renamed + parameters again. + + * erc-track.el 1.21: erc-track-modified-channels-mode is now only an + alias to erc-track-mode. Only erc-track-mode is autoloaded. + (track): Rewrote call to define-erc-module. + +2002-11-16 Mario Lang + + * debian/README.Debian 1.5: * Spelling fix + + * erc-fill.el 1.18: * Fix autoload definition for erc-fill-mode + + * debian/control 1.6, debian/maint/postinst 1.4, debian/maint/prerm 1.4: + * Remove /usr/doc -> /usr/share/doc link handling + + * debian/changelog 1.18: * Sync with reality + + * debian/scripts/startup.erc 1.2: + * Add /usr/share/emacs/site-lisp/erc/ to load-path + * (load "erc-auto") + + * debian/README.Debian 1.4: + * Info about the changes since last release updated + + * erc-pcomplete.el 1.11: * Fix emacs/xemacs compatibility + + * debian/scripts/install 1.10: * Dont compile erc-compat, fix ELCDIR + + * debian/control 1.5: * Change maintainer field + + * erc.el 1.318: + * (defin-erc-module): Renamed argument mode-name to mname because silly byte-compiler thought we were talking about `mode-name'. + + * Makefile 1.6: * Added debrelease target + + * erc-bbdb.el 1.18, erc-pcomplete.el 1.10, erc-stamp.el 1.13, erc.el 1.317: + * (define-erc-module): Added mode-name argument. + * Converted erc-bbdb, erc-pcomplete and erc-stamp to new macro. + * autoload fixes + + * erc-bbdb.el 1.17: + * Create a global-minor-mode (i.e., make it a proper erc-module) + + * erc.el 1.316: * (define-erc-modle): New defmacro + +2002-11-16 Jorgen Schaefer + + * erc-autoaway.el 1.5 (erc-autoaway-idle-seconds): + t in docstrings should be non-nil + +2002-11-16 Alex Schroeder + + * erc-autoaway.el 1.4, erc-button.el 1.29, erc-fill.el 1.17, erc-match.el 1.14, + erc-menu.el 1.9, erc-ring.el 1.5, erc-track.el 1.20: + Cleanup of file headers: copyright years, GPL mumbo-jumbo, commentaries. + + * erc-stamp.el 1.12 (erc-insert-away-timestamp-function): + New custom type. + (erc-insert-timestamp-function): New custom type. + + * erc-fill.el 1.16 (erc-fill-function): Doc, new custom type. + (erc-fill-static): Doc. + (erc-fill-enable): New function. + (erc-fill-disable): New function. + (erc-fill-mode): New function. + + * erc-match.el 1.13 (erc-match-enable): add-hook for both + erc-insert-modify-hook and erc-send-modify-hook. + (erc-match-disable): remove-hook for both + erc-insert-modify-hook and erc-send-modify-hook. + +2002-11-15 Jorgen Schaefer + + * erc-autoaway.el 1.3: + - Added a way to use auto-away using emacs idle timers + - Renamed erc-set-autoaway to erc-autoaway-possibly-set-away for consistency + +2002-11-14 Jorgen Schaefer + + * erc.el 1.315: erc-mode-map: Removed the C-c C-g binding for erc-grab + + * erc.el 1.314: + (erc-server-341) Another instance of the channel/chnl problem i didn't + see last time + +2002-11-14 Alex Schroeder + + * erc-compat.el 1.3 (erc-decode-coding-string): typo + +2002-11-14 Jorgen Schaefer + + * erc.el 1.313 (erc-server-341): + variable name should be chnl not channel, as it is + used this way in this function, and the other erc-server-[0-9]* use + chnl too. + + * erc-autoaway.el 1.2: + Set back on all servers, not just the current one, since we're set + away on all servers as well. + + * HISTORY 1.2: Fixed typo (ngu.org => gnu.org) + + * erc-autoaway.el 1.1, erc-fill.el 1.15, erc.el 1.312: erc-autoaway.el: + * new file + + erc.el: + * Removed auto-discard-away facility (now included in erc-autoaway.el) + * (erc-away-p): new function + + erc-fill.el: + * (erc-fill-variable): Check wether erc-timestamp-format is bound before + using it (erc-fill.el does not require erc-stamp). + +2002-11-10 Alex Schroeder + + * TODO 1.4: + TODO: moved it to http://www.emacswiki.org/cgi-bin/wiki.pl?ErcTODO + + * erc.el 1.311 (with-erc-channel-buffer): Rudimentary doc string. + +2002-11-09 Alex Schroeder + + * erc-button.el 1.28 (erc-nick-popup-alist): Made a defcustom. + + * erc-button.el 1.27 (erc-button-disable): New function. + (erc-button-enable): New function, replaces the add-hook calls at top-level. + (erc-button-mode): New minor mode. + +2002-11-08 Alex Schroeder + + * erc-button.el 1.26 (erc-button-entry): Use erc-button-syntax-table. + + * erc.el 1.310, erc-stamp.el 1.10: Doc changes. + + * erc-match.el 1.12 (erc-match-mode): New function, replacing the + add-hook. + (erc-match-enable): New function. + (erc-match-disable): New function. + (erc-current-nick-highlight-type): Changed from 'nickname to 'nick + to make it consistent with the others. + (erc-match-message): Ditto. + + * erc-button.el 1.25 (erc-button-syntax-table): New variable. + (erc-button-add-buttons): Use it. + +2002-11-06 Mario Lang + + * erc.el 1.309: + 1) (bug) ERC pops up a new buffer and window when being messaged + from an ignored person. fixed + 2) (misfeature) ERC notices the user in the minibuffer when it + ignores something - this can get very annoying, since the + minibuffer is also visible when not looking at ERC buffers. + Added a customizeable variable for this, the default is nil. + 3) (wishlist) There is no IGNORE or UNIGNORE command. + Added. + 4) (wishlist) Some IRC clients, notably irssi, allow the user to + ignore "replies" to ignored people. A reply is defined as a + line starting with "nick:", where nick is the nick of an + ignored person. Added that functionaly. + Done by Jorgen Schaefer + +2002-11-02 Alex Schroeder + + * erc.el 1.308 (erc-connect): set-process-coding-system to raw-text. + +2002-11-01 Brian P Templeton + + * erc-pcomplete.el 1.9, erc-stamp.el 1.9, erc-track.el 1.19: + Fixed more autoloads + + * erc-compat.el 1.2: Added autoload for erc-define-minor-mode + +2002-11-01 Mario Lang + + * erc.el 1.307: * (erc-send-command): will break long messages into + a bunch of smaller ones, to prevent them from being truncated by the server. + The patch also axes some trailing whitespace. :-) + +2002-10-31 Alex Schroeder + + * erc-pcomplete.el 1.8 (erc-compat): Require. + (erc-completion-mode): Use erc-define-minor-mode. + + * erc-track.el 1.18 (erc-compat): Require. + (erc-track-modified-channels-mode): Use erc-define-minor-mode. + + * erc-stamp.el 1.8 (erc-compat): Require. + (erc-timestamp-mode): Use erc-define-minor-mode. + + * erc-compat.el 1.1: New file with the code for erc-define-minor-mode, + erc-encode-coding-string and erc-decode-coding-string. Essentially + all the stuff that cannot be tested for using a simple boundp or + fboundp -- eg. because the number of arguments are wrong. + + * erc.el 1.306 (erc-compat): Require. + (erc-process-coding-system): Moved to erc-compat.el. + (erc-connect): Do not set-process-coding-system. + (encode-coding-string): Compatibility code moved to erc-compat.el. + (decode-coding-string): Compatibility code moved to erc-compat.el. + (erc-encode-coding-string): Compatibility code moved to erc-compat.el. + (erc-decode-coding-string): Compatibility code moved to erc-compat.el. + +2002-10-27 Alex Schroeder + + * erc.el 1.305 (erc-display-line-1): Removed call to + erc-decode-coding-string. + (erc-parse-line-from-server): Added call to + erc-decode-coding-string before anything gets parsed at all. + (erc-decode-coding-string): Use undecided coding system. + +2002-10-24 Sandra Jean Chua + + * erc-button.el 1.24, erc.el 1.304: + Added LASTLOG command and action for nick-button + +2002-10-22 Sandra Jean Chua + + * erc-pcomplete.el 1.7: + Fixed nopruning bug, added /MODE channel (mode) [nicks...] completion - mode not completed yet. + +2002-10-16 Sandra Jean Chua + + * erc-pcomplete.el 1.6: + Fixed 'Hi delysid:' bug in SAY completion after realizing that pcomplete on commands already took care of completing the initial nick: + +2002-10-15 Mario Lang + + * erc-pcomplete.el 1.5: update from sachac + +2002-10-13 Alex Schroeder + + * erc.el 1.303 (erc-emacs-time-to-erc-time): Catch when tm is nil. + +2002-10-11 Andreas Fuchs + + * erc.el 1.302: + * Fixed `erc-scroll-to-bottom' to scroll to the bottom even when + in the middle of a line. Might also fix the Magic ECHAN Bug[tm]. (-: + +2002-10-11 Mario Lang + + * erc-nickserv.el 1.6: Fixed erc-networks for the opn->freenode change + +2002-10-08 Mario Lang + + * erc-pcomplete.el 1.4: + Make erc-completion-mode work interactively with already joined channel buffers + + * erc-chess.el 1.19: Add autoload cookies + + * erc-notify.el 1.5: Add pcomplete support + + * erc.el 1.301: + Remove autoload statments, remove autoload cookie from erc-mode and erc-info-mode + + * erc-fill.el 1.14, erc-match.el 1.11: add/remove autoload cookies + +2002-10-06 Alex Schroeder + + * erc-pcomplete.el 1.3 (erc-completion-mode): New global minor mode + with autoload cookie. + (erc-pcomplete-enable): Renamed erc-pcomplete-initialize. + (erc-pcomplete-disable): New function. + + * erc-complete.el 1.10: Doc changes. + + * erc-stamp.el 1.7 (erc-stamp-enable): Renamed erc-stamp-initialize. + (erc-stamp-disable): Renamed erc-stamp-destroy. + (erc-timestamp-mode): Use new names. + + * erc.el 1.300: Removed autload for erc-complete and + erc-track-modified-channels-mode -- the autoload cookie should do + that instead. + (erc-input-message): Doc string, removed binding for erc-complete. + (erc-mode-map): Removed binding for erc-complete. + +2002-10-03 Mario Lang + + * erc-notify.el 1.4: + New functions erc-notify-JOIN and erc-notify-QUIT to catch some common cases (warning, untested) + +2002-10-01 Alex Schroeder + + * erc-stamp.el 1.6 (erc-timestamp-mode): New function. Removed call + to erc-stamp-initialize at the end. + +2002-09-25 Brian P Templeton + + * erc.el 1.299: + Added customizable `erc-process-coding-system' variable. + +2002-09-22 Brian P Templeton + + * erc-fill.el 1.13: + `erc-fill-variable' now does the right thing when `erc-hide-timestamps' is non-nil + +2002-09-21 Mario Lang + + * erc-fill.el 1.12: + patch from Peter Solodov (note, its slightly broken still + +2002-09-05 Mario Lang + + * erc-pcomplete.el 1.2: Added LEAVE as alias for PART + +2002-09-04 Mario Lang + + * erc-pcomplete.el 1.1: + By sachac (good work!) keep up doing such things + +2002-08-31 Mario Lang + + * erc.el 1.298: + A fix for Bug#133267: now you can put (erc-save-buffer-in-logs) on erc-insert-post-hook to save *every* incoming message. + +2002-08-30 Brian P Templeton + + * erc.el 1.297: + Changed default value of erc-common-server-suffixes because of the OPN + name change + +2002-08-28 Mario Lang + + * erc-stamp.el 1.5: Try to reactivate isearch in xemacs + + * erc-stamp.el 1.4: + fixes issues related to comparative emacsology and a silly bug + +2002-08-27 Mario Lang + + * erc.el 1.296: + New hook erc-send-completed-hook (for robot stuff), changed alexanders email address to reflect reality, little fix to erc-auto-query to get a bit of a speedup + +2002-08-22 Mario Lang + + * erc-button.el 1.23: + Fixed case-fold-search (thanks sachac), now lambda works in erc-button-alist, added wardwiki+google+symvar+rfc+itime regexps from the wiki + +2002-08-19 Mario Lang + + * erc-button.el 1.22: + erc-nick-popup-alist: New variable to make erc-nick-popup configurable + +2002-08-16 Alex Schroeder + + * erc-button.el 1.21 (erc-recompute-nick-regexp): Fixed regexp. + + * erc-button.el 1.20 (erc-button-buttonize-nicks): Changed custom type + to integer. + (erc-button-add-buttons): Moved button removal code to new + function. + (erc-button-remove-old-buttons): New function. + (erc-button-add-button): Removed use of overlays and used + erc-button-add-face instead. + (erc-button-add-face): New function to merge faces as text + properties. This should be much faster when lots of buttons + appear. + (erc-button-list): New helper function. + + * erc.el 1.295 (erc-display-message): Fixed argument list. + (erc-display-prompt): Reduced calls to length, use start-open + property for XEmacs to prevent a little box of erc-prompt-face at + the end of messages other people send. + (erc-refresh-channel-members): Fix XEmacs calls to split-string, + which may return an empty string at the end of the list. This + would cause hangups in erc-button in re-search-forward loops. + (erc-get-channel-mode-from-keypress): Replaced control codes with + octal escape sequences. + +2002-08-14 Mario Lang + + * erc-button.el 1.19: + Try to be compatible to XEmacs regexp-opt. (Im going to quit this job if I find more of those damn differencies + + * debian/README.Debian 1.3, debian/scripts/install 1.9: + * Added info to README.Debian + * Finished debian/scripts/install + +2002-08-13 Mario Lang + + * debian/scripts/install 1.8: First attempt to fix it + + * debian/README.Debian 1.2, debian/changelog 1.17, debian/scripts/install 1.7: + changelog: Changed maintainer and added new entry + README.Debian: Re-explained the byte-compile issue + scripts/install: Exclude erc-bbdb|chess|ibuffer|speedbar from + byte-compiling + + * erc-track.el 1.17: Added C-c C-SPC in addition to C-c C-@ + + * erc-notify.el 1.3: Little docstring change + +2002-08-09 Mario Lang + + * erc-stamp.el 1.3: + Change one use of set-text-properties to add-text-properties (tnx Lathi) + +2002-08-02 Mario Lang + + * erc-stamp.el 1.2: added erc-timestamp-only-if-changed-flag + +2002-07-22 Mario Lang + + * erc.el 1.294: + Removed timestamp related code and moved into erc-stampe.l + + * erc-stamp.el 1.1: + Timestamping code moved out of erc.el. Additional, now we can timestamp either on the left or on the right side + +2002-07-16 Mario Lang + + * erc.el 1.293: + * Make ctcp ping return its message in the active buffer, instead of the server buffer + * Corrected minimal typo in catalog + * Added var and variable as alias for /set + +2002-07-08 Mario Lang + + * erc-track.el 1.16: + * New function erc-track-switch-buffer (by resolve) + Bound to C-c C-SPC, enjoy! + +2002-07-08 Gergely Nagy + + * debian/changelog 1.16: New snapshot deb + + * debian/scripts/install 1.6: Rewrote in make. + Does not byte-compile erc-speak.el at all, and excludes erc-track.el too, if + ran for xemacs. + + * debian/control 1.4: Added dependency on make + + * debian/copyright 1.2: Updated copyright info + + * debian/rules 1.10: Use $(wildcard *.el) instead of a hardcoded list + +2002-07-03 Diane Murray + + * erc.el 1.292: + erc-iswitchb now works correctly if erc-modified-channels-alist is non-nil + +2002-07-01 Diane Murray + + * erc-menu.el 1.8: + * changed how we check if we should activate "Track hidden channels" and + whether it should be selected - fixes a bug Xemacs where whole menu bar + does not work if menu is loaded + + * erc-menu.el 1.7: + * added "Disconnect from server", only selectable if erc-connected is non-nil + + * topic is allowed to be set by normal users if channel mode is not +t + + * add " ..." after description if arguments needed after selecting menu item + + * only allow selecting of menu points needing a channel if current buffer is + a channel buffer - done by testing if channel-members is non-nil + + * put erc-match functions in new group "Pals, fools and other keywords" + + * erc.el 1.291: + * moved definition of erc-show-my-nick to GUI variables section + + * erc-connected variable now defined with defvar + now set in channel and query buffers, was only in server buffer before + upon disconnect, set erc-connected to nil in all the server's buffers + + * added erc-cmd-GQUIT and its alias erc-cmd-GQ - quit all servers at once + + * added interactive function erc-quit-server, bound to C-c C-q + + * added erc-server-WALLOPS + + * added WALLOPS to english catalog, fixed s461 (was showing message twice) + + * typo fixes, spacing change + +2002-06-29 Mario Lang + + * erc.el 1.290: Use pp-to-string in /set (without args) + + * erc-netsplit.el 1.5: + Make /set anonymous-lign set erc-anonymous-login, also report + which var was set to which val. + +2002-06-28 Diane Murray + + * erc-menu.el 1.6: added "Customize ERC" + +2002-06-25 Mario Lang + + * erc.el 1.289: New variable: erc-use-info-buffers, defaults to nil. + This prevents info-buffers from being created/updated. + Set to t if you use :INFO buffers. + (by rw) + Delete (erc-display-prompt) from reconnect to avoid clutter + +2002-06-23 Diane Murray + + * erc.el 1.288: + erc-get-channel-mode-from-keypress is now bound to C-c C-m + erc-insert-mode-command is taken care of by this function as well + +2002-06-21 Mario Lang + + * erc-track.el 1.15: + Fixed bug where buffer-names suddenly had text-properties. + +2002-06-19 Diane Murray + + * Makefile 1.5: changed erc-auto.el to $(SPECIAL) in make fullclean + + * Makefile 1.4: remove erc-auto.el on make fullclean + +2002-06-18 Diane Murray + + * erc-match.el 1.10: fixed spelling error + + * erc-track.el 1.14, erc-match.el 1.9: * erc-match.el: + highlight current nickname in its own face (deactivated by default): + - added erc-current-nick-highlight-type, erc-current-nick-face, + erc-current-nick-p + + * erc-track.el: + added support for erc-current-nick-face + +2002-06-17 Diane Murray + + * erc.el 1.287: * added beginning suport for 005 numerics: + - added buffer local variable erc-server-parameters + - added erc-server-005, which sets erc-server-parameters if the server has + used this code to show its parameters + +2002-06-16 Diane Murray + + * erc.el 1.286: + * bugfix: when pasting lines with blank lines in between, remove the blank lines + but send the rest + + * since we know the command, use it when checking what's in erc-hide-list + added check to erc-server-KICK + + * added some blank lines for better readability + +2002-06-16 Alex Schroeder + + * erc-nickserv.el 1.5 (erc-nickserv-alist): Fixed typo. + +2002-06-15 Alex Schroeder + + * erc-nickserv.el 1.4 (erc-networks): Added doc string. + (erc-nickserv-alist): Added doc string. + +2002-06-14 Diane Murray + + * erc-ring.el 1.4: + fixed bug so that the prompt and command always get put at the end of the buffer + +2002-06-10 Mario Lang + + * erc-nickserv.el 1.3: Added iip support. + Added :type for erc-nickserv-passwords custom. + Fixed hook usage. + +2002-06-07 Diane Murray + + * erc-nickserv.el 1.2: * added GalaxyNet + + * erc-nickserv-alist: + - sorting networks alphabetically + - added two more pieces of information in erc-nickserv-alist: + word to use for identification and whether to use the nickname + + * erc-current-network: + - made regex case insensitive, downcase server to match + - uses the new information + - now uses new variable erc-networks instead of doing checking manually + + * added variable erc-networks + + * fixed some indentation, documentation + +2002-06-07 Mario Lang + + * erc.el 1.285: Fix for kill-buffer hook stuff + +2002-06-06 Mario Lang + + * erc.el 1.284: Added /squery command + +2002-06-06 Diane Murray + + * erc-menu.el 1.5: * made group Channel modes + - moved change mode and invite only mode to here + - added secret, moderated, no external send, topic lock, limit, key + + * check that user is in a channel buffer and user is a channel operator + for all op-related actions + + * "Identify to nickserv" needs erc-nickserv-identify defined + + * added "Show ERC version" + + * erc.el 1.283: + * added erc-set-channel-limit, erc-set-channel-key, erc-toggle-channel-mode + + * added erc-get-channel-mode-from-keypress, which is binded to C-c m + sends the next character which is typed to one of the 3 new functions + - did not remove erc-invite-only-mode and it's key binding in case + people are used to it, although it probably should be removed... + + * in erc-server-MODE: + added check if tgt equal to user's nick + removed erc-display-line, only using the erc-display-message + + * added s461 to english catalog + + * fixed bug where Xemacs would not quit if erc-quit-reason was + set to erc-quit-reason-various and assoc-default was not defined + +2002-06-04 Andreas Fuchs + + * erc-ezbounce.el 1.1, erc-match.el 1.8: + * erc-ezbounce.el: Added. Provides support for ezbouncer; automatic login, + session management implemented. I've contacted the author + about stuff in EZBounce's logging. + * erc-match.el: Fixed a stupid mistake where + "*** Your new nick is " would trigger an error. + +2002-06-04 Diane Murray + + * erc-nickserv.el 1.1, erc.el 1.282: * added erc-nickserv.el + * moved nickserv identification variables and functions to the new file + (require 'erc-nickserv) is now necessary for this to work + + * erc.el 1.281: + * results of /COUNTRY now formatted as notice; errors are ignored, + fixing + bug which made prompt disappear + + * added undefined-ctcp error message to english catalog + + * changed some (when (not erc-disable-ctcp-replies) to use unless instead + and some if's without else statments to use when or use + + * CTCP replies now use erc-display-message, formatted as notices + + * added following to english catalog: + - undefined-ctcp + - CTCP-CLIENTINFO, CTCP-ECHO, CTCP-FINGER, CTCP-PAGE, CTCP-PING, + CTCP-SOUND, CTCP-TIME, CTCP-UNKNOWN, CTCP-VERSION + - s303, s305, s306, s353 + + * split erc-server-305-or-306 into erc-server-305 and erc-server-306 + + * KICK already had buffer set, using it + + * erc.el 1.280: + * erc-format-timestamp now only called from erc-display-message and + erc-send-current-line + + * all instances of erc-display-line with erc-highlight-error + changed to use erc-display-message + + * added following error messages to english catalog: + bad-ping-response, bad-syntax, cannot-find-file, cannot-read-file, + ctcp-request, flood-ctcp-off, flood-strict-mode, no-default-channel, + no-target, variable-not-bound + + * added following server related messages to english catalog: + s324, s329, s331, s332, s333, s341, s406, KICK, KICK-you, KICK-by-you, MODE-nick + + * ignoring server codes 315, 369 + + * added erc-server-341, erc-server-406 + + * channel topic and mode notices displayed in respective channel buffers if they + exist + + * erc-server-KICK: display the message before removing this channel so that we + can track the kick + + * send parsed to erc-ctcp-query-ACTION-hook so that actions can be checked + by erc-match + + * fixed bug where nil was shown if no reason was given by users on /PART + +2002-06-03 Diane Murray + + * erc-match.el 1.7: + * fixed bug where erc-log-matches produced an error when the value of + (erc-default-target) was not a channel + * use erc-format-timestamp, if it's non-nil, for %t in erc-log-match-format + +2002-06-01 Diane Murray + + * erc-button.el 1.18: + * made action case insensitive in erc-nick-popup and added a more descriptive + error message + +2002-05-30 Brian P Templeton + + * erc.el 1.279: + Removed multiple calls of `erc-prompt' in `erc-display-prompt' + +2002-05-29 Mario Lang + + * erc.el 1.278: + First step timestampkiller cleanup. I'm tired, do the rest tomorrow. + + * erc.el 1.277: + New functionality: Catch channel/server buffer kills through kill-buffer-hook. + Currently, it only does a PART if you kill a channel buffer. + +2002-05-28 Mario Lang + + * erc.el 1.276: + defvar'ed some buffer-local variables to make elint at least a bit more happy. + Moved comments into docstrings. + Changed some instances of member to memq. + + * erc-track.el 1.13, erc.el 1.275: + erc.el: (erc-message-type-member): New function, used to test + for message type. Require erc-parsed text-property. + erc-track.el: erc-track-exclude-types: New variable. Defaults to ("JOIN" "PART") right now for testing, it should eventually set to nil soon again. + (erc-track-modified-channels): Use above fun and var to optionally exclude certain message types from channel tracking. + +2002-05-28 Diane Murray + + * CREDITS 1.5: added myself, vain as it sounds ;) + +2002-05-25 Mario Lang + + * erc.el 1.274: * Some small docstring fixes + * (erc-display-line): Now takes also a process object in the buffer argument. + Used for easy sending to the server buffer. + * Several places: Just pass proc, not (process-buffer proc) + +2002-05-24 Mario Lang + + * erc.el 1.273: Mostly docstring fixes/additions + + * erc-netsplit.el 1.4: Doc fixes, and a new netjoin-done message. + + * erc-fill.el 1.11: Doc fixes, erc-fill custom group, autoloads. + + * erc-netsplit.el 1.3: Fix to erc-netsplit-timer. + + * erc-netsplit.el 1.2: Fixed a silly typo + + * erc-maint.el 1.1: is this really necessary? + + * erc.el 1.272: Added new variable erc-hide-list. + It affects erc globally right now, and is used to hide certain IRC type messages like JOIN and PART. + + * Makefile 1.3: Doh, I should really test this before checkin :) + + * Makefile 1.2: Silly cut&paste bug fixed + + * erc-list.el 1.6: Added autoload cookie + + * erc-match.el 1.6: Added missing require erc. + + * erc-notify.el 1.2: Autoload cookies and a -initialize function. + + * erc-chess.el 1.18: Added autoload cookies + + * Makefile 1.1: Finally, we have a Makefile. + Primarily used for autoload definition generation right now. + + * erc-auto.in 1.1: First version. + + * erc-track.el 1.12: Added autoload cookie + + * erc-netsplit.el 1.1: + New module, used to autodetect and hide netsplits. + (Untested, no netsplit happened yet :) ) + + * erc-nets.el 1.3: Added some old code I once worked on. + Added autoload cookie + +2002-05-24 Diane Murray + + * erc-fill.el 1.10: + removed reference in documentation to old variable, changed it to the new one + + * erc.el 1.271: + * added new function erc-connection-established which is called after receiving + end of MOTD (does nothing if it's been called before) + + * added new hook erc-after-connect which is called from + erc-connection-established with the arguments server (the announced server) + and nick - which other arguments should be sent?? + + * added buffer variable erc-connected which is set to t the first time + erc-connection-established is called, set to nil again if we've been + disconnected + + * set initial user mode + - added custom variable erc-user-mode which can be a string or a function + which returns a string + - new function erc-set-initial-user-mode gets called from + erc-connection-established + +2002-05-22 Diane Murray + + * erc.el 1.270: fixed bug where prompt was missing after reconnect + +2002-05-21 Diane Murray + + * erc.el 1.269: + in erc-nickserv-identify: if network is unknown, just use "Nickserv" + + * erc.el 1.268: * fixed some typos + + * timestamping + - ctcp request messages and replies now have timestamp + - timestamps in front of error messages now in timestamp face + - added timestamp to more error messages + + * ctcp reply messages, server ping message updated + + * added variable erc-verbose-server-ping - check this instead of erc-paranoid + + * added whowas on no such nick: + - added variable erc-whowas-on-nosuchnick + - in erc-server-401 do WHOWAS if erc-whowas-on-nosuchnick is non-nil + + * erc.el 1.267: forgot documentaion for erc-nickserv-alist + + * erc.el 1.266: NickServ identification changed and enhanced: + - erc-nickserv-identify-autodetect now called from erc-server-NOTICE-hook + - now possible to identify automatically without prompt: + - added custom variables erc-prompt-for-nickserv-password and + erc-nickserv-passwords + - added erc-nickserv-alist containing the different networks' nickserv details + - added function erc-current-network to determine the network symbol + - fixed bug where identification on dalnet didn't work, because they now + require NickServ@services.dal.net + now sends to all NickServ with nick@server where possible + +2002-05-17 Diane Murray + + * erc-fill.el 1.9: + * filling with erc-fill-variable now works with custom defined fill width: + - changed erc-fill-column from defvar to defcustom + - in erc-fill-variable: set fill-column to value of erc-fill-column + + * erc.el 1.265: erc.el: + * fixed bug where topic wasn't being set when chanel name was provided + + erc-fill.el: + * filling with erc-fill-variable now works with custom defined fill width: + - changed erc-fill-column from defvar to defcustom + - in erc-fill-variable: set fill-column to value of erc-fill-column + +2002-05-16 John Wiegley + + * erc.el 1.264: whitespace fix + +2002-05-15 Diane Murray + + * erc.el 1.263: + * added explanation of empty string working in erc-quit-reason-various-alist + * removed the text property from erc-send-message, it caused problems + with /SV (as noticed by gbvb on IRC) and is obviously not needed + * when receiving a ctcp query, convert type to uppercase to allow for + "/ctcp nick time" and not just "/ctcp nick TIME" + * timestamp in front of server notices now shown in the timestamp face + +2002-05-13 Diane Murray + + * erc.el 1.262: + - in erc-format-privmessage: `erc-format-timestamp' added to message after + message's text properties are applied so that it doesn't lose its face + + - /quit without reason now works when `erc-quit-reason' is set to + `erc-quit-reason-various' and the empty string "" is defined in + `erc-quit-reason-various-alist' + +2002-05-13 Andreas Fuchs + + * erc-bbdb.el 1.16: + * Applied Drewies patch to pop-up on nick changes when -popup-type is 'visible + +2002-05-12 Andreas Fuchs + + * erc-bbdb.el 1.15, erc.el 1.261: + * erc-bbdb.el: pop up the buffer on /whois when erc-bbdb-popup-type is 'visible + * erc.el: fix for empty quit reason problem by drewie. + +2002-05-12 Mario Lang + + * erc.el 1.260: disumu nick patch + - added erc-show-my-nick (default t) + if t, show nickname like + if nil, only show a > character before the message + - added faces erc-nick-default-face and erc-nick-msg-face + - nicknames (channel, msgs, notices) are now in bold face by default + - the msg face matches the erc-direct-msg-face color + +2002-05-10 Alex Schroeder + + * erc.el 1.259 (erc-send-pre-hook): Doc change. + + * CREDITS 1.4: Alexander L. Belikoff is confirmed original author. + +2002-05-10 Mario Lang + + * erc.el 1.258: + timestamp fix by disumutimestamp fix by disumutimestamp fix by disumutimestamp fix by disumutimestamp fix by disumutimestamp fix by disumutimestamp fix by disumutimestamp fix by disumu + +2002-05-09 Mario Lang + + * erc.el 1.257: *** empty log message *** + +2002-05-06 Mario Lang + + * erc.el 1.256: + New var: erc-echo-notices-in-minibuffer-flag. defaults to t. + +2002-05-04 John Wiegley + + * TODO 1.3: *** empty log message *** + +2002-05-03 Alex Schroeder + + * erc.el 1.255: Copyright notice, version string updates. + +2002-05-02 Alex Schroeder + + * erc.el 1.254: Comment: dme is David Edmondson + +2002-05-01 Alex Schroeder + + * erc.el 1.253 (erc-warn-about-blank-lines): New option. + (erc-send-current-line): Use it. + (erc-quit-reason-various-alist): New option. + (erc-quit-reason): New option. + (erc-quit-reason-normal): New function. + (erc-quit-reason-zippy): New function. + (erc-quit-reason-various): New function. + (erc-cmd-QUIT): Use them. + +2002-04-30 Alex Schroeder + + * erc.el 1.252: Version 2.92 + + * erc.el 1.251 (erc-send-modify-hook): Default value is nil. + +2002-04-27 John Wiegley + + * erc.el 1.250: + Don't redisplay the prompt if the ERC buffer is no longer alive. + +2002-04-26 John Wiegley + + * erc.el 1.249: + Don't call `set-buffer' on old-buf unless the buffer is valid. It's + often not when separate frames are being used. + +2002-04-23 Mario Lang + + * erc-button.el 1.17: fixed up erc-nick-regexp + +2002-04-22 Brian P Templeton + + * erc.el 1.248: + `erc-prompt' may now be a function that returns a string (which is + used as the prompt). I don't use Customize but I think customization + of it may be broken if it's not a string. + + There is a new `erc-prompt' function that returns the prompt as a + string (e.g., returning either the result of `(funcall erc-prompt)' or + `erc-prompt'). + + This allows for dynamic prompts, such as a LispWorks-like prompt, or + one containing simply the current channel name. It was requested by + Mojo Nichols (nick michols) in #emacs today, 21-Apr-2002; cf. the + #emacs logs at + + * erc.el 1.247: + fix erc-send-current-line to work on empty lines again (without sending the prompt) + Fix C-c C-t to not include the nick/time info + (both from antifuchs) + + * erc-complete.el 1.9: Fix for xemacs elt behaviour + +2002-04-17 John Wiegley + + * erc-chess.el 1.17: + Added a missing arg in a call to erc-chess-handler. + +2002-04-15 John Wiegley + + * erc-chess.el 1.16: *** empty log message *** + +2002-04-14 John Wiegley + + * erc-chess.el 1.15: *** empty log message *** + +2002-04-12 John Wiegley + + * erc-chess.el 1.14: *** empty log message *** + + * erc-chess.el 1.12: bug fixes + + * erc-chess.el 1.11: *** empty log message *** + +2002-04-12 Mario Lang + + * erc-chess.el 1.6: change order. + + * erc-chess.el 1.5: more fixing. + + Now, the 'match question works. It sends an accept back. + But display popup doesnt work.. + + * erc-chess.el 1.4: fixup (still far from working) + +2002-04-11 Mario Lang + + * erc.el 1.246: + * Added :options entry for erc-mode-hook (erc-add-scroll-to-bottom) + +2002-04-11 John Wiegley + + * erc.el 1.245: remove trailing \n from any sent text + + * servers.pl 1.2, erc-bbdb.el 1.14, erc-button.el 1.16, erc-chess.el 1.3, + erc-complete.el 1.8, erc-fill.el 1.8, erc-ibuffer.el 1.14, erc-list.el 1.5, + erc-match.el 1.5, erc-menu.el 1.4, erc-nets.el 1.2, erc-replace.el 1.3, + erc-speak.el 1.22, erc-speedbar.el 1.8, erc-track.el 1.11, erc.el 1.244: + clean whitespace + + * erc.el 1.243: Replaced erc-scroll-to-bottom. + +2002-04-11 Mario Lang + + * erc-track.el 1.10: + try to fix behaviour when used with different frames. + +2002-04-09 Mario Lang + + * erc-chess.el 1.2: + fixup release, far from ready for real usage, but it appears to work. + + * erc.el 1.242: + speed improvments based on elp-instrument-package RET erc- RET results + + * erc-chess.el 1.1: initial version. + please test it + Get chess.el from johnw's cvs: + cvs -d:pserver:anonymous@alice.dynodns.net:/usr/local/cvsroot login + cvs -d:pserver:anonymous@alice.dynodns.net:/usr/local/cvsroot co chess + + (as usual, blank password) + + Add the resulting dir to your load-path and reqire erc-chess. + + Usage: Just do /chess nickname + The remote end much use erc, as no other irc client I know of supports this ... + + See erc-chess-default-display and maybe set it to chess-images or chess-ics1 if you prefer those over chess-plain. + Also, see erc-chess-user-full-name to set the name you use in chess games. + +2002-04-04 Mario Lang + + * erc.el 1.241: New hackery latenightwise + + * erc.el 1.240: upupadowndowncase + +2002-04-04 Gergely Nagy + + * debian/changelog 1.15: Updated for the new snapshot + + * debian/rules 1.9: Install README.Debian into the package + + * debian/README.Debian 1.1: Initial check-in + +2002-04-04 Mario Lang + + * erc.el 1.239: + Fixed that /me in query buffers ended up in server buffer + + * erc.el 1.238: * Implemented joining +k channels + +2002-03-14 Mario Lang + + * erc.el 1.237: New utility function: erc-channel-list + minor fix to erc-get-buffer. hopefully that helps shapr + +2002-03-12 Mario Lang + + * erc.el 1.236: + New /command: /QUOTE for sending directly to the IRC server + Removed erc-fill from erc-insert-modify-hook. To activate filling, simply customize that var. + +2002-03-09 Brian P Templeton + + * CREDITS 1.3: *** empty log message *** + +2002-03-09 Mario Lang + + * erc-complete.el 1.7: + New variable: erc-nick-completion-ignore-case. Defaults to t. + + * erc-track.el 1.9: + * erc-track-shorten-name-function can now be set to nil to avoid treating of channel names at all. + +2002-03-06 Gergely Nagy + + * debian/changelog 1.14, debian/rules 1.8: update to new snapshot + +2002-03-06 Mario Lang + + * erc.el 1.235: + Fixed nasty bug which prevented channel limit from correctly display/handling + + * erc-track.el 1.8: Made shortening code highly customizable. + Now, there is the variable erc-track-shorten-function which holds + a function which gets called with one argument, CHANNEL-NAMES, which is a list + of strings of the channel names. + It needs to return a list of strings of the same length with the modified values... + + * erc-track.el 1.7: + Added erc-track-shorten-aggressively, default to nil + if it is set to t, erc will shorten a bit more. + if nil, erc will shorten the name only if it would get shorter than just + one char... + + * erc-speak.el 1.21: added iirc to the abbreviation expansion list. + + * erc-track.el 1.6: + Added customization variable: erc-track-use-faces. defaults to t. + + * erc-track.el 1.5: *** empty log message *** + + * erc-track.el 1.4: + experimental: Added face support to mode-line channel activity tracker. + Currently we use the faces used for indicating in the buffer (erc-pal-face for channels with pal acitivity...) + +2002-03-05 Mario Lang + + * erc-complete.el 1.6: * added docfixes (thanks ore) + + * erc-track.el 1.3: Fixed channel-name reduction. + thanks again alex. + Renamed the vars to erc-track-opt-start and erc-track-opt-cutoff. + + * erc.el 1.234: fixed another silly error + + * erc-track.el 1.2: Implemented channel name shortening. + Vars erc-track-cutoff says: all channel names longer than this will be shortened. + Var erc-track-minimum-channel-length says: dont make names shorten than this. + (Thanks go out to kensanata for the nice unique-substrings utility function). + + * erc.el 1.233: silly typo corrected + + * erc.el 1.232: * erc.el 1.232: * New varialbe: erc-common-server-name-suffixes + This alist can be used to change the server names displayed in mode-line + to a shorter version.. + * New function: erc-shorten-server-name (uses var above) + * Changed erc-prepare-mode-line to use erc-shorten-server-name. + +2002-02-25 Mario Lang + + * erc.el 1.231: + CTCP handling rewritten. Seems to work. please test and report probs. + +2002-02-24 Mario Lang + + * erc.el 1.230: + Fixed emacs20 backward compatibility (new defun/alias: erc-propertize) + +2002-02-22 Mario Lang + + * erc-button.el 1.15: *** empty log message *** + +2002-02-21 Mario Lang + + * erc-button.el 1.14, erc.el 1.229: + minor fixup related to read-only prompts and command renaming. + +2002-02-21 Andreas Fuchs + + * erc.el 1.228: * modify `erc-remove-text-properties-region' to work. + Could even be a little faster now. (-: + +2002-02-21 Mario Lang + + * erc-ring.el 1.3: + fixed erc-replace-command to behave right when text is read-only. + Also, use erc-insert-marker and (point-max) now. + + * erc.el 1.227: * Made erc-prompt read-only + * new function: erc-make-read-only. Can be used on erc-insert-post-hook and erc-send-post-hook to ensure read-only buffer text too + +2002-02-19 Mario Lang + + * erc-list.el 1.4: added comment to docstring + + * erc-speak.el 1.20: minor updates, use erc-nick-regexp now + + * erc.el 1.226: + ensure that erc-timer-hook is called inside the server-buffer. + +2002-02-19 Andreas Fuchs + + * erc-match.el 1.4: + * Probably fixed the "number-char-or-marker-p: nil" bug. + +2002-02-19 Mario Lang + + * erc-notify.el 1.1: Initial release. + + * erc.el 1.225: added #303 handling + moved timer and added an arg (erc-current-time) + + * erc-list.el 1.3, erc.el 1.224: + slightly changed the erc-once-with-server-event macro + + * erc-button.el 1.13: erc-button-alist: doc fix and custom type fix + +2002-02-18 Mario Lang + + * erc-list.el 1.2, erc.el 1.223: new macro: erc-once-with-server-event + erc-list.el: use it + + * erc-match.el 1.3: + Minor fix related to hook call method change (-until-seccess now) + + * erc.el 1.222: fixed ctcp behaviour abit (with auto-query on) + + * erc-list.el 1.1: ChanList mode. + Load it, and type M-x erc-chanlist RET + Demonstrates how the new hook system can be nicely used. + + * erc.el 1.221: + new hook: erc-default-server-hook. This one gets called if we dont have anything defined for a certain IRC server message. + New function: erc-default-server-handler. (used by above hook). + New function: erc-debug-missing-hooks: Used by above hook to save a list of unimplemented server messages. + New function: erc-server-buffer, erc-server-buffer-p. + Various places: use it. + Minor fixup. + + * erc-button.el 1.12: fix regexp to not buttonize ~user@host hostnames + +2002-02-17 Mario Lang + + * erc-complete.el 1.5, erc.el 1.220: Eliminated erc-command-table + Upcased the command defuns (erc-cmd-join is now erc-cmd-JOIN) + Fixed erc-complete to not require erc-command-table. + Implemented erc-cmd-HELP + (You have to try that, its tooo coool!) + e.g. /help auto-q + fixed autoloads for erc-add-pal and so on to be interactive. + +2002-02-17 Andreas Fuchs + + * erc-match.el 1.2: + * Fix unfunctional code in `erc-get-parsed-vector-type'. + + * erc-bbdb.el 1.13, erc-button.el 1.11, erc-match.el 1.1, erc.el 1.219: + * Be careful: MANY changes ahead. I won't go into too much details. + + * erc.el, new file erc-match.el: split out all pattern-matching code. + * erc.el: removed all defcusts for erc-{...}-highlight-props. They are + quite useless, anyway. + * moved erc-add-entry-to-list and -remove- over to erc-match. changed + their arg list. + * erc.el: add autoloads for erc-{add,delete}-{keyword,pal,fool,dangerous-host} + * erc.el: erc-server-PRIVMSG-or-NOTICE: + - remove all the highlighting crap + - add a (when (eq s nil) ...) so that untreated CTCP messages don't + get misdisplayed. + * erc.el: erc-mark-message: removed this function, it's useless + * erc.el: minor bugfixes. + + * erc-match.el: first checkin. This file now contains all the pattern + matching stuff. there is now another defcust group, erc-match, + containing all match related stuff (erc-keywords, ...) + * erc-match.el: added functionality to log matching lines. Quite + customizable, check out the docstring of defun erc-log-matches + * erc-match.el: added functionality to make foolish messages + invisible/intangible. This could replace erc-ignore-list + sometime. it's more powerful right now, anyway. + * erc-match.el erc-text-matched-hook: new hook. run when Text matches + anything (pal, fool, etc.). + + * erc-button.el: Make nick buttonization customizable. + * erc-button.el: Give nick buttonization a lower priority so that it + does not break url buttons. + + * erc-bbdb.el: Add \n to the separators by which we split nicknames. + +2002-02-17 Mario Lang + + * TODO 1.2: Added item + +2002-02-17 Brian P Templeton + + * CREDITS 1.2, erc.el 1.218: Added invisible timestamp support. + +2002-02-16 Gergely Nagy + + * debian/changelog 1.13, debian/rules 1.7, debian/scripts/install 1.5: + updated to new snapshot + +2002-02-16 Mario Lang + + * erc.el 1.217: + Fixed channel limit format overflow in mode-line display. + (Having to use floats if integers are to large is quite strange, isn't it?) + + * TODO 1.1: TODO list created. + Add comments and expand it. + + * erc.el 1.216: + Fixed bug in query buffer handling (only happend in mixed-case situations) + + * erc.el 1.215: shapr checkdoc patch #1 + massive docfixes! yay, keep going! + +2002-02-15 Mario Lang + + * erc.el 1.214: various other fixes + make s301 a catalog entry + +2002-02-15 Andreas Fuchs + + * erc.el 1.213: * erc-server-NICK and erc-server-INVITE: fixed to use + `erc-display-message'. These I missed in the first checkin. I + didn't say it in the last log message, but please test these. + + * erc-fill.el 1.7, erc.el 1.212: + * erc.el: updated many functions to use `erc-display-message'. Now, we + should go for getting highlighting out of + erc-server-PRIVMSG-or-NOTICE. The part I want to attack has been + marked. + * erc-fill.el: updated static filling to leave the erc-parsed property alone. + +2002-02-15 Mario Lang + + * erc.el 1.211: + first step, new function: erc-display-message + + * erc.el 1.210: added numreply 379 and 405. + + * erc.el 1.209: stupid typo fixed + + * erc.el 1.208: + Finally renamed erc-frame-dedicated-p to erc-frame-dedicated-flag + Removed usage of erc-interpret-controls from info buffer drawing (major speedup) + Other speedups based on the results from elp. + ERC is now about 300%-500% faster in some situations with very full channels!!!!! + +2002-02-14 Andreas Fuchs + + * erc.el 1.207: + * erc-downcase now downcases {}|^ with []\~ -- 'stolen' from zenirc. + * various checkdoc fixes. Just the upper third of the file, but that + should help a little, too. (-: Again, if you have any writing + skills, take out that dusty keyboard and tap it to the beat of M-x + checkdoc! + +2002-02-14 Gergely Nagy + + * erc.el 1.206 (erc-format-privmessage): + fix it, so timestamp-coloring works again (patch from antifuchs) + +2002-02-14 Mario Lang + + * erc.el 1.205: Many fixes based on M-x checkdoc RET. + If you have write access, and some english knowledge, help document erc too! + M-x checkdoc RET, and follow the instructions. + + * erc-button.el 1.10, erc-ibuffer.el 1.13: minor fixes + + * erc.el 1.204: Use nreverse instead of reverse. + Use eq instead of equal where possible. + Rewrote erc-get-buffer to not use find-if (find-if does very deep function-call nesting, which isnt good ina defun which is called so often) + +2002-02-13 Mario Lang + + * erc-button.el 1.9, erc.el 1.203: + In erc.el, new hook: erc-channel-members-changed-hook. + erc-button.el: Now highlight all nicknames. uses regexp-opt. + +2002-02-04 Mario Lang + + * erc-nets.el 1.1: + Database of irc networks. Use erc-server-select to interactively select one. + + * erc.el 1.202: * erc-format-nick-function: New variable. + * (erc-format-nick): The default for above var. Just return the nick. + * (erc-format-@nick): Prefix NICK with @ or + if OP or VOICE. + * Removed erc-track-modified-channels related code and moved into erc-tracke.l + Its auto-loaded now + + * erc-track.el 1.1: Split code from erc.el + +2002-02-01 Mario Lang + + * erc-ibuffer.el 1.12: + * erc-target now uses erc-port-to-string + + * servers.pl 1.1: + Script to convert mircs servers.ini to a elisp salist kind of thing. + (development tool, it doesnt help you much as a user) + + * erc.el 1.201: + * erc-display-line-buffer: renamed to erc-display-line-1 + * erc-port-equal: New function. + * erc-normalize-port: Used by erc-port-equal + * minor docstring fixes + +2002-02-01 Andreas Fuchs + + * erc.el 1.200: + * erc-already-logged-in-p: compare ports is more robust now. + + * erc-button.el 1.8: * Add buttonization to erc-send-modify-hook, too + +2002-01-31 Mario Lang + + * erc.el 1.199: + Use insert-before-markers instead of insert in erc-display-line-buffer + This fixed point@column 0 problem and gives us some speedup! yay + + * erc-ibuffer.el 1.11, erc.el 1.198: minor fixes + + * erc.el 1.197: + * (erc-line-beginning-position): Renamed to erc-beg-of-input-line. + * (erc-line-end-position): Renamed to erc-end-of-input-line. + * erc-multiline-input-p: Variable removed. + + * erc.el 1.196: + Minor docstring fixes (using M-x checkdoc-current-buffer) + If you find time, and you are native english speaker, do that too!! + + * erc.el 1.195: fixed macro-invokation + +2002-01-31 Andreas Fuchs + + * erc.el 1.194: * erc-with-all-buffers-of-server: use erc-list-buffers + * erc-process-away, erc-{save,kill}-query-buffers: use it. + * erc-cmd-away-all: new command. Set away/back on all servers. + + * erc.el 1.193: + * Fix last multiline bug in erc-send-distinguish-noncommands. + +2002-01-31 Mario Lang + + * erc-ibuffer.el 1.10, erc.el 1.192: minor fixes + +2002-01-30 Mario Lang + + * erc-ibuffer.el 1.9, erc-menu.el 1.3, erc-speak.el 1.19, erc.el 1.191: + Renamed erc-track-modified-channels-minor-mode to erc-track-modified-channels-mode (at least, its a bit shorter) + Added docstring to erc-server-hooks (through the macro) + Minor docfix in obsolete hook + +2002-01-30 Andreas Fuchs + + * erc.el 1.190: + * erc-send-current-line: fix behaviour where buffer changes. + * erc-mark-message: fix stupid face bug. highlighting of pals should work now. + + * erc-ring.el 1.2, erc.el 1.189: + * new hooks: erc-send-pre-hook, erc-send-modify-hook, erc-send-post-hook + * erc-send-this: new variable + * erc-noncommands-list: new constant. + * erc-send-distinguish-noncommands: use it. (First filter function for sending! yay!) + * erc-send-current-line: nearly completely rewritten. + - now handles multiline input. (yay!) + - now uses the three hooks from above. + * erc-process-line: new arg, no-command: don't process this line as a command. + +2002-01-30 Mario Lang + + * erc-bbdb.el 1.12, erc-button.el 1.7, erc-speak.el 1.18, erc.el 1.188: + hook handling rewrite phase 1. + +2002-01-30 Andreas Fuchs + + * erc.el 1.187: * Rework erc-server-PRIVMSG-or-NOTICE + * New function: erc-is-message-ctcp-p + * New function: erc-format-privmessage + * New function: erc-mark-message + * erc-server-PRIVMSG-or-NOTICE: use them. + +2002-01-30 Mario Lang + + * CREDITS 1.1, HISTORY 1.1: + Initial checkin. + +2002-01-29 Andreas Fuchs + + * erc.el 1.186: * erc-put-text-properties: make OBJECT optional + * erc-put-text-property: same + * erc-server-PRIVMSG-or-NOTICE: use them. + * Make erc-display-line-buffer: add the "\n" even when the string would be invisible. + * same: make the \n invisible, too (: + +2002-01-29 Mario Lang + + * erc-ibuffer.el 1.8, erc.el 1.185: + Rewrote channel tracking using window-configuration-change-hook instead of defadvices. + +2002-01-28 Andreas Fuchs + + * erc-fill.el 1.6, erc.el 1.184: + * Macro define-erc-highlight-customization: Ease up defining + erc-{fool,pal,..}-highlight-props defcusts. + * defcusts: + - erc-fool-highlight-props + - erc-pal-highlight-props + - erc-dangerous-host-highlight-props + - erc-keyword-highlight-props + + Customizable to either nil or "Hide message". + * erc-string-invisible-p: check for invisible chars in string + * erc-display-line-buffer: use it. + * erc-put-text-properties: put a list of props into a piece of text. + * erc-server-PRIVMSG-or-NOTICE: use it; set appropriate + highlight-props for entire incoming message. This set of changes + allows you to e.g. auto-ignore fools. + +2002-01-28 Mario Lang + + * erc-ibuffer.el 1.7: + Added highlight detection support to the Mark column. + Now p, k, f, and d indicate pal, keyword, fool and dangerous-host related activity. + + * erc.el 1.183: + Highlight tracking finished. All necessary info should now be in erc-modified-channels. + + * erc.el 1.182, erc-ibuffer.el 1.6, erc-speedbar.el 1.7: + Added highlight tracking to track-modified-channels + no display code yet, the info is just kept in erc-modified-channels + Added erc-modified column to ibuffer + speedbar update + + * erc-ibuffer.el 1.5: Added erc-members column + + * erc-ibuffer.el 1.4: *** empty log message *** + +2002-01-28 Andreas Fuchs + + * erc-bbdb.el 1.11: + * Fix a slight typo. The hook function should be called in + erc-server-376-hook (-: + +2002-01-28 Mario Lang + + * erc-ibuffer.el 1.3: *** empty log message *** + +2002-01-27 Mario Lang + + * erc-ibuffer.el 1.2: Fixup, it sort of works now. Try it + + * erc-ibuffer.el 1.1: Initial version + +2002-01-26 Mario Lang + + * erc.el 1.181: *** empty log message *** + +2002-01-25 Andreas Fuchs + + * erc-bbdb.el 1.10: * fix two bad things: + - fix the "proc trick": pass proc as an arg through + ...-insinuate-... to ...-show-entry + - hook highlighting into the 376 hook. This one is bound to get + called (-: + * We now only append to hooks only. + * Highlighting of changing records gets updated automatically. + +2002-01-25 Mario Lang + + * erc.el 1.180: *** empty log message *** + +2002-01-25 Andreas Fuchs + + * erc-bbdb.el 1.9: * nearly complete rewrite of erc-bbdb: + - Removed code duplication in erc-bbdb-NICK and -JOIN. + - Made erc-bbdb-show-entry more general and intelligent. + - erc-bbdb-insinuate-entry is now erc-bbdb-insinuate-and-show-entry + (note the different arglist!): + - erc-search-name-and-create now creates "John Doe" users if name + is not specified. + - No sign of "mail" anywhere anymore. It's all finger-host. (-: + - erc-bbdb-popup-p is now called erc-bbdb-popup-type. + - New customize values: + . erc-bbdb-irc-channel-field channel field name + . erc-bbdb-irc-highlight-field (see below) + . erc-bbdb-auto-create-on-nick-p auto-create record on join + + * Highlighting based on BBDB is now here! Specify which type of + highlighting a person in the BBDB (whose nick you know) and have + fun! Read help to erc-bbdb-init-highlighting for details. Changes: + - new function erc-bbdb-init-highlighting: gets called on server + connect. + - new function erc-bbdb-highlight-record: highlights a person's + nick names. + +2002-01-24 Andreas Fuchs + + * erc-button.el 1.6: + * Fix the erc-button-alist regexp for EmacsWiki stuff. delYsid's version + is better (-: + + * erc-button.el 1.5: * Added an Ewiki: specifier to the url-regexp. + EmacsWiki: EmacsIRCClient tells you + should highlight "EmacsWiki: EmacsIRCClient" and allow you to + browse to the wiki when the button is activated. + * new custom: erc-emacswiki-url. + * new function: erc-browse-emacswiki: use it. + +2002-01-23 Mario Lang + + * erc-bbdb.el 1.8: + erc-bbdb-NICK: Added regexp-quote around fingerhost search. + +2002-01-10 Andreas Fuchs + + * erc.el 1.179: + * Channel saving/killing on quit from server implemented: + - defcust erc-save-queries-on-quit: Save server's channel buffers on quitting from server + - defcust erc-kill-queries-on-quit: Kill server's channel buffers on quitting from server + - Macro erc-with-all-buffers-of-server: Run a form inside all the server's query buffers + - Functions erc-{kill,save}-query-buffers: use it. + * Added indent-tabs-mode: t to Local Variables section. + +2002-01-07 Andreas Fuchs + + * erc-replace.el 1.2: * fix stupid documentation errors. + +2002-01-07 Mario Lang + + * erc.el 1.178: + * (toplevel): Revert previous change. This resulted ina recursive load... + You have to put (require 'erc-button) into your .emacs for now + +2002-01-05 Mario Lang + + * erc.el 1.177: + * Added require for erc-button. This is devel. so I need testers :) + + * erc-button.el 1.4: * Added proper file headers (GPL). + +2002-01-04 Mario Lang + + * erc-button.el 1.3: * erc-button-alist: Added entry for finger + + * erc-button.el 1.2: * Removed bogus usage of :button-keymap. + P + Does anyone know what this was supposed to do anyway? + + * erc-button.el 1.1: * Initial version. + * This module allows a way of buttonizing text in IRC buffers. + Default it is used for URLs, but other things could be added. + see if you can find another use, erc-button-alist + +See ChangeLog.2001 for earlier changes. + + Copyright (C) 2002 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: a6779d5e-99fa-442b-98cf-90e73eb2c272 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog.2003 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.2003 Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,2151 @@ +2003-12-30 Francis Litterio + + * erc.el 1.595 (erc-cmd-HELP): + Changed to prefer giving help for erc-cmd-* functions over + similarly-named Elisp functions (e.g., erc-cmd-LIST vs. list). + +2003-12-28 Francis Litterio + + * erc.el 1.594 (erc-query-buffer-p): Added this function. + +2003-12-28 Jorgen Schaefer + + * erc.el 1.593 (erc-cmd-SV): Use erc-emacs-build-time. + + * erc-compat.el 1.15: erc-emacs-build-time: New variable. + + * erc.el 1.592 (erc-cmd-SAY): + Reintroduced the feature where the spaces between + "/SAY" and the rest of the line were being sent with the message. + +2003-12-28 Francis Litterio + + * erc.el 1.591 (erc-server-buffer-p): + Fixed a bug where this function sometimes would return + nil when it should return t. + +2003-12-27 Francis Litterio + + * erc.el 1.590 (erc-generate-new-buffer-name): + Really fixed a bug where ERC would reuse + a connected server buffer when erc-reuse-buffers is non-nil. + (erc-cmd-JOIN): Now we tell the user when he attempts to join the same + channel twice on the same server. + + * erc.el 1.589 (erc-generate-new-buffer-name): + Fixed a bug where ERC would reuse a connected server buffer when erc-reuse-buffers is non-nil. + + * erc.el 1.588 (erc-cmd-SAY): + Fixed a bug where the spaces between "/SAY" and the rest of the + line were being sent with the message. + + * erc-list.el 1.15: Fixed another typo. + + * erc-list.el 1.14: Fixed a typo. + + * erc-list.el 1.13: + Added text to the top of the channel list buffer describing the keybinding for + function erc-chanlist-join-channel. + + * erc-list.el 1.12: Minor appearance changes. No functional change. + + * erc-list.el 1.11: + Implemented function erc-chanlist-join-channel. Added variable + erc-chanlist-channel-line-regexp. Got rid of function + erc-chanlist-pre-command-hook. Changed the logic for how channel lines are + highlighted. + +2003-12-26 Francis Litterio + + * erc-list.el 1.10: + Removed a bunch of unused code. No semantic change. + + * erc-list.el 1.9: Added lots of functionality. + +2003-12-15 Mario Lang + + * erc-track.el 1.58, erc.el 1.587: + New custom type erc-message-type, use it in erc-hide-list and erc-track-exclude-types + +2003-12-14 Alex Schroeder + + * erc-track.el 1.57 (track-when-inactive): New module. + (erc-track-visibility): New option. + (erc-buffer-activity): New variable. + (erc-buffer-activity-timeout): New variable. + (erc-user-is-active): New function. + (erc-buffer-visible): New function. + (erc-modified-channels-update): Replace get-buffer-window call + with call to erc-buffer-visible. + (erc-track-modified-channels): Ditto. + +2003-12-14 Lawrence Mitchell + + * erc-track.el 1.56 (erc-modified-channels-update): + Force update of modeline. Makes sure + that the tracked channels disappear in other buffers too. + +2003-12-06 Lawrence Mitchell + + * erc.el 1.586 (define-erc-module): + New optional argument LOCAL-P. If non-nil, then + mode will be created as buffer-local rather than a global mode. + (erc-cmd-CTCP): Fix indentation from last commit. + + * erc-compat.el 1.14 (erc-define-minor-mode): + Deal with :global and :group keywords. + + * erc-nickserv.el 1.13 (erc-current-network): + Make server regex more permissive. + + * erc.el 1.585 (erc-cmd-CTCP): + Don't add a space to end of command when ARGS are + empty. This fixes a bug whereby requests of the form "VERSION " were + being sent, and ignored. + +2003-11-27 Lawrence Mitchell + + * erc-log.el 1.9: From Adrian Aichner + * erc-log.el (erc-log-file-coding-system): Use 'binary + coding-system under XEmacs (instead of 'emacs-mule). + * erc-log.el (erc-w32-invalid-file-characters): Removed as no + longer needed. + * erc-log.el (erc-generate-log-file-name-long): Use + `convert-standard-filename', which exists in XEmacs too. + +2003-11-16 Mario Lang + + * erc-identd.el 1.1: Code provided by johnw, thanks! + +2003-11-09 Lawrence Mitchell + + * erc.el 1.584 (erc-latest-version): Clean up docstring. + Remove requirement for w3, wrap REQUIRE statement in IGNORE-ERRORS. + Update viewcvs url to correct location. + (erc-ediff-latest-version): Make sure that we find the uncompiled + erc.el, error if not. + +2003-11-07 Mario Lang + + * erc.el 1.583: Add more info to /sv + +2003-11-06 Francis Litterio + + * erc.el 1.582: Added optional argument BUFFER to erc-server-buffer-p. + +2003-11-04 Mario Lang + + * AUTHORS 1.6: Add sachac + +2003-11-02 Lawrence Mitchell + + * erc.el 1.581 (erc-server-366): + chnl is 4th element of parsed, not fifth. + (erc-channel-end-receiving-names): Pass correct number of arguments + to delete-if-not. + + * erc.el 1.580 (erc-update-current-channel-member): + Use erc-downcase when comparing + nick entries. Cleanup indentation. + +2003-11-01 Lawrence Mitchell + + * erc-sound.el 1.4: Added a (provide 'erc-sound) line. + + * erc.el 1.579 (erc-cmd-NAMES): send to TGT, not CHANNEL. + +2003-10-29 Sandra Jean Chua + + * erc-pcomplete.el 1.21, erc.el 1.578, CREDITS 1.6: + Merged Jeremy Maitin-Shepard's patch for time-sensitive nick completion. + +2003-10-27 Mario Lang + + * Makefile 1.19, debian/changelog 1.24: + New Debian package 4.0.cvs.20031027 + +2003-10-25 Mario Lang + + * erc.el 1.577: Fix typo tuncate->rruncate + +2003-10-24 Mario Lang + + * erc-dcc.el 1.80: From Stephan Stahl : + * (erc-dcc-send-block): Kill buffer if transfer completed correctly. + +2003-10-22 Mario Lang + + * erc-track.el 1.55 (erc-track-disable): + Do not deactivate all advices for `switch-to-buffer', + just disable the erc specific one. (Bug#217022). + +2003-10-18 Lawrence Mitchell + + * erc-log.el 1.8 (erc-log-file-coding-system): New variable. + (erc-save-buffer-in-logs): Use it. + +2003-10-17 Mario Lang + + * erc.el 1.576 (erc-interpret-mirc-color): New boolean defcustom + + * erc.el 1.575: Do not use -nowait on darwin (thanks johnw) + +2003-10-15 Lawrence Mitchell + + * erc.el 1.574 (define-erc-module): + Set erc-FOO-mode appropriately in erc-FOO-enable + and erc-FOO-disable. + +2003-10-12 Jorgen Schaefer + + * erc-autoaway.el 1.12 (erc-mode): + Reset idletime on connect. Fixes an annoying bug which + flooded the server with aways on reconnect. + (erc-autoway-reset-idletime): Accept optional args so we can hook it + onto erc-server-001-hook. + +2003-10-10 Mario Lang + + * erc.el 1.573 (erc-hide-list): Add a nice defcustom type + +2003-10-08 Mario Lang + + * Makefile 1.18, debian/changelog 1.23, debian/control 1.8: + Debian snapshot 20031008 + + * erc-speedbar.el 1.11: + Patch from Eric M. Ludlam : + - (erc-install-speedbar-variables): Add functions list (needs new speedbar?) + - (erc-speedbar-buttons): Add doc. Clear the buffer + - (erc-speedbar-sort-channel-members): New function. + - (erc-speedbar-expand-channel): Call new sort function. Change some visuals. + - (erc-speedbar-insert-user): Change some visuals based on channel data. + - (erc-speedbar-line-text, erc-speedbar-item-info): New functions + Add proper elisp file header. + +2003-10-02 Lawrence Mitchell + + * erc-match.el 1.22 (erc-match-syntax-table): New variable. + (erc-match-current-nick-p): Use it. + + * erc.el 1.572 (erc-quit-reason-zippy, erc-part-reason-zippy): Use + `erc-replace-regexp-in-string' rather than + `replace-regexp-in-string'. + (erc-command-indicator-face): New face, used to show commands if + `erc-hide-prompt' is nil and `erc-command-indicator' is non-nil. + (erc-command-indicator): Clean up doc-string. + (erc-display-prompt): New optional argument FACE, use this rather + than `erc-prompt-face' to fontify the prompt if non-nil. + (erc-send-current-line): Pass in `erc-command-indicator-face' to + `erc-display-prompt'. + + * erc-compat.el 1.13 (erc-replace-regexp-in-string): New function. + Alias for `replace-regexp-in-string' on Emacs 21. + Argument massaging for `replace-in-string' for XEmacs. + +2003-09-28 Jorgen Schaefer + + * erc.el 1.571 (erc-keywords): Removed. Wasn't used by anything. + +2003-09-25 Lawrence Mitchell + + * erc.el 1.570: ERC-HIDE-PROMPT: add custom group + ERC-COMMAND-INDICATOR: new variable. + ERC-COMMAND-INDICATOR: new function. + ERC-DISPLAY-PROMPT: new argument, PROMPT, used to override default + prompt. + ERC-SEND-CURRENT-LINE: pass ERC-COMMAND-INDICATOR to ERC-DISPLAY-PROMPT. + +2003-09-24 Jorgen Schaefer + + * erc.el 1.569 (erc-parse-line-from-server): + Ignore empty lines as required by RFC. + +2003-09-17 Mario Lang + + * erc.el 1.568: Add lag time calculation + +2003-09-13 Mario Lang + + * Makefile 1.17, debian/README.Debian 1.7, debian/changelog 1.22: + New debian release + + * erc-notify.el 1.22: + Call erc-notify-install-message-catalogs on load, not on module init + + * erc.el 1.567 (erc-update-modules): + Use `load' instead of `require'. XEmacs appears + to have the NOERROR arg only sometimes... Strange + + * erc.el 1.566: No fboundp if we have a defvar + + * erc.el 1.565: Properly defvar erc-ping-handler + +2003-09-11 Damien Elmes + + * erc.el 1.564 (erc-setup-periodical-server-ping): + check if erc-ping-handler is + bound before referencing it + +2003-09-10 Mario Lang + + * erc.el 1.563 (erc-cmd-NICK): + Warn about exceeded NICKLEN if we know it. + + * erc.el 1.562: Make erc-server-PONG obey erc-verbose-server-ping. + Cancel old `erc-ping-handler' timer when restablishing connection in the same + buffer. + + * debian/changelog 1.21, Makefile 1.16: New debian snapshot + + * erc-dcc.el 1.79, erc-xdcc.el 1.6: + Use new function erc-dcc-file-to-name to convert spaces to underscores + + * erc-xdcc.el 1.5: Add autoload for erc-xdcc-add-file + +2003-09-08 Mario Lang + + * erc-dcc.el 1.78: indent fixes and copyright update + + * erc.el 1.561: + erc-send-ping-interval: New defcustom which defaults to 60. + Every 60 seconds, we send PING now. + This should fix the "connection silently lost" bug. + Please test this change extensively, and report problems. + +2003-09-07 Alex Schroeder + + * erc.el 1.560 (erc-default-coding-system): + Test for undecided and utf-8 + before setting. + +2003-09-01 Mario Lang + + * erc.el 1.559 (erc-modules): Add some more symbols to the set + + * erc.el 1.558 (erc-modules): * erc.el 1.558 (erc-modules): Add :greedy t to the set in + + * erc-dcc.el 1.77: + More autoloads which make dcc autoload upon ctcp dcc query received. + + * erc-dcc.el 1.76 (erc-cmd-DCC): Add Autoload. + (pcomplete/erc-mode/DCC): Ditto, makes DCC autoloadable just by using + completion. + Also only offer "send" if fboundp make-network-process. + + * erc-autojoin.el 1.6: Update copyright + + * erc-autojoin.el 1.5 (erc-autojoin-add): + Only add the channel if it is not already there. + + * erc-notify.el 1.21: + Use `define-erc-module' instead of old `erc-notify-initialize'. + Now defines the global minor mode erc-notify-mode, and should also + be controllable via `erc-modules' with symbol `notify'. + + * erc.el 1.557 (erc-modules): + Fix paren-in-column-zero bug in docstring. + Add a sort of bogus, but still better :type. + Add autojoin and netsplit by default. + (erc-update-modules): Dont barf with an error if `require' fails. + We can still error out if the mode is not defined. + +2003-08-31 Andreas Fuchs + + * erc.el 1.556: + * make 353 (NAMES reply) output go into the appropriate channel buffer + (if it exists) or into the active erc buffer (if not). + +2003-08-29 mtoledo + + * erc.el 1.555: + Added the variable erc-echo-notices-in-current-buffer to make possible display notices in the current buffer (queries to nickserv/chanserv/memoserv). Defaults to nil so nothing changes from what we have today. + +2003-08-29 Mario Lang + + * erc.el 1.554: Fix typo in varname which led to a compiler warning + + * AUTHORS 1.5: Added lawrence + +2003-08-27 Mario Lang + + * erc-dcc.el 1.75: + Set process and file-coding system to 'binary (for Windows) + + * erc-stamp.el 1.30: Rename custom group erc-timestamp to erc-stamp. + +2003-08-07 Lawrence Mitchell + + * erc-fill.el 1.23 (erc-fill-disable): + Remove erc-fill, not erc-fill-static from + erc-insert-modify-hook. + +2003-08-05 Francis Litterio + + * erc.el 1.553 (erc-send-current-line): + Now we display the prompt for previously entered commands + based on the value of customization variable erc-hide-prompt. This change is + closely related to revision 1.552 by wencem. + +2003-08-04 Lawrence Mitchell + + * erc.el 1.552 (erc-send-current-line): + If we're sending a command, don't display + the prompt. + +2003-08-04 Damien Elmes + + * erc-track.el 1.54: patch from David Edmondson (dme AT dme DOT org) + + This patch makes button 3 on the erc-track buffer names in the + modeline show the selected buffer in another window. It's analogous to + button 2 which shows the buffer in the current window. + +2003-07-31 Francis Litterio + + * erc.el 1.551 (erc-display-line-1): + Fixed bad indentation on one line. No semantic change. + +2003-07-29 Lawrence Mitchell + + * erc-match.el 1.21: + Quote open paren in docstring of erc-text-matched-hook + + * erc.el 1.550: Anchor match only at beginning in erc-ignored-user-p. + + * erc-button.el 1.47: New variable erc-button-wrap-long-urls. + Modified erc-button-add-buttons: + New optional argument REGEXP. + If we're buttonising a URL and erc-button-wrap-long-urls is + non-nil, try and wrap them + + Modified erc-button-add-buttons-1: + Pass regexp to erc-button-add-buttons. + +2003-07-28 Francis Litterio + + * erc.el 1.549 (erc-network-name): + Improved docstring. Removed an unnecessary call to erc-server-buffer. + +2003-07-28 Mario Lang + + * erc.el 1.548: By lawrence: + (erc-ignored-user-p): Use anchored regexp. + (smiley): Fix missing quote in `remove-hook' call. + +2003-07-26 Francis Litterio + + * erc-nets.el 1.4, erc-nickserv.el 1.12, erc.el 1.547: + Changed all references to Openprojects into references to Freenode. + +2003-07-25 Francis Litterio + + * erc.el 1.546: + Now variable erc-debug-irc-protocol is defvar'ed instead of defcustom'ed. + Made the docstring clearer too. + + * erc.el 1.545: Fixed a wrong-type-argument error from window-live-p. + +2003-07-15 Damien Elmes + + * erc-log.el 1.7 (erc-log-setup-logging): + set buffer-file-name to "", as (basic-save-buffer) + will prompt for a buffer name before invoking hooks. the buffer-file-name + will be overridden by (erc-save-buffer-in-logs) anyway - the main danger + of doing this is write-file-contents hooks. Let's see if anyone complains. + (erc-save-buffer-in-logs): return t, so that further write hooks are not run + +2003-07-09 Damien Elmes + + * erc-dcc.el 1.74 (erc-dcc-open-network-stream): + -nowait still crashes emacs cvs - disable for now + +2003-07-02 Francis Litterio + + * erc.el 1.544 (erc): Minor docstring modification. + +2003-07-01 Damien Elmes + + * erc-match.el 1.20 (erc-match-current-nick-p): + match only on word boundaries + + * erc-log.el 1.6 (erc-log-setup-logging): + not sure how this crept in again - make sure we set + buffer-file-name to nil, since otherwise it is not possible to open + previous correspondence in another buffer while a conversation is open + +2003-06-28 Francis Litterio + + * erc.el 1.543 (erc-network-name): + Now makes some intelligent guesses if the server didn't tell + us the network name. + +2003-06-28 Alex Schroeder + + * erc.el 1.542 (erc-default-coding-system): Use utf-8 as the default + encoding for outgoing stuff and undecided as the default for + incoming stuff. + (erc-coding-sytem-for-target): New. + (erc-encode-string-for-target): Use it. + (erc-decode-string-from-target): Use it. Removed the flet + erc-default-target hack and documented the dynamically bound + variable `target' instead. + +2003-06-25 Francis Litterio + + * erc.el 1.541 (erc-log-irc-protocol): + Now we keep point on the bottom line of the window + displaying the *erc-protocol* buffer if it is at the end of the + *erc-protocol* buffer. + + * erc.el 1.540: + Added some text to the docstring for variable erc-debug-irc-protocol. + +2003-06-23 Francis Litterio + + * erc-dcc.el 1.73 (erc-dcc-auto-mask-p): + Fixed a docstring typo that caused a load-time error. + + * erc-dcc.el 1.72 (erc-dcc-auto-mask-p): + Changed reference to undefined variable erc-dcc-auto-mask-list + to erc-dcc-auto-masks. + Changed default value of variable erc-dcc-auto-masks to nil and added text to its + docstring. + + * erc-notify.el 1.20 (erc-notify-timer and erc-notify-QUIT): + Added network name to notify_off message. + + * erc.el 1.539 (erc-network-name): + Now returns the name of the IRC server if the network name + cannot be determined. + + * erc-notify.el 1.19 (erc-notify-JOIN and erc-notify-NICK): + Added argument ?m to call to erc-display-message. + + * erc-dcc.el 1.71 (erc-dcc-do-LIST-command): + Fixed a bug where I assumed (plist-get elt :type) + returns a string -- it really returns a symbol. + + * erc-notify.el 1.18 (erc-notify-timer): + Now we include the network name in the notify_on message. + + * erc.el 1.538: + New function: erc-network-name. Returns the name of the network that the + current buffer is associate with. Not every server sends the 005 messages + that enable the network name to be known. If the network name is + not known, the string "UNKNOWN" is returned. + + * erc-dcc.el 1.70 (erc-dcc-chat-setup): + Added a comment. Fixed a bug where a DCC CHAT buffer has no + prompt when it first appears. + + * erc-dcc.el 1.69 (erc-dcc-chat-parse-output): + Now a DCC chat buffer displays the nick using + erc-nick-default-face just like in a channel buffer. + +2003-06-22 Francis Litterio + + * erc.el 1.537 (erc-display-prompt): + Fixed incorrect indentation. No semantic change. + + * erc.el 1.536 (erc-strip-controls): + Minor change to regexp that matches IRC color control + codes. I was seeing usage as follows: ^C07colored text^C^C04other color. + Now we strip a ^C followed by zero, one, or two digits. Before this change, + we stripped a ^C followed by one or two digits. + + * erc-dcc.el 1.68 (erc-dcc-do-LIST-command): + Improved format of output of /DCC LIST. Now the + "Size" column for a DCC GET includes the percentage of the file that has + been retrieved. + (erc-dcc-do-GET-command): Now it works if erc-dcc-default-directory is set. + +2003-06-19 Damien Elmes + + * erc-log.el 1.5: + * added quickstart information to the comments up the top + +2003-06-16 Mario Lang + + * erc.el 1.535: + Default to open-network-stream on MS Windows. (thanks lawrence) + +2003-06-11 Damien Elmes + + * erc.el 1.534 (erc-process-input-line): + refactor so that wrong-number-of-arguments is + caught when using do-not-parse-args - this lets do-not-parse-args + commands display help messages on incorrect syntax in a uniform manner. + This no longer raises a bad-syntax error - was this a catch-all to stop a + backtrace? Does it belong? + (erc-cmd-APPENDTOPIC): the correct way to display help when you want to + accept an abitrary string is to (signal 'wrong-number-of-arguments nil). + This fixes a bug where people could not /at topics with a space in them. + +2003-06-09 Damien Elmes + + * erc.el 1.533: + Re-add the last few changes which weren't merged for some reason. + + * erc.el 1.532 (erc-cmd-APPENDTOPIC): show help when given no arguments + + Patch from MrBump. Fixes problem with erc-set-topic inserting ^C characters + into the topic. Also removes dependency on CL. + +2003-06-08 Jorgen Schaefer + + * erc.el 1.531: + Added comment to explain (eval-after-load "erc" '(erc-update-modules)). + +2003-06-01 Mario Lang + + * erc-pcomplete.el 1.20: Add completion for /unignore + +2003-05-31 Alex Schroeder + + * erc-compat.el 1.12 (erc-encode-coding-string): The default binding, + if encode-coding-string was not available, must be a defun that + takes multiple arguments. Did that. + +2003-05-30 Mario Lang + + * erc.el 1.530: + Add handlers for 313 and 330 (by arne@rfc2549.org, thanks) + +2003-05-30 Damien Elmes + + * erc.el 1.529: + patch from MrBump to make /mode #foo +b work again (erc-cmd-BANLIST only + temporarily changes them now) + +2003-05-29 Alex Schroeder + + * erc.el 1.528 (erc-select): + server is now defaulted with erc-compute-server. + A few cosmetic fixes. + (erc-default-coding-system): Renamed from erc-encoding-default. + (erc-encoding-default): Renamed to erc-default-coding-system. + (erc-encoding-coding-alist): Documentation updated to cover regexps. + (erc-encode-string-for-target): Now considers keys of + erc-encoding-coding-alist to be regexps. Rely on erc-compat + wrt. MULE support. + (erc-decode-string-from-target): New function. + (erc-send-current-line): eq -> char-equal fix. + (erc-server-TOPIC): topic is now decoded with + erc-decode-string-from-target. + (erc-parse-line-from-server): Line from server is no longer decoded + here. + (erc-server-PRIVMSG-or-NOTICE): Message from a user is decoded here, + sspec -> sender-spec for clarity. Cosmetic if -> when fix. + (erc-server-TOPIC): sspec -> sender-spec + (erc-server-WALLOPS): Ditto. + + * erc-compat.el 1.11 (erc-decode-coding-string): + Now requires coding-system as an argument. + +2003-05-15 Mario Lang + + * erc.el 1.527: + erc-part|quit-hook is only run on a part|quit directed to our nick, reflect that in the docstring to avoid confusion + +2003-05-01 Andreas Fuchs + + * erc-truncate.el 1.3: + * erc-truncate-buffer-to-size: use fboundp. Scheme takes its toll... + +2003-05-01 Jorgen Schaefer + + * erc-truncate.el 1.2: remove require of erc-log + (erc-truncate-buffer-to-size): use erc-save-buffer-in-logs when it's + there, else, dont. + +2003-04-29 Andreas Fuchs + + * erc-log.el 1.4, erc-truncate.el 1.1, erc.el 1.526: erc.el: + * erc-cmd-QUIT: Remove references to code in erc-log.el, to + not force autoloading of erc-log.el + * erc-server-PART: ditto. + * erc-quit-hook: new hook, run when /quit command is + processed. + * erc-cmd-QUIT: use it. + * erc-part-hook: new hook, run then PART message is + processed. + * erc-cmd-PART: use it. + * erc-connect-pre-hook: new hook, run before connection to IRC + server is started. + * erc: use it. + * erc-max-buffer-size: Move truncation variables and functions + to erc-truncate.el + * erc-truncate-buffer-on-save: moved to erc-log.el + * erc-initialize-log-marker: new function. + erc-log.el: + * erc-truncate-buffer-on-save: New defcust here; from erc.el + * erc-truncate-buffer-on-save: Put it in group `erc-log' + * erc-log-channels-directory: Remove trailing slash from + default value. + * Add functions to erc-connect-pre-hook, erc-part-hook and + erc-quit-hook to avoid getting autoloaded. + + erc-truncate.el: + * Contains the truncation functions and defcusts from erc.el. + * define-erc-module clause added; new erc-truncate-mode. + +2003-04-29 Jorgen Schaefer + + * erc.el 1.525 (erc): + Check wether erc-save-buffer-in-logs is bound, too + + * erc.el 1.524 (erc): + Check wether erc-logging-enabled is bound before using it - not + everyone is using erc-log.el! + +2003-04-28 Andreas Fuchs + + * erc-log.el 1.3: + * while we're at it, remove the (declare (ignore ignore)) statements. + + * erc-log.el 1.2: + * add autoload statement for erc-log-mode/etc. Sorry for the delay. + + * erc-log.el 1.1, erc.el 1.523: * erc.el: + - move variables and functions to erc-log.el: + defgroup `erc-log' + defcustom `erc-log-channels-directory' + defcustom `erc-log-insert-log-on-open' + defcustom `erc-generate-log-file-name-function' + defun `erc-save-buffer-in-logs' (autoloads from erc-log.el) + defuns `erc-generate-log-file-name-*' + defun `erc-current-logfile' + defun `erc-logging-enabled' (autoloads from erc-log.el) + - erc-truncate-buffer-to-size: fix for double-saving bug when + writing out truncated buffer contents. Thanks, lawrence mitchell ! + - erc-remove-text-properties-region: Fix case for read-only text. + - erc-send-current-line: update insert-marker before calling the hooks. + also, wrap (erc-display-prompt) so that it doesn't toggle + buffer-modified-p. + - erc-interpret-controls: remove /very/ old commented-out function + - erc-last-saved-position: make it a marker + - erc: use it. + + * erc-log.el: (thanks, lawrence mitchell !) + - Move logging code from erc.el here + - define-erc-module log: add; minor mode erc-log-mode is the + same as adding the `erc-save-buffer-in-logs' to + erc-send-post-hook and `erc-insert-post-hook'. + - erc-w32-invalid-file-characters: add. + - erc-enable-logging: add. + - erc-logging-enabled: use it. + - erc-logging-enabled: autoload. + - erc-save-buffer-in-logs: fix for truncating saved buffer with read-only text. + - erc-save-buffer-in-logs: use erc-last-saved-position. + - erc-save-buffer-in-logs: fix saving half-written messages on + the prompt when saving the log file. (simply uses + erc-insert-marker as an upper bound for saving). + +2003-04-27 Damien Elmes + + * erc.el 1.522: * erc.el 1.522: erc-modules: added + +2003-04-27 Alex Schroeder + + * Makefile 1.15 (UNCOMPILED): Added erc-compat.el. + (clean): Remove .elc files, too. + Patch by Hynek Schlawack + +2003-04-22 Damien Elmes + + * erc-button.el 1.46: + erc-button-keymap: set the parent keymap to erc-mode-map + +2003-04-20 Damien Elmes + + * erc.el 1.521: + erc-official-location: shouldn't the official location be the base URL of erc? + + * erc.el 1.520: + erc-modules: updated the docstring to make the semantics clearer + +2003-04-19 Mario Lang + + * erc.el 1.519: + Fix problem where % in NOTICE produced errors (from mmc) + +2003-04-18 Damien Elmes + + * erc.el 1.518 (erc-toggle-debug-irc-protocol): + moved a reference to 'buf' inside the let + statement which defines it. it's difficult to tell what the original + intentions were here - at the moment the debug window is displayed when + toggling either way. + + * README 1.3, erc.el 1.517: + (erc-update-modules: added a condition in for erc-nickserv -> erc-services + + * erc-pcomplete.el 1.19: + - that change to erc-update-modules making it require the modules first means + we don't need any special case handling here, so i reverted the previous + change + + * erc.el 1.516: + - don't require 'erc-auto, since windows users don't have access to make. + instead, we handle it in (erc-update-modules) + +2003-04-17 Damien Elmes + + * README 1.2, Makefile 1.14: + Updated Makefile and documentation to reflect the new release + + * erc.el 1.515: + - note the previous change also updated the release number to erc 4.0! + (erc-connect): fix a bug introduced by the previous release + + * erc.el 1.514: + fixed about 20 instances of (message (format ...)) which will break if the + format returns a string with %s in it + + * erc.el 1.513: erc-error-face: make it red, not pink + + * erc-pcomplete.el 1.18: + since pcomplete is autoloaded via erc-completion-mode, and completion is in + erc-modules by default, we remove completion when pcomplete is added + + * erc.el 1.512 (define-erc-module): no need for delete, use delq + + * erc-members.el 1.5 (erc-nick-channels): + (erc-person-channels) takes one arg + (erc-format-user): again, they all take an arg + + * erc.el 1.511: + - require erc-auto when loading, so the default `erc-modules' can be loaded. + this makes erc-auto no longer a convenience but a necessity - all the name + of user friendliness. + (define-erc-module): the enable and disable routines now update erc-modules + accordingly + erc-modules: new variable controllig the modules which erc has loaded/will + load. when customising, it will automatically enable modules. it won't + automatically disable modules which are removed, yet. + (erc-update-modules): enable all modules in `erc-modules' + + * erc-dcc.el 1.67 (erc-dcc-open-network-stream): + use the -nowait equiv if available + erc-dcc-server-port: removed + erc-dcc-port-range: allows a range of values, so you can have more than one + dcc + (erc-dcc-server): support erc-dcc-port-range + (erc-dcc-chat): use OCHAT for outgoing chat for now. we need to fix the + issues with allowing more than one chat with the same person + + * erc.el 1.510: + erc-log-channels: removed; set the directory to start logging + (erc-directory-writeable-p): create directory if it doesn't exist, check if + it's writeable + (erc-logging-enabled): don't reference erc-log-channels + +2003-04-07 Damien Elmes + + * erc.el 1.509 (erc): + but when inserting the contents of a previous logfile, use the logfile + name, not ""! + + * erc.el 1.508 (erc): + set buffer-file-name to "", since we have a custom saving function and + it's not needed. this enables one to open a log file with previous + correspondence, while talking to the person at the same time + +2003-03-29 Francis Litterio + + * erc.el 1.507 (erc-prepare-mode-line-format): + Now strips all text properties from the target before + putting it in the mode line. Keeps the mode line looking consistent. + (erc-channel-p): Improved docstring. + +2003-03-28 Alex Schroeder + + * erc.el 1.506 (erc-generate-log-file-name-with-date): New function. + (erc-generate-log-file-name-function): Make it available. + +2003-03-24 Mario Lang + + * erc.el 1.505: + Fix erc-prompt and erc-user-mode custom :type (Closes: #185794) + +2003-03-20 Damien Elmes + + * erc.el 1.504: + erc-server-hook-list: correct documentation of ordering of (proc parsed) + +2003-03-16 Alex Schroeder + + * erc-track.el 1.53 (erc-modified-channels-string): + Make it a risky-local-variable. + +2003-03-16 Jorgen Schaefer + + * erc-track.el 1.52 (erc-track-modified-channels): + Use (point-min) if we don't find a + parsed-property, so it won't error out with nil... + +2003-03-16 Damien Elmes + + * erc-track.el 1.51 (erc-track-switch-buffer): + removed call to erc-modified-channels-update, as + this is done correctly on buffer switching in both emacs and xemacs now + +2003-03-15 Damien Elmes + + * erc-track.el 1.50 (erc-find-parsed-property): + simplified a little, so it shouldn't return nil anymore + + * erc.el 1.503: erc-send-post-hook: document narrowing which occurs + +2003-03-14 Alex Schroeder + + * erc-track.el 1.49 (erc-find-parsed-property): New function. + (erc-track-modified-channels): Use it instead of relying on + point-min. + +2003-03-12 Mario Lang + + * erc.el 1.502: + Fix erc-set-topic to accept a channel name as first word + +2003-03-11 Jorgen Schaefer + + * erc-dcc.el 1.66: + Small patch (<10 lines, also slightly modified by Jorgen Schäfer) from + David Spreen to add hostmask-authentication to + DCC auto-accept. + + erc-dcc-auto-mask-list: New variable + (erc-dcc-handle-ctcp-send): Check erc-dcc-auto-mask-list + (erc-dcc-auto-mask-p): New function + erc-dcc-send-request: Docstring now mentions erc-dcc-auto-mask-list + +2003-03-10 Francis Litterio + + * erc-ring.el 1.11 (erc-clear-input-ring): + New function. Erases the contents of the input ring for + the current ERC buffer. + +2003-03-08 Francis Litterio + + * erc.el 1.501: + (erc-display-line-1) and (erc-send-current-line): Now these functions reset erc-insert-this + to t as soon as possible after consuming the value of that variable. See the comments in + the code for the strange symptom this fixes. + (erc-bol): Changed to call point-at-eol instead of line-end-position. This increases XEmacs + portability, since XEmacs doesn't have line-end-position. Patch suggested by Scott Evans + on the ERC mailing list. + +2003-03-04 Damien Elmes + + * erc.el 1.500: banlist*: patch from mrbump to avoid using cl packages + +2003-03-04 Francis Litterio + + * erc.el 1.499: + Changed erc-noncommands-list from a constant to variable, so that users can + add their own erc-cmd-* functions to the list. Improved the docstring too. + +2003-03-02 Francis Litterio + + * erc.el 1.498 (erc-server-353): + Now the output of "/NAMES #channel" appears in the currently + active ERC buffer, even if the user is not a member of #channel. + + * erc.el 1.497 (erc-cmd-DEOP): + Fixed a syntax error: invalid read syntax ")" caused by my last change. + +2003-03-01 Francis Litterio + + * erc.el 1.496 (erc-cmd-DEOP): + Fixed a wrong-type-argument error caused by calling split-string + on a list instead of on a string. Removed the call to split-string entirely, + because it wasn't needed. + + * erc.el 1.495 (erc-cmd-HELP): + Changed to use intern-soft instead of intern. Now "/HELP floob" + doesn't create a void function symbol erc-cmd-FLOOB. + +2003-02-25 Damien Elmes + + * erc.el 1.494 (erc-cmd-SERVER): + remove erroneous references to line, use server instead + +2003-02-23 Francis Litterio + + * erc.el 1.493 (erc-toggle-debug-irc-protocol): + Fixed a bug where the global value of + kill-buffer-hook was being modified instead of the buffer-local value. + +2003-02-22 Francis Litterio + + * erc.el 1.492 (erc-cmd-KICK): + Now supports any number of words in the REASON string. Examples + of the /KICK command are: + /KICK franl You don't belong here + /KICK franl Bye + /KICK franl + /KICK #channel franl Go away now + /KICK #channel franl Bye + /KICK #channel franl + +2003-02-16 Jorgen Schaefer + + * erc-stamp.el 1.29 (erc-insert-timestamp-right): + Make the timestamp rear-nonsticky, so + C-e works at the beginning of the next line. + +2003-02-16 Andreas Fuchs + + * erc-stamp.el 1.28: + * s/choose/choice/ in customize options, as kensanata requested. + +2003-02-15 Francis Litterio + + * erc.el 1.491 (erc-toggle-debug-irc-protocol): + Now if the *erc-protocol* buffer is killed, + logging is turned off. Prior to this change, the buffer would come back + into existence (generally unbeknownst to the user) after being killed. + +2003-02-11 Damien Elmes + + * erc.el 1.490 (erc-send-current-line): + we can't inhibit everything here when not connected, + as the user will expect commands like /server still to work. the + erc-cmd-handler should recover from errors instead + +2003-02-10 Damien Elmes + + * erc.el 1.489: + * we now run erc-after-connect on 422 (no motd) messages as well as the motd + messages + (erc-login): revert the previous change + + * erc.el 1.488 (erc-login): register that we're connected + +2003-02-10 Mario Lang + + * erc-members.el 1.4: * Provide erc-members + * Fix excessive ) + * Comment out broken self-tests + +2003-02-07 Damien Elmes + + * erc.el 1.487 (erc-connect): + notify the user we're trying to connect when using asych + connections + + * erc.el 1.486 (erc-connect): support an asyncronous connection + (erc-process-sentinel): ditto + + * erc-track.el 1.48: + * advise switch-to-buffer in the case of xemacs, since it doesn't have + window-configuration-change-hook + + * erc.el 1.485 (erc-send-current-line): + if not connected, refuse to send either a message or + a command + + * erc.el 1.484: (erc-save-buffer-in-logs): + - check for a sensibile region before saving the buffer. if the + connection process is killed early on, there is not a sensible region + to save + - don't set buffer-file-name on save. we don't need it, and it means we + can now find-file a log while an existing query is open with that + user + + * erc.el 1.483 (erc-process-input-line): + when displaying the help for a function, if no + documentation exists, don't fall over + (erc-cmd-SAY): new function for quoting lines begining with / + (erc-server-NICK): + - fix a bug where the "is now known as" message doesn't appear on newly + created /query buffers + - when a user changes their nick, update the query to point to the new + nick + + * erc.el 1.482 (erc-send-current-command): + don't reject multi-line commands. since + multiline-p is used as the no-command arg to erc-process-current-line, + multi-line text is never interpreted as a command. i believe this is the + correct behavior - it allows people to post the output of things like df + (sans header). if you want to change this, please provide a rationale + in the changelog + + * erc.el 1.481 (erc-send-current-line): + only match the first line when determining if a + multi-line command is allowed + +2003-02-07 Jorgen Schaefer + + * erc-bbdb.el 1.21 (erc-bbdb-highlight-record): + Use alternate strings, not character + classes to split the nick-field. + +2003-02-06 Francis Litterio + + * erc.el 1.479 (erc-process-sentinel): + Now we set erc-connected to nil every time we disconnect + from a server, not just when an unexpected disconnect happens. + + * erc.el 1.478 (erc-connected): + Removed redundant defvar of this variable. Improved the + docstring. + (erc-login): Changed to send a correct RFC2812 USER message (see section + 3.1.3 of RFC2812 for the documentation of the semantics of each argument + of the USER message. + +2003-02-02 Damien Elmes + + * erc.el 1.477 (erc-cmd-NOTICE): fix from mrbump + +2003-01-31 Francis Litterio + + * erc.el 1.476 (erc-cmd-JOIN): + Now we only send one JOIN command to the server when a channel + key is provided. + +2003-01-30 Francis Litterio + + * erc.el 1.475 (erc-remove-channel-member): + Fixed so that it runs erc-channel-members-changed-hook + with the channel buffer current, as is documented in the docstring for variable + erc-channel-members-changed-hook: "The buffer where the change happened is + current while this hook is called." + +2003-01-28 Francis Litterio + + * erc.el 1.474: + (erc-ignored-user-p),(erc-cmd-IGNORE),(erc-cmd-UNIGNORE): Now nicks are ignored + on a per-server basis. Now, erc-ignore-list is only valid in server + buffers! Do not reference it in channel buffers. + + * erc.el 1.473 (erc-cmd-IGNORE): + Now says "Ignore list is empty" if it erc-ignore-list is empty + instead of showing an empty list. + +2003-01-25 Alex Schroeder + + * erc-nickserv.el 1.11 (services): Defined a module + +2003-01-25 Jorgen Schaefer + + * erc.el 1.472 (erc-process-ctcp-query): + Display recipient of CTCP query if it's not + our current nick. + + * erc.el 1.471 (erc-cmd-WHOIS): + Accept an optional second argument SERVER. + +2003-01-25 Alex Schroeder + + * erc-stamp.el 1.27 (stamp): erc-add-timestamp must always be added + with the APPEND parameter -- not only when adding it on the right. + +2003-01-24 Alex Schroeder + + * erc-members.el 1.3 (erc-channel-members-changed-hook): Obsolete, use + erc-members-changed-hook instead. When it is set, add its content + to erc-members-changed-hook. + (erc-update-channel-member): Obsolete, use erc-update-member + instead. Defalias to that effect. + (erc-remove-channel-member): New and already obsolete. Use + erc-remove-nick-from-channel instead. + (erc-update-channel-info-buffer): Obsolete, use ignore instead. + Yes, these have to go. + (erc-channel-member-to-user-spec): Obsolete, use erc-format-user + instead. + (erc-format-user): New. + (erc-ignored-reply-p): New, use it. + + * erc-members.el 1.2: + Further along the way. Any function from erc.el that uses + channel-members should end up in this file, rewritten to use + erc-members. + + (erc-person): Call erc-downcase before getting + something from the hash. + (erc-nick-in-channel): Checking wether erc-process must be used is + unnecessary -- this will be done in erc-person. + (erc-nick-channels): New. + (erc-add-nick-to-channel, erc-update-member): Call erc-downcase + before putting something into the hash. + (erc-buffer-list-with-nick): New. + (erc-format-nick, erc-format-@nick): New, backwards incompatible. + Must check for other places that call these! + (erc-server-PRIVMSG-or-NOTICE): Use the new version. + + * erc-compat.el 1.10 (view-mode-enter): defalias to view-mode, if + view-mode-enter is not fboundp and view-mode is -- as is the case + in XEmacs. We need view-mode-enter in erc-match.el. + +2003-01-23 Francis Litterio + + * erc.el 1.470 (erc-default-server-handler): + Minor performance improvement: allow the lambda + expression to be byte-compiled. + +2003-01-23 Damien Elmes + + * erc.el 1.469 (erc-cmd-BANLIST): + in the absence of a fill-column, use the screen width + +2003-01-22 Damien Elmes + + * erc.el 1.468: + patch from MrBump to delay fetching the banlist until /bl is run, so we don't + fetch it when joining a channel anymore + + * erc-ring.el 1.10: + * instead of adjusting hooks when loaded, provide (erc-ring-mode). you'll + need to run (erc-ring-mode 1) now to get the ring + * (erc-previous-command), (erc-next-command): + - check if the ring exists and create it if necessary + - don't do anything if the ring is empty + + * erc-pcomplete.el 1.17: + Put "how to use" documentation in the comments up the top + +2003-01-21 Alex Schroeder + + * erc-autojoin.el 1.4 (erc-autojoin-version): New. + + * erc-autojoin.el 1.3 (erc-autojoin-add): Added body. + (erc-autojoin-remove): Added body. + (erc-autojoin): Provide it. + +2003-01-21 Damien Elmes + + * erc.el 1.467: erc-cmd-*: removed a bunch of references to force + +2003-01-21 Alex Schroeder + + * erc-autojoin.el 1.2 (erc-autojoin-channels-alist): More doc. + +2003-01-20 Alex Schroeder + + * erc-autojoin.el 1.1: + new, based on resolve's mail, and the stuff on the wiki + + * erc-members.el 1.1: new + +2003-01-19 Mario Lang + + * debian/README.Debian 1.6, debian/changelog 1.20, debian/scripts/install 1.11, + debian/scripts/startup.erc 1.4, Makefile 1.13: + Prepare for 20030119 debian package + + * erc-dcc.el 1.65: + * (erc-decimal-to-ip): Since XEmacs decides that return a completely + and utterly wrong number from string-to-number if it is larger than + the integer boundary, instead of sanely converting the thing to + a float, we now (concat dec ".0"). + + + * erc.el 1.466: + * (erc-log-irc-protocol): Use erc-propertize, not propertize + +2003-01-19 Alex Schroeder + + * erc-button.el 1.45 (erc-button-add-buttons): Added regexp-quote for + the list case, too. + +2003-01-19 Damien Elmes + + * erc-dcc.el 1.64 (erc-dcc-member): fix for case where a prop is nil + + * erc-dcc.el 1.63 (erc-dcc-member): + fix for xemacs's version of plist-member + +2003-01-19 Mario Lang + + * erc-notify.el 1.17: Delete empty strings from the ison-list + + * erc-track.el 1.47: + * (erc-track-switch-buffer): Call erc-modified-channels-update here. + + * erc-track.el 1.46: * toplevel: require 'erc-match + + * erc-track.el 1.45: * (erc-track-mode): Make autoload interactive + + * erc-button.el 1.44: * (button): Make the autoload interactive + + * erc.el 1.465: + * (erc-mode): Comment out the case-table stuff, breaks xemacs + * (erc-downcase): Revert. + + * erc-dcc.el 1.62: + * (erc-dcc-handle-ctcp-send): Use erc-decimal-to-ip on the ip we get... + + * erc-speak.el 1.25: + Eliminate reference to erc-nick-regexp, which no longer exists + +2003-01-19 Alex Schroeder + + * erc-stamp.el 1.26 (erc-timestamp-right-column): New, default nil. + (erc-insert-timestamp-right): Use it, if non-nil. Verbose + doc string. + +2003-01-18 Jorgen Schaefer + + * erc.el 1.464 (erc-downcase): Use the old behavior in non-CVS Emacs. + + * erc.el 1.463 (erc-cmd-QUIT): Remove &rest. The correct fix follows. + (erc-cmd-GQUIT): Pass "" to erc-cmd-QUIT. + (erc-mode): Use the case-table only in CVS Emacs. See comment. + + * erc.el 1.462 (erc-cmd-QUIT): make reason optional. + + * erc.el 1.461 (erc-cmd-GQUIT): Fixed typo. + +2003-01-17 Mario Lang + + * erc.el 1.460: + * (erc-current-logfile): call expand-file-name, so that downcase doesn't mess up ~ + + * erc.el 1.459: * (erc-mode): Define a proper case-table. + * (erc-downcase): just call downcase for now, lets see if the case-table is portable, if yes, we'll remove all erc-downcase references anyway... + + * erc-button.el 1.43: * (erc-button-add-buttons): regex-quote the nick + +2003-01-17 Alex Schroeder + + * erc-button.el 1.42 (button): erc-channel-members-changed-hook no + longer has erc-recompute-nick-regexp. + (erc-button-alist): Use channel-members instead of + erc-nick-regexp. + (erc-button-add-buttons): Split some code into + erc-button-add-buttons-1, and now handle strings, lists, and + alists. Regular expressions in lists and alists are enclosed in + < and >. + (erc-button-add-buttons-1): New. + (erc-nick-regexp): Deleted. + (erc-recompute-nick-regexp): Deleted. + + * erc-button.el 1.41: Remove require cl again. + (erc-mode-map): No longer bind widget-backward and widget-forward. + (erc-button-alist): Explain why byte-compiling makes no sense, and + remove all calls to byte-compile. + (erc-button-keymap): Define it the standard way, without exposing + the list nature of the keymap. + (erc-button-marker-list): Deleted. + (erc-button-add-buttons): Simplify. In particular, create the + button using the real callback, instead of using the intermediate + erc-button-push, and only store the data as described for + erc-button-alist. + (erc-button-remove-old-buttons): Simplify. No more list munging. + Instead, just remove all the properties that we add in + erc-button-add-button. + (erc-widget-press-button): Deleted. + (erc-button-click-button): New, for mouse clicks. Moves point to + where the mouse is, and calls erc-button-push. + (erc-button-push): Instead of matching again, just use the + erc-callback and erc-data properties at point to do the right + thing. + (erc-button-entry): Deleted. + (erc-button-next): Use error instead of the beep plus message + combo. + +2003-01-17 Jorgen Schaefer + + * erc-autoaway.el 1.11 (erc-autoaway-set-back): + Don't pass a force argument to erc-cmd-GAWAY. + + * erc.el 1.458 (erc-cmd-AWAY): Removed usage of the force variable. + +2003-01-17 Alex Schroeder + + * erc-button.el 1.40 (button): + erc-recompute-nick-regexp is no longer added to + erc-channel-members-changed-hook unconditionally, but only if + erc-button-mode is enabled, and if it is disabled, it is removed + again. + (erc): Require cl for delete-if. + (erc-button-remove-old-buttons): Rewrote using delete-if to + prevent exceesive consing. Having the marker list is still ugly, + so another solution needs to be found. + +2003-01-17 Jorgen Schaefer + + * erc.el 1.457 (erc-banlist-store): + Don't assume there's always a setter in the banlist reply. + +2003-01-17 Alex Schroeder + + * erc-button.el 1.39 (erc-button-url-regexp): Changed regexp according + to a suggestion by Max Froumentin . + +2003-01-17 Mario Lang + + * erc.el 1.456: + fix erc-remove-channel-member again to not error out on nil as first arg... + + * erc.el 1.455: * (erc-occur): New function + +2003-01-17 Damien Elmes + + * erc.el 1.454: erc-banlist-*: return nil so further hooks are called + + * erc.el 1.453 (erc-server-368): + supress "end of ban list" messages - use /listbans now + + * erc.el 1.452 (erc-send-current-line): + removed the check for leading whitespace again - the + only time we want to prohibit multi-line commands is if / is the first + thing on the line + (erc-get-arglist): new defun for reading a function's arglist which should + work with older copies of emacs. we use help-function-arglist if it's + available, though, since that has support for reading subrs, etc + + * erc.el 1.451 (erc-cmd-JOIN): fixed (again) + + * erc.el 1.450: * fixed call to erc-cmd-NICK when connecting + * support for listing bans and mass unbanning, again thanks to MrBump + + * erc.el 1.449 (erc-set-topic): + patch from MrBump (Mark Triggs, mst@dishvelled.net) to strip + control chars and topic attribution in C-c C-t + +2003-01-16 Mario Lang + + * erc.el 1.448: + * (erc-remove-channel-member): Do not use delq, modify the list using setcdr like delq does. + In theory, this should be way faster since the list doesnt get traverse two times. + Measurement didn't show any real difference though :(, this system is flawed for channels with >300 users it seems... + Also moved some defcustoms up. + +2003-01-16 Brian P Templeton + + * erc.el 1.447: moved misplaced paren + +2003-01-16 Damien Elmes + + * erc.el 1.446 (erc-cmd-UNIGNORE): + reference argument directly - no string matching + + * erc.el 1.445 (erc-extract-command-from-line): + hmm, thinko in the canonicalisation. should + be fixed + +2003-01-16 Francis Litterio + + * erc.el 1.444 (erc-send-current-line): + Changed the regexp used to match /COMMANDs so that leading + whitespace is taken into account. + +2003-01-16 Mario Lang + + * erc-dcc.el 1.61: * (erc-dcc-do-SEND-command): Fix it + + * erc-ezbounce.el 1.4, erc-lang.el 1.2: Arglist changes... + + * erc.el 1.443: Various docstring fixes and additions. + + * erc-notify.el 1.16: + * (erc-cmd-NOTIFY): Change the function arglist to (&rest args) + + * erc-netsplit.el 1.8: * (erc-cmd-WHOLEFT): Has no args... + +2003-01-16 Damien Elmes + + * erc-fill.el 1.22: + erc-fill-column: default to 78, so things like docstrings don't get wrapped + in an ugly manner + +2003-01-16 Mario Lang + + * erc.el 1.442: + * (erc-cmd-default): Take a substring, now /mode works again. + * (erc-cmd-AWAY): Put do-not-parse-args t + * (erc-cmd-GAWAY): Ditto, and fix it. + * (erc-cmd-CTCP): Switch to argument system. + * (erc-cmd-KICK): Do the same. + +2003-01-15 Mario Lang + + * erc-dcc.el 1.60: + * (erc-cmd-DCC): Fixed for the new scheme, simplified. + * (erc-dcc-do-CHAT-command): Ditto. + * (erc-dcc-do-CLOSE-command): Ditto. + * (erc-dcc-do-LIST-command): Ditto. + +2003-01-15 Damien Elmes + + * erc.el 1.441: + erc-error-face: setting a background doesn't work so well with multi-line + messages, so we don't. fg colour is negotiable ;-) + (erc-cmd-QUERY): fixed, new doco, supress (erc-delete-query) until we fix it + (erc-send-current-line): allow multi-line messages provided they don't start + with a slash - there's no need to prohibit them if the slash isn't the + first character + + * erc.el 1.440: * bad-syntax now reports like incorrect-args + * bunch of extra cmds fixed, nick, sv etc. + + * erc.el 1.439 (erc-cmd-HELP): fixed + (erc-extract-command-from-line): when deterimining canon-defun, make sure we + have a valid symbol + (erc-cmd-KICK): fixed + + * erc.el 1.438: + * removed duplicate do-no-parse-args properties for the defaliased defuns + (erc-process-input-line): show function signature when incorrect args + (erc-extract-command-from-line): canonicalise defaliases before extracting + plist + (erc-cmd-CLEAR): fixed + (erc-cmd-UNIGNORE): fixed again + + * erc.el 1.437 (erc-cmd-SET): fixed + (erc-cmd-UNIGNORE): fixed + (erc-process-input-line): report when incorrect arguments are provided to a + command, and show the command's docstring + + * erc.el 1.436 (erc-cmd-APPENDTOPIC): fixed + (erc-process-input-line): more informative error message than 'bad syntax' + +2003-01-15 Mario Lang + + * erc.el 1.435: * (erc-cmd-IGNORE): fixed + + * erc.el 1.434: * (erc-cmd-NAMES): fixed + + * erc.el 1.433: + * (erc-cmd-CLEARTOPIC): Simplify, fix doc, make interactive + +2003-01-15 Damien Elmes + + * erc.el 1.432 (erc-cmd-JOIN): + correct invite behavior, and document it. + +2003-01-15 Mario Lang + + * erc.el 1.431: * (erc-cmd-PART): Put 'do-not-parse-args t + +2003-01-15 Damien Elmes + + * erc.el 1.430 (erc-cmd-JOIN): new cmd argument syntax + (erc-process-input-line): check if (erc-extract-command-from-line) returned a + list, and apply if that's the case + + * erc.el 1.429: + erc-cmd-*: remove optional force and references to `force' in the code + (erc-cmd-AMSG): call erc-trim-string, not trim-string + +2003-01-15 Mario Lang + + * erc.el 1.428: + * (erc-cmd-CLEARTOPIC): LINE is now ARGS and already parsed. + Set erc-cmd-TOPIC to 'do-not-parse-args for now. + (comment: I think we should have 'first, so that only first word is parsed... + Or we could autodetect erc-channel-p in the parser before that somehow...) + + * erc.el 1.427: * (erc-cmd-OP): LINE is PEOPLE now, and already parsed. + + * erc-notify.el 1.15: + * (erc-cmd-NOTIFY): Arg LINE is now ARGS, and already parsed. + +2003-01-15 Jorgen Schaefer + + * erc-stamp.el 1.25 (erc-insert-timestamp-right): + Prefer erc-fill-column to window-width, + because on wide screens the timestamp could wander off too far to the + right. + +2003-01-15 Mario Lang + + * erc.el 1.426: This is the "everything is suddenly broken!" release + You know, this is CVS, you can still go back, and wait until the transition + is finished, but here is patch one, which basicly breaks every command + which is typed on the prompt. + Hit me, we can still revert, but something needs to be done about this. + * (erc-extract-command-from-line): intern-soft the function here. + If the function symbol has a property 'do-not-parse-args, operate as before, + otherwise, split the arguments prior to calling the command handler. + * (erc-process-input-line): Updated to accomodate the change above. + * (erc-send-distinguish-noncommands): Ditto. + * (erc-cmd-NAMES): Ditto. + * (erc-cmd-ME): Put 'do-not-parse-args property. + + * erc-dcc.el 1.59:nick: * erc-dcc.el 1.59: * erc-dcc-list: Renamed + * (erc-dcc-member). Treat :nick as either a nick!user@host or nick, + do appropriate comparisons, simplified. + * (erc-dcc-list-add): New functions + various callers of (cons (list ...) erc-dcc-list) updated. + Other stuff I'm to bored to document now + +2003-01-15 Jorgen Schaefer + + * erc-stamp.el 1.24 (erc-insert-timestamp-right): + Removed redundant code that overrid the + window-width. Now substracts (length string) from every found + indentation positions. + +2003-01-14 Mario Lang + + * erc.el 1.425: + * (erc-cmd-AMSG): Remove useless call to erc-display-message. + + * erc-dcc.el 1.58: + * erc-dcc-chat/send-request: New variables, control how to treat + incoming dcc chat or send requests. Can be set to 'ask, which behaves + like it did before, 'auto, which accepts automatically, and + 'ignore, which ignores those type of requests completely. + * (erc-cmd-CREQ): New user-level command. + * (erc-cmd-SREQ): Ditto. + + * erc.el 1.424: * (erc-cmd-AMSG). New command. + + * erc-xdcc.el 1.4: * (erc-xdcc): delete empty strings from ARGS + + * erc-dcc.el 1.57: * erc-dcc-ipv4-regexp: New constant + * (erc-ip-to-decimal): Use it. + * erc-dcc-host:valid-regexp erc-dcc-ipv4-regexp: * erc-dcc-host: :type + * (pcomplete/erc-mode/DCC): Add completion for GET and CLOSE. + * Some docstring/comment fixes. + + * erc-stamp.el 1.23: + * (erc-insert-timestamp-right): Subtract (length string) from + POS in any case, otherwise, linewrap occurs. + + * erc-dcc.el 1.56: + * Fixed the unibyte-multibyte problem (now a dcc get buffer is (set-buffer-multibyte nil), + and saves correctly (tried with 21.3.50). Thanks to Eli for suggesting it! + * Added :start-time plist property/value to GET handling so that we can calculate elapsed-time. + * Some (unwind-protect (progn (set-buffer ...) ...)) constructs replaced with (with-current-buffer ...) + +2003-01-13 Mario Lang + + * erc-xdcc.el 1.3: + * erc-xdcc-help-text: New variable which makes replies to the originator + much more flexible. + * erc-xdcc-help-format: Removed. + * (erc-xdcc-help): Handle the new variable. + * (erc-xdcc): Simplified + + * erc-xdcc.el 1.2: * erc-xdcc-handler-alist: New variable. + * (erc-xdcc): Move code for list and send sub-commands into + * (erc-xdcc-help): New function. + * (erc-xdcc-list): New function. + * (erc-xdcc-send): New function. + +2003-01-12 Jorgen Schaefer + + * erc.el 1.423 (erc-server-JOIN): + Oops, send MODE command only when *we* joined a channel. + + * erc.el 1.422: + Fixing ERCs behavior wrt IRCnet's !channels have a different name for + JOIN than in reality (e.g. you can join !forcertest or !!forcertest + and really get to !ABCDEforcertest) + + (erc-cmd-JOIN): Removed erc-send-command MODE. + (erc-server-JOIN): Ask for MODE now. + +2003-01-12 Damien Elmes + + * erc-dcc.el 1.55: + (erc-dcc-get-filter), (erc-dcc-get-file): store size as a string, not an + integer. check size > 0 for the case where a size wasn't provided, since + string-to-int will return 0 on an empty string + +2003-01-12 Mario Lang + + * erc-dcc.el 1.54: * Use RAWFILE arg with find-file-noselect + * Fix alist/plist conversion left-over + * Add verbose-info about sending blocks. + +2003-01-11 Mario Lang + + * erc-dcc.el 1.53: * (pcomplete-erc-mode/DCC): Fixes + + * erc-xdcc.el 1.1: Initial version. + + * erc-pcomplete.el 1.16: + * (erc-pcomplete): Fix so that cycle-completion works again. + * (pcomplete-parse-erc-arguments): If there is a space after the last word + before point, we need to return a "" arg, and it's position. + + * erc-dcc.el 1.52: Fix to pcomplete/erc-mode/DCC + + * erc-dcc.el 1.51: * (pcomplete/erc-mode/DCC): New function + + * erc-dcc.el 1.50: *** empty log message *** + + * erc-dcc.el 1.49: Move code around, just basic changes + +2003-01-11 Jorgen Schaefer + + * erc-stamp.el 1.22 (erc-insert-timestamp-right): + Check wether erc-fill-column is + available before using it. Else default to fill-column or if + everything else fails, the window width of the current window. For the + fill-columns, use them directly as the starting position for the + timestamp. + +2003-01-11 Andreas Fuchs + + * erc-stamp.el 1.21: + erc-insert-timestamp-right: use correct window's window-width. If + buffer is not in a window, use erc-fill-column. + +2003-01-11 Mario Lang + + * erc-dcc.el 1.48: * erc-dcc.el 1.48: * (erc-dcc-do-LIST-command): Fix + + * erc-dcc.el 1.47: + * buffer-local variables erc-dcc-sent-marker and erc-dcc-send-confirmed marker removed + Keep This info in erc-dcc-member :sent and :confirmed plist values + * : * :buffer plist for :type 'SEND removed, since we can get this with (marker-buffer + * erc-dcc-send-connect-hook: New hook, defaults to erc-dcc-send-block and erc-dcc-send-conntected, which now prints a msg... + + * erc-dcc.el 1.46: + * (erc-dcc-chat-accept): Renamed from erc-dcc-chat. Callers updated. + * (erc-dcc-chat): Renamed from erc-dcc-chat-request. + Callers updated, and interactive form added. + * (erc-dcc-server-accept): No longer do any type-specific stuff. + * (erc-dcc-chat-sentinel): Call erc-dcc-chat-setup if event is "open from " + from here, otherwise call erc-dcc-chat-close. + + * ( + + * erc-dcc.el 1.45: *** empty log message *** + + * erc-dcc.el 1.43: Moved some functions around. + Doc string fixes. + "/dcc send nick filename" works now + +2003-01-11 Alex Schroeder + + * erc.el 1.421 (erc-send-command): Fixed flood protect message. + + * erc-button.el 1.38 (erc-button-syntax-table): Make `-' a legal nick + constituent. + +2003-01-10 Mario Lang + + * erc-dcc.el 1.42: Some more steps toward dcc send. + +2003-01-10 Francis Litterio + + * erc-notify.el 1.14 (erc-notify-timer): + Changed to make it IRC-case-insensitive when comparing nicks. + (erc-notify-JOIN): Changed to make it IRC-case-insensitive when comparing nicks. + (erc-notify-NICK): Changed to make it IRC-case-insensitive when comparing nicks. + (erc-notify-QUIT): Changed to make it IRC-case-insensitive when comparing nicks. + (erc-cmd-NOTIFY): Now "/notify -l" lists the nicks on your notify list. Now + when you remove a nick from your notify list, you no longer recieve a spurious + signoff notification for that nick. Changed to make it IRC-case-insensitive when + comparing nicks. + + * erc.el 1.420 (erc-ison-p): + Fixed so it calls erc-member-ignore-case instead of member. + + * erc.el 1.419 (erc-member-ignore-case): + New function. Just like member-ignore-case, but obeys + the IRC protocol case matching rules. + +2003-01-10 Damien Elmes + + * erc-dcc.el 1.41: + (erc-dcc-do-GET-command), (erc-dcc-get-file): use the plist syntax, this + fixes dcc get again + +2003-01-10 Jorgen Schaefer + + * erc.el 1.418: erc-complete-functions: New variable. + erc-mode-map: Bind \t to 'erc-complete-word + erc-complete-word: New function. + + * erc-pcomplete.el 1.15 (erc-pcomplete-mode): + Use new erc-complete-functions + (erc-pcomplete): Check that we're in the input line, else return nil. + + * erc-button.el 1.37 (erc-button-mode): Use new erc-complete-functions + erc-button-old-tab-command: Removed. + (erc-button-next-or-old): Removed + (erc-button-next): check that we're not in the input line, else just return nil. + +2003-01-10 Mario Lang + + * erc-dcc.el 1.40: cleanup + + * erc-dcc.el 1.39: + * (erc-dcc-chat-request): No longer use erc-send-ctcp-message. + + * erc-dcc.el 1.38: + * (erc-dcc-no-such-nick): Also call delete-process if we have a peer already + + * erc-dcc.el 1.37: + * (erc-dcc-no-such-nick): New function, server event handler for event 401. + If we send a CTCP message requesting something dcc related, we set up an + entry in erc-dcc-list before sending the request (for the server proc object + for listening conns for example). But if that nick does not exist + on that server, we now nicely cleanup erc-dcc-list again. + +2003-01-09 Mario Lang + + * erc-dcc.el 1.36: Moved code around a bit, and doc fixes + + * erc-dcc.el 1.35: *** empty log message *** + + * erc-dcc.el 1.34: Rename erc-dcc-plist to erc-dcc-list + +2003-01-09 Damien Elmes + + * erc-dcc.el 1.33 (erc-dcc-server (erc-dcc-chat-setup): + use erc's (erc-setup-buffer) to determine how to + display new DCC windows + (erc-dcc-chat-buffer-killed): buffer-local hook for DCC buffers to close the + process + (erc-dcc-chat-close): code common to a killed buffer or a disconnection from + the other side + (erc-dcc-chat-sentinel): use (erc-dcc-chat-close) + (erc-dcc-server-accept): use (erc-log) instead of (message) + + * erc.el 1.417: + (erc), (erc-setup-buffer): factor out window generation code so DCC can use + it too + + * erc-dcc.el 1.32: + (erc-dcc-do-CLOSE-command), (erc-dcc-do-LIST-command): work with erc-dcc-plist + + * erc-dcc.el 1.31: + erc-dcc-alist: became erc-dcc-plist, so we can more easily grab particular + properties + dcc catalog: unify use of DCC: and [dcc] (either's fine, but let's be + consistent) + (erc-dcc-member): takes an arbitrary list of constraints now + (erc-dcc-proc-member): removed, as (erc-dcc-member) can be used for this + (erc-dcc-do-CHAT-command): use the catalog to show the user what's going on + (erc-dcc-chat-server): removed + (erc-dcc-server): takes name sentinel and filter arguments, can be used for + both send and chat now + + .. this release means all send/get support is broken until we fix up the + things that still expect to be using an alist. this include /dcc list, /dcc + close + +2003-01-09 Francis Litterio + + * erc-ring.el 1.9 (erc-previous-command): + If you have a partially typed input line and press M-p, + you lose what you typed. Now we save it so you can come back to it. + +2003-01-09 Jorgen Schaefer + + * erc-ring.el 1.8 (erc-add-to-input-ring): s/nullp/null/ + +2003-01-09 Damien Elmes + + * erc-ring.el 1.7 (erc-add-to-input-ring): + set up the ring if it's not already setup + + * erc-dcc.el 1.30 (erc-dcc-member): case insensitive match of nicknames + (erc-dcc-do-CHAT-command): echo what we're doing (at least for now) + +2003-01-09 Mario Lang + + * erc-dcc.el 1.29: (temporarily) fix erc-process setting... + + * erc-dcc.el 1.28: * (erc-dcc-chat-send-line): Removed + + * erc.el 1.416: + Check if target is stringp (we can now also have 'dcc as value...) + + * erc-dcc.el 1.27 (erc-dcc-chat-send-input-line): + New function, used for + erc-send-input-line-function. + Use erc-send-current-line now. + + * erc-dcc.el 1.26: evt to elt... + + * erc-dcc.el 1.25: Remove () from a var (how silly!) + + * erc-dcc.el 1.24: * (erc-dcc-get-host): Use format-network-address. + * (erc-dcc-host): Change semantic. If erc-dcc-host is set, use it. + Otherwise, try to figure out the host by calling erc-dcc-get-host. + * (erc-dcc-server-port): New variable. + * erc-dcc-chat-log: Renamed to erc-dcc-server-accept + + * erc-dcc.el 1.23 (erc-dcc-do-CHAT-command): + Change arg of call to erc-dcc-chat-request from elt to nick + +2003-01-09 Francis Litterio + + * erc.el 1.415 (erc-send-current-line): + Now rejects multi-line commands (i.e., lines that + start with "/" and contain newlines). + +2003-01-09 Jorgen Schaefer + + * erc-button.el 1.36: + Functionality to use TAB to jump to the next button: + + (erc-button-next-or-old): New function. + (erc-button-next): New function. + erc-button-keymap: added erc-button-next + erc-button-old-tab-command: New variable. + define-erc-module button: Add and remove 'erc-button-next-or-old as + appropriate. + +2003-01-09 Francis Litterio + + * erc.el 1.414: + New variable: erc-auto-reconnect (defaults to t). If non-nil, ERC will + automatically reconnect to a server after an unexpected disconnection. + (erc-process-sentinel): Changed to refer to variable erc-auto-reconnect. + +2003-01-08 Mario Lang + + * erc.el 1.413: + * erc-send-input-line-function: New variable, used for dispatch... + +2003-01-08 Damien Elmes + + * erc-dcc.el 1.22 (erc-dcc-chat-sentinel): + check event type before killing process + (erc-dcc-chat-log): new, handles the setup of dcc chats for incoming + connections + (erc-dcc-chat): use (erc-dcc-chat-setup) + (erc-dcc-chat-setup): code common to incoming and outgoing DCC chats + (erc-dcc-chat-request): request a DCC chat with another user + (erc-dcc-proc-member): locate a member in erc-dcc-alist by process + + The very first ERC to ERC DCC chat was held between delysid and resolve today! + +2003-01-08 Mario Lang + + * erc-track.el 1.44 (erc-all-buffer-names): + Check for erc-dcc-chat-mode too + +2003-01-08 Francis Litterio + + * erc-ring.el 1.6, erc.el 1.412 (erc-kill-input): + Resets erc-input-ring-index to nil, so that invoking this + command conceptually puts you after your most recent input in the input + history. + (erc-previous-command and erc-next-command): Changed so that history movement + is more intuitive. Also preserves the blank input line that marks the + place after the newest command in the history ring (i.e., you'll see a + blank command once every trip around the ring in either direction). + +2003-01-08 Mario Lang + + * erc-dcc.el 1.21 (erc-dcc-chat): Add docstring + Add self-test. + Fix error if /dcc chat nick doesnt find the nick + +2003-01-08 Francis Litterio + + * Makefile 1.12: + Changed so that "make" works correctly under Cygwin. Before this change, the + pathname passed to Emacs on the command line under Cygwin had the form + "/cygwin/c/...", which prevented emacs from finding the file. Now the pathname + has the form "c:/...". This works for any drive letter. + +2003-01-08 Mario Lang + + * erc-button.el 1.35: reindent some code, and add TODO to comments + + * erc-dcc.el 1.20: *** empty log message *** + + * erc-dcc.el 1.19: Make dcc-chat-ended a notice + Remove now bogus comment + +2003-01-08 Damien Elmes + + * erc-dcc.el 1.18 (erc-pack-int): from erc-packed-int + (erc-unpack-int): new + + * erc-dcc.el 1.17 (erc-unpack-str): added + +2003-01-08 Mario Lang + + * erc.el 1.411 (erc-server-482): + New handler, handles KICK reply if you're not channel-op + + * erc-dcc.el 1.16: Document SEND in erc-dcc-alist. + Move sproc, parent-proc and file into erc-dcc-alist + + * erc-dcc.el 1.15: stubs + + * erc-dcc.el 1.14 (erc-dcc-get-host): + Change :iface to :local since Kim committed it now to CVS emacs + + * erc-dcc.el 1.13 (erc-dcc-get-host): + New function, requires the not-yet-in-CVS-emacs local-address.patch to process.c. + Some other minor additions + +2003-01-08 Francis Litterio + + * erc.el 1.410 (erc-cmd-IGNORE): + Now returns t to prevent "Bad syntax" error. + (erc-cmd-UNIGNORE): Now returns t to prevent "Bad syntax" error. + (erc-server-PRIVMSG-or-NOTICE): Capitalized first word in message to user. + + * erc.el 1.409 (erc-scroll-to-bottom): + Temporarilly bind resize-mini-windows to nil so that + users who have it set to a non-nil value will not suffer from premature + minibuffer shrinkage due to the below recenter call. I have no idea why + this works, but it solves the problem, and has no negative side effects. + +2003-01-07 Jorgen Schaefer + + * erc-dcc.el 1.12: + erc-dcc-ctcp-query-chat-regexp: The IP is not really an IP, but a + number (no . allowed there). + (erc-dcc-send-ctcp-string): use let* here to avoid cluttering up the + match data. + Also, use erc-decimal-to-ip to get the IP. + (erc-ip-to-decimal): Removed some pasted ERC timestamps + (erc-decimal-to-ip): New function. + erc-dcc-chat-mode-map: Return map in the initialization. + +2003-01-07 Francis Litterio + + * erc-match.el 1.19 (erc-match-fool-p): + Changed to call erc-match-directed-at-fool-p instead of + erc-directed-at-fool-p. + +2003-01-07 Mario Lang + + * erc-dcc.el 1.11 (erc-cmd-DCC): + Change (cond ... (t nil)) to (when ...) + + * erc-dcc.el 1.10: Use erc-current-nick-p + +2003-01-07 Jorgen Schaefer + + * erc.el 1.408: + erc-join-buffer: Added 'window-noselect to docstring and :type. + erc-auto-query: Added 'window-noselect to :type. + (erc): Treat erc-join-buffer being 'window-noselect appropriately. + + * erc.el 1.407 (erc-current-nick-p): New function. + (erc-nick-equal-p): New function. + (erc-already-logged-in), (erc-server-JOIN), (erc-auto-query), + (erc-server-PRIVMSG-or-NOTICE): Use erc-current-nick-p. + (erc-update-channel-member): Use erc-nick-equal-p. + + * erc-match.el 1.18 (erc-match-current-nick-p): + Renamed from erc-current-nick-p + (erc-match-pal-p): Renamed from erc-pal-p + (erc-match-fool-p): Renamed from erc-fool-p + (erc-match-keyword-p): Renamed from erc-keyword-p + (erc-match-dangerous-host-p): Renamed from erc-dangerous-host-p + (erc-match-directed-at-fool-p): Renamed from erc-directed-at-fool-p + (erc-match-message): Use erc-match-TYPE-p instead of erc-TYPE-p + + * erc.el 1.406: + Support for IRCnets' "nick/channel temporarily unavailable" + + (erc-nickname-in-use): New function (mostly copied from erc-server-433). + (erc-server-433): Use erc-nickname-in-use + (erc-server-437): New function. + erc-server-hook-list: Added (437 erc-server-437). + +2003-01-07 Mario Lang + + * erc-fill.el 1.21: Add autoload cookie + + * erc-notify.el 1.13: + Now also pass SERVER argument to signon/off hooks, and provide a erc-notify-signon/off function for echo-area printing + + * erc-notify.el 1.12 (erc-notiy-QUIT): + Change use of delq to delete, delq does not work with strings + +2003-01-06 Jorgen Schaefer + + * erc.el 1.405 (erc-ctcp-query-VERSION): + v%s -> %s, so we are no longer vVersion... + +2003-01-06 Mario Lang + + * erc.el 1.404: Small change to erc-ison-p, and fixme tag + +2003-01-06 Francis Litterio + + * erc.el 1.403 (erc): + Fixed bug where variable "away" would be nil in new channel buffers + even if the user is away when joining the channel. + (erc-strip-controls): Fixed a bug where erc-strip-controls accidentally + removed all text properties from the string. + +2003-01-06 Mario Lang + + * erc-dcc.el 1.9: + Some stub functions, some code, nothing really works yet + + * erc.el 1.402 (erc-ison-p): New function + + * erc-dcc.el 1.8: Some functions which will be needed for dcc send + + * erc-dcc.el 1.7 (erc-ip-address-to-decimal): + New function, thanks lawrence + + * erc-dcc.el 1.6: Again, simplify code, fix stuff, DCC CHAT works now + + * erc-dcc.el 1.5: Many fixes, chat nearly works now + + * erc-netsplit.el 1.7: Also detect fast netsplit/joins + + * erc-dcc.el 1.4: some more fixes + + * erc-dcc.el 1.3: Fixup stage 1, now dcc get works + + * erc-dcc.el 1.2: make /dcc LIST work + + * erc-dcc.el 1.1: + Initial checkin, dont use it! its really far from complete. Hackers: help! + + * erc-notify.el 1.11: + New function erc-notify-NICK, and added signon/off hooks which were missing + +2003-01-05 Jorgen Schaefer + + * erc.el 1.401 (erc-truncate-buffer-to-size): + set inhibit-read-only to t for the + deletion. This is usually done by the function calling the hook, but + not if it's called interactively. Also, rewrote some weird if/if + combination. + + * erc-track.el 1.43 (erc-track-shortennames): + Documentation fix (erc-all-buffers is really + erc-all-buffer-names) + + These changes make server buffers be tracked as well, as there are + quite a few interesting things going on there (e.g. CTCP etc.) + (erc-all-buffer-names): Check for (eq major-mode 'erc-mode) instead of + erc-default-recipients. + (erc-track-modified-channels): Don't require a default target (e.g., + this-channel being non-nil) + +2003-01-03 Damien Elmes + + * erc.el 1.400: + erc-auto-query: can now be set to a symbol to control how new messages should + be popped up (or not popped up, as the case may be) + (erc-query): new function which handles the bulk of what (erc-cmd-QUERY) did + previously + (erc-cmd-QUERY): use (erc-query) + (erc-auto-query): use (erc-query) + + * erc.el 1.399 (erc-current-logfile): + Downcase result of log generation function, as IRC is + case insensitive. Fixes problems where "/query user" results in a different + log file to a query from "User". Avoided adding an extra flag to control this + behavior - if you think this was the wrong decision, please correct it and + I'll remember it for next time. + +See ChangeLog.2002 for earlier changes. + + Copyright (C) 2003 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: 808865e1-3cce-4c5b-9997-95a8b7a9d384 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog.2004 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.2004 Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,2080 @@ +2004-12-29 Francis Litterio + + * erc-goodies.el (erc-interpret-controls-p): Changed docstring to + reflect the new meaning if this is set to 'remove. + (erc-controls-interpret): Rephrased docstring to be more accurate. + (erc-controls-strip): New function that behaves like the + recently-removed erc-strip-controls -- it removes all IRC color + and highlighting control characters. + (erc-controls-highlight): Changed to support the new 'remove value + that variable erc-interpret-controls-p might have. + +2004-12-28 Francis Litterio + + * erc-ibuffer.el, erc-list.el, erc-page.el, erc-speedbar.el: + Changed all calls to erc-interpret-controls (which no longer + exists) to call erc-controls-interpret (the new name of the same + function). + +2004-12-28 Francis Litterio + + * erc-goodies.el (erc-controls-interpret): Added this function to + replace the recently-removed erc-interpret-controls. Also added + a (require 'erc) to solve a byte-compile problem. + +2004-12-28 Francis Litterio + + * erc.el (erc-controls-interpret): Added this function to replace + the recently-removed erc-interpret-controls. + +2004-12-27 Jorgen Schaefer + + * erc-truncate.el (erc-truncate-buffer-to-size): Check for + logging even better (via lawrence). + +2004-12-26 Jorgen Schaefer + + * erc-truncate.el (erc-truncate-buffer-to-size): Much saner + logging detection (via lawrence). + +2004-12-25 Jorgen Schaefer + + * erc-goodies.el (erc-controls-highlight): Treat single C-c + correctly. + +2004-12-24 Jorgen Schaefer + + * erc-goodies.el, erc.el: Deleted IRC control character processing + and implemented a sane version in erc-goodies.el as a module. + + * erc.el (erc-merge-controls, erc-interpret-controls, + erc-decode-controls, erc-strip-controls, erc-make-property-list, + erc-prepend-properties): Removed. + + (erc-interpret-controls-p, erc-interpret-mirc-color, erc-bold-face + erc-inverse-face, erc-underline-face, fg:erc-color-face0, + fg:erc-color-face1, fg:erc-color-face2, fg:erc-color-face3, + fg:erc-color-face4, fg:erc-color-face5, fg:erc-color-face6, + fg:erc-color-face7, fg:erc-color-face8, fg:erc-color-face9, + fg:erc-color-face10, fg:erc-color-face11, fg:erc-color-face2, + fg:erc-color-face13, fg:erc-color-face14, fg:erc-color-face15, + bg:erc-color-face1, bg:erc-color-face2, bg:erc-color-face3, + bg:erc-color-face4, bg:erc-color-face5, bg:erc-color-face6, + bg:erc-color-face7, bg:erc-color-face8, bg:erc-color-face9, + bg:erc-color-face10, bg:erc-color-face11, bg:erc-color-face2, + bg:erc-color-face13, bg:erc-color-face14, bg:erc-color-face15, + erc-get-bg-color-face, erc-get-fg-color-face, + erc-toggle-interpret-controls): Moved. + + * erc-goodies.el (erc-beep-p, irccontrols, erc-controls-highlight, + erc-controls-propertize): New. + +2004-12-24 Jorgen Schaefer + + * erc-goodies.el, erc.el: The Small Extraction of Stuff[tm] commit. + Moved some functions from erc.el to erc-goodies.el, and + transformed them to erc modules in the process. + - imenu autoload stuff moved. I don't know why it is here at all. + - Moved: scroll-to-bottom, make-read-only, distinguish-noncommands, + smiley, unmorse, erc-occur (the last isn't a module, but still + moved) + (erc-input-line-position, erc-add-scroll-to-bottom, + erc-scroll-to-bottom, erc-make-read-only, erc-noncommands-list, + erc-send-distinguish-noncommands, erc-smiley, erc-unmorse, + erc-occur): Moved from erc.el to erc-goodies.el. + (smiley): Module moved from erc.el to erc-goodies.el. + (scrolltobottom, readonly, noncommands, unmorse): New modules. + +2004-12-20 Diane Murray + + * erc.el: (erc-format-away-status): Use `a', not `away' - that's + why it's there. + (erc-update-mode-line-buffer): The values of `mode-line-process' + and `mode-line-buffer-identification' are normally lists. + Conform. + +2004-12-18 Jorgen Schaefer + + * erc.el: (erc-process-ctcp-query, erc-process-ctcp-reply): Display + message in the active window, not the server window. + +2004-12-16 Edward O'Connor + + * erc-track.el (erc-track-position-in-mode-line): Check for + 'erc-track-mode variable with boundp. From Adrian Aichner + . + +2004-12-16 Jorgen Schaefer + + * erc.el (erc-upcase-first-word): New function. The old way used + in erc-send-ctcp-message would eat consecutive whitespace etc. + (erc-send-ctcp-message, erc-send-ctcp-notice): Use it. + +2004-12-15 Edward O'Connor + + * erc.el (erc-send-ctcp-message): Fix braino with my previous + patch. It always helps to C-x C-s before `cvs commit'. + +2004-12-15 Edward O'Connor + + * erc.el (erc-send-ctcp-message): Only upcase the ctcp command, + and not the entire message. Revision 1.707 had broken /me. + Shouting is bad! :) + +2004-12-14 Diane Murray + + * erc-nets.el (erc-networks-alist): Change undernet to Undernet as + is used in `erc-server-alist', so that completion works when using + `erc-server-select'. This should fix Debian bug #282003 (erc: + cannot connect to Undernet). + +2004-12-14 Diane Murray + + * erc-backend.el: (def-edebug-spec): Only run this if 'edebug is + available. + +2004-12-14 Diane Murray + + * erc.el: The last change to `erc-mode-line-format' introduced a + bug in Xemacs - it can't handle the #(" "...) strings at all. The + following changes fix the bug and simplify the mode-line handling + considerably. (erc-mode-line-format): Now defined as a string + which will be formatted using `format-spec' and take the place of + `mode-line-buffer-identification' in the mode line. + (erc-header-line-format): Now defined as a string to be formatted + using `format-spec'. + (erc-prepare-mode-line-format): Removed. + (erc-format-target, erc-format-target-and/or-server, + erc-format-away-status, erc-format-channel-modes): New functions. + Basically the old `erc-prepare-mode-line-format' split apart. + (erc-update-mode-line-buffer): Set + `mode-line-buffer-identification' to the formatted + `erc-mode-line-format', set `mode-line-process' to ": CLOSED" if + the connection has been terminated, and set `header-line-format' + (if it is bound) to the formatted `erc-header-line-format', then + do a `force-mode-line-update'. + +2004-12-12 Diane Murray + + * erc.el (erc-modules): Disable modules removed with `customize'. + (erc-update-modules): Try to give a more descriptive error + message. + +2004-12-12 Diane Murray + + * erc-complete.el, erc.el, erc-list.el, erc-nets.el, + erc-nicklist.el, erc-pcomplete.el, erc-replace.el, erc-speak.el, + erc-truncate.el: (erc-buffers, erc-coding-systems, erc-display, + erc-mode-line-and-header, erc-ignore, erc-query, + erc-quit-and-part, erc-paranoia, erc-scripts, erc-old-complete, + erc-list, erc-networks, erc-nicklist, erc-pcomplete, erc-replace, + erc-truncate): New customization groups. (erc-join-buffer, + erc-frame-alist, erc-frame-dedicated-flag, erc-reuse-buffers): Use + 'erc-buffers as `:group'. (erc-default-coding-system, + erc-encoding-coding-alist): Use 'erc-coding-systems as `:group'. + (erc-hide-prompt, erc-show-my-nick, erc-prompt, + erc-input-line-position, erc-command-indicator, erc-notice-prefix, + erc-notice-highlight-type, erc-interpret-controls-p, + erc-interpret-mirc-color, erc-minibuffer-notice, + erc-format-nick-function): Use 'erc-display as `:group'. + (erc-mode-line-format, erc-header-line-format, + erc-header-line-uses-help-echo-p, erc-common-server-suffixes, + erc-mode-line-away-status-format): Use 'erc-mode-line-and-header + as `:group'. + (erc-hide-list, erc-ignore-list, erc-ignore-reply-list, + erc-minibuffer-ignored): Use 'erc-ignore as `:group'. + (erc-auto-query, erc-query-on-unjoined-chan-privmsg, + erc-format-query-as-channel-p): Use 'erc-query as `:group'. + (erc-kill-buffer-on-part, erc-kill-queries-on-quit, + erc-kill-server-buffer-on-quit, erc-quit-reason-various-alist, + erc-part-reason-various-alist, erc-quit-reason, erc-part-reason): + Use 'erc-quit-and-part as `:group'. + (erc-verbose-server-ping, erc-paranoid, erc-disable-ctcp-replies, + erc-anonymous-login, erc-show-channel-key-p): Use 'erc-paranoia as + `:group'. + (erc-startup-file-list, erc-script-path, erc-script-echo): Use + 'erc-scripts as `:group'. + (erc-nick-completion, erc-nick-completion-ignore-case, + erc-nick-completion-postfix): Use 'erc-old-complete as `:group'. + (erc-chanlist-progress-message, erc-no-list-networks, + erc-chanlist-frame-parameters, erc-chanlist-hide-modeline, + erc-chanlist-mode-hook): Use 'erc-list as `:group'. + (erc-server-alist, erc-networks-alist): Use 'erc-networks as + `:group'. + (erc-settings): Use `defvar' instead of `defcustom' since this is + only a draft which doesn't work. + (erc-nicklist-window-size): Use 'erc-nicklist as `:group'. + (erc-pcomplete-nick-postfix, + erc-pcomplete-order-nickname-completions): Use 'erc-pcomplete as + `:group'. + (erc-replace-alist): Use 'erc-replace as `:group'. + (erc-speak-filter-timestamp): Use 'erc-speak as `:group'. + (erc-max-buffer-size): Use 'erc-truncate as `:group'. + +2004-12-12 Jorgen Schaefer + + * erc.el (erc-scroll-to-bottom): Go to the end of the buffer + before recentering. This allows editing multiple lines more + conveniently in CVS Emacs. This also undos a change by antifuchs + who said this goto-char would mess up redisplay. Extensive testing + couldn't reproduce that problem. + +2004-12-12 Brian Palmer + + * erc.el (erc-send-ctcp-message): upcase the ctcp message (so that + version becomes VERSION, for example). + (erc-iswitchb): Make the argument optional in non-interactive + invocation, so erc-iswitchb can be substituted directly for + iswitchb in code. + +2004-12-11 Diane Murray + + * erc-track.el (erc-track-position-in-mode-line): Allow for the + fact that `erc-track-mode' isn't bound when file is loaded. + +2004-12-11 Diane Murray + + * erc-track.el (erc-track-position-in-mode-line): New customizable + variable. (erc-track-remove-from-mode-line): New function. + Remove `erc-modified-channels-string' from the mode-line. + (erc-track-add-to-mode-line): New function. Add + `erc-modified-channels-string' to the mode-line using the value of + `erc-track-position-in-mode-line' to determine whether to add it + to the beginning or the end of `mode-line-modes' (only available + with GNU Emacs versions above 21.3) or to the end of + `global-mode-string'. + (erc-track-mode, erc-track-when-inactive-mode): Use the new + functions. + +2004-12-11 Jorgen Schaefer + + * erc.el: (erc-cmd-BANLIST): Use (buffer-name) and not + (erc-default-target) for the buffer name - buffer names are case + sensitive. + +2004-12-11 Brian Palmer + + * erc.el (erc-message-type): Added the message "MODE" to the known + erc-message-type widget, so that (for example) people can tell + erc-track-exclude-types to ignore mode changes. The others tag + also needed to be made an inline list, so that it's merged with + the given constants, instead of being inserted as a list. + +2004-12-10 Jorgen Schaefer + + * erc-track.el, erc.el: Update to get ERC look nicely in CVS Emacs. + + * erc.el (erc-mode-line-format): When on CVS emacs, use the new + format. + + * erc-track.el (track module): When on CVS emacs, modify + mode-line-modes instead of global-mode-string. The latter is way + to far too the right. + +2004-11-18 Mario Lang + + * Makefile, debian/changelog: debian release 20041118-1 + +2004-11-03 Diane Murray + + * erc-button.el (erc-button-buttonize-nicks): Set default value to + `t'. Updated documentation and customization `:type' to reflect + usage. + +2004-10-29 Johan Bockgard + + * AUTHORS: Added self. + +2004-10-17 Diane Murray + + * erc-list.el: Added local variables for this file. + (erc-list-version): New. + (erc-cmd-LIST): Take &rest rather than &optional arguments, as was + done in revision 1.21. Allow for input when called interactively. + (erc-prettify-channel-list, erc-chanlist-toggle-sort-state): Use + `unless' instead of when not. + +2004-10-17 Diane Murray + + * erc-backend.el (erc-handle-unknown-server-response): Fixed so + that the contents are only shown once. (MOTD): Display lines in + the server buffer if it's the first MOTD sent upon connection. + This is to avoid the problem of having the MOTD of one server + showing up in another server's buffer if it took a while to get + connected. + (004): Fixed to show the user modes and channel modes correctly. + (303): Now displays the nicknames returned by ISON instead of the + user's nickname. + (367, 368): Moved up into 300's section of the code. Added + documentation. Use `multiple-value-bind' to set variables in 367. + (391): Fixed so that the server name is shown correctly. + +2004-10-17 Diane Murray + + * erc.el (erc-process-sentinel): Use CPROC instead of + `erc-process' in debug message. Should fix a bug where an error + saying "Buffer *scratch* has no process" would occur when + disconnected. + (erc-cmd-SV): Check for X toolkit after checking for more specific + features. (erc--kill-server): Set `quitting' to non-nil so that + we don't automatically reconnect. + +2004-10-05 Jorgen Schaefer + + * erc.el: (erc-ignored-user-p): Don't require regexes to match the + beginning. + +2004-09-11 Jorgen Schaefer + + * erc.el: group erc: Moved to 'applications (patch by bojohan) + +2004-09-08 Jorgen Schaefer + + * erc-button.el: (erc-button-remove-old-buttons): Remove 'keymap + not 'local-map. + +2004-09-03 Jorgen Schaefer + + * erc-backend.el: JOIN response handler: Typo fix of the last + commit. + +2004-09-03 Jorgen Schaefer + + * erc-backend.el: JOIN response handler: Run `erc-join-hook' + without arguments as specified in the docstring. + +2004-08-27 Jorgen Schaefer + + * erc.el (erc-send-current-line): Removed unused variable SENTP. + +2004-08-19 Jorgen Schaefer + + * erc.el: ERC-SEND-COMPLETED-HOOK used to be run when the prompt + was already displayed. We restore this behavior (thanks to bojohan + and TerryP for noticing). We also fix the docstring of + ERC-SEND-COMPLETED-HOOK, since the hook is (and used to be) called + even if nothing was sent to the server. + (erc-send-completed-hook): Fixed docstring. + (erc-send-current-line): Add incantation for + erc-send-completed-hook. + (erc-send-input): Remove incantation for erc-send-completed-hook. + +2004-08-18 Jorgen Schaefer + + * erc-backend.el: response-handler 368: Use s368, not s367. + +2004-08-17 Jorgen Schaefer + + * erc.el (erc-scroll-to-bottom): Don't scroll when we're not + connected anymore. + +2004-08-17 Jorgen Schaefer + + * erc-backend.el, erc.el: Handle /mode #emacs b output without + errors and such. First, handle unknown format specs gracefully + (that is, give a useful error). Then, provide handlers for the + banlist replies. + + * erc-backend.el: New handler for 367 and 368. Removed from default + handler. + + * erc.el: Provide english catalog for s367 and s368. + (erc-format-message): Give an error message when we don't find an + entry. + +2004-08-17 Jorgen Schaefer + + * erc-fill.el: erc-fill-variable could be confused about really + long nicks. We put an upper limit on the length of the fill prefix. + (erc-fill-variable): Adjust fill-prefix. + erc-fill-variable-maximum-indentation: New variable. + +2004-08-17 Francis Litterio + + * erc.el (erc-send-input): Fixed a bug where this function + referenced variable "input" instead of variable "str". + +2004-08-16 Francis Litterio + + * erc-list.el (erc-chanlist-highlight-line): Fixed a bug where + this function failed to set the correct face for highlighting the + current line. + +2004-08-14 Jorgen Schaefer + + * erc-fill.el (erc-fill-variable): Don't fuck up when the + looking-at didn't work. + +2004-08-14 Jorgen Schaefer + + * erc.el (erc-send-single-line): Call the hooks to change the + appearance for something only if we actually inserted something, + doh. + (erc-display-command): Display the prompt outside of the area that + set the text properties on. + +2004-08-14 Jorgen Schaefer + + * erc.el: Refactored erc-send-current-line. This should fix some + dormant bugs, and make the whole thing actually readable. Yay. + Some changes in behavior were made. Whitespace at the end of lines + sent is not removed anymore, but that shouldn't bother anyone. + Additionally, errors in commands or hooks shouldn't prevent the + prompt from showing up again now. + (erc-parse-current-line): Removed. + (erc-send-current-line): Refactored. + (erc-send-input): New function. + (erc-send-single-line): New function. + (erc-display-command): New function. + (erc-display-msg): New function. + (erc-user-input): New function. + +2004-08-13 Jorgen Schaefer + + * erc.el (erc-cmd-SERVER): Use newer keyword call interface to + erc-select, and handle the error if it can't resolve the host. + +2004-08-11 Jorgen Schaefer + + * erc-backend.el, erc.el: erc-backend.el (404 response handler): + New function. We now support "cannot send to channel". + + * erc.el (erc-define-catalog call): Added s404. erc.el + (erc-ctcp-ECHO-reply, erc-ctcp-CLIENTINFO-reply, + erc-ctcp-FINGER-reply, erc-ctcp-PING-reply, erc-ctcp-TIME-reply, + erc-ctcp-VERSION-reply): Display reply in the active window, not + the server window. + +2004-08-10 Jorgen Schaefer + + * erc.el (erc-with-all-buffers-of-server): Actually make it left + to right, doh. + +2004-08-10 Jorgen Schaefer + + * erc.el (erc-with-all-buffers-of-server): Evaluate left-to-right + so we don't surprise a user. + +2004-08-10 Jorgen Schaefer + + * erc.el (erc-process-input-line): Parentophobia! Another + paren-fix. + +2004-08-10 Jorgen Schaefer + + * erc-backend.el: PRIVMSG NOTICE response handler: Killed one paren + too much. Poor paren. Got resurrected. + +2004-08-10 Jorgen Schaefer + + * erc-track.el: Make server buffers showing up in the mode line + optional. Thanks to Daniel Knapp on the EmacsWiki for this patch. + + erc-track-exclude-server-buffer: New variable. + (erc-track-modified-channels): Return a server buffer only if + erc-track-exclude-server-buffer is nil. + +2004-08-10 Jorgen Schaefer + + * erc.el: (erc-cmd-DESCRIBE): Don't parse arguments. + +2004-08-10 Jorgen Schaefer + + * erc-truncate.el: (erc-truncate-buffer-to-size): Use + erc-insert-marker, not (point-max), to decide the length of the + buffer. A long input line shouldn't make the buffer smaller. + +2004-08-10 Jorgen Schaefer + + * erc-macs.el, erc-members.el: The change to hashes for channel + members has been made some time ago. Clean up the various tries to + do this in the past. + + erc-macs.el: Removed. erc-members.el: Removed. + +2004-08-10 Jorgen Schaefer + + * erc-backend.el, erc-ibuffer.el, erc-members.el, erc.el: Nothing + big changed here. Really. Uhm, maybe the info-buffers are gone or + so. Can't really remember. Don't worry, nothing important is + missing. + + erc-speedbar.el looks nice btw, did you know? + + Adjusted various places in erc.el, erc-backend.el, erc-ibuffer.el + and erc-members.el - too numerous to list here, sorry. + + * erc.el: erc-use-info-buffers: Removed. erc-info-mode-map: + Removed. + (erc-info-mode): Removed. + (erc-find-channel-info-buffer): Removed. + (erc-update-channel-info-buffer): Removed. + (erc-update-channel-info-buffers): Removed. + + * erc-members.el: erc-update-member renamed to + erc-update-channel-member for better clarity. + +2004-08-10 Jorgen Schaefer + + * erc.el: This change improves the help output on a bogus command + invocation. We display the command as it would be typed by the + user, not as it is seen by Emacs. + + (erc-get-arglist): Is now called erc-function-arglist, and returns + now an arglist without the enclosing parens. + (erc-command-name): New function. + (erc-process-input-line): Pass the command name, not the function + name. + +2004-08-10 Jorgen Schaefer + + * erc.el: (erc-process-input-line): Fix bug when the command + doesn't have an arglist or no documentation. Thanks bojohan again + :) + +2004-08-10 Jorgen Schaefer + + * erc-match.el: (erc-add-entry-to-list), + (erc-remove-entry-from-list): Update docstring, a TEST argument is + not given. + +2004-08-10 Jorgen Schaefer + + * erc.el (erc-with-buffer): Really fix this docstring. + +2004-08-10 Jorgen Schaefer + + * erc.el (erc-with-buffer): Fix double evaluation in macro, and + fix docstring. + +2004-08-10 Brian Palmer + + * erc.el (erc-cmd-JOIN): Use erc-member-ignore-case instead of + member-ignore-case. + +2004-08-09 Johan Bockgard + + * erc-backend.el: Define an "Edebug specification" for the + `define-erc-response-handler' macro. This means that one can step + through response handlers defined by this macro with edebug. Maybe + more macros would benefit from this? + +2004-08-09 Johan Bockgard + + * erc-pcomplete.el (pcomplete/erc-mode/CTCP): New function. + Completion for the /CTCP command. (erc-pcomplete-ctcp-commands): + New variable. List of ctcp commands. + +2004-08-09 Johan Bockgard + + * erc-list.el: Clean up docstrings. + (erc-prettify-channel-list): Extend properties to cover the entire + line, including the newline, to make it look + better. + (erc-chanlist-highlight-line): Ditto. + (erc-chanlist-mode-hook): Make it a defcustom. + +2004-08-09 Jorgen Schaefer + + * erc.el (erc-compute-full-name): Typo fix, should be full-name, + not name. + +2004-08-09 Jorgen Schaefer + + * erc.el (erc): Setup the buffer to be shown in a window at the + end of this function. This enables 'window-noselect to work + properly. + (erc, erc-send-current-line): Fix some + goto-char/open-line/goto-char to goto-char/insert. + +2004-08-08 Jorgen Schaefer + + * erc.el (erc-parse-user): Live with bogus info from bouncers. + +2004-07-31 Brian Palmer + + * erc.el (erc-select): Change the docstring to reflect the new + arguments; include the arguments in the docstring for non-cvs + emacs. Change the parameters to call erc-compute-* instead of + using the erc-* variables directly. + (erc-compute-server): Made argument optional. + (erc-compute-nick): ditto. + (erc-compute-full-name): ditto. (erc-compute-port): ditto. + +2004-07-30 Francis Litterio + + * erc.el: (erc-cmd-BANLIST): Fixed a bug where channel-banlist was + not reset to nil before fetching an updated banlist from the + server. + +2004-07-30 Francis Litterio + + * erc.el: (erc-cmd-BANLIST): Fixed a bug where the + 'received-from-server property on variable channel-banlist was not + being reset to nil. This fixes the symptom where one types + /BANLIST and sees "No bans for channel: #whatever" when you know + there are bans. + +2004-07-23 Brian Palmer + + * erc.el: (erc-select-read-args): Use erc-compute-nick to + calculate the default nickname + +2004-07-20 Brian Palmer + + * erc.el: (erc-process-sentinel-1): New function. This is an + auxiliary function refactored out of erc-process-sentinel to + decide a server buffer's fate (whether it should be killed, and + whether erc should attempt to auto-reconnect). Michael Olson + helped with this. + (erc-kill-server-buffer-on-quit): New variable. Used in + erc-process-sentinel-1 to decide whether to kill a server buffer + when the user quit normally. + (erc-process-sentinel): Auxiliary function erc-process-sentinel-1 + split out. The function body has `with-current-buffer' wrapped + around it, to ensure separation of messages if multiple + connections were being made. Use `if' instead of `cond' in places + where the decision is binary. The last (useless, since the server + connection is closed) prompt in the server buffer is removed. + Color "erc terminated" and "erc finished" messages with + erc-error-face. Mark the buffer unmodified so that, if not killed + automatically, the user is not prompted to save it. + +2004-07-16 Brian Palmer + + * erc.el (erc-select-read-args): New function. Prompts the user + for arguments to pass to erc-select and erc-select-ssl. + (erc-select): Use (erc-select-read-args) when called interactively + to get its arguments. When non-interactively, use keyword + arguments. + (erc-select-ssl): Ditto. + (erc-compute-port): New function. Parallel to erc-compute-server, + but comes up with a default value for an IRC server's port. + +2004-07-16 Jorgen Schaefer + + * erc-match.el (erc-match-message): Quote the current nickname. + +2004-07-12 Brian Palmer + + * erc-list.el (erc-chanlist-mode): Remove explicit invocation of + erc-chanlist-mode-hook, since it's automatically invoked by + define-derived-mode + +2004-07-03 Jorgen Schaefer + + * erc-match.el (erc-match-current-nick-p): Quote current nick for + regexp parsing. + +2004-06-27 Johan Bockgard + + * erc-nickserv.el (erc-nickserv-identify-mode): Fix erroneous + parentheses in call to `completing-read'. + +2004-06-23 Alex Schroeder + + * Makefile (release): Depend on autoloads, and copy erc-auto.el + into the tarball. + +2004-06-14 Francis Litterio + + * erc.el (erc-log-irc-protocol): Fixed minor bug where each line + received from a server was logged as two lines (one with text and + one blank). + +2004-06-08 Brian Palmer + + * erc-list.el (erc-chanlist-frame-parameters): Made customizable. + (erc-chanlist-header-face): Changed to use defface with some + reasonable defaults instead of make-face, and removed the + associated -face variable. + (erc-chanlist-odd-line-face): Ditto. + (erc-chanlist-even-line-face): Ditto. + (erc-chanlist-highlight-face): New variable. Holds a face used for + highlighting the current line. + (erc-cmd-LIST): Use erc-member-ignore-case instead of + member-ignore-case. + (erc-chanlist-post-command-hook): Change to move the highlight + overlay instead of refontifying the entire buffer. + (erc-chanlist-dehighlight-line): Added to detach the highlight + overlay from the buffer. + +2004-05-31 Jorgen Schaefer + + * erc.el: erc-mode-line-format: Add column numbers. + +2004-05-31 Adrian Aichner + + * erc-autojoin.el: Typo fix. + + * erc-dcc.el (erc-dcc-do-GET-command): Use expand-file-name. + (erc-dcc-get-file): XEmacs set-buffer-multibyte compatibility. + + * erc-log.el: Append `erc-log-setup-logging' to + `erc-connect-pre-hook' so that `erc-initialize-log-marker' is run + first (markers are needed by `erc-log-setup-logging'). + (erc-enable-logging): Docstring fix. + (erc-log-setup-logging): Move `erc-log-insert-log-on-open' to (1- + (point-max)) when doing `erc-log-insert-log-on-open'. Modified + version of a patch by Lawrence Mitchell. + (erc-log-all-but-server-buffers): Do `save-excursion' as well. + (erc-current-logfile): Pass buffer name as target + argument to `erc-generate-log-file-name-function' if + `erc-default-target' is nil. + (erc-generate-log-file-name-with-date): Use expand-file-name. + (erc-generate-log-file-name-short): Ditto. + (erc-save-buffer-in-logs): Do `save-excursion' and test whether + erc-last-saved-position is a marker. + + * erc-members.el: Avoid miscompiling macro `erc-log' and + `with-erc-channel-buffer' by requiring 'erc at compile time. + + * erc-sound.el: Use expand-file-name. + + * erc.el (erc-debug-log-file): Ditto. + (erc-find-file): Ditto. + +2004-05-26 Francis Litterio + + * erc.el, erc-backend.el (erc-cmd-BANLIST): Added a missing "'" + that was preventing /BANLIST from working. In erc-backend.el, + added server repsonse handler for 367 and 368 reponses to get + /BANLIST working. + +2004-05-26 Francis Litterio + + * erc.el: Removed an eval-when-compile that was preventing the + byte-compiled version of this file from loading. + +2004-05-26 Francis Litterio + + * erc.el: Undid part of my last change. I suspect it was wrong. + +2004-05-26 Francis Litterio + + * erc.el: Silenced several byte-compiler warnings. + +2004-05-26 Francis Litterio + + * erc.el (erc-log-irc-protocol): Fixed problem where this function + misformatted IRC protocol text if multiple lines were received from + the server at one time. + +2004-05-25 Francis Litterio + + * erc.el (erc-toggle-debug-irc-protocol): Cosmetic changes to the + informational text in the *erc-protocol* buffer. + +2004-05-24 Francis Litterio + + * erc.el (erc-log-irc-protocol, erc-process-filter): Now the lines + inserted in the *erc-protocol* buffer are prefixed with the name + of the network to/from which the data is going/coming. This makes + reading the *erc-protocol* buffer much easier when connected to + multiple networks. + +2004-05-23 Jeremy Bertram Maitin-Shepard + + * erc-backend.el: Fixes server message parsing so that command + arguments specified after the colon are not treated specially. All + arguments are added to the `command-args' field, and the + `contents' points to the last element in the `command-args' list. + This allows ERC to connect to networks such as Undernet. Although + keeping `contents' allows many of the response handlers to + continue to work as-is, many other are probably broken by this + patch. + +2004-05-20 Lawrence Mitchell + + * HACKING: Add comment that C-c C-a can be useful if you write + ChangeLog entries using Emacs' standard functions. + +2004-05-17 Diane Murray + + * erc-speedbar.el: Ignore errors when attempting to require dframe + (there are a couple implementations of speedbar, one of which uses + of dframe). + (erc-speedbar-version): New. + (erc-speedbar-goto-buffer): Use dframe functions if dframe is + available. + +2004-05-17 Diane Murray + + * erc-autojoin.el: Added local variables for this file. + (erc-autojoin-add): The channel name is in `erc-response.contents'. + +2004-05-17 Mario Lang + + * erc-log.el: Dont autoload a define-key statement, erc-mode-map + might not be known yet + +2004-05-16 Lawrence Mitchell + + * erc-backend.el (erc-parse-server-response): Revert to original + `erc-parse-line-from-server' version, since new version breaks for + a number of edge cases. + +2004-05-14 Diane Murray + + * erc-backend.el (erc-handle-unknown-server-response): New + function. Added to `erc-default-server-functions'. Display + unknown responses to the user. + (221): Don't show nickname in modes list. + (254): Fixed to use 's254. + (303): Added docstring. + (315, 318, 323, 369): Ignored responses grouped together. + (391): New. + (406, 432): Use ?n, not ?c in `erc-display-message'. + (431, 445, 446, 451, 462, 463, 464, 465, 481, 483, 485, 491, 501, + 502): All error responsess with no arguments grouped together. + +2004-05-14 Diane Murray + + * erc.el (erc-message-type-member): Use `erc-response.command'. + `erc-track-exclude-types' should be respected again. + (erc-cmd-TIME): Fixed to work with and without server given as + argument. + (erc-define-catalog): Added, s391, s431, s445, s446, s451, s462, + s463, s464, s465, s483, s484, s485, s491, s501, s502. + +2004-05-14 Lawrence Mitchell + + * HACKING: Typo fix. + +2004-05-14 Lawrence Mitchell + + * Makefile (erc-auto.el): Pass -f flag to rm so that we don't fail + if erc-auto.elc doesn't exist. + +2004-05-14 Lawrence Mitchell + + * erc-backend.el (erc-with-buffer): Autoload. + (erc-parse-server-response): XEmacs' `replace-match' only replaces + subexpressions when operating on buffers, not strings, work around + it. + (461): Command with invalid arguments is `second', not `third'. + +2004-05-14 Diane Murray + + * erc-notify.el (erc-notify-NICK): Use `erc-response.contents' to + get nickname. + +2004-05-13 Lawrence Mitchell + + * erc-track.el: Indentation fixes. + (track-when-inactive): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc-notify.el (notify): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + (erc-notify-timer, erc-notify-JOIN, erc-notify-NICK) + (erc-notify-QUIT): Use new accessors for PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-nickserv.el (services, erc-nickserv-identify-mode): Use + `erc-server-FOO-functions', not `erc-server-FOO-hook. + (erc-nickserv-identify-autodetect): Use new accessors for PARSED + argument. + +2004-05-13 Lawrence Mitchell + + * erc-netsplit.el (netsplit): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + (erc-netsplit-JOIN, erc-netsplit-MODE, erc-netsplit-QUIT): Use new + accessors for PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-nets.el: Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc-menu.el (erc-menu-definition): Only allow listing of + channels if `erc-cmd-LIST' is fboundp. + +2004-05-13 Lawrence Mitchell + + * erc-match.el: Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + (erc-get-parsed-vector-nick, erc-get-parsed-vector-type): Use new + accessors for PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-list.el (erc-chanlist, erc-chanlist-322): Use new accessors + for PARSED argument. Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc-ezbounce.el (erc-ezb-notice-autodetect): Use new accessors + for PARSED argument. + (erc-ezb-initialize): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc-dcc.el: Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + (erc-dcc-no-such-nick): Use new accessors for PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-bbdb.el (erc-bbdb-whois, erc-bbdb-JOIN, erc-bbdb-NICK): Use + new accessors for PARSED argument. + (BBDB): Use `erc-server-FOO-functions', not `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc-autojoin.el (autojoin): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + (erc-autojoin-add, erc-autojoin-remove): Use new accessors for + PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-autoaway.el (autoaway): Use `erc-server-FOO-functions', not + `erc-server-FOO-hook. + +2004-05-13 Lawrence Mitchell + + * erc.el (erc-backend): Require. + (erc-disconnected-hook, erc-join-hook, erc-quit-hook) + (erc-part-hook, erc-kick-hook): Docstring fix, we now use + `erc-server-FOO-functions', rather than `erc-server-FOO-hook'. + (erc-event-to-hook-name, erc-event-to-hook): Remove. + (erc-once-with-server-event) + (erc-once-with-server-event-global): Use `erc-get-hook' + (erc-process-filter): Use `erc-parse-server-response'. + (erc-cmd-IDLE, erc-cmd-BANLIST, erc-cmd-MASSUNBAN): New accessors + for PARSED argument. Rename all `erc-server-FOO-hook' to + `erc-server-FOO-functions'. + (erc-server-364-hook, erc-server-365-hook, erc-server-367-hook) + (erc-server-368-hook, erc-server-KILL-hook) + (erc-server-PONG-hook, erc-server-200-hook, erc-server-201-hook) + (erc-server-202-hook, erc-server-203-hook, erc-server-204-hook) + (erc-server-205-hook, erc-server-206-hook, erc-server-208-hook) + (erc-server-209-hook, erc-server-211-hook, erc-server-212-hook) + (erc-server-213-hook, erc-server-214-hook, erc-server-215-hook) + (erc-server-216-hook, erc-server-217-hook, erc-server-218-hook) + (erc-server-219-hook, erc-server-241-hook, erc-server-242-hook) + (erc-server-243-hook, erc-server-244-hook, erc-server-249-hook) + (erc-server-261-hook, erc-server-262-hook, erc-server-302-hook) + (erc-server-323-hook, erc-server-342-hook, erc-server-351-hook) + (erc-server-381-hook, erc-server-382-hook, erc-server-391-hook) + (erc-server-392-hook, erc-server-393-hook, erc-server-394-hook) + (erc-server-395-hook, erc-server-402-hook, erc-server-404-hook) + (erc-server-407-hook, erc-server-409-hook, erc-server-411-hook) + (erc-server-413-hook, erc-server-414-hook, erc-server-415-hook) + (erc-server-422-hook, erc-server-423-hook, erc-server-424-hook) + (erc-server-431-hook, erc-server-436-hook, erc-server-437-hook) + (erc-server-441-hook, erc-server-443-hook, erc-server-444-hook) + (erc-server-445-hook, erc-server-446-hook, erc-server-451-hook) + (erc-server-462-hook, erc-server-463-hook, erc-server-464-hook) + (erc-server-465-hook, erc-server-467-hook, erc-server-471-hook) + (erc-server-472-hook, erc-server-473-hook, erc-server-483-hook) + (erc-server-491-hook, erc-server-502-hook): Remove. + (erc-call-hooks, erc-parse-line-from-server): Remove + (erc-server-hook-list): Remove. Remove top-level call too. + (erc-server-ERROR, erc-server-INVITE, erc-server-JOIN) + (erc-server-KICK, erc-server-MODE, erc-server-NICK) + (erc-server-PART, erc-server-PING, erc-server-PONG) + (erc-server-PRIVMSG-or-NOTICE, erc-server-QUIT) + (erc-server-TOPIC, erc-server-WALLOPS, erc-server-001) + (erc-server-004, erc-server-005, erc-server-221, erc-server-252) + (erc-server-253, erc-server-254, erc-server-301, erc-server-303) + (erc-server-305, erc-server-306, erc-server-311-or-314) + (erc-server-312, erc-server-313, erc-server-317, erc-server-319) + (erc-server-320, erc-server-321, erc-server-322, erc-server-324) + (erc-server-329, erc-server-330, erc-server-331, erc-server-332) + (erc-server-333, erc-server-341, erc-server-352, erc-server-353) + (erc-server-366, erc-server-MOTD, erc-server-379) + (erc-server-401, erc-server-403, erc-server-405, erc-server-406) + (erc-server-412, erc-server-421, erc-server-432, erc-server-433) + (erc-server-437, erc-server-442, erc-server-461, erc-server-474) + (erc-server-475, erc-server-477, erc-server-481, erc-server-482) + (erc-server-501): Move to erc-backend.el + (erc-auto-query, erc-banlist-store, erc-banlist-finished) + (erc-banlist-update, erc-connection-established) + (erc-process-ctcp-query, erc-display-server-message): Use new + accessors for PARSED argument. + +2004-05-13 Lawrence Mitchell + + * erc-backend.el: (erc-parse-server-response) + (erc-handle-parsed-server-response, erc-get-hook) + (define-erc-response-handler): New functions. + (erc-response): New struct for server responses. + (erc-server-responses): New variable. + (erc-call-hooks): Move from erc.el and rework. + (ERROR, INVITE, JOIN, KICK, MODE, NICK, PART, PING, PONG) + (PRIVMSG, NOTICE, QUIT, TOPIC, WALLOPS, 001, MOTD, 376, 004) + (252, 253, 254, 250, 301, 303, 305, 306, 311, 312, 313, 315) + (317, 318, 319, 320, 321, 322, 324, 329, 330, 331, 332, 333) + (341, 352, 353, 366, 369, 379, 401, 403, 405, 406, 412, 421) + (432, 433, 437, 442, 461, 474, 477, 481, 482, 501, 323, 221) + (002, 003, 371, 372, 374, 375, 422, 251, 255, 256, 257, 258) + (259, 265, 266, 377, 378, 314, 475, 364, 365, 367, 368, 381) + (382, 391, 392, 393, 394, 395, 200, 201, 202, 203, 204, 205) + (206, 208, 209, 211, 212, 213, 214, 215, 216, 217, 218, 219) + (241, 242, 243, 244, 249, 261, 262, 302, 342, 351, 402, 404) + (407, 409, 411, 413, 414, 415, 423, 424, 431, 436, 441, 443) + (444, 445, 446, 451, 462, 463, 464, 465, 467, 471, 472, 473) + (483, 491, 502, 005, KILL): Move from erc.el and rework using + `define-erc-response-handler' and erc-response struct. + +2004-05-12 Diane Murray + + * erc.el: A few bug fixes to avoid errors after disconnect, + including the "Selecting deleted buffer" bug. + (erc-channel-user-op-p, erc-channel-user-voice-p): Make sure NICK + is non-nil (`erc-current-nick' can return nil). + (erc-server-buffer): Make sure the buffer isn't a #. + (erc-server-buffer-live-p): New function. + (erc-display-line, erc-join-channel, erc-prepare-mode-line-format, + erc-away-p): Use `erc-server-buffer-live-p' to make sure process + buffer exists. + (erc-send-current-line): If there is no server buffer, let the + user know. + +2004-05-12 Diane Murray + + * erc.el, erc-log.el: C-c C-l keybinding now defined in + erc-log.el. + (erc-log-version): New. + (erc-cmd-JOIN): Fix applied for bug where /join -invite causes + errors when there's no `invitation'. + +2004-05-11 Diane Murray + + * erc.el: (erc-cmd-JOIN): Make sure `chnl' is non-nil before trying + to join anything (chnl is not set if /join -invite is used but + there's no `invitation'). + +2004-05-10 Diane Murray + + * erc-log.el: Define C-c C-l keybinding outside of `erc-log-mode', + making it available all the time; autoload definition. + (erc-log-version): New. + +2004-05-09 Diane Murray + + * AUTHORS, CREDITS, Makefile, erc-autoaway.el, erc-autojoin.el, + erc-button.el, erc-chess.el, erc-dcc.el, erc-ezbounce.el, + erc-fill.el, erc-ibuffer.el, erc-imenu.el, erc-lang.el, + erc-list.el, erc-log.el, erc-macs.el, erc-match.el, erc-members.el, + erc-menu.el, erc-nets.el, erc-netsplit.el, erc-nickserv.el, + erc-notify.el, erc-page.el, erc-ring.el, erc-speak.el, + erc-speedbar.el, erc-stamp.el, erc-track.el, erc-truncate.el, + erc-xdcc.el, erc.el: Applied all relevant bug fixes and code + cleanup made between the time of the ERC_4_0_RELEASE tag until now. + +2004-05-09 Diane Murray + + * erc-menu.el: Updated copyright years. + +2004-05-09 Lawrence Mitchell + + * erc.el (erc-update-channel-info-buffer): Correct bug in sorting + of channel users. Tiny change from Andreas Schwab + . + +2004-05-09 Lawrence Mitchell + + * erc-fill.el (erc-fill-variable): Fix docstring. + +2004-05-09 Lawrence Mitchell + + * erc-button.el (erc-button-add-button): Use 'keymap + text-property, rather than 'local-map, since it's cross-emacs + compatible. Pass :mouse-down-action into `widget-convert-button' + as 'erc-button-click-button, to make XEmacs happy. Replace bogus + reference to erc-widget-press-button with erc-button-press-button. + (erc-button-click-button): New (ignored) first argument, to make + XEmacs behave when pressing buttons. + (erc-button-press-button): New (ignored) &rest argument. + +2004-05-09 Adrian Aichner + + * erc-log.el (erc-conditional-save-buffer): Fix docstring + reference to erc-save-queries-on-quit. + (erc-conditional-save-queries): Ditto. + +2004-05-06 Diane Murray + + * erc-speedbar.el: Updated copyright years. Added local variables + for this file; fixed indenting. + (erc-speedbar): New group. + (erc-speedbar-sort-users-type): New variable. + (erc-speedbar-buttons): Handle query buffers (fixes a bug where an + error would be thrown if the current buffer was a query). Ignore + unknown buffers. + (erc-speedbar-expand-channel): Show limit and key with channel + modes. Sort users according to `erc-speedbar-sort-users-type'. + (erc-speedbar-insert-user): Fixed bug where only nicks with more + info were being listed, and those were shown twice. + (erc-speedbar-goto-buffer): Don't use dframe functions, as dframe + isn't available with the default speedbar. + +2004-05-06 Diane Murray + + * erc.el: (erc-sort-channel-users-alphabetically): New function. + (erc-server-412, erc-server-432, erc-server-475): New functions. + (erc-server-412-hook, erc-server-432-hook, erc-server-475-hook): + Use them. + (erc-server-401, erc-server-403, erc-server-405) + (erc-server-421, erc-server-474, erc-server-481): Use catalog + messages. + (erc-define-catalog): Added s401, s403, s405, s412, s421, s432, + s474, s475, and s481. + +2004-05-06 Diane Murray + + * erc-nickserv.el: Added documentation to Commentary, Usage. + Removed `outline-mode' from file local variables. + (erc-services-mode): Use `erc-nickserv-identify-mode' to add + hooks. + (erc-nickserv-identify-mode): New function. + (erc-nickserv-identify-mode): New variable. + (erc-prompt-for-nickserv-password, erc-nickserv-passwords): + Changed docstring. + (erc-nickserv-identify-autodetect): Use + `erc-nickserv-call-identify-function'. Docstring change. + (erc-nickserv-identify-on-connect, + erc-nickserv-identify-on-nick-change, + erc-nickserv-call-identify-function): New functions. + (erc-nickserv-identify): PASSWORD is not optional. Autoload + function. + +2004-05-05 Diane Murray + + * erc.el (erc-join-hook, erc-quit-hook, erc-part-hook, + erc-kick-hook, erc-connect-pre-hook): Now customizable. + (erc-nick-changed-functions): New hook. + (erc-server-NICK): Run `erc-nick-changed-functions' with the + arguments NEW-NICK and OLD-NICK. + (erc-channel-user-voice-p, erc-channel-user-voice-p): Shortened + docstring. + +2004-05-05 Lawrence Mitchell + + * HACKING: New section on function/variable naming and coding + conventions. + +2004-05-05 Lawrence Mitchell + + * erc.el (erc-wash-quit-reason): Quote regexp special characters + in NICK, LOGIN and HOST. + +2004-05-04 Diane Murray + + * erc.el (erc-server-parameters): Typo fix in docstring. + (erc-input-line-position): `:type' is now a choice between integer + and nil. (erc-mode-map): Bind `erc-get-channel-mode-from-keypress' + to C-c C-o instead of C-c RET (C-c C-m). (erc-cmd-GQUIT): Use + REASON as argument when calling `erc-cmd-QUIT'. + +2004-05-03 Lawrence Mitchell + + * erc-nicklist.el: Initial version. + +2004-04-28 Diane Murray + + * erc-menu.el: Added local variables for file, fixed indenting. + (erc-menu-version): New variable. + (erc-menu-definition): "List channels": New. "Join channel": Use + `erc-connected' as test. "Start a query": New. "List channel + operators": New. "Input action": Moved up. "Set topic": Fixed + test so it's only active in channels. "Leave this channel": Moved + down. "Track hidden channel buffers": Removed. "Enable/Disable + ERC Modules": New. + +2004-04-28 Diane Murray + + * erc.el (erc-mode-map): Removed binding for + `erc-save-buffer-in-logs' (moved to erc-log.el). + (erc-cmd-QUERY, erc-cmd-OPS): Now interactive. + +2004-04-28 Diane Murray + + * erc-log.el: Added local variables for this file. + (erc-log-channels-directory): Added directory as a choice in + `:type'. + (define-erc-module): Define and undefine key binding (C-c + C-l) for `erc-save-buffer-in-logs' here. + +2004-04-28 Diane Murray + + * erc-nets.el: Added local variables for this file. + (erc-networks-alist): Fixed `:type' to work better in + customization. + +2004-04-28 Diane Murray + + * erc-match.el: Added local variables for file. (erc-keywords): + Use `list' instead of `cons' in `:type'. Fixes bug where mismatch + was shown in customization. (erc-current-nick-highlight-type): + Escape parentheses in docstring. Added keyword, nick-or-keyword as + options in `:type'. + +2004-04-28 Diane Murray + + * erc-stamp.el: Added local variables for file. + (erc-away-timestamp-format): Allow nil as a choice in `:type'. + (erc-timestamp-intangible): Changed `:type' to boolean. + (erc-timestamp-right-column): Added `:group' and `:type'. + +2004-04-28 Diane Murray + + * erc.el (erc-modules): Added bbdb, log, match, sound, and stamp + as `:type' options; changed documentation for autojoin, fill, + pcomplete, track. (erc-prompt-for-channel-key): New variable. + (erc-join-channel): Only prompt for key if + `erc-prompt-for-channel-key' is non-nil. (erc-format-my-nick): New + function. (erc-send-message, erc-send-current-line): Use it. + +2004-04-24 Johan Bockgard + + * erc-track.el: (erc-track-modified-channels): Fix indentation. + +2004-04-24 Johan Bockgard + + * erc-match.el: (erc-hide-fools): Docstring fix. + (erc-log-matches-types-alist): Added `current-nick' to valid + choices. + +2004-04-20 Diane Murray + + * erc-page.el, erc-ezbounce.el, erc-speak.el, erc-match.el, + erc-track.el (erc-ezbounce, erc-page, erc-speak): Groups defined. + (erc-match, erc-track): `erc' is parent group. + (erc-ezb-regexp, erc-ezb-login-alist): Added `:group'. + +2004-04-20 Jorgen Schaefer + + * erc-fill.el: Fixed erc-fill-static so it breaks the lines at the + right column and respects timestamps. Patch by Simon Siegler + + (erc-fill-static): Major rewrite and split up into some functions. + (erc-count-lines): Removed. + (erc-fill-regarding-timestamp): New function. + (erc-timestamp-offset): New function. + (erc-restore-text-properties): New function. + (erc-fill-variable): Respect leftbound timestamp. This is still + broken if someone has both erc-timestamp-only-if-changed-flag set + and erc-insert-timestamp-function set to + 'erc-insert-timestamp-left, but otherwise it works now. + +2004-04-20 Diane Murray + + * erc.el: (erc-cmd-SV): Show features gtk, mac-carbon, multi-tty. + Fixed so that arguments fit the format (build date was not being + shown). + +2004-04-19 Lawrence Mitchell + + * erc.el: (erc-update-channel-topic); Error if `channel-topic' is + unbound. Remove %-sign substitution. + (erc-update-mode-line-buffer): Escape %-signs in `channel-topic' + here. + +2004-04-19 Diane Murray + + * erc.el: (erc-send-action, erc-ctcp-query-ACTION, + erc-ctcp-reply-ECHO-hook): Let `erc-display-message-highlight' + propertize the message. + (erc-display-message-highlight): Allow for any erc-TYPE-face. + (erc-cmd-JOIN): Display error message instead of throwing an error + if there's no `invitation'. + (erc-cmd-PART): Allow for no reason if channel is provided. Fixes + bug where user would part the current channel with the other + channel's name as reason when no reason was given. + (erc-server-vectors, erc-debug-missing-hooks): Added docstring. + (erc-server-JOIN): Moved `erc-join-hook' to JOIN-you section. + `erc-join-hook' called by `run-hook-with-args', sending the ARGS + `chnl' and the channel's buffer. Changed an instance of if + without else to when. + (erc-server-477): New function. + (erc-server-477-hook): Use `erc-server-477'. + (erc-define-catalog): Added `no-invitation'. + +2004-04-14 Diane Murray + + * erc-nickserv.el: Local variables for file added. + (erc-nickserv-passwords): Customization: Network symbols updated + to reflect `erc-nickserv-alist'. Allow user to type in network + symbol. + (erc-nickserv-alist): Now customizable variable. + +2004-04-09 Diane Murray + + * erc-autoaway.el (erc-autoaway-reset-idletime): Make sure `line' + is a string to avoid errors upon startup. + +2004-04-06 Diane Murray + + * erc-autoaway.el (erc-autoaway-version): New variable. + (erc-auto-discard-away): Updated docstring. + (erc-autoaway-no-auto-back-regexp): New variable. + (erc-autoaway-reset-idletime): Use it. Hopefully a better solution + which allows for aliases to "/away" and any other text that the + user wants to ignore when `erc-auto-discard-away' is non-nil. + +2004-04-06 Diane Murray + + * erc-autoaway.el (erc-autoaway-reset-idletime): Forgot /gaway in + regexp. + +2004-04-06 Diane Murray + + * erc-autoaway.el (erc-autoaway-reset-idletime): If the user sends + an "/away" command, don't call `erc-autoaway-set-back', fixes bug + where ERC would send "/away" when user was already away and sent an + "/away reason". Changed `l' to `line' for better understanding. + (erc-autoaway-set-back): Changed `l' to `line' for better + understanding. + +2004-04-05 Diane Murray + + * erc.el (erc-set-channel-key): Now able to remove key. + (erc-set-channel-limit): Now able to remove limit. + (erc-get-channel-mode-from-keypress): Fixed docstring. + +2004-04-04 Diane Murray + + * erc.el (erc-join-channel): Allow for optional channel key. + (erc-set-modes): Need to set `channel-key' to nil in case of mode + changes during split. + (erc-show-channel-key-p): New variable. + (erc-prepare-mode-line-format): Only show key if + `erc-show-channel-key-p' is non-nil. + +2004-04-04 Diane Murray + + * erc.el (channel-key): New variable. + (erc-update-channel-key): New function. + (erc-set-modes, erc-parse-modes, erc-update-modes, erc, + erc-update-channel-info-buffer): Deal with channel keys. + (erc-prepare-mode-line-format): Show channel key in header-line. + (erc-server-NICK): Show nick change in server buffer as well. + (erc, erc-send-command, erc-banlist-store, erc-banlist-update, + erc-load-irc-script-lines, + erc-arrange-session-in-multiple-windows, erc-handle-login, + erc-find-channel-info-buffer): Changed when not to unless. + (erc-server-MODE): Changed if without else to when. + +2004-03-27 Adrian Aichner + + * erc.el: (erc-cmd-BANLIST): Use `truncate-string-to-width' + instead of `truncate-string' alias. + (erc-nickname-in-use): Ditto. + +2004-03-27 Francis Litterio + + * erc-list.el (erc-cmd-list): Fixed error caused by erc-cmd-LIST + passing a non-sequence to erc-chanlist. + +2004-03-22 Jeremy Bertram Maitin-Shepard + + * erc.el: Add new hook `erc-join-hook', which is run when we join a + channel. + +2004-03-22 Jeremy Bertram Maitin-Shepard + + * erc.el: Replaced existing notice user notification system and + the configuration options, which consisted of + `erc-echo-notices-in-minibuffer-flag' and + `erc-echo-notices-in-current-buffer' with two new hooks, + `erc-echo-notice-hook' and `erc-echo-notice-always-hook'. + + When user notification is needed, `erc-echo-notice-always-hook' is + first run using `run-hook-with-args', then `erc-echo-notice-hook' + is run using `run-hook-with-args-until-success'. + + In addition to these hooks, a large number of functions, which are + described in the documentation strings of those hooks, were added + which can be used to achieve a large variety of different + behaviors. + + The current default behavior, which is identical to the existing + default behavior, is for `erc-echo-notice-always-hook' to be set to + `(erc-echo-notice-in-default-buffer). + +2004-03-21 Diane Murray + + * erc-track.el: (erc-modified-channels-display): Added a space + before opening bracket. + +2004-03-21 Diane Murray + + * erc.el: (erc-format-query-as-channel-p): New variable. + (erc-server-PRIVMSG-or-NOTICE): If `erc-format-query-as-channel-p' + is nil, messages in the query buffer are formatted like private + messages. + + (erc-server-252-hook, erc-server-253-hook, erc-server-254-hook, + erc-server-256-hook, erc-server-257-hook, erc-server-258-hook, + erc-server-259-hook, erc-server-371-hook, erc-server-372-hook, + erc-server-374-hook, erc-server-374-hook, erc-server-442-hook, + erc-server-477-hook): Removed, now defined in + `erc-server-hook-list'. + (erc-display-server-message): New function. + (erc-server-252, erc-server-253, erc-server-254, erc-server-442): + New functions. + (erc-server-hook-list): Added 250, 256, 257, 258, 259, 265, 266, + 377, 378, 477 - using `erc-display-server-message'. 251, 255 now + use `erc-display-server-message'. Added 252, 253, 254, 442 - + using respective erc-server-* functions. 371, 372, 374, 375 now + defined here. + (erc-define-catalog): Added s252, s253, s254, s442. + (erc-server-001, erc-server-004, erc-server-005): Fixed + documentation. + +2004-03-20 Diane Murray + + * erc-stamp.el: Commentary: Changed `erc-stamp-mode' to + `erc-timestamp-mode'. + (erc-insert-timestamp-left): Use `erc-timestamp-face' on filler + spaces as well. + +2004-03-19 Diane Murray + + * erc.el (erc-send-action): Use `erc-input-face'. + (erc-display-message-highlight): If the requested highlighting + type doesn't match, just display the string with no highlighting + and warn about it with `erc-log'.. (erc-cmd-JOIN): If user is + already on the requested channel, switch to that channel's buffer. + (erc-ctcp-query-ACTION): Use `erc-action-face' for nick as well. + (erc-header-line-use-help-echo-p): New variable. + (erc-update-mode-line-buffer): Use `help-echo' for header-line if + `erc-header-line-use-help-echo-p' is non-nil. + +2004-03-18 Adrian Aichner + + * erc-nets.el: Use two arguments version of `make-obsolete', if + third argument is not supported (for XEmacs). + +2004-03-18 Andreas Fuchs + + * CREDITS: added CREDITS entry for Adrian Aichner + +2004-03-18 Andreas Fuchs + + * erc-xdcc.el, erc.el, erc-autoaway.el, erc-autojoin.el, + erc-button.el, erc-dcc.el, erc-ezbounce.el, erc-imenu.el, + erc-list.el, erc-log.el, erc-match.el, erc-members.el, + erc-menu.el, erc-netsplit.el, erc-notify.el, erc-speedbar.el, + erc-stamp.el, erc-track.el, erc-truncate.el: + (erc-coding-sytem-for-target): Removed. + (erc-coding-system-for-target): New. + (erc-autoaway-use-emacs-idle): Typo fix. + (erc-auto-set-away): Ditto. + (erc-auto-discard-away): Ditto. + (autojoin): Ditto. + (erc-button-alist): Ditto. + (erc-dcc-auto-masks): Ditto. + (erc-dcc-chat-send-input-line): Ditto. + (erc-ezb-get-login): Ditto. + (erc-unfill-notice): Ditto. + (erc-save-buffer-in-logs): Ditto. + (match): Ditto. + (erc-log-matches-types-alist): Ditto. + (erc-match-directed-at-fool-p): Ditto. + (erc-match-message): Ditto. + (erc-update-member): Ditto. + (erc-ignored-reply-p): Ditto. + (erc-menu-definition): Ditto. + (erc-netsplit-QUIT): Ditto. + (erc-notify-list): Ditto. + (erc-speedbar-update-channel): Ditto. + (erc-speedbar-item-info): Ditto. + (erc-stamp): Ditto. + (erc-timestamp-intangible): Ditto. + (erc-add-timestamp): Ditto. + (erc-timestamp-only-if-changed-flag): Ditto. + (erc-show-timestamps): Ditto. + (erc-track-priority-faces-only): Ditto. + (erc-modified-channels-alist): Ditto. + (erc-unique-substrings): Ditto. + (erc-find-parsed-property): Ditto. + (erc-track-switch-direction): Ditto. + (erc-truncate-buffer-to-size): Ditto. + (erc-xdcc): Ditto. + (erc-auto-reconnect): Ditto. + (erc-startup-file-list): Ditto. + (erc-once-with-server-event): Ditto. + (erc-once-with-server-event-global): Ditto. + (erc-mode): Ditto. + (erc-generate-new-buffer-name): Ditto. + (erc): Ditto. + (erc-open-ssl-stream): Ditto. + (erc-default-coding-system): Ditto. + (erc-encode-string-for-target): Ditto. + (erc-decode-string-from-target): Ditto. + (erc-scroll-to-bottom): Ditto. + (erc-decode-controls): Ditto. + (erc-channel-members-changed-hook): Ditto. + (erc-put-text-property): Ditto. + (erc-add-default-channel): Ditto. + +2004-03-17 Diane Murray + + * erc.el (erc-process-sentinel): Cancel ping timer upon + disconnect. + (erc-cmd-PART): Use same regexp as `erc-cmd-QUIT' when no #channel + is provided. + (erc-nick-uniquifier, erc-manual-set-nick-on-bad-nick-p): `:group' + was missing, added. + (erc-part-reason-zippy, erc-part-reason-zippy): Removed FIXME + comments. I see no problem allowing typed in reasons. + +2004-03-16 Diane Murray + + * erc-stamp.el: (erc-insert-timestamp-left): Added support for + `erc-timestamp-only-if-changed-flag' and added docstring. + (erc-timestamp-only-if-changed-flag): Updated documentation. + +2004-03-13 Francis Litterio + + * erc-nets.el (erc-network-name): No longer marked as obsolete. + Why was this function made obsolete? There is no other function + that performs this task. Some of us use these functions in our + personal ERC configs. + +2004-03-12 Lawrence Mitchell + + * erc.el (erc-buffer-filter): Use `with-current-buffer'. + (erc-process-input-line): Append newline to documentation. Fixes a + bug whereby the prompt would be put on the same line as the output. + (erc-cmd-GQUIT): Only try and send QUIT if the process is alive. + +2004-03-12 Lawrence Mitchell + + * erc-log.el: Only add top-level hooks if `erc-enable-logging' is + non-nil. + +2004-03-10 Damien Elmes + + * erc-nets.el: From Adrian Aichner (adrian /at/ xemacs /dot/ org) + * erc-nets.el: XEmacs make-obsolete only takes two arguments. + +2004-03-10 Diane Murray + + * erc-nets.el (erc-determine-network): Use `erc-session-server' if + `erc-announced-server' is nil to avoid error if server does not + send 004 (RPL_MYINFO) message. + +2004-03-10 Lawrence Mitchell + + * erc-nets.el (erc-server-alistm erc-settings): Use lowercase + "freenode", as in `erc-networks-alist'. + +2004-03-10 Lawrence Mitchell + + * erc-nickserv.el (erc-nickserv-alist): Use lowercase "freenode", + as in `erc-networks-alist'. + +2004-03-10 Lawrence Mitchell + + * erc-dcc.el (pcomplete/erc-mode/DCC): Append "send" as a list. + +2004-03-10 Francis Litterio + + * erc-nets.el (erc-networks-alist): Changed "Freenode" to + "freenode". + +2004-03-10 Francis Litterio + + * erc-list.el (erc-cmd-LIST): Improved the docstring. Made + message to user more accurate depending on whether a single + channel is being listed or not. + +2004-03-10 Lawrence Mitchell + + * erc-nets.el (erc-determine-network): Make matching logic simpler + (suggested by Damian Elmes). + (erc-current-network, erc-network-name): Add `make-obsolete' form. + (erc-set-network-name): Indentation fix. + (erc-ports-list): Add docstring. Rework function body to use + `nconc'. + +2004-03-09 Diane Murray + + * erc-list.el, erc-notify.el: (require 'erc-nets): added + +2004-03-08 Diane Murray + + * erc.el (erc-network-name): Function definition moved to + erc-nets.el. The functions `erc-determine-network' and + `erc-network' in erc-nets.el do what this did before. Deprecated. + Use (erc-network) instead. + +2004-03-08 Diane Murray + + * erc-nickserv.el: Changed copyright notice. Now require + erc-nets. erc-nets.el now takes care of network-related functions + and variables. + (erc-nickserv-alist): Changed network symbols to match those in + `erc-networks-alist' in erc-nets.el. + (erc-nickserv-identify-autodetect): Use `erc-network'. + (erc-nickserv-identify): Use `erc-network'. Changed wording for + interactive use, now shows current nick. + (erc-networks): Removed. Use `erc-networks-alist' as defined in + erc-nets.el. + (erc-current-network): Function definition moved to erc-nets.el. + The functions `erc-determine-network' and `erc-network' in + erc-nets.el do what this did before. Deprecated. Use + (erc-network) instead. + +2004-03-08 Diane Murray + + * erc-nets.el: Added commentary, `erc-nets-version'. + (erc-server-alist): Changed Brasnet to BRASnet. + (erc-networks-alist): All networks (except EFnet and IRCnet) now + have a MATCHER. (erc-network): New variable. + (erc-determine-network): New function. Determine the network the + user is on. Use the server parameter NETWORK, if provided, else + parse the server name and search for a match (regexp and loop by + wencem) in `erc-networks-alist'. Return the name of the network + or "Unknown" as a symbol. + (erc-network): New function. Returns value of `erc-network'. Use + this when the current buffer is not the server process buffer. + (erc-current-network): Returns the value of `erc-network' as + expected by users who used the function as it was defined in + erc-nickserv.el. Deprecated. + (erc-network-name): Returns the value of `erc-network' as expected + by users who used the function as it was defined in erc.el. + Deprecated. + (erc-set-network-name): New function. Added to + `erc-server-375-hook' and `erc-server-422-hook'. + (erc-unset-network-name): New function. Added to + `erc-disconnected-hook'. + (erc-server-select): Small documentation word change. + +2004-03-07 Diane Murray + + * AUTHORS, CREDITS: disumu info updated + +2004-03-06 Lawrence Mitchell + + * erc-list.el (erc-cmd-LIST): Take &rest rather than &optional + arguments. + (erc-chanlist): Construct correct LIST command from list of + channels. + +2004-03-06 Lawrence Mitchell + + * erc.el (erc-update-mode-line-buffer): Add 'help-echo property to + header-line text. This allows header lines longer than the width + of the current window to be seen. + +2004-03-06 Jorgen Schaefer + + * erc-match.el (erc-match-directed-at-fool-p): Also check for + "FOOL, " + +2004-03-06 Jorgen Schaefer + + * erc-match.el (erc-match-message): Only use nick-or-keyword if + we're matching our nick. + +2004-03-06 Jorgen Schaefer + + * erc-match.el: The highlight type for the current nickname can + now also be 'nick-or-keyword, to highlight the nick of the sender + if that is available, but fall back to highlighting your nickname + in the whole message otherwise. + (erc-current-nick-highlight-type): Adapted docstring accordingly. + (erc-match-message): Added new condition. Also added some comments + to this monster of a function. + +2004-03-06 Jorgen Schaefer + + * erc.el (erc-is-valid-nick-p): Don't check for length less or + equal to 9. + +2004-03-06 Damien Elmes + + * erc-nickserv.el (erc-current-network): the last change resulted + in this function failing when a network identifies itself as + anything other than var.netname.com, so for instance + 'vic.au.austnet.org' fails. This version is only a marginal + improvement over the original, but if we want to be more flexible + we'll probably have to do the iteration ourselves instead of using + assoc. + +2004-03-05 Diane Murray + + * erc.el: Added erc-server-001 which runs when the server sends + its welcome message. It sets the current-nick to reflect the + server's settings. This fixes a bug where nicks that were too long + and got truncated by ther server were still set to the old value. + (nickname-in-use): If user wants to try again manually, let user + know that the nick is taken. If not, go through erc-default-nicks + until none are left, and then try one last time with + erc-nick-uniquifier. If it's still a bad-nick, make the user + change nick manually. When applying uniquifier, use NICKLEN if + it's in the server parameters, otherwise use what RFC 2812 says is + the max nick length (9 chars). Added custom variable + erc-manual-set-nick-on-bad-nick-p, which is set to nil and + erc-nick-change-attempt-count. Reset erc-default-nicks and + erc-nick-change-attempt-count when the nick has been changed + successfully. This fixes the bug where ERC would get caught in a + neverending loop of trying to set the same nick if the nick was + too long and the uniquified nick was not available. + + * added erc-cmd-WHOAMI + + * added custom variable erc-mode-line-away-status-format, use this + instead of the previous hard-coded setting + + * erc-server-315|318|369-hook defvar lines removed - they're + already defined in erc-server-hook-list + +2004-03-04 Lawrence Mitchell + + * HACKING: Initial commit. Some thoughts on coding standards. + +2004-03-03 Diane Murray + + * erc-track.el: added the variable erc-track-priority-faces-only + which adds the option to ignore changes in a channel unless there + are faces from the erc-track-faces-priority-list in the message + options are nil, 'all, or a list of channel name strings + +2004-03-01 Diane Murray + + * erc.el, erc-ibuffer.el, erc-menu.el: Changed erc-is-channel-op + and erc-is-channel-voice to erc-channel-user-op-p and + erc-channel-user-voice-p to better match erc-channel-user + structure (and emacs lisp usage) + +2004-03-01 Diane Murray + + * erc.el, erc-ibuffer.el, erc-menu.el: + erc-track-modified-channels-mode is now erc-track-mode + +2004-02-29 Diane Murray + + * erc-match.el: Added 'keyword option to + erc-current-nick-highlight-type highlights all instances of + current-nick in the message ('nickname option in cvs revisions 1.9 + - 1.11 had same effect) + +2004-02-28 Jorgen Schaefer + + * erc-button.el: Add Lisp: prefix for the EmacsWiki Elisp area. + (erc-button-alist): Added Lisp: prefix. + (erc-emacswiki-lisp-url): New variable. + (erc-browse-emacswiki-lisp): New function. + +2004-02-27 Lawrence Mitchell + + * erc.el (erc-get-arglist): Use `substitute-command-keys', rather + than hard-coding C-h f for `describe-function'. + +2004-02-26 Johan Bockgard + + * erc-log.el (erc-save-buffer-in-logs): bind `inhibit-read-only' + to t around call to `erase-buffer'. + +2004-02-23 Edward O'Connor + + * erc-chess.el, erc-dcc.el, erc-ezbounce.el, erc-list.el, + erc-macs.el, erc-ring.el, erc-stamp.el, erc.el: Normalized buffer + local variable creation. + +2004-02-17 Lawrence Mitchell + + * erc.el (erc-scroll-to-bottom, erc-add-scroll-to-bottom): Mention + `erc-input-line-position' in docstring. + +2004-02-13 Jorgen Schaefer + + * erc.el (erc-kick-hook): Typo fix. + +2004-02-13 Jeremy Bertram Maitin-Shepard + + * erc.el: Added `erc-kick-hook', which is called when the local + user is kicked from a channel. Fixed a bug in `erc-cmd-OPS', such + that the command now works. Added `erc-remove-channel-users', in + order to fix a number of significant bugs relating to channel + parting. + +2004-02-12 Jorgen Schaefer + + * erc.el (erc-display-prompt): Remove last change. This caused a + lot of trouble :( + +2004-02-12 Jorgen Schaefer + + * erc.el (erc-display-prompt): Also set 'field property, so C-j + works on an empty prompt. + +2004-02-12 Lawrence Mitchell + + * erc.el (erc-update-channel-topic): Ensure that `channel-topic' + does not contain any bare format controls. + +2004-02-10 Jorgen Schaefer + + * erc-stamp.el (erc-timestamp-intangible): New variable (user + feature request) + (erc-format-timestamp): Use erc-timestamp-intangible. + +2004-02-07 Jeremy Bertram Maitin-Shepard + + * erc-button.el: Fixed bug related to nickname buttonizing and text + fields due to erc-stamp. + +2004-02-07 Jeremy Bertram Maitin-Shepard + + * CREDITS: Added mention of my change of ERC to use hash tables. + +2004-02-07 Jeremy Bertram Maitin-Shepard + + * AUTHORS: Added myself to the list. + +2004-02-05 Lawrence Mitchell + + * erc.el: From Jeremy Maitin-Shepard : + (erc-remove-channel-user): Use `delq' not `delete'. + (erc-get-buffer): Pass PROC through to `erc-buffer-filter'. + (erc-process-sentinel): Use `erc' rather than `erc-reconnect' for + auto-reconnection. + +2004-02-02 Lawrence Mitchell + + * erc.el: (erc-buffer-list-with-nick): Apply `erc-downcase' NICK. + +2004-01-30 Alex Schroeder + + * erc.el: (erc-get-buffer): Use erc-buffer-filter. + +2004-01-30 Johan Bockgard + + * erc.el: From jbms: (erc-get-channel-nickname-list): New function. + (erc-get-server-nickname-list): New function. + (erc-get-server-nickname-alist): New function. + (erc-get-channel-nickname-alist): New function. + +2004-01-30 Johan Bockgard + + * erc-match.el: (erc-add-entry-to-list, + erc-remove-entry-from-list): Use `erc-member-ignore-case' to + compare entries. + (erc-add-pal, erc-add-fool): Fix type bug. Use + `erc-get-server-nickname-alist'. + +2004-01-29 Johan Bockgard + + * erc.el: From jbms: Adds xemacs compatibility to hash table + channel-members patch. + +2004-01-29 Johan Bockgard + + * erc.el: (erc-update-undo-list): Rewritten. Update + buffer-undo-list in place. Deal with XEmacsesque + entries (extents) in the list. + (erc-channel-users): Fix unescaped open-paren in left column in + docstring. + +2004-01-29 Johan Bockgard + + * erc-ring.el: (erc-replace-current-command): Exclude the prompt + from the deleted region and don't redisplay the prompt (because + `erc-display-prompt' flushes `buffer-undo-list'). + +2004-01-29 Johan Bockgard + + * erc-match.el: (erc-add-entry-to-list): Use `symbol-value' instead + of `eval'. + +2004-01-28 Jorgen Schaefer + + * erc.el: (erc-kill-buffer-function): maphash was missing an + argument. + +2004-01-28 Jorgen Schaefer + + * Makefile, erc-autoaway.el, erc-button.el, erc-ibuffer.el, + erc-lang.el, erc-list.el, erc-match.el, erc-menu.el, erc-page.el, + erc-pcomplete.el, erc-speedbar.el, erc.el: HUGE change by jbms. + This makes channel-members a hash, erc-channel-users. + + Modified files: Makefile erc-autoaway.el erc-button.el + erc-ibuffer.el erc-lang.el erc-list.el erc-match.el erc-menu.el + erc-page.el erc-pcomplete.el erc-speedbar.el erc.el + + The changes are too numerous to document properly. Have fun with + the breakage. + +2004-01-27 Jorgen Schaefer + + * erc.el: (erc-send-input-line): Add a space to empty lines so the + server likes them. + +2004-01-25 Jorgen Schaefer + + * erc.el: erc-send-whitespace-lines: New variable. + (erc-send-current-line): Use erc-send-whitespace-lines. Also, + removed superflous test for empty line in the mapc, since the + blank line test should find all. I do like to be able to send an + empty line when i want to! + (erc-send-current-line): Check for point being in input line + before checking for blank lines. + +2004-01-21 Lawrence Mitchell + + * erc.el: (erc-display-line-1): Move `erc-update-undo-list' outside + `save-restriction'. Removing need for temporary variable. + (erc-send-current-line): Fix bug introduced by last change, remove + complement in blank line regexp. + +2004-01-20 Lawrence Mitchell + + * erc.el: (erc-update-undo-list): Add logic to catch the case when + `buffer-undo-list' is t, indentation cleanup. + (erc-send-current-line): Reverse logic for matching blank lines. + +2004-01-20 Lawrence Mitchell + + * erc.el (erc-input-line-position): New variable. If non-nil, + specifies the argument to `recenter' in `erc-scroll-to-bottom'. + (erc-scroll-to-bottom): Use it. + +2004-01-20 Lawrence Mitchell + + * erc.el: From Johan Bockgård : + (erc-update-undo-list): New function. Update `buffer-undo-list' + so that calling `undo' in an ERC buffer doesn't mess up the + existing text. + (erc-display-line-1): Use it. + +2004-01-19 Lawrence Mitchell + + * erc.el (erc-beg-of-input-line): Use `forward-line' rather than + `beginning-of-line'. Docstring fix. + (erc-end-of-input-line): Docstring fix. + +2004-01-13 Jorgen Schaefer + + * erc.el (erc-display-prompt): Remove the undo list after + displaying the prompt, so the user can't undo ERC changes, which + breaks some stuff anyways. This way the user can still undo his + editing, but not ours. + +2004-01-12 Jorgen Schaefer + + * erc.el (erc-scroll-to-bottom): Should recenter on the bottom + line, not the second-to-last one. + +2004-01-12 Lawrence Mitchell + + * erc.el: (erc-bol): Fix bug introduced in revision 1.601. + +2004-01-12 Lawrence Mitchell + + * erc.el: From Brian Palmer + (erc-cmd-JOIN): Use `erc-member-ignore-case', rather than + `member-ignore-case'. + +2004-01-12 Jorgen Schaefer + + * erc.el: There was an inconsistency where the values of op and + voice in channel-names could be 'on or 'off after an update, t and + nil before. The intended version was to have t or nil, so i fixed + it to do so. + (channel-names): Updated docstring. + (erc-update-current-channel-member): Clarified docstring, fixed so + it sets t or nil on an update as well, not only on an add. + (erc-cmd-OPS): Updated not to check for 'on (the only function that + did this!) + +2004-01-12 Lawrence Mitchell + + * erc.el (erc-part-reason-various-alist, + erc-update-mode-line-buffer): Fix docstring + +2004-01-11 Lawrence Mitchell + + * erc.el (erc-update-mode-line): Fix typo. + +2004-01-11 Lawrence Mitchell + + * erc.el (erc-prompt-interactive-input): Removed. + (erc-display-prompt): Removed `erc-prompt-interactive-input' + option. (erc-interactive-input-map): Removed. + + Major docstring fixes. + +2004-01-07 Francis Litterio + + * erc.el (erc-cmd-OPS): Added this function. + (erc-cmd-IDLE): Switched from using erc-display-message-highlight + to erc-make-notice. + +2004-01-07 Francis Litterio + + * erc-list.el (erc-cmd-LIST): Switched from using + erc-display-message-highlight to erc-make-notice. + +2004-01-07 Francis Litterio + + * erc.el (erc-once-with-server-event): Added a sentence to the + docstring. Now returns the uninterned symbol that is added to the + server hook. + (erc-cmd-IDLE): Changed to use erc-once-with-server-event instead + of erc-once-with-server-event-global. + +2004-01-06 Francis Litterio + + * erc-list.el (erc-chanlist-hide-modeline): New variable. + (erc-chanlist): Now displays message as a notice. Also hides the + modeline if erc-chanlist-hide-modeline is non-nil. + +2004-01-05 Francis Litterio + + * erc.el (erc-server-PRIVMSG-or-NOTICE): Now nicks appear as + in query buffers, instead of as *nick*. + +2004-01-03 Francis Litterio + + * erc.el (erc-once-with-server-event-global): Changed to return + the uninterned symbol that it creates. + (erc-cmd-LIST): Changed to clean up hooks that don't run. + +2004-01-03 Francis Litterio + + * erc-pcomplete.el (pcomplete/erc-mode/IDLE): Added to support new + /IDLE command. + +2004-01-03 Francis Litterio + + * erc.el (erc-once-with-server-event-global): New function. Like + erc-once-with-server-event, except it modifies the global value of + the event hook. + (erc-cmd-IDLE): New function. Implements the new /IDLE command. + Usage: /IDLE NICK (erc-seconds-to-string): New function. Converts + a number of seconds to an Engligh phrase. + +2004-01-02 Francis Litterio + + * erc-list.el: Added variable erc-chanlist-mode-hook. + +See ChangeLog.2003 for earlier changes. + + Copyright (C) 2004 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: cc606d2d-635b-4b36-829b-a50e3c51e2d1 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/ChangeLog.2005 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/ChangeLog.2005 Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,1228 @@ +2005-11-23 Johan Bockgård + + * erc.el (erc-cmd-SAY): Strip leading space in input line. + +2005-10-29 Michael Olson + + * FOR-RELEASE: Add stuff that needs to be done before the 5.1 + release. Longer-term items can be added to the 5.2 section. + + * Makefile (SITEFLAG): New variable that indicates what variant of + "--site-flag" to use. XEmacs needs "-site-flag". + (INSTALLINFO): New variable indicating how we should call + install-info when installing documentation. + (erc-auto.el, .elc.el): Use $(SITEFLAG). + + * NEWS: Note that last release was 5.0.4. + + * erc.texi: Initial and incomplete draft of ERC documentation. + Commence collaborate-documentation-hack-mode :^) . + +2005-10-29 Diane Murray + + * erc-ring.el (erc-replace-current-command): Revert last change + since it made the prompt disappear when using `erc-next-command' + and `erc-previous-command'. + +2005-10-28 Michael Olson + + * erc.el (erc-input-marker): New variable that indicates the + position where text from the user begins, after the prompt. + (erc-mode-map): Bind to erc-bol, just like C-a. + (erc): Initialize erc-input-marker. + (erc-display-prompt): Even in case where no prompt is desired by + the user, clear the undo buffer and set the input marker. + (erc-bol, erc-user-input): Simplify by using erc-input-marker. + + * erc-pcomplete.el (pcomplete-parse-erc-arguments): Use + erc-insert-marker. + + * erc-ring.el (erc-previous-command) + (erc-replace-current-command): Use erc-insert-marker. + + * erc-spelling.el (erc-spelling-init): Make sure that even Emacs21 + obeys erc-spelling-flyspell-verify. + (erc-spelling-flyspell-verify): Use erc-input-marker. This should + make it considerably faster when switching to a buffer that has + seen a lot of activity since last viewed. + +2005-10-25 Diane Murray + + * erc-backend.el (erc-server-version, 004): Re-added setting of + `erc-server-version'. It doesn't hurt to set, and it could be + used in modules or users' settings. + + * NEWS: Added descriptions of some new features. + +2005-10-20 Diane Murray + + * erc-match.el (erc-current-nick-highlight-type): Set to `keyword' + as default. + (erc-beep-match-types): New variable. + (erc-text-matched-hook): Doc fix. Added `erc-beep-on-match' to + customization options. + (erc-beep-on-match): New function. If the MATCH-TYPE is found in + `erc-beep-match-types', beep. + + * erc-compat.el (erc-make-obsolete, erc-make-obsolete-variable): + New functions to deal with the difference in the number of + arguments accepted by `make-obsolete' and `make-obsolete-variable' + in Emacs and XEmacs. + + * erc.el, erc-nets.el: Use `erc-make-obsolete' and + `erc-make-obsolete-variable'. + + * erc-compat.el (erc-make-obsolete, erc-make-obsolete-variable): + Handle `wrong-number-of-arguments' error instead of checking for + xemacs feature as future versions of XEmacs might accept three + arguments. + +2005-10-18 Edward O'Connor + + * erc.el: Tell emacs-lisp-mode how to font-lock define-erc-module + docstrings. + +2005-10-08 Diane Murray + + * AUTHORS, CREDITS, ChangeLog, ChangeLog.2002, ChangeLog.2004: + Updated my email address. + +2005-10-06 Michael Olson + + * erc.el (erc-send-input-line, erc-cmd-KICK, erc-cmd-PART) + (erc-cmd-QUIT, erc-cmd-TOPIC, erc-kill-server, erc-kill-channel): + Adapt to new TARGET parameter of erc-server-send. + + * erc-backend.el (erc-server-connect): Don't specify encoding for + erc-server-process, since we set this each time we send a line to + the server. + (erc-encode-string-for-target): Remove. + (erc-server-send): Allow TARGET to be specified. This was how it + used to be before my more-backend work. Set encoding of server + process just before sending text to it. Associate encoding with + text if we are using the queue. + (erc-server-send-queue): Pull encoding from queue. + (erc-message, erc-send-ctcp-message, erc-send-ctcp-notice): Adapt + to new TARGET parameter of erc-server-send. + +2005-10-05 Michael Olson + + * erc.el (erc-toggle-debug-irc-protocol): Use erc-view-mode-enter + rather than view-mode. + + * erc-backend.el (erc-encode-string-for-target): If given a nil or + empty string, return "". + (erc-server-send-queue): XEmacs fix: Use erc-cancel-timer rather + than cancel-timer. + + * erc-compat.el (erc-view-mode-enter): New function that is + aliased to the correct way of entering view-mode. + + * erc-match.el (erc-log-matches-make-buffer): Use + erc-view-mode-enter rather than view-mode-enter. + +2005-10-05 Edward O'Connor + + * erc-backend.el (erc-encode-string-for-target): If str is nil, + pass the empty string to erc-encode-coding-string instead, which + allows one to /part and /quit without providing a reason again. + +2005-10-03 Michael Olson + + * erc-backend.el (erc-message, erc-send-ctcp-message) + (erc-send-ctcp-notice): Encode string for target before sending. + + * erc.el (erc-cmd-KICK, erc-cmd-PART, erc-cmd-QUIT, erc-cmd-TOPIC) + (erc-kill-server, erc-kill-channel): Ditto. + +2005-09-05 Johan Bockgård + + * erc-page.el (erc-ctcp-query-PAGE): (message text) -> (message + "%s" text). + (erc-cmd-PAGE): Simplify regexp. Put `do-not-parse-args' t. + +2005-09-05 Michael Olson + + * erc.el (erc-flood-limit, erc-flood-limit2): Remove since they + are no longer needed. + (erc-send-input): Detect whether we want flood control to be + active. The previous behavior was to always force the message. + (erc-toggle-flood-control): Adapt to new flood control method. No + more 'strict. + (erc-cmd-SV): Use concat rather than + format-time-string. + (erc-format-target, erc-format-target-and/or-server): Shorten + logic statements. + + * erc-compat.el (erc-emacs-build-time): Use a string + representation rather than trying to coerce a time out of a string + on XEmacs. + + * erc-identd.el (erc-identd-start): Use make-network-process + instead of open-network-stream. Error out if this is not defined. + + * erc-backend.el (erc-send-line): New command that sends a line + using flood control, using a callback for display. It isn't used + yet. + +2005-09-04 Michael Olson + + * erc.el: Add defvaralias and make-obsolete-variable for + erc-default-coding-system. + (channel-topic, channel-modes, channel-user-limit, channel-key, + invitation, away, channel-list, bad-nick): Rename globally to + erc-{name-of-variable}. + +2005-09-03 Johan Bockgård + + * erc.el (erc-message): Simplify regexp. + (erc-cmd-DEOP, erc-cmd-OP): Simplify. + +2005-08-29 Michael Olson + + * erc.el: Alias erc-send-command to erc-server-send. ErBot needs + this to work without modification. Add defvaralias for + erc-process. Make this and the other backwards-compatibility + functions and variables be marked obsolete as of ERC 5.1. + + * erc-backend.el: Add autoload for erc-log macro. + (erc-server-connect): Set some variables before defining process + handlers. It probably doesn't make any difference. + +2005-08-26 Michael Olson + + * erc.el: Add defvaralias for erc-announced-server-name, since + this seems to be widely used. + +2005-08-17 Michael Olson + + * erc.el (erc): Remove unnecessary boundp check. + + * erc-autoaway.el: Fix compiler warning. + + * erc-backend.el (erc-server-version): Since this isn't used by + any code, and isn't generally useful, remove it. + (erc-server-send-queue): Use erc-current-time rather than + float-time. + (004): Don't set erc-server-version. + + * erc-dcc.el (erc-dcc-chat-request, erc-dcc-get-parent): Move to + fix a compiler warning. + + * erc-ibuffer.el (erc-server): Remove unnecessary boundp check. + + * erc-identd.el (erc-identd-start): Use read-string instead of + read-input. + + * erc-imenu.el (erc-unfill-notice): Use a while loop instead of + replace-regexp. + + * erc-nicklist.el: Add conditional dependency on erc-bbdb. + (erc-nicklist-insert-contents): Tighten some regexps. + + * erc-notify.el (erc-notify-list): Docfix. + + * erc-spelling.el (erc-spelling-dictionaries): Add :type and + :group to silence a compiler warning. + +2005-08-14 Michael Olson + + * erc-backend.el (erc-session-server, erc-session-port) + (erc-announced-server-name, erc-server-version) + (erc-server-parameters): Moved here from erc.el. + (erc-server-last-peers): Moved, renamed from last-peers. + (erc-server-lag): Moved, renamed from erc-lag. + (erc-server-duplicates): Moved, renamed from erc-duplicates. + (erc-server-duplicate-timeout): Moved, renamed from + erc-duplicate-timeout. + (erc-server): New customization group hosting all options from + this file. + (erc-server-prevent-duplicates): Moved, renamed from + erc-prevent-duplicates. + (erc-server-duplicate-timeout): Moved, renamed from + erc-duplicate-timeout. + (erc-server-auto-reconnect, erc-split-line-length) + (erc-server-coding-system, erc-encoding-coding-alist) + (erc-server-connect-function, erc-server-flood-margin) + (erc-server-flood-penalty): Change group to 'erc-server. + (erc-server-send-ping-interval): Moved, renamed from + erc-ping-interval. + (erc-server-ping-handler): Moved, renamed from erc-ping-handler. + (erc-server-setup-periodical-server-ping): Moved, renamed from + erc-setup-periodical-server-ping. + (erc-server-connect): Add to docstring. Move more initialization + here. + (erc-server-processing-p): Docfix. + (erc-server-connect): Use 'raw-text like in the original version. + (erc-server-filter-function): Don't reset process coding system. + + * erc-stamp.el (erc-add-timestamp): If the text at point is + invisible, don't insert a timestamp. Thanks to Pascal + J. Bourguignon for the suggestion. + + * erc-match.el (erc-text-matched-hook): Don't hide fools by + default, but include it in the available options. + +2005-08-13 Michael Olson + + * erc-*.el: s/erc-send-command/erc-server-send/g. + s/erc-process/erc-server-process/g (sort of). Occasional + whitespace and indentation fixes. + + * erc-backend.el: Specify a few local variables for indentation. + Take one item off of the TODO list. + (erc-server-filter-data): Renamed from erc-previous-read. From + circe. + (erc-server-processing-p): New variable that indicates when we're + currently processing a message. From circe. + (erc-split-line-length): New option that gives the maximum line + length of a single message. From circe. + (erc-default-coding-system): Moved here from erc.el. + (erc-split-line): Renamed from erc-split-command and taken from + circe. + (erc-connect-function, erc-connect, erc-process-sentinel-1) + (erc-process-sentinel, erc-flood-exceeded-p, erc-send-command) + (erc-message, erc-upcase-first-word, erc-send-ctcp-message) + (erc-send-ctcp-notice): Moved here from erc.el. + (erc-server-filter-function): Renamed from erc-process-filter. + From circe. + (erc-server-process): Renamed from `erc-process' and moved here + from erc.el. + (erc-server-coding-system): Renamed from + `erc-default-coding-system'. + (erc-encoding-coding-alist): Moved here from erc.el. + (erc-server-flood-margin, erc-server-flood-penalty): + (erc-server-flood-last-message, erc-server-flood-queue): + (erc-server-flood-timer): New options from circe that allow + tweaking of flood control. + (erc-server-connect-function): Renamed from erc-connect-function. + (erc-flood-exceeded-p): Removed. + (erc-coding-system-for-target) + (erc-encode-string-for-target, erc-decode-string-from-target): + Moved here from erc.el + (erc-server-send): Renamed from erc-send-command. Adapted from + the circe function by the same name. + (erc-server-send-queue): New function from circe that implements + handling of a flood queue. + (erc-server-current-nick): Renamed from current-nick. + (erc-server-quitting): Renamed from `quitting'. + (erc-server-last-sent-time): Renamed from `last-sent-time'. + (erc-server-last-ping-time): Renamed from `last-ping-time'. + (erc-server-lines-sent): Renamed from `lines-sent'. + (erc-server-auto-reconnect): Renamed from `erc-auto-reconnect'. + (erc-server-coding-system): Docfix. + (erc-server-connect): Renamed from `erc-connect'. Require SERVER + and PORT parameters. Initialize several variables here. Don't + set `erc-insert-marker'. Use a per-server coding system via + erc-server-default-encoding. + + * erc.el (erc-version-string): Changed to indicate we are running + the `more-backend' branch. + (erc-send-single-line): Implement flood control using + erc-split-line. + (erc-send-input): Move functionality of erc-send-single-line in + here. + (erc-send-single-line): Assimilated! + (erc-display-command, erc-display-msg): Handle display hooks. + (erc-auto-reconnect, current-nick, last-sent-time) + (last-ping-time, last-ctcp-time, erc-lines-sent, erc-bytes-sent) + (quitting): Moved to erc-backend.el. + (erc): Docfix. Don't initialize quite so many things here. + +2005-08-10 Michael Olson + + * debian/copyright (Copyright): Remove notices for 4 people, since + they didn't contribute legally-significant changes, or have had + these changes overwritten. + + * erc-log.el: Remove copyright notice. + + * erc.el: Remove 3 copyright notices. + +2005-08-09 Michael Olson + + * debian/changelog: Create 5.0.4-3 package. This doesn't serve + any purpose other than to thank Romain Francoise for some advice. + + * Makefile (debrelease): Allow last upload and extra build options + to be specified. + +2005-08-08 Michael Olson + + * debian/changelog: Create 5.0.4-2 package. + + * debian/control (Uploaders): Add Romain Francoise. + (Standards-Version): Update to 3.6.2. + (Depends): Add `emacsen'. + + * debian/scripts/startup.erc (load-path): Minor whitespace fixup. + + * Makefile (clean): Split target from realclean and make it remove + files that aren't packaged in releases. + (clean, release): Minor cleanups. + (debrelease): Use debuild rather than dpkg-buildpackage since the + former calls lintian. Minor cleanups. + (debrelease-mwolson): New target that removes old Debian packages, + calls debrelease, and copies the resulting package to my dist dir. + (upload): New target that automates the process of uploading an + ERC release to sourceforge. + + * erc.el (erc-mode): Use `make-local-variable' instead of + `make-variable-buffer-local'. + +2005-07-12 Michael Olson + + * debian/changelog: Build 5.0.4-1. + + * Makefile (release): Prepare zip file in addition to tarball. + + * NEWS: Add item for the undo fix. + +2005-07-09 Michael Olson + + * erc-nicklist.el (erc-nicklist-insert-contents): Check + erc-announced-name before erc-session-server. Make sure that we + can never get a stringp (nil) error. + (erc-nicklist-call-erc-command): If given no command, do nothing. + This fixes an error that used to occur when a stray mouse click + was made outside of the popup window, but on the erc-nicklist + menu. + + * erc-bbdb.el (erc-bbdb-search-name-and-create): Get rid of the + infinite input loop when you want to create a new record. Replace + most of that with a completing read of existing nicks. If no nick + is chosen, create a new John Doe record. The net effect of this + is that the old behavior is re-instated, with the addition of one + completing read that happens when you do a /whois. + +2005-07-09 Johan Bockgård + + * erc.el (erc-process-input-line): Docfix. + (erc-update-mode-line-buffer): Use `erc-propertize' instead of + `propertize'. + (erc-propertize): Move to erc-compat.el. + + * erc-compat.el (erc-propertize): Move here from erc.el. Always + return a copy of the string (like `propertize' in GNU Emacs). + + * erc-nicklist.el (erc-nicklist-icons-directory) + (erc-nicklist-voiced-position) + (erc-nicklist-insert-medium-name-or-icon): Docfix. + (erc-nicklist-insert-contents): Simplify. + (erc-nicklist-mode-map): Bind RET instead of `return'. Bind + `down-mouse-3' instead of `mouse-3'. + (erc-nicklist-kbd-cmd-QUERY): Cleanup regexp. + (erc-nicklist-channel-users-info): Docfix. Simplify. + +2005-07-02 Michael Olson + + * images: New directory containing the images that are used by + erc-nicklist.el. These are from Gaim, and are thought to be + available under the terms of the GPL. + + * erc-bbdb.el: Add local variables section to preserve tabs, since + that is the style used throughout this file. Apply patch from + Edgar Gonçalves as follows. + (erc-bbdb-bitlbee-name-field): New variable that indicates the + field name to use for annotating the "displayed name" of a bitlbee + contact. + (erc-bbdb-irc-highlight-field): Docfix. + (erc-bbdb-search-name-and-create): Prompt the user for the name of + a contact if none was found. Merge the new entries into the + specified contact. If new arg SILENT is non-nil, do not prompt + the user for a name or offer to merge the new entry. + (erc-bbdb-insinuate-and-show-entry): New arg SILENT is accepted, + which is passed on to erc-bbdb-search-name-and-create. + (erc-bbdb-whois): Tell erc-bbdb-search-name-and-create to prompt + for name if necessary. + (erc-bbdb-JOIN, erb-bbdb-NICK): Forbid + erc-bbdb-search-name-and-create from prompting for a name. + + * erc-nicklist.el: Add local variables section to preserve tabs, + since that is the style used throughout this file. Apply patch + from Edgar Gonçalves as follows. + (erc-nicklist-use-icons): New option; if non-nil, display an icon + instead of the name of the chat medium. + (erc-nicklist-icons-directory): New option indicating the path to + the PNG files that are used for chat icons. + (erc-nicklist-use-icons): New option indicating whether to put + voiced nicks on top, bottom, or not to differentiate them. The + default is to put them on the bottom. + (erc-nicklist-bitlbee-connected-p): New variable that indicates + whether or not we are currently using bitlbee. An attempt will be + made to auto-detect the proper value. This is bound in the + `erc-nicklist-insert-contents' function. + (erc-nicklist-nicklist-images-alist): New variable that maps a + host type to its icon. This is set by `erc-nicklist'. + (erc-nicklist-insert-medium-name-or-icon): New function that + inserts an icon or string that identifies the current host type. + (erc-nicklist-search-for-nick): New function that attempts to find + a BBDB record that corresponds with this contact given its + finger-host. If found, return its bitlbee-nick field. + (erc-nicklist-insert-contents): New function that inserts the + contents of the nick list, including text properties and images. + (erc-nicklist): Populate `erc-nicklist-images-alist'. Move + nicklist content generation code to + `erc-nicklist-insert-contents'. + (erc-nicklist-mode-map): Map C-j to erc-nicklist-kbd-menu and RET + to erc-nicklist-kbd-cmd-QUERY. + (erc-nicklist-call-erc-command): Make use of + `switch-to-buffer-other-window'. + (erc-nicklist-cmd-QUERY): New function that opens a query buffer + for the given contact. + (erc-nicklist-kbd-cmd-QUERY): Ditto; contains most of the code. + (erc-nicklist-kbd-menu): New function that shows the nicklist + action menu. + (erc-nicklist-channel-users-info): Renamed from + `erc-nicklist-channel-nicks'. Implement sorting voiced users. + +2005-06-29 Johan Bockgård + + * erc-nickserv.el (erc-nickserv-alist): Fix regexp for Azzurra. + +2005-06-26 Michael Olson + + * erc-autojoin.el (erc-autojoin-add, erc-autojoin-remove): Use + `erc-session-server' if `erc-announced-server-name' is nil. This + happens when servers don't send a 004 message. + + * erc.el (erc-quit-server): Ditto. + + * erc-ibuffer.el (erc-server, erc-server-name): Ditto. + + * erc-notify.el (erc-notify-JOIN, erc-notify-NICK) + (erc-notify-QUIT): Ditto. + +2005-06-24 Johan Bockgård + + * erc.el (erc-default-coding-system) + (erc-handle-user-status-change): Docstring fix. + (with-erc-channel-buffer): Removed. + (erc-ignored-reply-p): Replace `with-erc-channel-buffer' with + `erc-with-buffer'. + (erc-display-line-1): Revision 1.730 broke undo. Fix it. + +2005-06-23 Michael Olson + + * CREDITS: Add entries for Luigi Panzeri and Andreas Schwab. + + * erc-nickserv.el (erc-nickserv-alist): Add entries for Azzurra + and OFTC. Thanks to Luigi Panzeri and Andreas Schwab for + providing these. + +2005-06-16 Michael Olson + + * CREDITS: Add John Paul Wallington. + + * erc.el: Thanks to John Paul Wallington for the following. + (erc-nickname-in-use): Use `string-to-number' instead of + `string-to-int'. + + * erc-dcc.el (erc-dcc-handle-ctcp-send) + (erc-dcc-handle-ctcp-chat, erc-dcc-get-file) + (erc-dcc-chat-accept): Ditto. + + * erc-identd.el (erc-identd-start): Ditto. + +2005-06-16 Johan Bockgård + + * erc.el (erc-mode-map): Suppress `font-lock-fontify-block' key + binding since it destroys face properties. + +2005-06-08 Michael Olson + + * erc.el (erc-cmd-UNIGNORE): Use `erc-member-ignore-case' instead + of `member-ignore-case'. Thanks to bpalmer for the heads up. + +2005-06-06 Michael Olson + + * erc.el (erc-modules): Fix a mistake I made when editing this a + few days ago. Modes should now be disabled properly. + (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Remove unnecessary call to + `format'. Thanks to Andreas Schwab for reporting this. + + * debian/changelog: Close "README file missing" bug. + + * debian/rules (binary-erc): Install README file. + +2005-06-03 Michael Olson + + * erc.el (erc-with-buffer): Set `lisp-indent-function' so Emacs + Lisp mode knows how to indent erc-with-buffer blocks. + (with-erc-channel-buffer): Ditto. + (erc-with-all-buffers-of-server): Ditto. + (erc-modules): Use pcomplete by default, not completion, since + erc-complete.el is deprecated. Use `fboundp' instead of + `symbol-value' to check for existence of a function before calling + it. This was causing an error when untoggling the `completion' + option and trying to save via the customize interface. + + * erc-track.el (erc-modified-channels-update): If a buffer is not + currently connected, remove it from the modified channels list. + This should fix the problem where residue was left on the mode + line after quitting ERC. + + * erc-list.el (erc-prettify-channel-list): Docfix; thanks to John + Paul Wallington for reporting this. + +2005-05-31 Michael Olson + + * debian/changelog: First draft of entries for the 5.0.3 release. + + * debian/README.Debian: Note that ERC will now install correctly + on versions of Emacs or XEmacs that do not have the `format-spec' + library. Correct some grammar and prune the content a bit. + + * debian/scripts/install (emacs20): Remove line since we no longer + need to deal with format-spec.el. + + * NEWS: Add entries for the upcoming 5.0.3 release. + + * erc.el: Don't require format-spec since this is provided in + erc-compat.el now. + (erc-process-sentinel, erc-setup-periodical-server-ping): Use + `erc-cancel-timer' instead of `cancel-timer'. + (erc-version-string): Update to 5.0.3. + + * erc-autoaway.el (autoaway, erc-autoaway-reestablish-idletimer): + Use `erc-cancel-timer' instead of `cancel-timer'. + + * erc-compat.el (format-spec, format-spec-make): If we cannot load + the `format-spec' library, provide versions of these functions. + This should keep problems from surfacing with Emacs21 Debian + builds. + (erc-cancel-timer): New function created to take the place of + `cancel-timer' since XEmacs calls it something else. + + * erc-track.el (erc-modified-channels-update): Accept any number + of arguments, which are ignored. This allows it to be run from + `erc-disconnected-hook' without extra bother. + (track): Add `erc-modified-channels-update' to + `erc-disconnected-hook' so that the indicators are removed + correctly in some edge cases. + (erc-modified-channels-display): Make sure that we never pass nil + to the function in `erc-track-shorten-function'. This happens + when we have deleted buffers in `erc-modified-channels-alist'. + Also, make sure that the buffer has a non-nil short-name before + adding it to the string list. This should fix some XEmacs + warnings when running /quit with unchecked buffers, as well as get + rid of a stray buffer problem (or so it is hoped). + +2005-05-31 Johan Bockgård + + * erc-replace.el, erc-speak.el: Clean up comment formatting. + + * erc-ring.el (ring, erc-input-ring-index, erc-clear-input-ring): + Clean up docstring formatting. + +2005-05-30 Johan Bockgård + + * erc.el (erc-cmd-BANLIST, erc-cmd-MASSUNBAN): Delete superfluous + arg to `format'. + (erc-load-irc-script): Use `insert-file-contents' instead of + `insert-file'. Simplify. + +2005-05-29 Michael Olson + + * erc.el (erc-version-string): Move this up so that it is + evaluated before the `require' statements. Not a major change. + +2005-04-27 Johan Bockgård + + * erc.el (erc-complete-word): Simplify. + +2005-04-27 Michael Olson + + * Makefile (debrelease): Use a slightly different approach when + removing CVS and Arch cruft. + + * debian/changelog: Update for 5.0.2-1 package. + +2005-04-25 Michael Olson + + * erc-autoaway.el (erc-autoaway-reestablish-idletimer): Move code + block higher in file to fix a load failure when using Emacs21. + Thanks to Daniel Brockman for the report and fix. + +2005-04-24 Adrian Aichner + + * erc-backend.el (JOIN): save-excursion so that + `erc-current-logfile' inserts into the correct channel buffers + when using erc-log-insert-log-on-open in combination with autojoin + to multiple channels. + +2005-04-17 Adrian Aichner + + * erc-log.el: Remove stray whitespace. + * erc.el: Ditto. + +2005-04-09 Aidan Kehoe + + * erc.el: autoload erc-select-read-args, which, because it parses + erc-select's args, can be called before erc.el is loaded. + +2005-04-07 Edward O'Connor + + * erc-viper.el: Remove final newlines from previously-existing ERC + buffers. (Minor bug fix.) + +2005-04-06 Michael Olson + + * Makefile (debrelease): Ignore errors from deleting Arch and CVS + metadata. + +2005-04-05 Michael Olson + + * ChangeLog, CREDITS, AUTHORS: Correct name and email address of + Marcelo Toledo. + +2005-04-04 Michael Olson + + * erc.el (erc-modules): Add entry for spelling module. + + * erc-spelling.el: Add autoload line. + + * erc-backend.el: Apply latest non-ascii patch from Kai Fan. + (erc-decode-parsed-server-response): Search + erc-response.command-args for channel name. Decode the + erc-response struct using this channel name as key according to + the `erc-encoding-coding-alist'. + + * erc-track.el: Apply patch from Henrik Enberg. + (erc-modified-channels-object): Use optimal amount of whitespace + around modified channels indicator. + +2005-04-02 Johan Bockgård + + * erc.el (define-erc-module, erc-with-buffer) + (erc-with-all-buffers-of-server, with-erc-channel-buffer): Add + edebug-form-spec. + + * erc-compat (erc-define-minor-mode): Ditto. + +2005-03-29 Jorgen Schaefer + + * erc-spelling.el: New file. + +2005-03-24 Johan Bockgård + + * erc-backend.el (define-erc-response-handler): Add + `definition-name' property to constructed symbols so that + find-function and find-variable will find them. + +2005-03-21 Michael Olson + + * erc-dcc.el, erc-goodies.el, erc-list.el, erc-notify.el, + erc-ring.el, erc.el: Copyright assignment occurred. + + * debian/scripts/install: Make a shell wrapper around the original + Makefile and inline the Makefile. The problem is that Debian + passes all the Emacs variants at once, rotating them at every + invocation of the install script, which happens once per variant. + This caused each installation to happen N-1 times more often than + it should have. As a result, we need to only deal with the first + argument. + (ELFILES): Only add format-spec.el if we are compiling for + emacs21. Don't filter out erc-compat.el. + (SITEFLAG): New variable that indicates that the "nosite" option + should look like. + (.DEFAULT): Use $(FLAVOUR) instead of $@ for clarity. + + * debian/rules: Install NEWS file and compress it. + + * debian/maint/postinst: Be more cautious about configuration + step. + + * debian/copyright (Copyright): Another assignment came in. + + * debian/control (Standards-Version): Update to a newer version as + recommended by lintian. + + * debian/changelog: Changes made for the Debian package. + + * debian/README.Debian: Keep only the General Notes section. + + * NEWS: Move old history items here from debian/README.Debian. + + * Makefile (SNAPSHOTDATE): Deprecate this option since we hope to + release more often. + +2005-03-20 Jorgen Schaefer + + * erc.el (erc-define-catalog, `ctcp-request-to'): Fix typo (%: -> + %t:). + +2005-03-01 Michael Olson + + * erc-log.el (erc-save-buffer-in-logs): Replace tabs with spaces + in code indentation. + +2005-02-28 Michael Olson + + * erc.el (erc-display-message): Apply corrected patch from Henrik + Enberg. + +2005-02-27 Michael Olson + + * erc.el (erc-display-message): Apply patch from Henrik Enberg. + Check here to see if a message should be hidden, rather than + relying on code in each individual command. + (erc-version-string): Add "(CVS)" to the version string for + clarity. + + * erc-backend.el (JOIN, KICK, MODE, NICK, PART, QUIT, TOPIC): + Don't check `erc-hide-list' here. + + * erc-list.el, erc-match.el, erc.el, debian/copyright: Update + copyright information as a few more people have assignments + registered. + +2005-02-06 Michael Olson + + * erc-backend.el: Apply patch from Kai Fan for non-ASCII character + support. + (erc-parse-server-response): Add call to + `erc-decode-parsed-server-response'. + (erc-decode-parsed-server-response): New function that decodes a + pre-parsed server response before it can be handled. + (PRIVMSG): Comment out call to `erc-decode-string-from-target'. + (TOPIC): Ditto. + +2005-02-01 Jorgen Schaefer + + * erc.el (erc-process-sentinel-1): Don't reconnect on connection + refused. This error is reported differently when using + open-network-stream-nowait. + +2005-01-26 Diane Murray + + * erc.el (erc-cmd-APPENDTOPIC, erc-set-topic): The control + character in `channel-topic' was changed to \C-o - replaced \C-c + with \C-o so that these functions work as expected again. + (erc-get-channel-mode-from-keypress): Doc fix. + +2005-01-25 Diane Murray + + * erc.el, erc-button.el, erc-compat.el, erc-goodies.el, + erc-match.el, erc-nets.el, ChangeLog, NEWS: Merged bug fixes made + on release_5_0_branch since 5.0.1 release. + +2005-01-24 Johan Bockgård + + * erc.el (erc-input-action): Quote `erc-action-history-list' so + that input history actually works. + (erc-process-ctcp-query): Fix and simplify logic. + (erc-get-channel-mode-from-keypress): Use `C-' string syntax. + (erc-load-irc-script-lines): Use `erc-command-indicator' instead + of `erc-prompt'. + +2005-01-23 Edward O'Connor + + * erc-viper.el: Ensure that `viper-comint-mode-hook' runs in + buffers whose `erc-mode-hook' has already run when this file is + loaded. + Explicitly `require' erc.el. + +2005-01-22 Edward O'Connor + + * erc.el (erc-mode): Remove frobbing of `require-final-newline'. + + * erc-log.el (erc-save-buffer-in-logs): Remove frobbing of + `require-final-newline'. + + * erc-viper.el: New file. This is where all ERC/Viper + compatiibilty code should live. When and if ERC is bundled with + Emacs, some of the hacks in this file should be merged into Viper + itself. + +2005-01-21 Edward O'Connor + + * erc.el (erc-mode): Set `require-final-newline' to nil in ERC + buffers. This prevents a Viper misfeature whereby extraneous + newlines are inserted into the ERC buffer when switching between + viper states. + + * erc-log.el (erc-save-buffer-in-logs): Bind `require-final-newline' + to t when calling `write-region' to ensure that further log + entries start on fresh lines. + +2005-01-21 Diane Murray + + * erc-button.el (erc-button-add-face): Reverted my change to the + order faces since it had the unwanted effect of putting the button + face after all others. + (erc-button-face-has-priority): Removed this variable as it is not + necessary anymore - it was used to compensate for the above + mentioned change. + + * NEWS: Added the latest fixes. + +2005-01-20 Diane Murray + + * erc-button.el, erc-match.el: + (erc-button-syntax-table, erc-match-syntax-table): Added \ as a + legal character for nicknames. + + * erc-nets.el (erc-server-select): Fixed so that only networks + with servers found in `erc-server-alist' are available as choices. + + * erc.el, erc-compat.el, erc-goodies.el: + (erc-replace-match-subexpression-in-string): New function. Needed + because `replace-match' in XEmacs doesn't replace regular + expression subexpressions in strings, only in buffers. + (erc-seconds-to-string, erc-controls-interpret): Use the new + function. + + * erc-button.el (erc-button-add-button): Use the `:button-face' + key combined with an `erc-mode' local `widget-button-face' set to + nil to get the widget overlay face suppressed in XEmacs. + +2005-01-19 Francis Litterio + + * erc-button.el (erc-button-add-face): The face added by this + function is more important than the existing text's face, so we + now prepend erc-button-face to the list of existing faces when + adding a button. To instead append erc-button-face to existing + faces, set variable `erc-button-face-has-priority' to nil. + (erc-button-face-has-priority): New variable to control how + erc-button-add-face adds erc-button-face to existing faces. + (erc-button-press-button): Silenced a byte-compiler warning about + too few arguments in a call to `error'. + +2005-01-19 Diane Murray + + * NEWS: Added list of 5.0.1 fixes. + +2005-01-19 Michael Olson + + * AUTHORS: Move to format that cscvs can understand. As an added + perk, entries line up nicer. + + * erc.el, erc-fill.el, erc-pcomplete.el, debian/copyright: Merge a + few more copyright lines thanks to Alex Schroeder's BBDB file. + + * Makefile: Change version to correspond with our new scheme. + +2005-01-18 Diane Murray + + * erc-list.el (erc-chanlist-channel-line-regexp): Now matches + private channels, the channels `#' and `&', and channels with + names including non-ascii characters. + (erc-chanlist-join-channel): Don't attempt to join private + channels since the channel name is unknown. + + * erc-goodies.el (erc-make-read-only): Add `rear-nonsticky' + property to avoid `Text is read-only' errors during connection. + `front-nonsticky' does not exist, changed to `front-sticky'. + (erc-controls-interpret, erc-controls-strip): Just work on the + string, don't open a temporary buffer. + (erc-controls-propertize): Now accepts optional argument STR. + +2005-01-17 Michael Olson + + * Makefile: Version is 5.01, but only in the Makefile. It has not + been released yet. + + * erc-auto.in, erc-autojoin.el, erc-bbdb.el, erc-button.el, + erc-chess.el, erc-complete.el, erc-dcc.el, erc-fill.el, + erc-goodies.el, erc-ibuffer.el, erc-identd.el, erc-imenu.el, + erc-list.el, erc-match.el, erc-menu.el, erc-nets.el, + erc-netsplit.el, erc-nickserv.el, erc-notify.el, erc-pcomplete.el, + erc-ring.el, erc-speak.el, erc-speedbar.el, erc-stamp.el, + erc-track.el, erc-xdcc.el, erc.el, debian/copyright: Update + copyright notices. If anyone has signed papers for Emacs in + general, merge them with the FSF's entry. + +2005-01-16 Diane Murray + + * erc.el (erc): `erc-set-active-buffer' was being called before + `erc-process' was set, so that channels weren't being marked + active correctly upon join; fixed. + +2005-01-15 Johan Bockgård + + * erc-backend.el (def-edebug-spec): This macro caused problems (in + XEmacs). Use its expansion directly. + +2005-01-15 Diane Murray + + * erc-button.el (erc-button-add-button): Reverted previous change + since `:suppress-face' doesn't seem to be checked for a certain + face. + (erc-button-add-face): FACE is now appended to the `old' face. + This should fix the problem of faces being "covered" by + `erc-button-face'. + +2005-01-14 Diane Murray + + * erc.el, erc-backend.el (erc-cmd-OPS, erc-cmd-COUNTRY, + erc-cmd-NICK, erc-process-ctcp-query, ERROR, PONG, 311, 312, 313, + 314, 317, 319, 320, 321, 322, 330, 352): Use catalog entries + instead of hard-coded text messages. + (english): Added new catalog entries `country', `country-unknown', + `ctcp-empty', `ctcp-request-to', `ctcp-too-many', `nick-too-long', + `ops', `ops-none', `ERROR', `PONG', `s311', `s312', `s313', + `s314', `s317', `s317-on-since', `s319', `s320', `s321', `s322', + `s330', and `s352'. + (erc-send-current-line): Use `erc-set-active-buffer' (change was + lost in previous bug fix). + +2005-01-14 Francis Litterio + + * erc-button.el (erc-button-add-button): Fixed a bug where the + overlay created by widget-convert-button has a `face' property + that hides the `face' property set on the underlying button text. + + * erc-goodies.el: Docstring fix. + + * erc-button.el: Improved docstring for variable erc-button-face. + +2005-01-13 Diane Murray + + * erc-menu.el (erc-menu-definition): "Topic set by channel + operator": Small word change. "Identify to NickServ...": Check + that we're connected to the server. Added "Save buffer in log" + and "Truncate buffer". + +2005-01-13 Lawrence Mitchell + + * erc.el (erc-display-line-1): Widen before we try to insert + anything, this makes sure input isn't broken when the buffer is + narrowed by the user. + (erc-beg-of-input-line): Simplify, just return the position of + `erc-insert-marker' or error if does not exist. + (erc-send-current-line): Widen before trying to send anything. + +2005-01-13 Diane Murray + + * erc.el, erc-backend.el, erc-list.el: + (erc-update-mode-line-buffer): Strip controls characters from + `channel-topic' since we add our own control character to it. + (TOPIC, 332): Use \C-o instead of \C-c to force an end of IRC + control characters as it also ends bold, underline, and inverse - + \C-c only ends colors. + (erc-chanlist-322): Strip control characters from channel and + topic. No need to interpret controls when we're applying overlays + to the lines. + + * erc.el, erc-backend.el, erc-button.el, erc-netsplit.el, + erc-nicklist.el: Fixed so that each server has an active buffer. + (erc-active-buffer): Now a buffer-local variable. + (erc-active-buffer, erc-set-active-buffer): New functions. + (erc-display-line, erc-echo-notice-in-active-non-server-buffer, + erc-process-away, MODE): Call `erc-active-buffer' to get the + active buffer for the current server. + (erc, erc-process-sentinel-1, erc-grab-region, erc-input-action, + erc-send-current-line, erc-invite-only-mode, + erc-toggle-channel-mode, erc-channel-names, MODE, erc-nick-popup, + erc-nicklist-call-erc-command): Use `erc-set-active-buffer' to set + the active buffer for the current server. + (erc-cmd-WHOLEFT): Use 'active as BUFFER in `erc-display-message'. + + * erc-track.el (erc-track-modified-channels): Server buffers are + now treated the same as channels and queries. This means that + `erc-track-priority-faces-only', `erc-track-exclude', and + `erc-track-exclude-types' now work with server buffers. + +2005-01-12 Diane Murray + + * erc-backend.el (475): Prompt for the channel's key if + `erc-prompt-for-channel-key' is non-nil. Send a new JOIN message + with the key if a key is provided. + + * erc.el (erc-command-indicator): Fixed customization choices so + that there's no `mismatch' message when nil is the value. + +2005-01-11 Michael Olson + + * erc-bbdb.el (bbdb): Lowercase the name of the module. This + fixes a bug which caused an error to occur when trying to enable + the module using the customization interface. + +2005-01-08 Edward O'Connor + + * erc-track.el: Support using faces to indicate channel activity + in the modeline under XEmacs. + (erc-modified-channels-object): New function. + (erc-modified-channels-display): Use it. + `erc-modified-channels-string' renamed to + `erc-modified-channels-object' (because it's no longer a string on + XEmacs). The new function `erc-modified-channels-object' is used + to generate updated values for the same-named variable. + +2005-01-08 Diane Murray + + * ChangeLog.2002: Changed instances of my sourceforge username and + email address to real name and email. + + * erc.el (erc-modules): Changed customization tag descriptions, so + that they all start with a verb; added new modules to choices. + +2005-01-08 Mario Lang + + * debian/rules: Introduce new variable DOCDIR to simplify stuff a + bit. + +2005-01-08 Michael Olson + + * AUTHORS, ChangeLog.2004: Change bpalmer's email address as + requested. + + * CREDITS: Add everyone who is mentioned in the ChangeLogs. + + * debian/copyright (Copyright): Add last few people. This can now + be considered a complete list, as far as CVS entries are + concerned. If people have assigned copyright to the FSF, merge + them with the entry for the FSF. + + * debian/README.Debian: Add entry for XEmacs-related change in + `erc-track.el'. + + * erc.el (erc-cmd-MODE): New command that changes or displays the + mode for a channel or user. The functionality was present before + this change, but there was no documentation for it. + + * erc-auto.in, erc-*.el: Fully investigate copyright headers and + change them appropriately. If a file has been pulled off of + erc.el at one time, keep track of copyright from the time of + separation, but not before. If a file has been derived from a + work outside of erc, keep copyright statements in place. + + * Makefile (VERSION): Change to 5.0! :^) Congrats on all the great + work. I'll wait until hober commits his XEmacs compatibility + patch to erc-track.el, and then release. + (distclean): Alias for `realclean' target. + +2005-01-07 Michael Olson + + * AUTHORS: Add Marcelo Toledo, who has CVS access to this project. + + * ChangeLog.2004: Add my name to my one contribution to erc last + year. + + * CREDITS: Add people that were discovered while scouring + ChangeLogs. + + * debian/copyright: Add everyone from `AUTHORS' to Upstream + Authors. Anyone who has contributed 15 or more lines of + code (according to ChangeLogs) is listed in Copyright section. + Accurate years are included. + + * debian/README.Debian: Paste content of NEWS and reformat + slightly. + + * debian/rules: Concatenate the ChangeLogs during the Debian + install process and then gzip them. + + * Makefile (MISC): Add ChangeLog.yyyy files to list. + (ChangeLog): Remove rule since we do not dynamically generate the + ChangeLog anymore. + + * MkChangeLog: Removed since we do not use it to generate the + ChangeLog anymore. cvs2cl does a much better job anyway. + + * NEWS: Use 3rd level heading instead of bullets for lists that + contain descriptions. + +2005-01-07 Diane Murray + + * erc-list.el: Require 'sort. + (erc-chanlist): Disable undo in the channel list buffer. + + * erc.el, erc-menu.el: The `IRC' menu is now automatically added + to the menu-bar. Add the call to `easy-menu-add' to + `erc-mode-hook' when running in XEmacs (without this the menu + doesn't appear). + + * NEWS: Added the information from + http://emacswiki.org/cgi-bin/wiki/ErcCvsFeatures and the newer + changes which weren't yet documented on that page. + +2005-01-06 Hoan Ton-That + + * erc-log.el (erc-current-logfile): Only downcase the logfile + name, not the whole filename. Also expand relative to + `erc-log-channels-directory'. + (erc-generate-log-file-name-with-date) + (erc-generate-log-file-name-short) + (erc-generate-log-file-name-long): Don't expand filename, done in + `erc-current-logfile'. + +2005-01-06 Lawrence Mitchell + + * NEWS: New file, details user visible changes from version to + version. + + * HACKING (NEWS entries): Mention NEWS file, and what its purpose + is. + +2005-01-05 Michael Olson + + * FOR-RELEASE: New file containing the list of release-critical + tasks. Feel free to add to it. + + * debian/rules (binary-erc): Add ChangeLog files. + +2005-01-04 Michael Olson + + * ChangeLog.2001, ChangeLog.2002, ChangeLog.2003, ChangeLog.2004: + ChangeLog entries from previous years. + + * ChangeLog: New file containing ChangeLog entries for the current + year. Please update this file manually whenever a change is + committed. This is a new policy. + + * AUTHORS: Add myself to list. Some entries were space-delimited + instead of TAB-delimited, and since the latter seemed to be the + default, make the other entries conform. + + * HACKING (ChangeLog Entries): Update section to reflect new + policy toward ChangeLog entries, which is that they should be + manually updated whenever a change is committed. + +2005-01-04 Diane Murray + + * erc.el (erc-connection-established, erc-login): Update the + mode-line. + (erc-update-mode-line-buffer): If `erc-current-nick' returns nil, + use an empty string for ?n character in format spec. Set + `mode-line-process' to ":connecting" while the connection is being + established. + +2005-01-04 Lawrence Mitchell + + * AUTHORS: Update list of authors. + +2005-01-02 Diane Murray + + * erc-goodies.el (erc-control-characters): New customization + group. + (erc-interpret-controls-p): Small fix, addition to + documentation. Updated customization to allow 'remove as a value. + Use 'erc-control-characters as `:group'. + (erc-interpret-mirc-color): Use 'erc-control-characters as + `:group'. + (erc-beep-p): Updated documentation. Use 'erc-control-characters + as `:group'. + (define-erc-module irccontrols): Add `erc-controls-highlight' to + `erc-insert-modify-hook' and `erc-send-modify-hook' since it + changes the text's appearance. + (erc-controls-remove-regexp, erc-controls-interpret-regexp): New + variables. + (erc-controls-highlight): Fixed so that highlighting works even if + there is no following control character. Fixed mirc color + highlighting; now respecting `erc-interpret-mirc-color'. Fixed a + bug where emacs would get stuck in a loop when \C-g was in a + message and `erc-beep-p' was set to nil (default setting). + +See ChangeLog.2004 for earlier changes. + + Copyright (C) 2005 Free Software Foundation, Inc. + Copying and distribution of this file, with or without modification, + are permitted provided the copyright notice and this notice are preserved. + +;; Local Variables: +;; coding: utf-8 +;; End: + +;; arch-tag: 70f1733a-3e2f-43c2-91c3-d9ace93f82ba diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-autoaway.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-autoaway.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,207 @@ +;;; erc-autoaway.el --- Provides autoaway for ERC + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Jorgen Schaefer +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoAway + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; TODO: +;; - Legacy names: erc-auto-discard-away, erc-auto-set-away + +;;; Code: + +(require 'erc) + +(defgroup erc-autoaway nil + "Set yourself automatically away after some idletime and set +yourself back when you type something." + :group 'erc) + +(defvar erc-autoaway-idletimer nil + "The Emacs idletimer. +This is only used when `erc-autoaway-use-emacs-idle' is non-nil.") + +(defcustom erc-autoaway-use-emacs-idle nil + "*If non-nil, the idle time refers to idletime in Emacs. +If nil, the idle time refers to idletime on IRC only. +The time itself is specified by `erc-autoaway-idle-seconds'. +See `erc-autoaway-mode' for more information on the various +definitions of being idle. + +Note that using Emacs idletime is currently broken for most versions, +since process activity (as happens all the time on IRC) makes Emacs +non-idle. Emacs idle-time and user idle-time are just not the same." + :group 'erc-autoaway + :type 'boolean) + +;;;###autoload (autoload 'erc-autoaway-mode "erc-autoaway") +(define-erc-module autoaway nil + "In ERC autoaway mode, you can be set away automatically. +If `erc-auto-set-away' is set, then you will be set away after +the number of seconds specified in `erc-autoaway-idle-seconds'. + +There are several kinds of being idle: + +IRC idle time measures how long since you last sent something (see +`erc-autoaway-last-sent-time'). This is the default. + +Emacs idle time measures how long Emacs has been idle. This is +currently not useful, since Emacs is non-idle when it handles +ping-pong with IRC servers. See `erc-autoaway-use-emacs-idle' for +more information. + +User idle time measures how long you have not been sending any +commands to Emacs, or to your system. Emacs currently provides no way +to measure user idle time. + +If `erc-auto-discard-away' is set, then typing anything, will +set you no longer away. + +Related variables: `erc-public-away-p' and `erc-away-nickname'." + ;; Enable: + ((add-hook 'erc-send-completed-hook 'erc-autoaway-reset-idletime) + (add-hook 'erc-server-001-functions 'erc-autoaway-reset-idletime) + (add-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away) + (when erc-autoaway-use-emacs-idle + (erc-autoaway-reestablish-idletimer))) + ;; Disable: + ((remove-hook 'erc-send-completed-hook 'erc-autoaway-reset-idletime) + (remove-hook 'erc-server-001-functions 'erc-autoaway-reset-idletime) + (remove-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away) + (when erc-autoaway-idletimer + (erc-cancel-timer erc-autoaway-idletimer) + (setq erc-autoaway-idletimer nil)))) + +(defcustom erc-auto-set-away t + "*If non-nil, set away after `erc-autoaway-idle-seconds' seconds of idling. +ERC autoaway mode can set you away when you idle, and set you no +longer away when you type something. This variable controls whether +you will be set away when you idle. See `erc-auto-discard-away' for +the other half." + :group 'erc-autoaway + :type 'boolean) + +(defcustom erc-auto-discard-away t + "*If non-nil, sending anything when away automatically discards away state. +ERC autoaway mode can set you away when you idle, and set you no +longer away when you type something. This variable controls whether +you will be set no longer away when you type something. See +`erc-auto-set-away' for the other half. +See also `erc-autoaway-no-auto-discard-regexp'." + :group 'erc-autoaway + :type 'boolean) + +(defcustom erc-autoaway-no-auto-discard-regexp "^/g?away.*$" + "*Input that matches this will not automatically discard away status. +See `erc-auto-discard-away'." + :group 'erc-autoaway + :type 'regexp) + +(eval-when-compile (defvar erc-autoaway-idle-seconds)) + +(defun erc-autoaway-reestablish-idletimer () + "Reestablish the emacs idletimer. +You have to call this function each time you change +`erc-autoaway-idle-seconds', if `erc-autoaway-use-emacs-idle' is set." + (interactive) + (when erc-autoaway-idletimer + (erc-cancel-timer erc-autoaway-idletimer)) + (setq erc-autoaway-idletimer + (run-with-idle-timer erc-autoaway-idle-seconds + t + 'erc-autoaway-set-away + erc-autoaway-idle-seconds))) + +(defcustom erc-autoaway-idle-seconds 1800 + "*Number of seconds after which ERC will set you automatically away. +If you are changing this variable using lisp instead of customizing it, +you have to run `erc-autoaway-reestablish-idletimer' afterwards." + :group 'erc-autoaway + :set (lambda (sym val) + (set-default sym val) + (when erc-autoaway-use-emacs-idle + (erc-autoaway-reestablish-idletimer))) + :type 'number) + +(defcustom erc-autoaway-message + "I'm gone (autoaway after %i seconds of idletime)" + "*Message ERC will use when he sets you automatically away. +It is used as a `format' string with the argument of the idletime in +seconds." + :group 'erc-autoaway + :type 'string) + +(defvar erc-autoaway-last-sent-time (erc-current-time) + "The last time the user sent something.") + +(defun erc-autoaway-reset-idletime (line &rest stuff) + "Reset the stored idletime for the user. +This is one global variable since a user talking on one net can talk +on another net too." + (when (and erc-auto-discard-away + (stringp line) + (not (string-match erc-autoaway-no-auto-discard-regexp line))) + (erc-autoaway-set-back line)) + (setq erc-autoaway-last-sent-time (erc-current-time))) + +(defun erc-autoaway-set-back (line) + "Discard the away state globally." + (when (erc-away-p) + (setq erc-autoaway-last-sent-time (erc-current-time)) + (erc-cmd-GAWAY ""))) + +(defun erc-autoaway-possibly-set-away (current-time) + "Set autoaway when `erc-auto-set-away' is true and the idletime is +exceeds `erc-autoaway-idle-seconds'." + ;; A test for (erc-server-process-alive) is not necessary, because + ;; this function is called from `erc-timer-hook', which is called + ;; whenever the server sends something to the client. + (when (and erc-auto-set-away + (not (erc-away-p))) + (let ((idle-time (erc-time-diff erc-autoaway-last-sent-time + current-time))) + (when (>= idle-time erc-autoaway-idle-seconds) + (erc-display-message + nil 'notice nil + (format "Setting automatically away after %i seconds of idle-time" + idle-time)) + (erc-autoaway-set-away idle-time))))) + +(defun erc-autoaway-set-away (idle-time) + "Set the away state globally." + ;; Note that the idle timer runs, even when Emacs is inactive. In + ;; order to prevent flooding when we connect, we test for an + ;; existing process. + (when (and (erc-server-process-alive) + (not (erc-away-p))) + (erc-cmd-GAWAY (format erc-autoaway-message idle-time)))) + +(provide 'erc-autoaway) + +;;; erc-autoaway.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 16fc241e-8358-4b56-9fe2-116bdd0ba3bc diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-autojoin.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-autojoin.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,139 @@ +;;; erc-autojoin.el --- autojoin channels on connect and reconnects + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Alex Schroeder +;; Keywords: irc +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcAutoJoin + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This allows us to customize an `erc-autojoin-channels-alist'. As +;; we /JOIN and /PART channels, this alist is updated to reflect our +;; current setup, so that when we reconnect, we rejoin the same +;; channels. The alist can be customized, so that the customized +;; value will be used when we reconnect in our next Emacs session. + +;;; Code: + +(require 'erc) +;;; Minor Mode + +(defgroup erc-autojoin nil + "Enable autojoining." + :group 'erc) + +;;;###autoload (autoload 'erc-autojoin-mode "erc-autojoin" nil t) +(define-erc-module autojoin nil + "Makes ERC autojoin on connects and reconnects." + ((add-hook 'erc-after-connect 'erc-autojoin-channels) + (add-hook 'erc-server-JOIN-functions 'erc-autojoin-add) + (add-hook 'erc-server-PART-functions 'erc-autojoin-remove)) + ((remove-hook 'erc-after-connect 'erc-autojoin-channels) + (remove-hook 'erc-server-JOIN-functions 'erc-autojoin-add) + (remove-hook 'erc-server-PART-functions 'erc-autojoin-remove))) + +(defcustom erc-autojoin-channels-alist nil + "Alist of channels to autojoin on IRC networks. +Every element in the alist has the form (SERVER . CHANNELS). +SERVER is a regexp matching the server, and channels is the +list of channels to join. + +Customize this variable to set the value for your first connect. +Once you are connected and join and part channels, this alist +keeps track of what channels you are on, and will join them +again when you get disconnected. When you restart Emacs, however, +those changes are lost, and the customization you saved the last +time is used again." + :group 'erc-autojoin + :type '(repeat (cons :tag "Server" + (regexp :tag "Name") + (repeat :tag "Channels" + (string :tag "Name"))))) + +(defcustom erc-autojoin-domain-only t + "Truncate host name to the domain name when joining a server. +If non-nil, and a channel on the server a.b.c is joined, then +only b.c is used as the server for `erc-autojoin-channels-alist'. +This is important for networks that redirect you to other +servers, presumably in the same domain." + :group 'erc-autojoin + :type 'boolean) + +(defun erc-autojoin-channels (server nick) + "Autojoin channels in `erc-autojoin-channels-alist'." + (dolist (l erc-autojoin-channels-alist) + (when (string-match (car l) server) + (dolist (chan (cdr l)) + (erc-server-send (concat "join " chan)))))) + +(defun erc-autojoin-add (proc parsed) + "Add the channel being joined to `erc-autojoin-channels-alist'." + (let* ((chnl (erc-response.contents parsed)) + (nick (car (erc-parse-user (erc-response.sender parsed)))) + (server (with-current-buffer (process-buffer proc) + (or erc-server-announced-name erc-session-server)))) + (when (erc-current-nick-p nick) + (when (and erc-autojoin-domain-only + (string-match "[^.]+\\.\\([^.]+\\.[^.]+\\)$" server)) + (setq server (match-string 1 server))) + (let ((elem (assoc server erc-autojoin-channels-alist))) + (if elem + (unless (member chnl (cdr elem)) + (setcdr elem (cons chnl (cdr elem)))) + (setq erc-autojoin-channels-alist + (cons (list server chnl) + erc-autojoin-channels-alist)))))) + ;; We must return nil to tell ERC to continue running the other + ;; functions. + nil) + +;; (erc-parse-user "kensanata!~user@dclient217-162-233-228.hispeed.ch") + +(defun erc-autojoin-remove (proc parsed) + "Remove the channel being left from `erc-autojoin-channels-alist'." + (let* ((chnl (car (erc-response.command-args parsed))) + (nick (car (erc-parse-user (erc-response.sender parsed)))) + (server (with-current-buffer (process-buffer proc) + (or erc-server-announced-name erc-session-server)))) + (when (erc-current-nick-p nick) + (when (and erc-autojoin-domain-only + (string-match "[^.]+\\.\\([^.]+\\.[^.]+\\)$" server)) + (setq server (match-string 1 server))) + (let ((elem (assoc server erc-autojoin-channels-alist))) + (when elem + (setcdr elem (delete chnl (cdr elem))) + (unless (cdr elem) + (setq erc-autojoin-channels-alist + (delete elem erc-autojoin-channels-alist))))))) + ;; We must return nil to tell ERC to continue running the other + ;; functions. + nil) + +(provide 'erc-autojoin) + +;;; erc-autojoin.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: d62d8b15-8e31-49d6-8a73-12f11e717414 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-backend.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-backend.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,1786 @@ +;;; erc-backend.el --- Backend network communication for ERC + +;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + +;; Filename: erc-backend.el +;; Author: Lawrence Mitchell +;; Created: 2004-05-7 +;; Keywords: IRC chat client internet + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file defines backend network communication handlers for ERC. +;; +;; How things work: +;; +;; You define a new handler with `define-erc-response-handler'. This +;; defines a function, a corresponding hook variable, and populates a +;; global hash table `erc-server-responses' with a map from response +;; to hook variable. See the function documentation for more +;; information. +;; +;; Upon receiving a line from the server, `erc-parse-server-response' +;; is called on it. +;; +;; A line generally looks like: +;; +;; LINE := ':' SENDER ' ' COMMAND ' ' (COMMAND-ARGS ' ')* ':' CONTENTS +;; SENDER := Not ':' | ' ' +;; COMMAND := Not ':' | ' ' +;; COMMAND-ARGS := Not ':' | ' ' +;; +;; This gets parsed and stuffed into an `erc-response' struct. You +;; can access the fields of the struct with: +;; +;; COMMAND --- `erc-response.command' +;; COMMAND-ARGS --- `erc-response.command-args' +;; CONTENTS --- `erc-response.contents' +;; SENDER --- `erc-response.sender' +;; LINE --- `erc-response.unparsed' +;; +;; WARNING, WARNING!! +;; It's probably not a good idea to destructively modify the list +;; of command-args in your handlers, since other functions down the +;; line may well need to access the arguments too. +;; +;; That is, unless you're /absolutely/ sure that your handler doesn't +;; invoke some other function that needs to use COMMAND-ARGS, don't do +;; something like +;; +;; (while (erc-response.command-args parsed) +;; (let ((a (pop (erc-response.command-args parsed)))) +;; ...)) +;; +;; The parsed response is handed over to +;; `erc-handle-parsed-server-response', which checks whether it should +;; carry out duplicate suppression, and then runs `erc-call-hooks'. +;; `erc-call-hooks' retrieves the relevant hook variable from +;; `erc-server-responses' and runs it. +;; +;; Most handlers then destructure the parsed response in some way +;; (depending on what the handler is, the arguments have different +;; meanings), and generally display something, usually using +;; `erc-display-message'. + +;;; TODO: + +;; o Generalise the display-line code so that we can use it to +;; display the stuff we send, as well as the stuff we receive. +;; Then, move all display-related code into another backend-like +;; file, erc-display.el, say. +;; +;; o Clean up the handlers using new display code (has to be written +;; first). + +;;; History: + +;; 2004/05/10 -- Handler bodies taken out of erc.el and ported to new +;; interface. + +;; 2005-08-13 -- Moved sending commands from erc.el. + +;;; Code: + +(require 'erc-compat) +(eval-when-compile (require 'cl)) +(autoload 'erc-with-buffer "erc" nil nil 'macro) +(autoload 'erc-log "erc" nil nil 'macro) + +;;;; Variables and options + +(defvar erc-server-responses (make-hash-table :test #'equal) + "Hashtable mapping server responses to their handler hooks.") + +(defstruct (erc-response (:conc-name erc-response.)) + (unparsed "" :type string) + (sender "" :type string) + (command "" :type string) + (command-args '() :type list) + (contents "" :type string)) + +;;; User data + +(defvar erc-server-current-nick nil + "Nickname on the current server. +Use `erc-current-nick' to access this.") +(make-variable-buffer-local 'erc-server-current-nick) + +;;; Server attributes + +(defvar erc-server-process nil + "The process object of the corresponding server connection.") +(make-variable-buffer-local 'erc-server-process) + +(defvar erc-session-server nil + "The server name used to connect to for this session.") +(make-variable-buffer-local 'erc-session-server) + +(defvar erc-session-port nil + "The port used to connect to.") +(make-variable-buffer-local 'erc-session-port) + +(defvar erc-server-announced-name nil + "The name the server announced to use.") +(make-variable-buffer-local 'erc-server-announced-name) + +(defvar erc-server-version nil + "The name and version of the server's ircd.") +(make-variable-buffer-local 'erc-server-version) + +(defvar erc-server-parameters nil + "Alist listing the supported server parameters. + +This is only set if the server sends 005 messages saying what is +supported on the server. + +Entries are of the form: + (PARAMETER . VALUE) +or + (PARAMETER) if no value is provided. + +Some examples of possible parameters sent by servers: +CHANMODES=b,k,l,imnpst - list of supported channel modes +CHANNELLEN=50 - maximum length of channel names +CHANTYPES=#&!+ - supported channel prefixes +CHARMAPPING=rfc1459 - character mapping used for nickname and channels +KICKLEN=160 - maximum allowed kick message length +MAXBANS=30 - maximum number of bans per channel +MAXCHANNELS=10 - maximum number of channels allowed to join +NETWORK=EFnet - the network identifier +NICKLEN=9 - maximum allowed length of nicknames +PREFIX=(ov)@+ - list of channel modes and the user prefixes if user has mode +RFC2812 - server supports RFC 2812 features +SILENCE=10 - supports the SILENCE command, maximum allowed number of entries +TOPICLEN=160 - maximum allowed topic length +WALLCHOPS - supports sending messages to all operators in a channel") +(make-variable-buffer-local 'erc-server-parameters) + +;;; Server and connection state + +(defvar erc-server-connected nil + "Non-nil if the `current-buffer' is associated with an open IRC connection. +This variable is buffer-local.") +(make-variable-buffer-local 'erc-server-connected) + +(defvar erc-server-quitting nil + "Non-nil if the user requests a quit.") +(make-variable-buffer-local 'erc-server-quitting) + +(defvar erc-server-lines-sent nil + "Line counter.") +(make-variable-buffer-local 'erc-server-lines-sent) + +(defvar erc-server-last-peers '(nil . nil) + "Last peers used, both sender and receiver. +Those are used for /MSG destination shortcuts.") +(make-variable-buffer-local 'erc-server-last-peers) + +(defvar erc-server-last-sent-time nil + "Time the message was sent. +This is useful for flood protection.") +(make-variable-buffer-local 'erc-server-last-sent-time) + +(defvar erc-server-last-ping-time nil + "Time the last ping was sent. +This is useful for flood protection.") +(make-variable-buffer-local 'erc-server-last-ping-time) + +(defvar erc-server-lag nil + "Calculated server lag time in seconds. +This variable is only set in a server buffer.") +(make-variable-buffer-local 'erc-server-lag) + +(defvar erc-server-filter-data nil + "The data that arrived from the server +but has not been processed yet.") +(make-variable-buffer-local 'erc-server-filter-data) + +(defvar erc-server-duplicates (make-hash-table :test 'equal) + "Internal variable used to track duplicate messages.") +(make-variable-buffer-local 'erc-server-duplicates) + +;; From Circe +(defvar erc-server-processing-p nil + "Non-nil when we're currently processing a message. + +When ERC receives a private message, it sets up a new buffer for +this query. These in turn, though, do start flyspell. This +involves starting an external process, in which case Emacs will +wait - and when it waits, it does accept other stuff from, say, +network exceptions. So, if someone sends you two messages +quickly after each other, ispell is started for the first, but +might take long enough for the second message to be processed +first.") +(make-variable-buffer-local 'erc-server-processing-p) + +(defvar erc-server-flood-last-message 0 + "When we sent the last message. +See `erc-server-flood-margin' for an explanation of the flood +protection algorithm.") +(make-variable-buffer-local 'erc-server-flood-last-message) + +(defvar erc-server-flood-queue nil + "The queue of messages waiting to be sent to the server. +See `erc-server-flood-margin' for an explanation of the flood +protection algorithm.") +(make-variable-buffer-local 'erc-server-flood-queue) + +(defvar erc-server-flood-timer nil + "The timer to resume sending.") +(make-variable-buffer-local 'erc-server-flood-timer) + +;;; IRC protocol and misc options + +(defgroup erc-server nil + "Parameters for dealing with IRC servers." + :group 'erc) + +(defcustom erc-server-auto-reconnect t + "Non-nil means that ERC will attempt to reestablish broken connections. + +Reconnection will happen automatically for any unexpected disconnection." + :group 'erc-server + :type 'boolean) + +(defcustom erc-split-line-length 440 + "*The maximum length of a single message. +If a message exceeds this size, it is broken into multiple ones. + +IRC allows for lines up to 512 bytes. Two of them are CR LF. +And a typical message looks like this: + + :nicky!uhuser@host212223.dialin.fnordisp.net PRIVMSG #lazybastards :Hello! + +You can limit here the maximum length of the \"Hello!\" part. +Good luck." + :type 'integer + :group 'erc-server) + +(defcustom erc-server-coding-system (if (and (fboundp 'coding-system-p) + (coding-system-p 'undecided) + (coding-system-p 'utf-8)) + '(utf-8 . undecided) + nil) + "The default coding system for incoming and outgoing text. +This is either a coding system, a cons, a function, or nil. + +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'. + +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. +Emacs cannot guess it, since it does not know what the people on the +other end of the line are using." + :group 'erc-server + :type '(choice (const :tag "None" nil) + coding-system + (cons (coding-system :tag "encoding" :value utf-8) + (coding-system :tag "decoding" :value undecided)) + function)) + +(defcustom erc-encoding-coding-alist nil + "Alist of target regexp and coding-system pairs to use. +This overrides `erc-server-coding-system' depending on the +current target as returned by `erc-default-target'. + +Example: If you know that the channel #linux-ru uses the coding-system +`cyrillic-koi8', then add '(\"#linux-ru\" . cyrillic-koi8) to the +alist." + :group 'erc-server + :type '(repeat (cons (string :tag "Target") + coding-system))) + +(defcustom erc-server-connect-function + (if (and (fboundp 'open-network-stream-nowait) + ;; CVS Emacs claims to define open-network-stream-nowait on + ;; windows, however, it does, in fact, not work. + (not (memq system-type '(windows-nt cygwin ms-dos darwin)))) + 'open-network-stream-nowait + 'open-network-stream) + "Function used to initiate a connection. +It should take same arguments as `open-network-stream' does." + :group 'erc-server + :type 'function) + +(defcustom erc-server-prevent-duplicates '("301") + "*Either nil or a list of strings. +Each string is a IRC message type, like PRIVMSG or NOTICE. +All Message types in that list of subjected to duplicate prevention." + :type '(choice (const nil) (list string)) + :group 'erc-server) + +(defcustom erc-server-duplicate-timeout 60 + "*The time allowed in seconds between duplicate messages. + +If two identical messages arrive within this value of one another, the second +isn't displayed." + :type 'integer + :group 'erc-server) + +;;; Flood-related + +;; Most of this is courtesy of Jorgen Schaefer and Circe +;; (http://www.nongnu.org/circe) + +(defcustom erc-server-flood-margin 10 + "*A margin on how much excess data we send. +The flood protection algorithm of ERC works like the one +detailed in RFC 2813, section 5.8 \"Flood control of clients\". + + * If `erc-server-flood-last-message' is less than the current + time, set it equal. + * While `erc-server-flood-last-message' is less than + `erc-server-flood-margin' seconds ahead of the current + time, send a message, and increase + `erc-server-flood-last-message' by + `erc-server-flood-penalty' for each message." + :type 'integer + :group 'erc-server) + +(defcustom erc-server-flood-penalty 3 + "How much we penalize a message. +See `erc-server-flood-margin' for an explanation of the flood +protection algorithm." + :type 'integer + :group 'erc-server) + +;; Ping handling + +(defcustom erc-server-send-ping-interval 90 + "*Interval of sending pings to the server, in seconds. +If this is set to nil, pinging the server is disabled." + :group 'erc-server + :type '(choice (const nil) (integer :tag "Seconds"))) + +(defvar erc-server-ping-handler nil + "This variable holds the periodic ping timer.") +(make-variable-buffer-local 'erc-server-ping-handler) + +;;;; Helper functions + +;; From Circe +(defun erc-split-line (longline) + "Return a list of lines which are not too long for IRC. +The length is specified in `erc-split-line-length'. + +Currently this is called by `erc-send-input'." + (if (< (length longline) + erc-split-line-length) + (list longline) + (with-temp-buffer + (insert longline) + (let ((fill-column erc-split-line-length)) + (fill-region (point-min) (point-max) + nil t)) + (split-string (buffer-string) "\n")))) + +;; Used by CTCP functions +(defun erc-upcase-first-word (str) + "Upcase the first word in STR." + (with-temp-buffer + (insert str) + (goto-char (point-min)) + (upcase-word 1) + (buffer-string))) + +(defun erc-server-setup-periodical-server-ping (&rest ignore) + "Set up a timer to periodically ping the current server." + (and erc-server-ping-handler (erc-cancel-timer erc-server-ping-handler)) + (when erc-server-send-ping-interval + (setq erc-server-ping-handler + (run-with-timer + 4 erc-server-send-ping-interval + (lambda (buf) + (when (buffer-live-p buf) + (with-current-buffer buf + (erc-server-send + (format "PING %.0f" + (erc-current-time)))))) + (current-buffer))))) + +(defun erc-server-process-alive () + "Return non-nil when `erc-server-process' is open or running." + (and (boundp 'erc-server-process) + (processp erc-server-process) + (memq (process-status erc-server-process) '(run open)))) + +;;;; Connecting to a server + +(defun erc-server-connect (server port) + "Perform the connection and login. +We will store server variables in the current buffer." + (let ((msg (erc-format-message 'connect ?S server ?p port))) + (message "%s" msg) + (setq erc-server-process + (funcall erc-server-connect-function + (format "erc-%s-%s" server port) + (current-buffer) server port)) + (message "%s...done" msg)) + ;; Misc server variables + (setq erc-server-quitting nil) + (setq erc-server-last-sent-time (erc-current-time)) + (setq erc-server-last-ping-time (erc-current-time)) + (setq erc-server-lines-sent 0) + ;; last peers (sender and receiver) + (setq erc-server-last-peers '(nil . nil)) + ;; process handlers + (set-process-sentinel erc-server-process 'erc-process-sentinel) + (set-process-filter erc-server-process 'erc-server-filter-function) + ;; we do our own encoding and decoding + (when (fboundp 'set-process-coding-system) + (set-process-coding-system erc-server-process 'raw-text)) + (set-marker (process-mark erc-server-process) (point)) + (erc-log "\n\n\n********************************************\n") + (message (erc-format-message 'login ?n (erc-current-nick))) + ;; wait with script loading until we receive a confirmation (first + ;; MOTD line) + (if (eq erc-server-connect-function 'open-network-stream-nowait) + ;; it's a bit unclear otherwise that it's attempting to establish a + ;; connection + (erc-display-message nil nil (current-buffer) + "Opening connection..\n") + (erc-login))) + +(defun erc-server-filter-function (process string) + "The process filter for the ERC server." + (with-current-buffer (process-buffer process) + ;; If you think this is written in a weird way - please refer to the + ;; docstring of `erc-server-processing-p' + (if erc-server-processing-p + (setq erc-server-filter-data + (if erc-server-filter-data + (concat erc-server-filter-data string) + string)) + ;; This will be true even if another process is spawned! + (let ((erc-server-processing-p t)) + (setq erc-server-filter-data (if erc-server-filter-data + (concat erc-server-filter-data + string) + string)) + (while (and erc-server-filter-data + (string-match "[\n\r]+" erc-server-filter-data)) + (let ((line (substring erc-server-filter-data + 0 (match-beginning 0)))) + (setq erc-server-filter-data + (if (= (match-end 0) + (length erc-server-filter-data)) + nil + (substring erc-server-filter-data + (match-end 0)))) + (erc-parse-server-response process line))))))) + +(defun erc-process-sentinel-1 (event) + "This will be called when erc-process-sentinel has decided that we +are going to quit. Determine whether user has quit or whether erc has +been terminated. Conditionally try to reconnect and take appropriate +action." + (if erc-server-quitting + ;; normal quit + (progn + (let ((string "\n\n*** ERC finished ***\n") + (inhibit-read-only t)) + (erc-put-text-property 0 (length string) + 'face 'erc-error-face string) + (insert string)) + (when erc-kill-server-buffer-on-quit + (set-buffer-modified-p nil) + (kill-buffer (current-buffer)))) + ;; unexpected disconnect + (erc-display-message nil 'error (current-buffer) + (if erc-server-auto-reconnect + 'disconnected + 'disconnected-noreconnect)) + (erc-update-mode-line) + (erc-set-active-buffer (current-buffer)) + (setq erc-server-last-sent-time 0) + (setq erc-server-lines-sent 0) + (if (and erc-server-auto-reconnect + (not (string-match "^deleted" event)) + ;; open-network-stream-nowait error for connection refused + (not (string-match "^failed with code 111" event))) + ;; Yuck, this should perhaps funcall + ;; erc-server-reconnect-function with no args + (erc erc-session-server erc-session-port erc-server-current-nick + erc-session-user-full-name t erc-session-password) + ;; terminate, do not reconnect + (let ((string (concat "\n\n*** ERC terminated: " event + "\n")) + (inhibit-read-only t)) + (erc-put-text-property 0 (length string) + 'face 'erc-error-face string) + (insert string))))) + +(defun erc-process-sentinel (cproc event) + "Sentinel function for ERC process." + (with-current-buffer (process-buffer cproc) + (erc-log (format + "SENTINEL: proc: %S status: %S event: %S (quitting: %S)" + cproc (process-status cproc) event erc-server-quitting)) + (if (string-match "^open" event) + ;; newly opened connection (no wait) + (erc-login) + ;; assume event is 'failed + (let ((buf (process-buffer cproc))) + (erc-with-all-buffers-of-server cproc nil + (setq erc-server-connected nil)) + (when erc-server-ping-handler + (progn (erc-cancel-timer erc-server-ping-handler) + (setq erc-server-ping-handler nil))) + (run-hook-with-args 'erc-disconnected-hook + (erc-current-nick) (system-name) "") + ;; Remove the prompt + (forward-line 0) + (erc-remove-text-properties-region (point) (point-max)) + (delete-region (point) (point-max)) + ;; Decide what to do with the buffer + ;; Restart if disconnected + (erc-process-sentinel-1 event) + ;; Make sure we don't write to the buffer if it has been + ;; killed + (when (buffer-live-p buf) + (erc-update-mode-line) + (set-buffer-modified-p nil)))))) + +;;;; Sending messages + +(defun erc-coding-system-for-target (target) + "Return the coding system or cons cell appropriate for TARGET. +This is determined via `erc-encoding-coding-alist' or +`erc-server-coding-system'." + (or (cdr (assoc target erc-encoding-coding-alist)) + (and (functionp erc-server-coding-system) + (funcall erc-server-coding-system)) + erc-server-coding-system)) + +(defun erc-decode-string-from-target (str target) + "Decode STR as appropriate for TARGET. +This is indicated by `erc-encoding-coding-alist', defaulting to the value of +`erc-server-coding-system'." + (unless (stringp str) + (setq str "")) + (let ((coding (erc-coding-system-for-target target))) + (when (consp coding) + (setq coding (cdr coding))) + (erc-decode-coding-string str coding))) + +;; proposed name, not used by anything yet +(defun erc-send-line (text display-fn) + "Send TEXT to the current server. Wrapping and flood control apply. +Use DISPLAY-FN to show the results." + (mapc (lambda (line) + (erc-server-send line) + (funcall display-fn)) + (erc-split-line text))) + +;; From Circe, with modifications +(defun erc-server-send (string &optional forcep target) + "Send STRING to the current server. +If FORCEP is non-nil, no flood protection is done - the string is +sent directly. This might cause the messages to arrive in a wrong +order. + +If TARGET is specified, look up encoding information for that +channel in `erc-encoding-coding-alist' or +`erc-server-coding-system'. + +See `erc-server-flood-margin' for an explanation of the flood +protection algorithm." + (erc-log (concat "erc-server-send: " string "(" (buffer-name) ")")) + (setq erc-server-last-sent-time (erc-current-time)) + (let ((buf (erc-server-buffer)) + (encoding (erc-coding-system-for-target + (or target (erc-default-target))))) + (when (consp encoding) + (setq encoding (car encoding))) + (if (and buf + (erc-server-process-alive)) + (with-current-buffer buf + (let ((str (concat string "\r\n"))) + (if forcep + (progn + (setq erc-server-flood-last-message + (+ erc-server-flood-penalty + erc-server-flood-last-message)) + (erc-log-irc-protocol str 'outbound) + (condition-case err + (progn + ;; Set encoding just before sending the string + (when (fboundp 'set-process-coding-system) + (set-process-coding-system erc-server-process + 'raw-text encoding)) + (process-send-string erc-server-process str)) + ;; See `erc-server-send-queue' for full + ;; explanation of why we need this condition-case + (error nil))) + (setq erc-server-flood-queue + (append erc-server-flood-queue + (list (cons str encoding)))) + (erc-server-send-queue (current-buffer)))) + t) + (message "ERC: No process running") + nil))) + +;; From Circe +(defun erc-server-send-queue (buffer) + "Send messages in `erc-server-flood-queue'. +See `erc-server-flood-margin' for an explanation of the flood +protection algorithm." + (with-current-buffer buffer + (let ((now (erc-current-time))) + (when erc-server-flood-timer + (erc-cancel-timer erc-server-flood-timer) + (setq erc-server-flood-timer nil)) + (when (< erc-server-flood-last-message + now) + (setq erc-server-flood-last-message now)) + (while (and erc-server-flood-queue + (< erc-server-flood-last-message + (+ now erc-server-flood-margin))) + (let ((msg (caar erc-server-flood-queue)) + (encoding (cdar erc-server-flood-queue))) + (setq erc-server-flood-queue (cdr erc-server-flood-queue) + erc-server-flood-last-message + (+ erc-server-flood-last-message + erc-server-flood-penalty)) + (erc-log-irc-protocol msg 'outbound) + (erc-log (concat "erc-server-send-queue: " + msg "(" (buffer-name buffer) ")")) + (when (erc-server-process-alive) + (condition-case err + ;; Set encoding just before sending the string + (progn + (when (fboundp 'set-process-coding-system) + (set-process-coding-system erc-server-process + 'raw-text encoding)) + (process-send-string erc-server-process msg)) + ;; Sometimes the send can occur while the process is + ;; being killed, which results in a weird SIGPIPE error. + ;; Catch this and ignore it. + (error nil))))) + (when erc-server-flood-queue + (setq erc-server-flood-timer + (run-at-time 2 nil #'erc-server-send-queue buffer)))))) + +(defun erc-message (message-command line &optional force) + "Send LINE to the server as a privmsg or a notice. +MESSAGE-COMMAND should be either \"PRIVMSG\" or \"NOTICE\". +If the target is \",\", the last person you've got a message from will +be used. If the target is \".\", the last person you've sent a message +to will be used." + (cond + ((string-match "^\\s-*\\(\\S-+\\) ?\\(.*\\)" line) + (let ((tgt (match-string 1 line)) + (s (match-string 2 line))) + (erc-log (format "cmd: MSG(%s): [%s] %s" message-command tgt s)) + (cond + ((string= tgt ",") + (if (car erc-server-last-peers) + (setq tgt (car erc-server-last-peers)) + (setq tgt nil))) + ((string= tgt ".") + (if (cdr erc-server-last-peers) + (setq tgt (cdr erc-server-last-peers)) + (setq tgt nil)))) + (cond + (tgt + (setcdr erc-server-last-peers tgt) + (erc-server-send (format "%s %s :%s" message-command tgt s) + force)) + (t + (erc-display-message nil 'error (current-buffer) 'no-target)))) + t) + (t nil))) + +;;; CTCP + +(defun erc-send-ctcp-message (tgt l &optional force) + "Send CTCP message L to TGT. + +If TGT is nil the message is not sent. +The command must contain neither a prefix nor a trailing `\\n'. + +See also `erc-server-send'." + (let ((l (erc-upcase-first-word l))) + (cond + (tgt + (erc-log (format "erc-send-CTCP-message: [%s] %s" tgt l)) + (erc-server-send (format "PRIVMSG %s :\C-a%s\C-a" tgt l) + force))))) + +(defun erc-send-ctcp-notice (tgt l &optional force) + "Send CTCP notice L to TGT. + +If TGT is nil the message is not sent. +The command must contain neither a prefix nor a trailing `\\n'. + +See also `erc-server-send'." + (let ((l (erc-upcase-first-word l))) + (cond + (tgt + (erc-log (format "erc-send-CTCP-notice: [%s] %s" tgt l)) + (erc-server-send (format "NOTICE %s :\C-a%s\C-a" tgt l) + force))))) + +;;;; Handling responses + +(defun erc-parse-server-response (proc string) + "Parse and act upon a complete line from an IRC server. +PROC is the process (connection) from which STRING was received. +PROCs `process-buffer' is `current-buffer' when this function is called." + (unless (string= string "") ;; Ignore empty strings + (save-match-data + (let ((posn (if (eq (aref string 0) ?:) + (string-match " " string) + 0)) + (msg (make-erc-response :unparsed string))) + + (setf (erc-response.sender msg) + (if (eq posn 0) + erc-session-server + (substring string 1 posn))) + + (setf (erc-response.command msg) + (let* ((bposn (string-match "[^ ]" string posn)) + (eposn (string-match " " string bposn))) + (setq posn (and eposn + (string-match "[^ ]" string eposn))) + (substring string bposn eposn))) + + (while (and posn + (not (eq (aref string posn) ?:))) + (push (let* ((bposn posn) + (eposn (string-match " " string bposn))) + (setq posn (and eposn + (string-match "[^ ]" string eposn))) + (substring string bposn eposn)) + (erc-response.command-args msg))) + (when posn + (let ((str (substring string (1+ posn)))) + (push str (erc-response.command-args msg)))) + + (setf (erc-response.contents msg) + (first (erc-response.command-args msg))) + + (setf (erc-response.command-args msg) + (nreverse (erc-response.command-args msg))) + + (erc-decode-parsed-server-response msg) + + (erc-handle-parsed-server-response proc msg))))) + +(defun erc-decode-parsed-server-response (parsed-response) + "Decode a pre-parsed PARSED-RESPONSE before it can be handled. + +If there is a channel name in `erc-response.command-args', decode +`erc-response' according to this channel name and +`erc-encoding-coding-alist', or use `erc-server-coding-system' +for decoding." + (let ((args (erc-response.command-args parsed-response)) + (decode-target nil) + (decoded-args ())) + (dolist (arg args nil) + (when (string-match "^[#&].*" arg) + (setq decode-target arg))) + (when (stringp decode-target) + (setq decode-target (erc-decode-string-from-target decode-target nil))) + (setf (erc-response.unparsed parsed-response) + (erc-decode-string-from-target + (erc-response.unparsed parsed-response) + decode-target)) + (setf (erc-response.sender parsed-response) + (erc-decode-string-from-target + (erc-response.sender parsed-response) + decode-target)) + (setf (erc-response.command parsed-response) + (erc-decode-string-from-target + (erc-response.command parsed-response) + decode-target)) + (dolist (arg (nreverse args) nil) + (push (erc-decode-string-from-target arg decode-target) + decoded-args)) + (setf (erc-response.command-args parsed-response) decoded-args) + (setf (erc-response.contents parsed-response) + (erc-decode-string-from-target + (erc-response.contents parsed-response) + decode-target)))) + +(defun erc-handle-parsed-server-response (process parsed-response) + "Handle a pre-parsed PARSED-RESPONSE from PROCESS. + +Hands off to helper functions via `erc-call-hooks'." + (if (member (erc-response.command parsed-response) + erc-server-prevent-duplicates) + (let ((m (erc-response.unparsed parsed-response))) + ;; duplicate supression + (if (< (or (gethash m erc-server-duplicates) 0) + (- (erc-current-time) erc-server-duplicate-timeout)) + (erc-call-hooks process parsed-response)) + (puthash m (erc-current-time) erc-server-duplicates)) + ;; Hand off to the relevant handler. + (erc-call-hooks process parsed-response))) + +(defun erc-get-hook (command) + "Return the hook variable associated with COMMAND. + +See also `erc-server-responses'." + (gethash (format (if (numberp command) "%03i" "%s") command) + erc-server-responses)) + +(defun erc-call-hooks (process message) + "Call hooks associated with MESSAGE in PROCESS. + +Finds hooks by looking in the `erc-server-responses' hashtable." + (let ((hook (or (erc-get-hook (erc-response.command message)) + 'erc-default-server-functions))) + (run-hook-with-args-until-success hook process message) + (with-current-buffer (erc-server-buffer) + (run-hook-with-args 'erc-timer-hook (erc-current-time))))) + +(add-hook 'erc-default-server-functions 'erc-handle-unknown-server-response) + +(defun erc-handle-unknown-server-response (proc parsed) + "Display unknown server response's message." + (let ((line (concat (erc-response.sender parsed) + " " + (erc-response.command parsed) + " " + (mapconcat 'identity (erc-response.command-args parsed) + " ")))) + (erc-display-message parsed 'notice proc line))) + + +(put 'define-erc-response-handler 'edebug-form-spec + '(&define :name erc-response-handler + (name &rest name) + &optional sexp sexp def-body)) + +(defmacro* define-erc-response-handler ((name &rest aliases) + &optional extra-fn-doc extra-var-doc + &rest fn-body) + "Define an ERC handler hook/function pair. +NAME is the response name as sent by the server (see the IRC RFC for +meanings). + +This creates: + - a hook variable `erc-server-NAME-functions' initialised to `erc-server-NAME'. + - a function `erc-server-NAME' with body FN-BODY. + +If ALIASES is non-nil, each alias in ALIASES is `defalias'ed to +`erc-server-NAME'. +Alias hook variables are created as `erc-server-ALIAS-functions' and +initialised to the same default value as `erc-server-NAME-functions'. + +FN-BODY is the body of `erc-server-NAME' it may refer to the two +function arguments PROC and PARSED. + +If EXTRA-FN-DOC is non-nil, it is inserted at the beginning of the +defined function's docstring. + +If EXTRA-VAR-DOC is non-nil, it is inserted at the beginning of the +defined variable's docstring. + +As an example: + + (define-erc-response-handler (311 WHOIS WI) + \"Some non-generic function documentation.\" + \"Some non-generic variable documentation.\" + (do-stuff-with-whois proc parsed)) + +Would expand to: + + (prog2 + (defvar erc-server-311-functions 'erc-server-311 + \"Some non-generic variable documentation. + + Hook called upon receiving a 311 server response. + Each function is called with two arguments, the process associated + with the response and the parsed response. + See also `erc-server-311'.\") + + (defun erc-server-311 (proc parsed) + \"Some non-generic function documentation. + + Handler for a 311 server response. + PROC is the server process which returned the response. + PARSED is the actual response as an `erc-response' struct. + If you want to add responses don't modify this function, but rather + add things to `erc-server-311-functions' instead.\" + (do-stuff-with-whois proc parsed)) + + (puthash \"311\" 'erc-server-311-functions erc-server-responses) + (puthash \"WHOIS\" 'erc-server-WHOIS-functions erc-server-responses) + (puthash \"WI\" 'erc-server-WI-functions erc-server-responses) + + (defalias 'erc-server-WHOIS 'erc-server-311) + (defvar erc-server-WHOIS-functions 'erc-server-311 + \"Some non-generic variable documentation. + + Hook called upon receiving a WHOIS server response. + Each function is called with two arguments, the process associated + with the response and the parsed response. + See also `erc-server-311'.\") + + (defalias 'erc-server-WI 'erc-server-311) + (defvar erc-server-WI-functions 'erc-server-311 + \"Some non-generic variable documentation. + + Hook called upon receiving a WI server response. + Each function is called with two arguments, the process associated + with the response and the parsed response. + See also `erc-server-311'.\")) + +\(fn (NAME &rest ALIASES) &optional EXTRA-FN-DOC EXTRA-VAR-DOC &rest FN-BODY)" + (if (numberp name) (setq name (intern (format "%03i" name)))) + (setq aliases (mapcar (lambda (a) + (if (numberp a) + (format "%03i" a) + a)) + aliases)) + (let* ((hook-name (intern (format "erc-server-%s-functions" name))) + (fn-name (intern (format "erc-server-%s" name))) + (hook-doc (format "%sHook called upon receiving a %%s server response. +Each function is called with two arguments, the process associated +with the response and the parsed response. +See also `%s'." + (if extra-var-doc + (concat extra-var-doc "\n\n") + "") + fn-name)) + (fn-doc (format "%sHandler for a %s server response. +PROC is the server process which returned the response. +PARSED is the actual response as an `erc-response' struct. +If you want to add responses don't modify this function, but rather +add things to `%s' instead." + (if extra-fn-doc + (concat extra-fn-doc "\n\n") + "") + name hook-name)) + (fn-alternates + (loop for alias in aliases + collect (intern (format "erc-server-%s" alias)))) + (var-alternates + (loop for alias in aliases + collect (intern (format "erc-server-%s-functions" alias))))) + `(prog2 + ;; Normal hook variable. + (defvar ,hook-name ',fn-name ,(format hook-doc name)) + ;; Handler function + (defun ,fn-name (proc parsed) + ,fn-doc + ,@fn-body) + + ;; Make find-function and find-variable find them + (put ',fn-name 'definition-name ',name) + (put ',hook-name 'definition-name ',name) + + ;; Hashtable map of responses to hook variables + ,@(loop for response in (cons name aliases) + for var in (cons hook-name var-alternates) + collect `(puthash ,(format "%s" response) ',var + erc-server-responses)) + ;; Alternates. + ;; Functions are defaliased, hook variables are defvared so we + ;; can add hooks to one alias, but not another. + ,@(loop for fn in fn-alternates + for var in var-alternates + for a in aliases + nconc (list `(defalias ',fn ',fn-name) + `(defvar ,var ',fn-name ,(format hook-doc a)) + `(put ',var 'definition-name ',hook-name)))))) + +(define-erc-response-handler (ERROR) + "Handle an ERROR command from the server." nil + (erc-display-message + parsed 'error nil 'ERROR + ?s (erc-response.sender parsed) ?c (erc-response.contents parsed))) + +(define-erc-response-handler (INVITE) + "Handle invitation messages." + nil + (let ((target (first (erc-response.command-args parsed))) + (chnl (erc-response.contents parsed))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (setq erc-invitation chnl) + (when (string= target (erc-current-nick)) + (erc-display-message + parsed 'notice 'active + 'INVITE ?n nick ?u login ?h host ?c chnl))))) + + +(define-erc-response-handler (JOIN) + "Handle join messages." + nil + (let ((chnl (erc-response.contents parsed)) + (buffer nil)) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + ;; strip the stupid combined JOIN facility (IRC 2.9) + (if (string-match "^\\(.*\\)?\^g.*$" chnl) + (setq chnl (match-string 1 chnl))) + (save-excursion + (let* ((str (cond + ;; If I have joined a channel + ((erc-current-nick-p nick) + (setq buffer (erc erc-session-server erc-session-port + nick erc-session-user-full-name + nil nil + erc-default-recipients chnl + erc-server-process)) + (when buffer + (set-buffer buffer) + (erc-add-default-channel chnl) + (erc-server-send (format "MODE %s" chnl))) + (erc-with-buffer (chnl proc) + (erc-channel-begin-receiving-names)) + (erc-update-mode-line) + (run-hooks 'erc-join-hook) + (erc-make-notice + (erc-format-message 'JOIN-you ?c chnl))) + (t + (setq buffer (erc-get-buffer chnl proc)) + (erc-make-notice + (erc-format-message + 'JOIN ?n nick ?u login ?h host ?c chnl)))))) + (when buffer (set-buffer buffer)) + (erc-update-channel-member chnl nick nick t nil nil host login) + ;; on join, we want to stay in the new channel buffer + ;;(set-buffer ob) + (erc-display-message parsed nil buffer str)))))) + +(define-erc-response-handler (KICK) + "Handle kick messages received from the server." nil + (let* ((ch (first (erc-response.command-args parsed))) + (tgt (second (erc-response.command-args parsed))) + (reason (erc-trim-string (erc-response.contents parsed))) + (buffer (erc-get-buffer ch proc))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (erc-remove-channel-member buffer tgt) + (cond + ((string= tgt (erc-current-nick)) + (erc-display-message + parsed 'notice buffer + 'KICK-you ?n nick ?u login ?h host ?c ch ?r reason) + (run-hook-with-args 'erc-kick-hook buffer) + (erc-with-buffer + (buffer) + (erc-remove-channel-users)) + (erc-delete-default-channel ch buffer) + (erc-update-mode-line buffer)) + ((string= nick (erc-current-nick)) + (erc-display-message + parsed 'notice buffer + 'KICK-by-you ?k tgt ?c ch ?r reason)) + (t (erc-display-message + parsed 'notice buffer + 'KICK ?k tgt ?n nick ?u login ?h host ?c ch ?r reason)))))) + +(define-erc-response-handler (MODE) + "Handle server mode changes." nil + (let ((tgt (first (erc-response.command-args parsed))) + (mode (mapconcat 'identity (cdr (erc-response.command-args parsed)) + " "))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (erc-log (format "MODE: %s -> %s: %s" nick tgt mode)) + ;; dirty hack + (let ((buf (cond ((erc-channel-p tgt) + (erc-get-buffer tgt proc)) + ((string= tgt (erc-current-nick)) nil) + ((erc-active-buffer) (erc-active-buffer)) + (t (erc-get-buffer tgt))))) + (with-current-buffer (or buf + (current-buffer)) + (erc-update-modes tgt mode nick host login)) + (if (or (string= login "") (string= host "")) + (erc-display-message parsed 'notice buf + 'MODE-nick ?n nick + ?t tgt ?m mode) + (erc-display-message parsed 'notice buf + 'MODE ?n nick ?u login + ?h host ?t tgt ?m mode))) + (erc-banlist-update proc parsed)))) + +(define-erc-response-handler (NICK) + "Handle nick change messages." nil + (let ((nn (erc-response.contents parsed)) + bufs) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (setq bufs (erc-buffer-list-with-nick nick proc)) + (erc-log (format "NICK: %s -> %s" nick nn)) + ;; if we had a query with this user, make sure future messages will be + ;; sent to the correct nick. also add to bufs, since the user will want + ;; to see the nick change in the query, and if it's a newly begun query, + ;; erc-channel-users won't contain it + (erc-buffer-filter + (lambda () + (when (equal (erc-default-target) nick) + (setq erc-default-recipients + (cons nn (cdr erc-default-recipients))) + (rename-buffer nn) + (erc-update-mode-line) + (add-to-list 'bufs (current-buffer))))) + (erc-update-user-nick nick nn host nil nil login) + (cond + ((string= nick (erc-current-nick)) + (add-to-list 'bufs (erc-server-buffer)) + (erc-set-current-nick nn) + (erc-update-mode-line) + (setq erc-nick-change-attempt-count 0) + (setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick))) + (erc-display-message + parsed 'notice bufs + 'NICK-you ?n nick ?N nn) + (run-hook-with-args 'erc-nick-changed-functions nn nick)) + (t + (erc-handle-user-status-change 'nick (list nick login host) (list nn)) + (erc-display-message parsed 'notice bufs 'NICK ?n nick + ?u login ?h host ?N nn)))))) + +(define-erc-response-handler (PART) + "Handle part messages." nil + (let* ((chnl (first (erc-response.command-args parsed))) + (reason (erc-trim-string (erc-response.contents parsed))) + (buffer (erc-get-buffer chnl proc))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (erc-remove-channel-member buffer nick) + (erc-display-message parsed 'notice buffer + 'PART ?n nick ?u login + ?h host ?c chnl ?r (or reason "")) + (when (string= nick (erc-current-nick)) + (run-hook-with-args 'erc-part-hook buffer) + (erc-with-buffer + (buffer) + (erc-remove-channel-users)) + (erc-delete-default-channel chnl buffer) + (erc-update-mode-line buffer) + (when erc-kill-buffer-on-part + (kill-buffer buffer)))))) + +(define-erc-response-handler (PING) + "Handle ping messages." nil + (let ((pinger (first (erc-response.command-args parsed)))) + (erc-log (format "PING: %s" pinger)) + ;; ping response to the server MUST be forced, or you can lose big + (erc-server-send (format "PONG :%s" pinger) t) + (when erc-verbose-server-ping + (erc-display-message + parsed 'error proc + 'PING ?s (erc-time-diff erc-server-last-ping-time (erc-current-time)))) + (setq erc-server-last-ping-time (erc-current-time)))) + +(define-erc-response-handler (PONG) + "Handle pong messages." nil + (let ((time (string-to-number (erc-response.contents parsed)))) + (when (> time 0) + (setq erc-server-lag (erc-time-diff time (erc-current-time))) + (when erc-verbose-server-ping + (erc-display-message + parsed 'notice proc 'PONG + ?h (first (erc-response.command-args parsed)) ?i erc-server-lag + ?s (if (/= erc-server-lag 1) "s" ""))) + (erc-update-mode-line)))) + +(define-erc-response-handler (PRIVMSG NOTICE) + nil nil + (let ((sender-spec (erc-response.sender parsed)) + (cmd (erc-response.command parsed)) + (tgt (car (erc-response.command-args parsed))) + (msg (erc-response.contents parsed))) + (if (or (erc-ignored-user-p sender-spec) + (erc-ignored-reply-p msg tgt proc)) + (when erc-minibuffer-ignored + (message "Ignored %s from %s to %s" cmd sender-spec tgt)) + (let* ((sndr (erc-parse-user sender-spec)) + (nick (nth 0 sndr)) + (login (nth 1 sndr)) + (host (nth 2 sndr)) + (msgp (string= cmd "PRIVMSG")) + (noticep (string= cmd "NOTICE")) + ;; S.B. downcase *both* tgt and current nick + (privp (erc-current-nick-p tgt)) + s buffer + fnick) + (setf (erc-response.contents parsed) msg) + (setq buffer (erc-get-buffer (if privp nick tgt) proc)) + (when buffer + (with-current-buffer buffer + ;; update the chat partner info. Add to the list if private + ;; message. We will accumulate private identities indefinitely + ;; at this point. + (erc-update-channel-member (if privp nick tgt) nick nick + privp nil nil host login nil nil t) + (let ((cdata (erc-get-channel-user nick))) + (setq fnick (funcall erc-format-nick-function + (car cdata) (cdr cdata)))))) + (cond + ((erc-is-message-ctcp-p msg) + (setq s (if msgp + (erc-process-ctcp-query proc parsed nick login host) + (erc-process-ctcp-reply proc parsed nick login host + (match-string 1 msg))))) + (t + (setcar erc-server-last-peers nick) + (setq s (erc-format-privmessage + (or fnick nick) msg + ;; If buffer is a query buffer, + ;; format the nick as for a channel. + (and (not (and buffer + (erc-query-buffer-p buffer) + erc-format-query-as-channel-p)) + privp) + msgp)))) + (when s + (if (and noticep privp) + (progn + (run-hook-with-args 'erc-echo-notice-always-hook + s parsed buffer nick) + (run-hook-with-args-until-success + 'erc-echo-notice-hook s parsed buffer nick)) + (erc-display-message parsed nil buffer s))) + (when (string= cmd "PRIVMSG") + (erc-auto-query proc parsed)))))) + +;; FIXME: need clean way of specifiying extra hooks in +;; define-erc-response-handler. +(add-hook 'erc-server-PRIVMSG-functions 'erc-auto-query) + +(define-erc-response-handler (QUIT) + nil nil + (let ((reason (erc-response.contents parsed)) + bufs) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (setq bufs (erc-buffer-list-with-nick nick proc)) + (erc-remove-user nick) + (setq reason (erc-wash-quit-reason reason nick login host)) + (erc-display-message parsed 'notice bufs + 'QUIT ?n nick ?u login + ?h host ?r reason)))) + +(define-erc-response-handler (TOPIC) + nil nil + (let* ((ch (first (erc-response.command-args parsed))) + (topic (erc-trim-string (erc-response.contents parsed))) + (time (format-time-string "%T %m/%d/%y" (current-time)))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (erc-update-channel-member ch nick nick nil nil nil host login) + (erc-update-channel-topic ch (format "%s\C-o (%s, %s)" topic nick time)) + (erc-display-message parsed 'notice (erc-get-buffer ch proc) + 'TOPIC ?n nick ?u login ?h host + ?c ch ?T topic)))) + +(define-erc-response-handler (WALLOPS) + nil nil + (let ((message (erc-response.contents parsed))) + (multiple-value-bind (nick login host) + (erc-parse-user (erc-response.sender parsed)) + (erc-display-message + parsed 'notice nil + 'WALLOPS ?n nick ?m message)))) + +(define-erc-response-handler (001) + "Set `erc-server-current-nick' to reflect server settings and display the welcome message." + nil + (erc-set-current-nick (first (erc-response.command-args parsed))) + (erc-update-mode-line) ; needed here? + (setq erc-nick-change-attempt-count 0) + (setq erc-default-nicks (if (consp erc-nick) erc-nick (list erc-nick))) + (erc-display-message + parsed 'notice 'active (erc-response.contents parsed))) + +(define-erc-response-handler (MOTD 002 003 371 372 374 375) + "Display the server's message of the day." nil + (erc-handle-login) + (erc-display-message + parsed 'notice (if erc-server-connected 'active proc) + (erc-response.contents parsed))) + +(define-erc-response-handler (376 422) + nil nil + (erc-server-MOTD proc parsed) + (erc-connection-established proc parsed)) + +(define-erc-response-handler (004) + nil nil + (multiple-value-bind (server-name server-version) + (cdr (erc-response.command-args parsed)) + (setq erc-server-version server-version) + (setq erc-server-announced-name server-name) + (erc-update-mode-line-buffer (process-buffer proc)) + (erc-display-message + parsed 'notice proc + 's004 ?s server-name ?v server-version + ?U (fourth (erc-response.command-args parsed)) + ?C (fifth (erc-response.command-args parsed))))) + +(define-erc-response-handler (005) + "Set the variable `erc-server-parameters' and display the received message. + +According to RFC 2812, suggests alternate servers on the network. +Many servers, however, use this code to show which parameters they have set, +for example, the network identifier, maximum allowed topic length, whether +certain commands are accepted and more. See documentation for +`erc-server-parameters' for more information on the parameters sent. + +A server may send more than one 005 message." + nil + (let ((line (mapconcat 'identity + (setf (erc-response.command-args parsed) + (cdr (erc-response.command-args parsed))) + " "))) + (while (erc-response.command-args parsed) + (let ((section (pop (erc-response.command-args parsed)))) + ;; fill erc-server-parameters + (when (string-match "^\\([A-Z]+\\)\=\\(.*\\)$\\|^\\([A-Z]+\\)$" + section) + (add-to-list 'erc-server-parameters + `(,(or (match-string 1 section) + (match-string 3 section)) + . + ,(match-string 2 section)))))) + (erc-display-message parsed 'notice proc line))) + +(define-erc-response-handler (221) + nil nil + (let* ((nick (first (erc-response.command-args parsed))) + (modes (mapconcat 'identity + (cdr (erc-response.command-args parsed)) " "))) + (erc-set-modes nick modes) + (erc-display-message parsed 'notice 'active 's221 ?n nick ?m modes))) + +(define-erc-response-handler (252) + "Display the number of IRC operators online." nil + (erc-display-message parsed 'notice 'active 's252 + ?i (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (253) + "Display the number of unknown connections." nil + (erc-display-message parsed 'notice 'active 's253 + ?i (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (254) + "Display the number of channels formed." nil + (erc-display-message parsed 'notice 'active 's254 + ?i (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (250 251 255 256 257 258 259 265 266 377 378) + "Generic display of server messages as notices. + +See `erc-display-server-message'." nil + (erc-display-server-message proc parsed)) + +(define-erc-response-handler (301) + "AWAY notice." nil + (erc-display-message parsed 'notice 'active 's301 + ?n (second (erc-response.command-args parsed)) + ?r (erc-response.contents parsed))) + +(define-erc-response-handler (303) + "ISON reply" nil + (erc-display-message parsed 'notice 'active 's303 + ?n (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (305) + "Return from AWAYness." nil + (erc-process-away proc nil) + (erc-display-message parsed 'notice 'active + 's305 ?m (erc-response.contents parsed))) + +(define-erc-response-handler (306) + "Set AWAYness." nil + (erc-process-away proc t) + (erc-display-message parsed 'notice 'active + 's306 ?m (erc-response.contents parsed))) + +(define-erc-response-handler (311 314) + "WHOIS/WHOWAS notices." nil + (let ((fname (erc-response.contents parsed)) + (catalog-entry (intern (format "s%s" (erc-response.command parsed))))) + (multiple-value-bind (nick user host) + (cdr (erc-response.command-args parsed)) + (erc-update-user-nick nick nick host nil fname user) + (erc-display-message + parsed 'notice 'active catalog-entry + ?n nick ?f fname ?u user ?h host)))) + +(define-erc-response-handler (312) + nil nil + (multiple-value-bind (nick server-host) + (cdr (erc-response.command-args parsed)) + (erc-display-message + parsed 'notice 'active 's312 + ?n nick ?s server-host ?c (erc-response.contents parsed)))) + +(define-erc-response-handler (313) + "IRC Operator response in WHOIS." nil + (erc-display-message + parsed 'notice 'active 's313 + ?n (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (315 318 323 369) + ;; 315 - End of WHO + ;; 318 - End of WHOIS list + ;; 323 - End of channel LIST + ;; 369 - End of WHOWAS + nil nil + (ignore proc parsed)) + +(define-erc-response-handler (317) + "IDLE notice." nil + (multiple-value-bind (nick seconds-idle on-since time) + (cdr (erc-response.command-args parsed)) + (setq time (when on-since + (format-time-string "%T %Y/%m/%d" + (erc-string-to-emacs-time on-since)))) + (erc-update-user-nick nick nick nil nil nil + (and time (format "on since %s" time))) + (if time + (erc-display-message + parsed 'notice 'active 's317-on-since + ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle)) ?t time) + (erc-display-message + parsed 'notice 'active 's317 + ?n nick ?i (erc-sec-to-time (string-to-number seconds-idle)))))) + +(define-erc-response-handler (319) + nil nil + (erc-display-message + parsed 'notice 'active 's319 + ?n (second (erc-response.command-args parsed)) + ?c (erc-response.contents parsed))) + +(define-erc-response-handler (320) + "Identified user in WHOIS." nil + (erc-display-message + parsed 'notice 'active 's320 + ?n (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (321) + "LIST header." nil + (setq erc-channel-list nil) + (erc-display-message parsed 'notice 'active 's321)) + +(define-erc-response-handler (322) + "LIST notice." nil + (let ((topic (erc-response.contents parsed))) + (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-display-message + parsed 'notice 'active 's322 + ?c channel ?u num-users ?t (or topic ""))))) + +(define-erc-response-handler (324) + "Channel or nick modes." nil + (let ((channel (second (erc-response.command-args parsed))) + (modes (mapconcat 'identity (cddr (erc-response.command-args parsed)) + " "))) + (erc-set-modes channel modes) + (erc-display-message + parsed 'notice (erc-get-buffer channel proc) + 's324 ?c channel ?m modes))) + +(define-erc-response-handler (329) + "Channel creation date." nil + (let ((channel (second (erc-response.command-args parsed))) + (time (erc-string-to-emacs-time + (third (erc-response.command-args parsed))))) + (erc-display-message + parsed 'notice (erc-get-buffer channel proc) + 's329 ?c channel ?t (format-time-string "%A %Y/%m/%d %X" time)))) + +(define-erc-response-handler (330) + nil nil + ;; FIXME: I don't know what the magic numbers mean. Mummy, make + ;; the magic numbers go away. + ;; No seriously, I have no clue about the format of this command, + ;; and don't sit on Quakenet, so can't test. Originally we had: + ;; nick == (aref parsed 3) + ;; authaccount == (aref parsed 4) + ;; authmsg == (aref parsed 5) + ;; The guesses below are, well, just that. -- Lawrence 2004/05/10 + (let ((nick (second (erc-response.command-args parsed))) + (authaccount (third (erc-response.command-args parsed))) + (authmsg (erc-response.contents parsed))) + (erc-display-message parsed 'notice 'active 's330 + ?n nick ?a authmsg ?i authaccount))) + +(define-erc-response-handler (331) + "Channel topic." nil + (let ((channel (second (erc-response.command-args parsed))) + (topic (erc-response.contents parsed))) + ;; FIXME: why don't we do anything with the topic? -- Lawrence 2004/05/10 + (erc-display-message parsed 'notice (erc-get-buffer channel proc) + 's331 ?c channel))) + +(define-erc-response-handler (332) + "TOPIC notice." nil + (let ((channel (second (erc-response.command-args parsed))) + (topic (erc-response.contents parsed))) + (erc-update-channel-topic channel topic) + (erc-display-message parsed 'notice (erc-get-buffer channel proc) + 's332 ?c channel ?T topic))) + +(define-erc-response-handler (333) + ;; Who set the topic, and when + nil nil + (multiple-value-bind (channel nick time) + (cdr (erc-response.command-args parsed)) + (setq time (format-time-string "%T %Y/%m/%d" + (erc-string-to-emacs-time time))) + (erc-update-channel-topic channel + (format "\C-o (%s, %s)" nick time) + 'append) + (erc-display-message parsed 'notice (erc-get-buffer channel proc) + 's333 ?c channel ?n nick ?t time))) + +(define-erc-response-handler (341) + "Let user know when an INVITE attempt has been sent successfully." + nil + (multiple-value-bind (nick channel) + (cdr (erc-response.command-args parsed)) + (erc-display-message parsed 'notice (erc-get-buffer channel proc) + 's341 ?n nick ?c channel))) + +(define-erc-response-handler (352) + "WHO notice." nil + (multiple-value-bind (channel user host server nick away-flag) + (cdr (erc-response.command-args parsed)) + (let ((full-name (erc-response.contents parsed)) + hopcount) + (when (string-match "\\(^[0-9]+ \\)\\(.*\\)$" full-name) + (setq hopcount (match-string 1 full-name)) + (setq full-name (match-string 2 full-name))) + (erc-update-channel-member channel nick nick nil nil nil host + user full-name) + (erc-display-message parsed 'notice 'active 's352 + ?c channel ?n nick ?a away-flag + ?u user ?h host ?f full-name)))) + +(define-erc-response-handler (353) + "NAMES notice." nil + (let ((channel (third (erc-response.command-args parsed))) + (users (erc-response.contents parsed))) + (erc-with-buffer (channel proc) + (erc-channel-receive-names users)) + (erc-display-message parsed 'notice (or (erc-get-buffer channel proc) + 'active) + 's353 ?c channel ?u users))) + +(define-erc-response-handler (366) + "End of NAMES." nil + (erc-with-buffer ((second (erc-response.command-args parsed)) proc) + (erc-channel-end-receiving-names))) + +(define-erc-response-handler (367) + "Channel ban list entries" nil + (multiple-value-bind (channel banmask setter time) + (cdr (erc-response.command-args parsed)) + (erc-display-message parsed 'notice 'active 's367 + ?c channel + ?b banmask + ?s setter + ?t time))) + +(define-erc-response-handler (368) + "End of channel ban list" nil + (let ((channel (second (erc-response.command-args parsed)))) + (erc-display-message parsed 'notice 'active 's368 + ?c channel))) + +(define-erc-response-handler (379) + "Forwarding to another channel." nil + ;; FIXME: Yet more magic numbers in original code, I'm guessing this + ;; command takes two arguments, and doesn't have any "contents". -- + ;; Lawrence 2004/05/10 + (multiple-value-bind (from to) + (cdr (erc-response.command-args parsed)) + (erc-display-message parsed 'notice 'active + 's379 ?c from ?f to))) + +(define-erc-response-handler (391) + "Server's time string" nil + (erc-display-message + parsed 'notice 'active + 's391 ?s (second (erc-response.command-args parsed)) + ?t (third (erc-response.command-args parsed)))) + +(define-erc-response-handler (401) + "No such nick/channel." nil + (let ((nick/channel (second (erc-response.command-args parsed)))) + (when erc-whowas-on-nosuchnick + (erc-log (format "cmd: WHOWAS: %s" nick/channel)) + (erc-server-send (format "WHOWAS %s 1" nick/channel))) + (erc-display-message parsed '(notice error) 'active + 's401 ?n nick/channel))) + +(define-erc-response-handler (403) + "No such channel." nil + (erc-display-message parsed '(notice error) 'active + 's403 ?c (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (404) + "Cannot send to channel." nil + (erc-display-message parsed '(notice error) 'active + 's404 ?c (second (erc-response.command-args parsed)))) + + +(define-erc-response-handler (405) + ;; Can't join that many channels. + nil nil + (erc-display-message parsed '(notice error) 'active + 's405 ?c (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (406) + ;; No such nick + nil nil + (erc-display-message parsed '(notice error) 'active + 's406 ?n (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (412) + ;; No text to send + nil nil + (erc-display-message parsed '(notice error) 'active 's412)) + +(define-erc-response-handler (421) + ;; Unknown command + nil nil + (erc-display-message parsed '(notice error) 'active 's421 + ?c (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (432) + ;; Bad nick. + nil nil + (erc-display-message parsed '(notice error) 'active 's432 + ?n (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (433) + ;; Login-time "nick in use" + nil nil + (erc-nickname-in-use (second (erc-response.command-args parsed)) + "already in use")) + +(define-erc-response-handler (437) + ;; Nick temporarily unavailable (IRCnet) + nil nil + (let ((nick/channel (second (erc-response.command-args parsed)))) + (unless (erc-channel-p nick/channel) + (erc-nickname-in-use nick/channel "temporarily unavailable")))) + +(define-erc-response-handler (442) + ;; Not on channel + nil nil + (erc-display-message parsed '(notice error) 'active 's442 + ?c (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (461) + ;; Not enough params for command. + nil nil + (erc-display-message parsed '(notice error) 'active 's461 + ?c (second (erc-response.command-args parsed)) + ?m (erc-response.contents parsed))) + +(define-erc-response-handler (474) + "Banned from channel errors" nil + (erc-display-message parsed '(notice error) nil + (intern (format "s%s" + (erc-response.command parsed))) + ?c (second (erc-response.command-args parsed)))) + +(define-erc-response-handler (475) + "Channel key needed." nil + (erc-display-message parsed '(notice error) nil 's475 + ?c (second (erc-response.command-args parsed))) + (when erc-prompt-for-channel-key + (let ((channel (second (erc-response.command-args parsed))) + (key (read-from-minibuffer + (format "Channel %s is mode +k. Enter key (RET to cancel): " + (second (erc-response.command-args parsed)))))) + (when (and key (> (length key) 0)) + (erc-cmd-JOIN channel key))))) + +(define-erc-response-handler (477) + nil nil + (let ((channel (second (erc-response.command-args parsed))) + (message (erc-response.contents parsed))) + (erc-display-message parsed 'notice (erc-get-buffer channel proc) + (format "%s: %s" channel message)))) + +(define-erc-response-handler (482) + nil nil + (let ((channel (second (erc-response.command-args parsed))) + (message (erc-response.contents parsed))) + (erc-display-message parsed '(error notice) 'active 's482 + ?c channel ?m message))) + +(define-erc-response-handler (431 445 446 451 462 463 464 465 481 483 484 485 + 491 501 502) + ;; 431 - No nickname given + ;; 445 - SUMMON has been disabled + ;; 446 - USERS has been disabled + ;; 451 - You have not registered + ;; 462 - Unauthorized command (already registered) + ;; 463 - Your host isn't among the privileged + ;; 464 - Password incorrect + ;; 465 - You are banned from this server + ;; 481 - Need IRCop privileges + ;; 483 - You can't kill a server! + ;; 484 - Your connection is restricted! + ;; 485 - You're not the original channel operator + ;; 491 - No O-lines for your host + ;; 501 - Unknown MODE flag + ;; 502 - Cannot change mode for other users + nil nil + (erc-display-error-notice + parsed + (intern (format "s%s" (erc-response.command parsed))))) + +;; FIXME: These are yet to be implemented, they're just stubs for now +;; -- Lawrence 2004/05/12 + +;; response numbers left here for reference + +;; (define-erc-response-handler (323 364 365 381 382 392 393 394 395 +;; 200 201 202 203 204 205 206 208 209 211 212 213 +;; 214 215 216 217 218 219 241 242 243 244 249 261 +;; 262 302 342 351 402 407 409 411 413 414 415 +;; 423 424 436 441 443 444 467 471 472 473 KILL) +;; nil nil +;; (ignore proc parsed)) + +(provide 'erc-backend) + +;;; erc-backend.el ends here +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: a64e6bb7-a780-4efd-8f98-083b18c7c84a diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-button.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-button.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,504 @@ +;; erc-button.el --- A way of buttonizing certain things in ERC buffers + +;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +;; 2006 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: irc, button, url, regexp +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcButton + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Heavily borrowed from gnus-art.el. Thanks to the original authors. +;; This buttonizes nicks and other stuff to make it all clickable. +;; To enable, add to your ~/.emacs: +;; (require 'erc-button) +;; (erc-button-mode 1) +;; +;; Todo: +;; * Rewrite all this to do the same, but use button.el from GNU Emacs +;; if it's available for xemacs too. Why? button.el is much faster, +;; and much more elegant, and solves the problem we get with large buffers +;; and a large erc-button-marker-list. + + +;;; Code: + +(require 'erc) +(require 'wid-edit) +(require 'erc-fill) + +;;; Minor Mode + +(defgroup erc-button nil + "Define how text can be turned into clickable buttons." + :group 'erc) + +;;;###autoload (autoload 'erc-button-mode "erc-button" nil t) +(define-erc-module button nil + "This mode buttonizes all messages according to `erc-button-alist'." + ((add-hook 'erc-insert-modify-hook 'erc-button-add-buttons 'append) + (add-hook 'erc-send-modify-hook 'erc-button-add-buttons 'append) + (add-hook 'erc-complete-functions 'erc-button-next)) + ((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))) + +;; Make XEmacs use `erc-button-face'. +(when (featurep 'xemacs) + (add-hook 'erc-mode-hook + (lambda () (set (make-local-variable 'widget-button-face) nil)))) + +;;; Variables + +(defface erc-button '((t (:bold t))) + "ERC button face." + :group 'erc-faces) + +(defcustom erc-button-face 'erc-button + "Face used for highlighting buttons in ERC buffers. + +A button is a piece of text that you can activate by pressing +`RET' or `mouse-2' above it. See also `erc-button-keymap'." + :type 'face + :group 'erc-faces) + +(defcustom erc-button-nickname-face 'erc-nick-default-face + "Face used for ERC nickname buttons." + :type 'face + :group 'erc-faces) + +(defcustom erc-button-mouse-face 'highlight + "Face used for mouse highlighting in ERC buffers. + +Buttons will be displayed in this face when the mouse cursor is +above them." + :type 'face + :group 'erc-faces) + +(defcustom erc-button-url-regexp + (concat "\\(www\\.\\|\\(s?https?\\|" + "ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\):\\)" + "\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?" + "[-a-zA-Z0-9_=!?#$@~`%&*+\\/:;.,]+[-a-zA-Z0-9_=#$@~`%&*+\\/]") + "Regular expression that matches URLs." + :group 'erc-button + :type 'regexp) + +(defcustom erc-button-wrap-long-urls nil + "If non-nil, \"long\" URLs matching `erc-button-url-regexp' will be wrapped. + +If this variable is a number, consider URLs longer than its value to +be \"long\". If t, URLs will be considered \"long\" if they are +longer than `erc-fill-column'." + :group 'erc-button + :type '(choice integer boolean)) + +(defcustom erc-button-buttonize-nicks t + "Flag indicating whether nicks should be buttonized or not." + :group 'erc-button + :type 'boolean) + +(defcustom erc-button-rfc-url "http://www.faqs.org/rfcs/rfc%s.html" + "*URL used to browse rfc references. +%s is replaced by the number." + :group 'erc-button + :type 'string) + +(defcustom erc-button-google-url "http://www.google.com/search?q=%s" + "*URL used to browse Google search references. +%s is replaced by the search string." + :group 'erc-button + :type 'string) + +(defcustom erc-button-alist + ;; Since the callback is only executed when the user is clicking on + ;; a button, it makes no sense to optimize performance by + ;; bytecompiling lambdas in this alist. On the other hand, it makes + ;; things hard to maintain. + '(('nicknames 0 erc-button-buttonize-nicks erc-nick-popup 0) + (erc-button-url-regexp 0 t browse-url 0) + (" ]+\\) *>" 0 t browse-url 1) + ("(\\(\\([^~\n \t@][^\n \t@]*\\)@\\([a-zA-Z0-9.:-]+\\)\\)" 1 t finger 2 3) + ;; emacs internal + ("[`]\\([a-zA-Z][-a-zA-Z_0-9]+\\)[']" 1 t erc-button-describe-symbol 1) + ;; pseudo links + ("\\bInfo:[\"]\\([^\"]+\\)[\"]" 0 t Info-goto-node 1) + ("\\b\\(Ward\\|Wiki\\|WardsWiki\\|TheWiki\\):\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)" + 0 t (lambda (page) + (browse-url (concat "http://c2.com/cgi-bin/wiki?" page))) + 2) + ("EmacsWiki:\\([A-Z][a-z]+\\([A-Z][a-z]+\\)+\\)" 0 t erc-browse-emacswiki 1) + ("Lisp:\\([a-zA-Z.+-]+\\)" 0 t erc-browse-emacswiki-lisp 1) + ("\\bGoogle:\\([^ \t\n\r\f]+\\)" + 0 t (lambda (keywords) + (browse-url (format erc-button-google-url keywords))) + 1) + ("\\brfc[#: ]?\\([0-9]+\\)" + 0 t (lambda (num) + (browse-url (format erc-button-rfc-url num))) + 1) + ;; other + ("\\s-\\(@\\([0-9][0-9][0-9]\\)\\)" 1 t erc-button-beats-to-time 2)) + "*Alist of regexps matching buttons in ERC buffers. +Each entry has the form (REGEXP BUTTON FORM CALLBACK PAR...), where + +REGEXP is the string matching text around the button or a symbol + indicating a variable holding that string, or a list of + strings, or an alist with the strings in the car. Note that + entries in lists or alists are considered to be nicks or other + complete words. Therefore they are enclosed in \\< and \\> + while searching. REGEXP can also be the quoted symbol + 'nicknames, which matches the nickname of any user on the + current server. + +BUTTON is the number of the regexp grouping actually matching the + button, This is ignored if REGEXP is 'nicknames. + +FORM is a lisp expression which must eval to true for the button to + be added, + +CALLBACK is the function to call when the user push this button. + CALLBACK can also be a symbol. Its variable value will be used + as the callback function. + +PAR is a number of a regexp grouping whose text will be passed to + CALLBACK. There can be several PAR arguments. If REGEXP is + 'nicknames, these are ignored, and CALLBACK will be called with + the nickname matched as the argument." + :group 'erc-button + :type '(repeat + (list :tag "Button" + (choice :tag "Matches" + regexp + (variable :tag "Variable containing regexp") + (const :tag "Nicknames" 'nicknames)) + (integer :tag "Number of the regexp section that matches") + (choice :tag "When to buttonize" + (const :tag "Always" t) + (sexp :tag "Only when this evaluates to non-nil")) + (function :tag "Function to call when button is pressed") + (repeat :tag "Sections of regexp to send to the function" + :inline t + (integer :tag "Regexp section number"))))) + +(defcustom erc-emacswiki-url "http://www.emacswiki.org/cgi-bin/wiki.pl?" + "*URL of the EmacsWiki Homepage." + :group 'erc-button + :type 'string) + +(defcustom erc-emacswiki-lisp-url "http://www.emacswiki.org/elisp/" + "*URL of the EmacsWiki ELisp area." + :group 'erc-button + :type 'string) + +(defvar erc-button-keymap + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'erc-button-press-button) + (if (featurep 'xemacs) + (define-key map (kbd "") 'erc-button-click-button) + (define-key map (kbd "") 'erc-button-click-button)) + (define-key map (kbd "TAB") 'erc-button-next) + (set-keymap-parent map erc-mode-map) + map) + "Local keymap for ERC buttons.") + +(defvar erc-button-syntax-table + (let ((table (make-syntax-table))) + (modify-syntax-entry ?\( "w" table) + (modify-syntax-entry ?\) "w" table) + (modify-syntax-entry ?\[ "w" table) + (modify-syntax-entry ?\] "w" table) + (modify-syntax-entry ?\{ "w" table) + (modify-syntax-entry ?\} "w" table) + (modify-syntax-entry ?` "w" table) + (modify-syntax-entry ?' "w" table) + (modify-syntax-entry ?^ "w" table) + (modify-syntax-entry ?- "w" table) + (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?| "w" table) + (modify-syntax-entry ?\\ "w" table) + table) + "Syntax table used when buttonizing messages. +This syntax table should make all the legal nick characters word +constituents.") + +(defun erc-button-add-buttons () + "Find external references in the current buffer and make buttons of them. +\"External references\" are things like URLs, as +specified by `erc-button-alist'." + (interactive) + (save-excursion + (with-syntax-table erc-button-syntax-table + (let ((buffer-read-only nil) + (inhibit-point-motion-hooks t) + (inhibit-field-text-motion t) + (alist erc-button-alist) + entry regexp data) + (erc-button-remove-old-buttons) + (dolist (entry alist) + (if (equal (car entry) (quote (quote nicknames))) + (erc-button-add-nickname-buttons entry) + (progn + (setq regexp (or (and (stringp (car entry)) (car entry)) + (and (boundp (car entry)) + (symbol-value (car entry))))) + (cond ((stringp regexp) + (erc-button-add-buttons-1 regexp entry)) + ((and (listp regexp) (stringp (car regexp))) + (dolist (r regexp) + (erc-button-add-buttons-1 + (concat "\\<" (regexp-quote r) "\\>") + entry))) + ((and (listp regexp) (listp (car regexp)) + (stringp (caar regexp))) + (dolist (elem regexp) + (erc-button-add-buttons-1 + (concat "\\<" (regexp-quote (car elem)) "\\>") + entry))))))))))) + +(defun erc-button-add-nickname-buttons (entry) + "Search through the buffer for nicknames, and add buttons." + (let ((form (nth 2 entry)) + (fun (nth 3 entry)) + bounds word) + (when (or (eq t form) + (eval form)) + (goto-char (point-min)) + (while (forward-word 1) + (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))))))) + +(defun erc-button-add-buttons-1 (regexp entry) + "Search through the buffer for matches to ENTRY and add buttons." + (goto-char (point-min)) + (while (re-search-forward regexp nil t) + (let ((start (match-beginning (nth 1 entry))) + (end (match-end (nth 1 entry))) + (form (nth 2 entry)) + (fun (nth 3 entry)) + (data (mapcar 'match-string (nthcdr 4 entry)))) + (when (or (eq t form) + (eval form)) + (erc-button-add-button start end fun nil data regexp))))) + +(defun erc-button-remove-old-buttons () + "Remove all existing buttons. +This is called with narrowing in effect, just before the text is +buttonized again. Removing a button means to remove all the properties +that `erc-button-add-button' adds, except for the face." + (remove-text-properties + (point-min) (point-max) + '(erc-callback nil + erc-data nil + mouse-face nil + keymap nil))) + +(defun erc-button-add-button (from to fun nick-p &optional data regexp) + "Create a button between FROM and TO with callback FUN and data DATA. +NICK-P specifies if this is a nickname button. +REGEXP is the regular expression which matched for this button." + ;; Really nasty hack to ise urls, and line-wrap them if + ;; they're going to be wider than `erc-fill-column'. + ;; This could be a lot cleaner, but it works for me -- lawrence. + (let (fill-column) + (when (and erc-button-wrap-long-urls + (string= regexp erc-button-url-regexp) + (> (- to from) + (setq fill-column (- (if (numberp erc-button-wrap-long-urls) + erc-button-wrap-long-urls + erc-fill-column) + (length erc-fill-prefix))))) + (setq to (prog1 (point-marker) (insert ">")) + from (prog2 (goto-char from) (point-marker) (insert " (- to pos) fill-column) + (goto-char (+ pos fill-column)) + (insert "\n" erc-fill-prefix) ; This ought to figure out + ; what type of filling we're + ; doing, and indent accordingly. + (move-marker pos (point)))))) + (if nick-p + (when erc-button-nickname-face + (erc-button-add-face from to erc-button-nickname-face)) + (when erc-button-face + (erc-button-add-face from to erc-button-face))) + (add-text-properties + from to + (nconc (and erc-button-mouse-face + (list 'mouse-face erc-button-mouse-face)) + (list 'erc-callback fun) + (list 'keymap erc-button-keymap) + (list 'rear-nonsticky t) + (and data (list 'erc-data data)))) + (widget-convert-button 'link from to :action 'erc-button-press-button + :suppress-face t + ;; Make XEmacs use our faces. + :button-face (if nick-p + erc-button-nickname-face + erc-button-face) + ;; Make XEmacs behave with mouse-clicks, for + ;; some reason, widget stuff overrides the + ;; 'keymap text-property. + :mouse-down-action 'erc-button-click-button)) + +(defun erc-button-add-face (from to face) + "Add FACE to the region between FROM and TO." + ;; If we just use `add-text-property', then this will overwrite any + ;; face text property already used for the button. It will not be + ;; merged correctly. If we use overlays, then redisplay will be + ;; very slow with lots of buttons. This is why we manually merge + ;; face text properties. + (let ((old (erc-list (get-text-property from 'face))) + (pos from) + (end (next-single-property-change from 'face nil to)) + new) + ;; old is the face at pos, in list form. It is nil if there is no + ;; face at pos. If nil, the new face is FACE. If not nil, the + ;; new face is a list containing FACE and the old stuff. end is + ;; where this face changes. + (while (< pos to) + (setq new (if old (cons face old) face)) + (put-text-property pos end 'face new) + (setq pos end + old (erc-list (get-text-property pos 'face)) + end (next-single-property-change pos 'face nil to))))) + +;; widget-button-click calls with two args, we ignore the first. +;; Since Emacs runs this directly, rather than with +;; widget-button-click, we need to fake an extra arg in the +;; interactive spec. +(defun erc-button-click-button (ignore event) + "Call `erc-button-press-button'." + (interactive "P\ne") + (save-excursion + (mouse-set-point event) + (erc-button-press-button))) + +;; XEmacs calls this via widget-button-press with a bunch of arguments +;; which we don't care about. +(defun erc-button-press-button (&rest ignore) + "Check text at point for a callback function. +If the text at point has a `erc-callback' property, +call it with the value of the `erc-data' text property." + (interactive) + (let* ((data (get-text-property (point) 'erc-data)) + (fun (get-text-property (point) 'erc-callback))) + (unless fun + (message "No button at point")) + (when (and fun (symbolp fun) (not (fboundp fun))) + (error "Function %S is not bound" fun)) + (apply fun data))) + +(defun erc-button-next () + "Go to the next button in this buffer." + (interactive) + (let ((here (point))) + (when (< here (erc-beg-of-input-line)) + (while (and (get-text-property here 'erc-callback) + (not (= here (point-max)))) + (setq here (1+ here))) + (while (and (not (get-text-property here 'erc-callback)) + (not (= here (point-max)))) + (setq here (1+ here))) + (if (< here (point-max)) + (goto-char here) + (error "No next button")) + t))) + +(defun erc-browse-emacswiki (thing) + "Browse to thing in the emacs-wiki." + (browse-url (concat erc-emacswiki-url thing))) + +(defun erc-browse-emacswiki-lisp (thing) + "Browse to THING in the emacs-wiki elisp area." + (browse-url (concat erc-emacswiki-lisp-url thing))) + +;;; Nickname buttons: + +(defcustom erc-nick-popup-alist + '(("DeOp" . (erc-cmd-DEOP nick)) + ("Kick" . (erc-cmd-KICK (concat nick " " + (read-from-minibuffer + (concat "Kick " nick ", reason: "))))) + ("Msg" . (erc-cmd-MSG (concat nick " " + (read-from-minibuffer + (concat "Message to " nick ": "))))) + ("Op" . (erc-cmd-OP nick)) + ("Query" . (erc-cmd-QUERY nick)) + ("Whois" . (erc-cmd-WHOIS nick)) + ("Lastlog" . (erc-cmd-LASTLOG nick))) + "*An alist of possible actions to take on a nickname. +An entry looks like (\"Action\" . SEXP) where SEXP is evaluated with +the variable `nick' bound to the nick in question. + +Examples: + (\"DebianDB\" . + (shell-command + (format + \"ldapsearch -x -P 2 -h db.debian.org -b dc=debian,dc=org ircnick=%s\" + nick)))" + :group 'erc-button + :type '(repeat (cons (string :tag "Op") + sexp))) + +(defun erc-nick-popup (nick) + (let* ((completion-ignore-case t) + (action (completing-read (concat "What action to take on '" nick "'? ") + erc-nick-popup-alist)) + (code (cdr (assoc action erc-nick-popup-alist)))) + (when code + (erc-set-active-buffer (current-buffer)) + (eval code)))) + +;;; Callback functions +(defun erc-button-describe-symbol (symbol-name) + "Describe SYMBOL-NAME. +Use `describe-function' for functions, `describe-variable' for variables, +and `apropos' for other symbols." + (let ((symbol (intern-soft symbol-name))) + (cond ((and symbol (fboundp symbol)) + (describe-function symbol)) + ((and symbol (boundp symbol)) + (describe-variable symbol)) + (t (apropos symbol-name))))) + +(defun erc-button-beats-to-time (beats) + "Display BEATS in a readable time format." + (let* ((seconds (- (* (string-to-number beats) 86.4) + 3600 + (- (car (current-time-zone))))) + (hours (mod (floor seconds 3600) 24)) + (minutes (mod (round seconds 60) 60))) + (message (format "@%s is %d:%02d local time" + beats hours minutes)))) + +(provide 'erc-button) + +;;; erc-button.el ends here +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: 7d23bed4-2f30-4273-a03f-d7a274c605c4 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-compat.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-compat.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,207 @@ +;;; erc-compat.el --- ERC compatibility code for XEmacs + +;; Copyright (C) 2002, 2003, 2005, 2006 Free Software Foundation, Inc. + +;; Author: Alex Schroeder +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?EmacsIRCClient + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This mostly defines stuff that cannot be worked around easily. + +;;; Code: + +(require 'format-spec) + +;;;###autoload (autoload 'erc-define-minor-mode "erc-compat") +(defalias 'erc-define-minor-mode 'define-minor-mode) +(put 'erc-define-minor-mode 'edebug-form-spec 'define-minor-mode) + +(defun erc-decode-coding-string (s coding-system) + "Decode S using CODING-SYSTEM." + (decode-coding-string s coding-system t)) + +(defun erc-encode-coding-string (s coding-system) + "Encode S using CODING-SYSTEM. +Return the same string, if the encoding operation is trivial. +See `erc-encoding-coding-alist'." + (encode-coding-string s coding-system t)) + +(defalias 'erc-propertize 'propertize) +(defalias 'erc-view-mode-enter 'view-mode-enter) +(defalias 'erc-function-arglist 'help-function-arglist) +(defalias 'erc-delete-dups 'delete-dups) +(defalias 'erc-replace-regexp-in-string 'replace-regexp-in-string) + +(defvar erc-emacs-build-time + (if (stringp emacs-build-time) + emacs-build-time + (format-time-string "%Y-%m-%d" emacs-build-time)) + "Time at which Emacs was dumped out.") + +;; XEmacs' `replace-match' does not replace matching subexpressions in strings. +(defun erc-replace-match-subexpression-in-string + (newtext string match subexp start &optional fixedcase literal) + "Replace the subexpression SUBEXP of the last match in STRING with NEWTEXT. +MATCH is the text which matched the subexpression (see `match-string'). +START is the beginning position of the last match (see `match-beginning'). +See `replace-match' for explanations of FIXEDCASE and LITERAL." + (cond ((featurep 'xemacs) + (string-match match string start) + (replace-match newtext fixedcase literal string)) + (t (replace-match newtext fixedcase literal string subexp)))) + +(defalias 'erc-cancel-timer 'cancel-timer) +(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. +Return the sublist of LIST whose car matches." + (let ((ptr list)) + (catch 'found + (while ptr + (when (funcall predicate (car ptr)) + (throw 'found ptr)) + (setq ptr (cdr ptr)))))) + +;; Provide a simpler replacement for `delete-if' +(defun erc-delete-if (predicate seq) + "Remove all items satisfying PREDICATE in SEQ. +This is a destructive function: it reuses the storage of SEQ +whenever possible." + ;; remove from car + (while (when (funcall predicate (car seq)) + (setq seq (cdr seq)))) + ;; remove from cdr + (let ((ptr seq) + (next (cdr seq))) + (while next + (when (funcall predicate (car next)) + (setcdr ptr (if (consp next) + (cdr next) + nil))) + (setq ptr (cdr ptr)) + (setq next (cdr ptr)))) + seq) + +;; Provide a simpler replacement for `remove-if-not' +(defun erc-remove-if-not (predicate seq) + "Remove all items not satisfying PREDICATE in SEQ. +This is a non-destructive function; it makes a copy of SEQ to +avoid corrupting the original SEQ." + (let (newseq) + (dolist (el seq) + (when (funcall predicate el) + (setq newseq (cons el newseq)))) + (nreverse newseq))) + +;; Provide a simpler replacement for `gensym'. +(defvar *erc-sym-counter* 0) +(defun erc-gensym () + "Generate a new uninterned symbol." + (let ((num (prog1 *erc-sym-counter* + (setq *erc-sym-counter* (1+ *erc-sym-counter*))))) + (make-symbol (format "*erc-sym-%d*" num)))) + +;; Copied from cl-extra.el +(defun erc-subseq (seq start &optional end) + "Return the subsequence of SEQ from START to END. +If END is omitted, it defaults to the length of the sequence. +If START or END is negative, it counts from the end." + (if (stringp seq) (substring seq start end) + (let (len) + (and end (< end 0) (setq end (+ end (setq len (length seq))))) + (if (< start 0) (setq start (+ start (or len (setq len (length seq)))))) + (cond ((listp seq) + (if (> start 0) (setq seq (nthcdr start seq))) + (if end + (let ((res nil)) + (while (>= (setq end (1- end)) start) + (push (pop seq) res)) + (nreverse res)) + (copy-sequence seq))) + (t + (or end (setq end (or len (length seq)))) + (let ((res (make-vector (max (- end start) 0) nil)) + (i 0)) + (while (< start end) + (aset res i (aref seq start)) + (setq i (1+ i) start (1+ start))) + res)))))) + +(provide 'erc-compat) + +;;; erc-compat.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 8948ffe0-aff8-4ad8-a196-368ebbfd58ff diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-complete.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-complete.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,222 @@ +;;; erc-complete.el --- Provides Nick name completion for ERC + +;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + +;; Author: Alex Schroeder +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file is obsolete. Use completion from erc-pcomplete instead. +;; This file is based on hippie-expand, while the new file is based on +;; pcomplete. There is no autoload cookie in this file. If you want +;; to use the code in this file, add the following to your ~/.emacs: + +;; (autoload 'erc-complete "erc-complete" "Complete nick at point." t) + +;;; Code: + +(require 'erc) +(require 'erc-match); for erc-pals +(require 'hippie-exp); for the hippie expand stuff + +;;;###autoload +(defun erc-complete () + "Complete nick at point. +See `erc-try-complete-nick' for more technical info. +This function is obsolete, use `erc-pcomplete' instead." + (interactive) + (let ((hippie-expand-try-functions-list '(erc-try-complete-nick))) + (hippie-expand nil))) + +(defgroup erc-old-complete nil + "Nick completion. Obsolete, use erc-pcomplete instead." + :group 'erc) + +(defcustom erc-nick-completion 'all + "Determine how the list of nicks is determined during nick completion. +See `erc-complete-nick' for information on how to activate this. + +pals: Use `erc-pals'. +all: All channel members. + +You may also provide your own function that returns a list of completions. +One example is `erc-nick-completion-exclude-myself', +or you may use an arbitrary lisp expression." + :type '(choice (const :tag "List of pals" pals) + (const :tag "All channel members" all) + (const :tag "All channel members except yourself" + erc-nick-completion-exclude-myself) + (repeat :tag "List" (string :tag "Nick")) + function + sexp) + :group 'erc-old-complete) + +(defcustom erc-nick-completion-ignore-case t + "*Non-nil means don't consider case significant in nick completion. +Case will be automatically corrected when non-nil. +For instance if you type \"dely TAB\" the word completes and changes to +\"delYsid\"." + :group 'erc-old-complete + :type 'boolean) + +(defun erc-nick-completion-exclude-myself () + "Get a list of all the channel members except you. + +This function returns a list of all the members in the channel, except +your own nick. This way if you're named foo and someone is called foobar, +typing \"f o TAB\" will directly give you foobar. Use this with +`erc-nick-completion'." + (delete + (erc-current-nick) + (mapcar (function car) (erc-get-channel-user-list)))) + +(defcustom erc-nick-completion-postfix ": " + "*When `erc-complete' is used in the first word after the prompt, +add this string when a unique expansion was found." + :group 'erc-old-complete + :type 'string) + +(defun erc-command-list () + "Returns a list of strings of the defined user commands." + (let ((case-fold-search nil)) + (mapcar (lambda (x) + (concat "/" (downcase (substring (symbol-name x) 8)))) + (apropos-internal "erc-cmd-[A-Z]+")))) + +(defun erc-try-complete-nick (old) + "Complete nick at point. +This is a function to put on `hippie-expand-try-functions-list'. +Then use \\[hippie-expand] to expand nicks. +The type of completion depends on `erc-nick-completion'." + (cond ((eq erc-nick-completion 'pals) + (try-complete-erc-nick old erc-pals)) + ((eq erc-nick-completion 'all) + (try-complete-erc-nick old (append + (mapcar (function car) + (erc-get-channel-user-list)) + (erc-command-list)))) + ((functionp erc-nick-completion) + (try-complete-erc-nick old (funcall erc-nick-completion))) + (t + (try-complete-erc-nick old erc-nick-completion)))) + +(defvar try-complete-erc-nick-window-configuration nil + "The window configuration for `try-complete-erc-nick'. +When called the first time, a window config is stored here, +and when completion is done, the window config is restored +from here. See `try-complete-erc-nick-restore' and +`try-complete-erc-nick'.") + +(defun try-complete-erc-nick-restore () + "Restore window configuration." + (if (not try-complete-erc-nick-window-configuration) + (when (get-buffer "*Completions*") + (delete-windows-on "*Completions*")) + (set-window-configuration + try-complete-erc-nick-window-configuration) + (setq try-complete-erc-nick-window-configuration nil))) + +(defun try-complete-erc-nick (old completions) + "Try to complete current word depending on `erc-try-complete-nick'. +The argument OLD has to be nil the first call of this function, and t +for subsequent calls (for further possible completions of the same +string). It returns t if a new completion is found, nil otherwise. The +second argument COMPLETIONS is a list of completions to use. Actually, +it is only used when OLD is nil. It will be copied to `he-expand-list' +on the first call. After that, it is no longer used. +Window configurations are stored in +`try-complete-erc-nick-window-configuration'." + (let (expansion + final + (alist (if (consp (car completions)) + completions + (mapcar (lambda (s) + (if (and (erc-complete-at-prompt) + (and (not (= (length s) 0)) + (not (eq (elt s 0) ?/)))) + (list (concat s erc-nick-completion-postfix)) + (list (concat s " ")))) + completions))) ; make alist if required + (completion-ignore-case erc-nick-completion-ignore-case)) + (he-init-string (he-dabbrev-beg) (point)) + ;; If there is a string to complete, complete it using alist. + ;; expansion is the possible expansion, or t. If expansion is t + ;; or if expansion is the "real" thing, we are finished (final is + ;; t). Take care -- expansion can also be nil! + (unless (string= he-search-string "") + (setq expansion (try-completion he-search-string alist) + final (or (eq t expansion) + (and expansion + (eq t (try-completion expansion alist)))))) + (cond ((not expansion) + ;; There is no expansion at all. + (try-complete-erc-nick-restore) + (he-reset-string) + nil) + ((eq t expansion) + ;; The user already has the correct expansion. + (try-complete-erc-nick-restore) + (he-reset-string) + t) + ((and old (string= expansion he-search-string)) + ;; This is the second time around and nothing changed, + ;; ie. the user tried to expand something incomplete + ;; without making a choice -- hitting TAB twice, for + ;; example. + (try-complete-erc-nick-restore) + (he-reset-string) + nil) + (final + ;; The user has found the correct expansion. + (try-complete-erc-nick-restore) + (he-substitute-string expansion) + t) + (t + ;; We found something but we are not finished. Show a + ;; completions buffer. Substitute what we found and return + ;; t. + (setq try-complete-erc-nick-window-configuration + (current-window-configuration)) + (with-output-to-temp-buffer "*Completions*" + (display-completion-list (all-completions he-search-string alist))) + (he-substitute-string expansion) + t)))) + +(defun erc-at-beginning-of-line-p (point &optional bol-func) + (save-excursion + (funcall (or bol-func + 'erc-bol)) + (equal point (point)))) + +(defun erc-complete-at-prompt () + "Returns t if point is directly after `erc-prompt' when doing completion." + (erc-at-beginning-of-line-p (he-dabbrev-beg))) + +(provide 'erc-complete) + +;;; erc-complete.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 3be13ee8-8fdb-41ab-83c2-6582c757b91e diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-dcc.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-dcc.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,1135 @@ +;;; erc-dcc.el --- CTCP DCC module for ERC + +;; Copyright (C) 1993, 1994, 1995, 1998, 2002, 2003, 2004 +;; Free Software Foundation, Inc. + +;; Author: Ben A. Mesander +;; Noah Friedman +;; Per Persson +;; Maintainer: mlang@delysid.org +;; Keywords: comm, processes +;; Created: 1994-01-23 + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides Direct Client-to-Client support for the Emacs IRC Client. +;; +;; The original code was taken from zenirc-dcc.el, heavily mangled and +;; rewritten to support the way how ERC operates. Server socket support +;; was added for DCC CHAT and SEND afterwards. Thanks +;; to the original authors for their work. +;; +;; To use this file, put +;; (require 'erc-dcc) +;; in your .emacs. +;; +;; Provided commands +;; /dcc chat nick - Either accept pending chat offer from nick, or offer +;; DCC chat to nick +;; /dcc close type [nick] - Close DCC connection (SEND/GET/CHAT) with nick +;; /dcc get nick [file] - Accept DCC offer from nick +;; /dcc list - List all DCC offers/connections +;; /dcc send nick file - Offer DCC SEND to nick +;; +;; Please note that offering DCC connections (offering chats and sending +;; files) is only supported with Emacs 21.3.50 (CVS). + +;;; Code: + +(require 'erc) +(eval-when-compile + (require 'pcomplete)) + +(defgroup erc-dcc nil + "DCC stands for Direct Client Communication, where you and your +friend's client programs connect directly to each other, +bypassing IRC servers and their occasional \"lag\" or \"split\" +problems. Like /MSG, the DCC chat is completely private. + +Using DCC get and send, you can transfer files directly from and to other +IRC users." + :group 'erc) + +(defcustom erc-verbose-dcc t + "*If non-nil, be verbose about DCC activity reporting." + :group 'erc-dcc + :type 'boolean) + +(defvar erc-dcc-list nil + "List of DCC connections. Looks like: + ((:nick \"nick!user@host\" :type GET :peer proc :parent proc :size size :file file) + (:nick \"nick!user@host\" :type CHAT :peer proc :parent proc) + (:nick \"nick\" :type SEND :peer server-proc :parent parent-proc :file + file :sent :confirmed )) + + :nick - a user or userhost for the peer. combine with :parent to reach them + + :type - the type of DCC connection - SEND for outgoing files, GET for + incoming, and CHAT for both directions. To tell which end started + the DCC chat, look at :peer + + :peer - the other end of the DCC connection. In the case of outgoing DCCs, + this represents a server process until a connection is established + + :parent - the server process where the dcc connection was established. + Note that this can be nil or an invalid process since a DCC + connection is in general independent from a particular server + connection after it was established. + + :file - for outgoing sends, the full path to the file. for incoming sends, + the suggested filename or vetted filename + + :size - size of the file, may be nil on incoming DCCs") + +(defun erc-dcc-list-add (type nick peer parent &rest args) + "Add a new entry of type TYPE to `erc-dcc-list' and return it." + (car + (setq erc-dcc-list + (cons + (append (list :nick nick :type type :peer peer :parent parent) args) + erc-dcc-list)))) + +;; This function takes all the usual args as open-network-stream, plus one +;; more: the entry data from erc-dcc-list for this particular process. +(defvar erc-dcc-connect-function 'erc-dcc-open-network-stream) + +(defun erc-dcc-open-network-stream (procname buffer addr port entry) + (if nil; (fboundp 'open-network-stream-nowait) ;; this currently crashes + ;; cvs emacs + (open-network-stream-nowait procname buffer addr port) + (open-network-stream procname buffer addr port))) + +(erc-define-catalog + 'english + '((dcc-chat-discarded + . "DCC: previous chat request from %n (%u@%h) discarded") + (dcc-chat-ended . "DCC: chat with %n ended %t: %e") + (dcc-chat-no-request . "DCC: chat request from %n not found") + (dcc-chat-offered . "DCC: chat offered by %n (%u@%h:%p)") + (dcc-chat-offer . "DCC: offering chat to %n") + (dcc-chat-accept . "DCC: accepting chat from %n") + (dcc-chat-privmsg . "=%n= %m") + (dcc-closed . "DCC: Closed %T from %n") + (dcc-command-undefined + . "DCC: %c undefined subcommand. GET, CHAT and LIST are defined.") + (dcc-ctcp-errmsg . "DCC: `%s' is not a DCC subcommand known to this client") + (dcc-ctcp-unknown . "DCC: unknown dcc command `%q' from %n (%u@%h)") + (dcc-get-bytes-received . "DCC: %f: %b bytes received") + (dcc-get-complete + . "DCC: file %f transfer complete (%s bytes in %t seconds)") + (dcc-get-cmd-aborted . "DCC: Aborted getting %f from %n") + (dcc-get-file-too-long + . "DCC: %f: File longer than sender claimed; aborting transfer") + (dcc-get-notfound . "DCC: %n hasn't offered %f for DCC transfer") + (dcc-list-head . "DCC: From Type Active Size Filename") + (dcc-list-line . "DCC: -------- ---- ------ ------------ --------") + (dcc-list-item . "DCC: %-8n %-4t %-6a %-12s %f") + (dcc-list-end . "DCC: End of list.") + (dcc-malformed . "DCC: error: %n (%u@%h) sent malformed request: %q") + (dcc-privileged-port + . "DCC: possibly bogus request: %p is a privileged port.") + (dcc-request-bogus . "DCC: bogus dcc `%r' from %n (%u@%h)") + (dcc-send-finished . "DCC: SEND of %f to %n finished (size %s)") + (dcc-send-offered . "DCC: file %f offered by %n (%u@%h) (size %s)") + (dcc-send-offer . "DCC: offering %f to %n"))) + +;;; Misc macros and utility functions + +(defun erc-dcc-member (&rest args) + "Return the first matching entry in `erc-dcc-list' which satisfies the +constraints given as a plist in ARGS. Returns nil on no match. + +The property :nick is treated specially, if it contains a '!' character, +it is treated as a nick!user@host string, and compared with the :nick property +value of the individual elements using string-equal. Otherwise it is +compared with `erc-nick-equal-p' which is IRC case-insensitive." + (let ((list erc-dcc-list) + result test) + ;; for each element in erc-dcc-list + (while (and list (not result)) + (let ((elt (car list)) + (prem args) + (cont t)) + ;; loop through the constraints + (while (and prem cont) + (let ((prop (car prem)) + (val (cadr prem))) + (setq prem (cddr prem) + ;; plist-member is a predicate in xemacs + test (and (plist-member elt prop) + (plist-get elt prop))) + ;; if the property exists and is equal, we continue, else, try the + ;; next element of the list + (or (and (eq prop :nick) (string-match "!" val) + test (string-equal test val)) + (and (eq prop :nick) + test val + (erc-nick-equal-p + (erc-extract-nick test) + (erc-extract-nick val))) + ;; not a nick + (eq test val) + (setq cont nil)))) + (if cont + (setq result elt) + (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-unpack-int (str) + "Unpack a 1-4 character 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))) + num)) + +(defconst erc-dcc-ipv4-regexp + (concat "^" + (mapconcat #'identity (make-list 4 "\\([0-9]\\{1,3\\}\\)") "\\.") + "$")) + +(defun erc-ip-to-decimal (ip) + "Convert IP address to its decimal representation. +Argument IP is the address as a string. The result is also a string." + (interactive "sIP Address: ") + (if (not (string-match erc-dcc-ipv4-regexp ip)) + (error "Not an IP address") + (let* ((ips (mapcar + (lambda (str) + (let ((n (string-to-number str))) + (if (and (>= n 0) (< n 256)) + n + (error "%d out of range" n)))) + (split-string ip "\\."))) + (res (+ (* (car ips) 16777216.0) + (* (nth 1 ips) 65536.0) + (* (nth 2 ips) 256.0) + (nth 3 ips)))) + (if (interactive-p) + (message "%s is %.0f" ip res) + (format "%.0f" res))))) + +(defun erc-decimal-to-ip (dec) + "Convert a decimal representation DEC to an IP address. +The result is also a string." + (when (stringp dec) + (setq dec (string-to-number (concat dec ".0")))) + (let* ((first (floor (/ dec 16777216.0))) + (first-rest (- dec (* first 16777216.0))) + (second (floor (/ first-rest 65536.0))) + (second-rest (- first-rest (* second 65536.0))) + (third (floor (/ second-rest 256.0))) + (third-rest (- second-rest (* third 256.0))) + (fourth (floor third-rest))) + (format "%s.%s.%s.%s" first second third fourth))) + +;;; 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." + :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-send-request 'ask + "*How to treat incoming DCC Send requests. +'ask - Report the Send request, and wait for the user to manually accept it + You might want to set `erc-dcc-auto-masks' for this. +'auto - Automatically accept the request and begin downloading the file +'ignore - Ignore incoming DCC Send requests completely." + :group 'erc-dcc + :type '(choice (const ask) (const auto) (const ignore))) + +(defun erc-dcc-get-host (proc) + "Returns the local IP address used for an open PROCess." + (format-network-address (process-contact proc :local) t)) + +(defun erc-dcc-host () + "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) + (error "Unable to determine local address"))) + +(defcustom erc-dcc-port-range nil + "If nil, any available user port is used for outgoing DCC connections. +If set to a cons, it specifies a range of ports to use in the form (min . max)" + :group 'erc-dcc + :type '(choice + (const :tag "Any port" nil) + (cons :tag "Port range" + (integer :tag "Lower port") + (integer :tag "Upper port")))) + +(defcustom erc-dcc-auto-masks nil + "List of regexps matching user identifiers whose DCC send offers should be +accepted automatically. A user identifier has the form \"nick!login@host\". +For instance, to accept all incoming DCC send offers automatically, add the +string \".*!.*@.*\" to this list." + :group 'erc-dcc + :type '(repeat regexp)) + +(defun erc-dcc-server (name filter sentinel) + "Start listening on a port for an incoming DCC connection. Returns the newly +created subprocess, or nil." + (let ((port (or (and erc-dcc-port-range (car erc-dcc-port-range)) t)) + (upper (and erc-dcc-port-range (cdr erc-dcc-port-range))) + process) + (while (not process) + (condition-case err + (setq process + (make-network-process :name name + :buffer nil + :host (erc-dcc-host) + :service port + :nowait t + :noquery nil + :filter filter + :sentinel sentinel + :log #'erc-dcc-server-accept + :server t)) + (file-error + (unless (and (string= "Cannot bind server socket" (cadr err)) + (string= "address already in use" (caddr err))) + (signal (car err) (cdr err))) + (setq port (1+ port)) + (unless (< port upper) + (error "No available ports in erc-dcc-port-range"))))) + process)) + +(defun erc-dcc-server-accept (server client message) + "Log an accepted DCC offer, then terminate the listening process and set up +the accepted connection." + (erc-log (format "(erc-dcc-server-accept): server %s client %s message %s" + server client message)) + (when (and (string-match "^accept from " message) + (processp server) (processp client)) + (let ((elt (erc-dcc-member :peer server))) + ;; change the entry in erc-dcc-list from the listening process to the + ;; accepted process + (setq elt (plist-put elt :peer client)) + ;; delete the listening process, as we've accepted the connection + (delete-process server)))) + +;;; Interactive command handling + +(defcustom erc-dcc-get-default-directory nil + "*Default directory for incoming DCC file transfers. +If this is nil, then the current value of `default-directory' is used." + :group 'erc-dcc + :type '(choice (const nil :tag "Default directory") directory)) + +;;;###autoload +(defun erc-cmd-DCC (cmd &rest args) + "Parser for /dcc command. +This figures out the dcc subcommand and calls the appropriate routine to +handle it. The function dispatched should be named \"erc-dcc-do-FOO-command\", +where FOO is one of CLOSE, GET, SEND, LIST, CHAT, etc." + (when cmd + (let ((fn (intern-soft (concat "erc-dcc-do-" (upcase cmd) "-command")))) + (if fn + (apply fn erc-server-process args) + (erc-display-message + nil 'notice 'active + 'dcc-command-undefined ?c cmd) + (apropos "erc-dcc-do-.*-command") + t)))) + +;;;###autoload +(defun pcomplete/erc-mode/DCC () + "Provides completion for the /DCC command." + (pcomplete-here (append '("chat" "close" "get" "list") + (when (fboundp 'make-network-process) '("send")))) + (pcomplete-here + (case (intern (downcase (pcomplete-arg 1))) + (chat (mapcar (lambda (elt) (plist-get elt :nick)) + (erc-remove-if-not + #'(lambda (elt) + (eq (plist-get elt :type) 'CHAT)) + erc-dcc-list))) + (close (remove-duplicates + (mapcar (lambda (elt) (symbol-name (plist-get elt :type))) + erc-dcc-list) :test 'string=)) + (get (mapcar #'erc-dcc-nick + (erc-remove-if-not + #'(lambda (elt) + (eq (plist-get elt :type) 'GET)) + erc-dcc-list))) + (send (pcomplete-erc-all-nicks)))) + (pcomplete-here + (case (intern (downcase (pcomplete-arg 2))) + (get (mapcar (lambda (elt) (plist-get elt :file)) + (erc-remove-if-not + #'(lambda (elt) + (and (eq (plist-get elt :type) 'GET) + (erc-nick-equal-p (erc-extract-nick + (plist-get elt :nick)) + (pcomplete-arg 1)))) + erc-dcc-list))) + (close (mapcar #'erc-dcc-nick + (erc-remove-if-not + #'(lambda (elt) + (eq (plist-get elt :type) + (intern (upcase (pcomplete-arg 1))))) + erc-dcc-list))) + (send (pcomplete-entries))))) + +(defun erc-dcc-do-CHAT-command (proc &optional nick) + (when nick + (let ((elt (erc-dcc-member :nick nick :type 'CHAT :parent proc))) + (if (and elt (not (processp (plist-get elt :peer)))) + ;; accept an existing chat offer + ;; FIXME: perhaps /dcc accept like other clients? + (progn (erc-dcc-chat-accept elt erc-server-process) + (erc-display-message + nil 'notice 'active + 'dcc-chat-accept ?n nick) + t) + (erc-dcc-chat nick erc-server-process) + (erc-display-message + nil 'notice 'active + 'dcc-chat-offer ?n nick) + t)))) + +(defun erc-dcc-do-CLOSE-command (proc &optional type nick) + "/dcc close type nick +type and nick are optional." + ;; FIXME, should also work if only nick is specified + (when (string-match (concat "^\\s-*\\(\\S-+\\)? *\\(" + erc-valid-nick-regexp "\\)?\\s-*$") line) + (let ((type (when (match-string 1 line) + (intern (upcase (match-string 1 line))))) + (nick (match-string 2 line)) + (ret t)) + (while ret + (if nick + (setq ret (erc-dcc-member :type type :nick nick)) + (setq ret (erc-dcc-member :type type))) + (when ret + ;; found a match - delete process if it exists. + (and (processp (plist-get ret :peer)) + (delete-process (plist-get ret :peer))) + (setq erc-dcc-list (delq ret erc-dcc-list)) + (erc-display-message + nil 'notice 'active + 'dcc-closed + ?T (plist-get ret :type) + ?n (erc-extract-nick (plist-get ret :nick)))))) + t)) + +(defun erc-dcc-do-GET-command (proc nick &optional file) + (let* ((elt (erc-dcc-member :nick nick :type 'GET)) + (filename (or file (plist-get elt :file) "unknown"))) + (if elt + (let* ((file (read-file-name + (format "Local filename (default %s): " + (file-name-nondirectory filename)) + (or erc-dcc-get-default-directory + default-directory) + (expand-file-name (file-name-nondirectory filename) + (or erc-dcc-get-default-directory + default-directory))))) + (cond ((file-exists-p file) + (if (yes-or-no-p (format "File %s exists. Overwrite? " + file)) + (erc-dcc-get-file elt file proc) + (erc-display-message + nil '(notice error) proc + 'dcc-get-cmd-aborted + ?n nick ?f filename))) + (t + (erc-dcc-get-file elt file proc)))) + (erc-display-message + nil '(notice error) 'active + 'dcc-get-notfound ?n nick ?f filename)))) + +(defun erc-dcc-do-LIST-command (proc) + "This is the handler for the /dcc list command. +It lists the current state of `erc-dcc-list' in an easy to read manner." + (let ((alist erc-dcc-list) + size elt) + (erc-display-message + nil 'notice 'active + 'dcc-list-head) + (erc-display-message + nil 'notice 'active + 'dcc-list-line) + (while alist + (setq elt (car alist) + alist (cdr alist)) + + (setq size (or (and (plist-member elt :size) + (plist-get elt :size)) + "")) + (setq size + (cond ((null size) "") + ((numberp size) (number-to-string size)) + ((string= size "") "unknown"))) + (erc-display-message + nil 'notice 'active + 'dcc-list-item + ?n (erc-dcc-nick elt) + ?t (plist-get elt :type) + ?a (if (processp (plist-get elt :peer)) + (process-status (plist-get elt :peer)) + "no") + ?s (concat size + (if (and (eq 'GET (plist-get elt :type)) + (plist-member elt :file) + (buffer-live-p (get-buffer (plist-get elt :file))) + (plist-member elt :size)) + (concat " (" (number-to-string + (* 100 + (/ (buffer-size + (get-buffer (plist-get elt :file))) + (plist-get elt :size)))) + "%)"))) + ?f (or (and (plist-member elt :file) (plist-get elt :file)) ""))) + (erc-display-message + nil 'notice 'active + 'dcc-list-end) + t)) + +(defun erc-dcc-do-SEND-command (proc nick file) + "Offer FILE to NICK by sending a ctcp dcc send message." + (if (file-exists-p file) + (progn + (erc-display-message + nil 'notice 'active + 'dcc-send-offer ?n nick ?f file) + (erc-dcc-send-file nick file) t) + (erc-display-message nil '(notice error) proc "File not found") t)) + +;;; Server message handling (i.e. messages from remote users) + +;;;###autoload +(defvar erc-ctcp-query-DCC-hook '(erc-ctcp-query-DCC) + "Hook variable for CTCP DCC queries") + +(defvar erc-dcc-query-handler-alist + '(("SEND" . erc-dcc-handle-ctcp-send) + ("CHAT" . erc-dcc-handle-ctcp-chat))) + +;;;###autoload +(defun erc-ctcp-query-DCC (proc nick login host to query) + "The function called when a CTCP DCC request is detected by the client. +It examines the DCC subcommand, and calls the appropriate routine for +that subcommand." + (let* ((cmd (cadr (split-string query " "))) + (handler (cdr (assoc cmd erc-dcc-query-handler-alist)))) + (if handler + (funcall handler proc query nick login host to) + ;; FIXME: Send a ctcp error notice to the remote end? + (erc-display-message + nil '(notice error) proc + 'dcc-ctcp-unknown + ?q query ?n nick ?u login ?h host)))) + +(defconst erc-dcc-ctcp-query-send-regexp + "^DCC SEND \\([^ ]+\\) \\([0-9]+\\) \\([0-9]+\\) *\\([0-9]*\\)") + +(defun erc-dcc-handle-ctcp-send (proc query nick login host to) + "This is called if a CTCP DCC SEND subcommand is sent to the client. +It extracts the information about the dcc request and adds it to +`erc-dcc-list'." + (unless (eq erc-dcc-send-request 'ignore) + (cond + ((not (erc-current-nick-p to)) + ;; DCC SEND requests must be sent to you, and you alone. + (erc-display-message + nil 'notice proc + 'dcc-request-bogus + ?r "SEND" ?n nick ?u login ?h host)) + ((string-match erc-dcc-ctcp-query-send-regexp query) + (let ((filename (match-string 1 query)) + (ip (erc-decimal-to-ip (match-string 2 query))) + (port (match-string 3 query)) + (size (match-string 4 query))) + ;; FIXME: a warning really should also be sent + ;; if the ip address != the host the dcc sender is on. + (erc-display-message + nil 'notice proc + 'dcc-send-offered + ?f filename ?n nick ?u login ?h host + ?s (if (string= size "") "unknown" size)) + (and (< (string-to-number port) 1025) + (erc-display-message + nil 'notice proc + 'dcc-privileged-port + ?p port)) + (erc-dcc-list-add + 'GET (format "%s!%s@%s" nick login host) + nil proc + :ip ip :port port :file filename + :size (string-to-number size)) + (if (and (eq erc-dcc-send-request 'auto) + (erc-dcc-auto-mask-p (format "\"%s!%s@%s\"" nick login host))) + (erc-dcc-get-file (car erc-dcc-list) filename proc)))) + (t + (erc-display-message + nil 'notice proc + 'dcc-malformed + ?n nick ?u login ?h host ?q query))))) + +(defun erc-dcc-auto-mask-p (spec) + "Takes a full SPEC of a user in the form \"nick!login@host\" and +matches against all the regexp's in `erc-dcc-auto-masks'. If any +match, returns that regexp and nil otherwise." + (let ((lst erc-dcc-auto-masks)) + (while (and lst + (not (string-match (car lst) spec))) + (setq lst (cdr lst))) + (and lst (car lst)))) + +(defconst erc-dcc-ctcp-query-chat-regexp + "^DCC CHAT +chat +\\([0-9]+\\) +\\([0-9]+\\)") + +(defcustom erc-dcc-chat-request 'ask + "*How to treat incoming DCC Chat requests. +'ask - Report the Chat request, and wait for the user to manually accept it +'auto - Automatically accept the request and open a new chat window +'ignore - Ignore incoming DCC chat requests completely." + :group 'erc-dcc + :type '(choice (const ask) (const auto) (const ignore))) + +(defun erc-dcc-handle-ctcp-chat (proc query nick login host to) + (unless (eq erc-dcc-chat-request 'ignore) + (cond + (;; DCC CHAT requests must be sent to you, and you alone. + (not (erc-current-nick-p to)) + (erc-display-message + nil '(notice error) proc + 'dcc-request-bogus ?r "CHAT" ?n nick ?u login ?h host)) + ((string-match erc-dcc-ctcp-query-chat-regexp query) + ;; We need to use let* here, since erc-dcc-member might clutter + ;; the match value. + (let* ((ip (erc-decimal-to-ip (match-string 1 query))) + (port (match-string 2 query)) + (elt (erc-dcc-member :nick nick :type 'CHAT))) + ;; FIXME: A warning really should also be sent if the ip + ;; address != the host the dcc sender is on. + (erc-display-message + nil 'notice proc + 'dcc-chat-offered + ?n nick ?u login ?h host ?p port) + (and (< (string-to-number port) 1025) + (erc-display-message + nil 'notice proc + 'dcc-privileged-port ?p port)) + (cond (elt + ;; XXX: why are we updating ip/port on the existing connection? + (setq elt (plist-put (plist-put elt :port port) :ip ip)) + (erc-display-message + nil 'notice proc + 'dcc-chat-discarded ?n nick ?u login ?h host)) + (t + (erc-dcc-list-add + 'CHAT (format "%s!%s@%s" nick login host) + nil proc + :ip ip :port port))) + (if (eq erc-dcc-chat-request 'auto) + (erc-dcc-chat-accept (erc-dcc-member :nick nick :type 'CHAT) + proc)))) + (t + (erc-display-message + nil '(notice error) proc + 'dcc-malformed ?n nick ?u login ?h host ?q query))))) + + +(defvar erc-dcc-entry-data nil + "Holds the `erc-dcc-list' entry for this DCC connection.") +(make-variable-buffer-local 'erc-dcc-entry-data) + +;;; SEND handling + +(defcustom erc-dcc-block-size 1024 + "*Block size to use for DCC SEND sessions." + :group 'erc-dcc + :type 'integer) + +(defcustom erc-dcc-pump-bytes nil + "*If set to an integer, keep sending until that number of bytes are +unconfirmed." + :group 'erc-dcc + :type '(choice (const nil) integer)) + +(defsubst erc-dcc-get-parent (proc) + (plist-get (erc-dcc-member :peer proc) :parent)) + +(defun erc-dcc-send-block (proc) + "Send one block of data. +PROC is the process-object of the DCC connection. Returns the number of +bytes sent." + (let* ((elt (erc-dcc-member :peer proc)) + (confirmed-marker (plist-get elt :sent)) + (sent-marker (plist-get elt :sent))) + (with-current-buffer (process-buffer proc) + (when erc-verbose-dcc + (erc-display-message + nil 'notice (erc-dcc-get-parent proc) + (format "DCC: Confirmed %d, sent %d, sending block now" + (- confirmed-marker (point-min)) + (- sent-marker (point-min))))) + (let* ((end (min (+ sent-marker erc-dcc-block-size) + (point-max))) + (string (buffer-substring-no-properties sent-marker end))) + (when (< sent-marker end) + (set-marker sent-marker end) + (process-send-string proc string)) + (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)))) + (elt (erc-dcc-member :peer proc)) + (parent (plist-get elt :parent)) + (sent-marker (plist-get elt :sent)) + (confirmed-marker (plist-get elt :confirmed))) + (with-current-buffer (process-buffer proc) + (set-marker confirmed-marker (+ (point-min) size)) + (cond + ((and (= confirmed-marker sent-marker) + (= confirmed-marker (point-max))) + (erc-display-message + nil 'notice parent + 'dcc-send-finished + ?n (plist-get elt :nick) + ?f buffer-file-name + ?s (number-to-string (- sent-marker (point-min)))) + (setq erc-dcc-list (delete elt erc-dcc-list)) + (set-buffer-modified-p nil) + (kill-buffer (current-buffer)) + (delete-process proc)) + ((<= confirmed-marker sent-marker) + (while (and (< (- sent-marker confirmed-marker) + (or erc-dcc-pump-bytes + erc-dcc-block-size)) + (> (erc-dcc-send-block proc) 0)))) + ((> confirmed-marker sent-marker) + (erc-display-message + nil 'notice parent + (format "DCC: Client confirmed too much!")) + (delete-process proc)))))) + +(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) + "*Hook run whenever the remote end of a DCC SEND offer connected to your +listening port." + :group 'erc-dcc + :type 'hook) + +(defun erc-dcc-nick (plist) + "Extract the nickname portion of the :nick property value in PLIST." + (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)))) + (cond + ((string-match "^open from " event) + (when elt + (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) + (with-current-buffer (generate-new-buffer (file-name-nondirectory file)) + (insert-file-contents-literally file) + (setq buffer-file-name file) + (current-buffer))) + +(defun erc-dcc-file-to-name (file) + (with-temp-buffer + (insert (file-name-nondirectory file)) + (subst-char-in-region (point-min) (point-max) ? ?_ t) + (buffer-string))) + +(defun erc-dcc-send-file (nick file &optional pproc) + "Open a socket for incoming connections, and send a CTCP send request to the +other client." + (interactive "sNick: \nfFile: ") + (when (null pproc) (if (processp erc-server-process) + (setq pproc erc-server-process) + (error "Can not find parent process"))) + (if (featurep 'make-network-process) + (let* ((buffer (erc-dcc-find-file file)) + (size (buffer-size buffer)) + (start (with-current-buffer buffer + (set-marker (make-marker) (point-min)))) + (sproc (erc-dcc-server "dcc-send" + 'erc-dcc-send-filter + 'erc-dcc-send-sentinel)) + (contact (process-contact sproc))) + (erc-dcc-list-add + 'SEND nick sproc pproc + :file file :size size + :sent start :confirmed (copy-marker start)) + (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)) + (nth 1 contact) + size))) + (error "`make-network-process' not supported by your emacs."))) + +;;; GET handling + +(defvar erc-dcc-byte-count nil) +(make-variable-buffer-local 'erc-dcc-byte-count) + +(defun erc-dcc-get-file (entry file parent-proc) + "This function does the work of setting up a transfer from the remote client +to the local one over a tcp connection. This involves setting up a process +filter and a process sentinel, and making the connection." + (let* ((buffer (generate-new-buffer (file-name-nondirectory file))) + proc) + (with-current-buffer buffer + (fundamental-mode) + ;; This is necessary to have the buffer saved as-is in GNU + ;; Emacs. + ;; XEmacs change: We don't have `set-buffer-multibyte', setting + ;; coding system to 'binary below takes care of us. + (when (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte nil)) + + (setq mode-line-process '(":%s") + buffer-file-type t + buffer-read-only t) + (set-visited-file-name file) + + (setq erc-server-process parent-proc + erc-dcc-entry-data entry) + (setq erc-dcc-byte-count 0) + (setq proc + (funcall erc-dcc-connect-function + "dcc-get" buffer + (plist-get entry :ip) + (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) + + (set-process-filter proc 'erc-dcc-get-filter) + (set-process-sentinel proc 'erc-dcc-get-sentinel) + (setq entry (plist-put entry :start-time (erc-current-time))) + (setq entry (plist-put entry :peer proc))))) + +(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 +buffer, and sends back the replies after each block of data per the DCC +protocol spec. Well not really. We write back a reply after each read, +rather than every 1024 byte block, but nobody seems to care." + (with-current-buffer (process-buffer proc) + (setq buffer-read-only nil) ;; FIXME + (goto-char (point-max)) + (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 + (erc-display-message + nil 'notice erc-server-process + 'dcc-get-bytes-received + ?f (file-name-nondirectory buffer-file-name) + ?b (number-to-string erc-dcc-byte-count))) + (cond + ((and (> (plist-get erc-dcc-entry-data :size) 0) + (> erc-dcc-byte-count (plist-get erc-dcc-entry-data :size))) + (erc-display-message + nil '(error notice) 'active + 'dcc-get-file-too-long + ?f (file-name-nondirectory buffer-file-name)) + (delete-process proc)) + (t + (process-send-string + proc (erc-pack-int erc-dcc-byte-count 4)))))) + + +(defun erc-dcc-get-sentinel (proc event) + "This is the process sentinel for CTCP DCC SEND connections. +It shuts down the connection and notifies the user that the +transfer is complete." + ;; 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)) + (erc-display-message + nil 'notice erc-server-process + 'dcc-get-complete + ?f (file-name-nondirectory buffer-file-name) + ?s (number-to-string (buffer-size)) + ?t (format "%.0f" + (erc-time-diff (plist-get erc-dcc-entry-data :start-time) + (erc-current-time)))) + (save-buffer)) + (kill-buffer (process-buffer proc)) + (delete-process proc)) + +;;; CHAT handling + +(defcustom erc-dcc-chat-buffer-name-format "DCC-CHAT-%s" + "*Format to use for DCC Chat buffer names." + :group 'erc-dcc + :type 'string) + +(defcustom erc-dcc-chat-mode-hook nil + "*Hook calls when `erc-dcc-chat-mode' finished setting up the buffer." + :group 'erc-dcc + :type 'hook) + +(defcustom erc-dcc-chat-connect-hook nil + "" + :group 'erc-dcc + :type 'hook) + +(defcustom erc-dcc-chat-exit-hook nil + "" + :group 'erc-dcc + :type 'hook) + +(defun erc-cmd-CREQ (line &optional force) + "Set or get the DCC chat request flag. +Possible values are: ask, auto, ignore." + (when (string-match "^\\s-*\\(auto\\|ask\\|ignore\\)?$" line) + (let ((cmd (match-string 1 line))) + (if (stringp cmd) + (erc-display-message + nil 'notice 'active + (format "Set DCC Chat requests to %S" + (setq erc-dcc-chat-request (intern cmd)))) + (erc-display-message nil 'notice 'active + (format "DCC Chat requests are set to %S" + erc-dcc-chat-request))) + t))) + +(defun erc-cmd-SREQ (line &optional force) + "Set or get the DCC send request flag. +Possible values are: ask, auto, ignore." + (when (string-match "^\\s-*\\(auto\\|ask\\|ignore\\)?$" line) + (let ((cmd (match-string 1 line))) + (if (stringp cmd) + (erc-display-message + nil 'notice 'active + (format "Set DCC Send requests to %S" + (setq erc-dcc-send-request (intern cmd)))) + (erc-display-message nil 'notice 'active + (format "DCC Send requests are set to %S" + erc-dcc-send-request))) + t))) + +(defun pcomplete/erc-mode/CREQ () + (pcomplete-here '("auto" "ask" "ignore"))) +(defalias 'pcomplete/erc-mode/SREQ 'pcomplete/erc-mode/CREQ) + +(defvar erc-dcc-chat-filter-hook '(erc-dcc-chat-parse-output) + "*Hook to run after doing parsing (and possible insertion) of DCC messages.") + +(defvar erc-dcc-chat-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "RET") 'erc-send-current-line) + (define-key map "\t" 'erc-complete-word) + map) + "Keymap for `erc-dcc-mode'.") + +(defun erc-dcc-chat-mode () + "Major mode for wasting time via DCC chat." + (interactive) + (kill-all-local-variables) + (setq mode-line-process '(":%s") + mode-name "DCC-Chat" + major-mode 'erc-dcc-chat-mode + erc-send-input-line-function 'erc-dcc-chat-send-input-line + erc-default-recipients '(dcc)) + (use-local-map erc-dcc-chat-mode-map) + (run-hooks 'erc-dcc-chat-mode-hook)) + +(defun erc-dcc-chat-send-input-line (recipient line &optional force) + "Send LINE to the remote end. +Argument RECIPIENT should always be the symbol dcc, and force +is ignored." + ;; FIXME: We need to get rid of all force arguments one day! + (if (eq recipient 'dcc) + (process-send-string + (get-buffer-process (current-buffer)) line) + (error "erc-dcc-chat-send-input-line in %s" (current-buffer)))) + +(defun erc-dcc-chat (nick &optional pproc) + "Open a socket for incoming connections, and send a chat request to the +other client." + (interactive "sNick: ") + (when (null pproc) (if (processp erc-server-process) + (setq pproc erc-server-process) + (error "Can not find parent process"))) + (let* ((sproc (erc-dcc-server "dcc-chat-out" + 'erc-dcc-chat-filter + 'erc-dcc-chat-sentinel)) + (contact (process-contact sproc))) + (erc-dcc-list-add 'OCHAT nick sproc pproc) + (process-send-string pproc + (format "PRIVMSG %s :\C-aDCC CHAT chat %s %d\C-a\n" + nick + (erc-ip-to-decimal (nth 0 contact)) (nth 1 contact))))) + +(defvar erc-dcc-from) +(make-variable-buffer-local 'erc-dcc-from) + +(defvar erc-dcc-unprocessed-output) +(make-variable-buffer-local 'erc-dcc-unprocessed-output) + +(defun erc-dcc-chat-setup (entry) + "Setup a DCC chat buffer, returning the buffer." + (let* ((nick (erc-extract-nick (plist-get entry :nick))) + (buffer (generate-new-buffer + (format erc-dcc-chat-buffer-name-format nick))) + (proc (plist-get entry :peer)) + (parent-proc (plist-get entry :parent))) + (erc-setup-buffer buffer) + ;; buffer is now the current buffer. + (erc-dcc-chat-mode) + (setq erc-server-process parent-proc) + (setq erc-dcc-from nick) + (setq erc-dcc-entry-data entry) + (setq erc-dcc-unprocessed-output "") + (setq erc-insert-marker (set-marker (make-marker) (point-max))) + (erc-display-prompt buffer (point-max)) + (set-process-buffer proc buffer) + (add-hook 'kill-buffer-hook 'erc-dcc-chat-buffer-killed nil t) + (run-hook-with-args 'erc-dcc-chat-connect-hook proc) + buffer)) + +(defun erc-dcc-chat-accept (entry parent-proc) + "Accept an incoming DCC connection and open a DCC window" + (let* ((nick (erc-extract-nick (plist-get entry :nick))) + buffer proc) + (setq proc + (funcall erc-dcc-connect-function + "dcc-chat" nil + (plist-get entry :ip) + (string-to-number (plist-get entry :port)) + entry)) + ;; XXX: connected, should we kill the ip/port properties? + (setq entry (plist-put entry :peer proc)) + (setq entry (plist-put entry :parent parent-proc)) + (set-process-filter proc 'erc-dcc-chat-filter) + (set-process-sentinel proc 'erc-dcc-chat-sentinel) + (setq buffer (erc-dcc-chat-setup entry)))) + +(defun erc-dcc-chat-filter (proc str) + (let ((orig-buffer (current-buffer))) + (unwind-protect + (progn + (set-buffer (process-buffer proc)) + (setq erc-dcc-unprocessed-output + (concat erc-dcc-unprocessed-output str)) + (run-hook-with-args 'erc-dcc-chat-filter-hook proc + erc-dcc-unprocessed-output)) + (set-buffer orig-buffer)))) + +(defun erc-dcc-chat-parse-output (proc str) + (save-match-data + (let ((posn 0) + line) + (while (string-match "\n" str posn) + (setq line (substring str posn (match-beginning 0))) + (setq posn (match-end 0)) + (erc-display-message + nil nil proc + 'dcc-chat-privmsg ?n (erc-propertize erc-dcc-from 'face + 'erc-nick-default-face) ?m line)) + (setq erc-dcc-unprocessed-output (substring str posn))))) + +(defun erc-dcc-chat-buffer-killed () + (erc-dcc-chat-close "killed buffer")) + +(defun erc-dcc-chat-close (&optional event) + "Close a DCC chat, removing any associated processes and tidying up +`erc-dcc-list'" + (let ((proc (plist-get erc-dcc-entry-data :peer)) + (evt (or event ""))) + (when proc + (setq erc-dcc-list (delq erc-dcc-entry-data erc-dcc-list)) + (run-hook-with-args 'erc-dcc-chat-exit-hook proc) + (delete-process proc) + (erc-display-message + nil 'notice erc-server-process + 'dcc-chat-ended ?n erc-dcc-from ?t (current-time-string) ?e evt) + (setq erc-dcc-entry-data (plist-put erc-dcc-entry-data :peer nil))))) + +(defun erc-dcc-chat-sentinel (proc event) + (let ((buf (current-buffer)) + (elt (erc-dcc-member :peer proc))) + ;; the sentinel is also notified when the connection is opened, so don't + ;; immediately kill it again + ;(message "buf %s elt %S evt %S" buf elt event) + (unwind-protect + (if (string-match "^open from" event) + (erc-dcc-chat-setup elt) + (erc-dcc-chat-close event)) + (set-buffer buf)))) + +(defun erc-dcc-no-such-nick (proc parsed) + "Detect and handle no-such-nick replies from the IRC server." + (let* ((elt (erc-dcc-member :nick (second (erc-response.command-args parsed)) + :parent proc)) + (peer (plist-get elt :peer))) + (when (or (and (processp peer) (not (eq (process-status peer) 'open))) + elt) + ;; Since we already created an entry before sending the CTCP + ;; message, we now remove it, if it doesn't point to a process + ;; which is already open. + (setq erc-dcc-list (delq elt erc-dcc-list)) + (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 +;; +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: cda5a6b3-c510-4dbe-b699-84cccfa04edb diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-ezbounce.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-ezbounce.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,180 @@ +;;; erc-ezbounce.el --- Handle EZBounce bouncer commands + +;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. + +;; Author: Andreas Fuchs +;; Keywords: comm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;;; Code: + +(require 'erc) +(eval-when-compile (require 'cl)) + +(defgroup erc-ezbounce nil + "Interface to the EZBounce IRC bouncer (a virtual IRC server)" + :group 'erc) + +(defcustom erc-ezb-regexp "^ezbounce!srv$" + "Regexp used by the EZBouncer to identify itself to the user." + :group 'erc-ezbounce + :type 'string) + +(defcustom erc-ezb-login-alist '() + "Alist of logins suitable for the server we're connecting to. + +The alist's format is as follows: + + (((server . port) . (username . password)) + ((server . port) . (username . password)) + ...)" + :group 'erc-ezbounce + :type '(repeat + (cons (cons :tag "Server" + string + string) + (cons :tag "Login" + string + string)))) + +(defvar erc-ezb-action-alist '(("^\\[awaiting login/pass command\\]$" . erc-ezb-identify) + ("^\\[use /quote CONN to connect\\]$" . erc-ezb-select) + ("^ID +IRC NICK +TO +TIME$" . erc-ezb-init-session-list) + ("^$" . erc-ezb-end-of-session-list) + (".*" . erc-ezb-add-session)) + "Alist of actions to take on NOTICEs from EZBounce.") + + +(defvar erc-ezb-session-list '() + "List of detached EZBounce sessions.") +(make-variable-buffer-local 'erc-ezb-session-list) + +(defvar erc-ezb-inside-session-listing nil + "Indicate whether current notices are expected to be EZB session listings.") + +;;;###autoload +(defun erc-cmd-ezb (line &optional force) + "Send EZB commands to the EZBouncer verbatim." + (erc-server-send (concat "EZB " line))) +(put 'erc-cmd-EZB 'do-not-parse-args t) + +;;;###autoload +(defun erc-ezb-get-login (server port) + "Return an appropriate EZBounce login for SERVER and PORT. +Look up entries in `erc-ezb-login-alist'. If the username or password +in the alist is `nil', prompt for the appropriate values." + (let ((login (cdr (assoc (cons server port) erc-ezb-login-alist)))) + (when login + (let ((username (car login)) + (password (cdr login))) + (when (null username) + (setq username (read-from-minibuffer (format "EZBounce user name for %s:%s: " server port)))) + (when (null password) + (setq password (read-passwd (format "EZBounce password for %s:%s: " server port)))) + (cons username password))))) + +;;;###autoload +(defun erc-ezb-lookup-action (message) + (let ((function-alist erc-ezb-action-alist) + found) + (while (and (not found) + function-alist) + (let ((regexp (caar function-alist)) + (function (cdar function-alist))) + (when (string-match regexp message) + (setq found function)) + (setq function-alist (cdr function-alist)))) + found)) + +;;;###autoload +(defun erc-ezb-notice-autodetect (proc parsed) + "React on an EZBounce NOTICE request." + (let* ((sender (erc-response.sender parsed)) + (message (erc-response.contents parsed)) + (function (erc-ezb-lookup-action message))) + (when (and (string-match erc-ezb-regexp sender) + function) + (funcall function message))) + nil) + +;;;###autoload +(defun erc-ezb-identify (message) + "Identify to the EZBouncer server." + (let ((login (erc-ezb-get-login erc-session-server (erc-port-to-string erc-session-port)))) + (unless (null login) + (let ((username (car login)) + (pass (cdr login))) + (erc-server-send (concat "LOGIN " username " " pass)))))) + +;;;###autoload +(defun erc-ezb-init-session-list (message) + "Reset the EZBounce session list to NIL." + (setq erc-ezb-session-list nil) + (setq erc-ezb-inside-session-listing t)) + +;;;###autoload +(defun erc-ezb-end-of-session-list (message) + "Indicate the end of the EZBounce session listing." + (setq erc-ezb-inside-session-listing nil)) + +;;;###autoload +(defun erc-ezb-add-session (message) + "Add an EZBounce session to the session list." + (when (and erc-ezb-inside-session-listing + (string-match "^\\([^ ]+\\) +\\([^ ]+\\) +\\([^ ]+\\) +\\([^ ]+\\)$" message)) + (let ((id (match-string 1 message)) + (nick (match-string 2 message)) + (to (match-string 3 message))) + (add-to-list 'erc-ezb-session-list (list id nick to))))) + +;;;###autoload +(defun erc-ezb-select (message) + "Select an IRC server to use by EZBounce, in ERC style." + (unless (and erc-ezb-session-list + (erc-ezb-select-session)) + (let* ((server (read-from-minibuffer + "IRC server: " "" nil nil 'erc-server-history-list)) + (port + (erc-string-to-port + (read-from-minibuffer "IRC port: " + (erc-port-to-string "6667"))))) + (erc-server-send (format "CONN %s %s" server port))))) + + +;;;###autoload +(defun erc-ezb-select-session () + "Select a detached EZBounce session." + (let ((session (completing-read "Existing Session (RET to enter a new one): " + erc-ezb-session-list))) + (if (string= session "") + nil + (erc-server-send (format "REATTACH %s" session))))) + + +;;;###autoload +(defun erc-ezb-initialize () + "Add EZBouncer convenience functions to ERC." + (add-hook 'erc-server-NOTICE-functions 'erc-ezb-notice-autodetect)) + +(provide 'erc-ezbounce) + +;; arch-tag: e972aa7b-a9f4-4d16-a489-074ec7a1002e +;;; erc-ezbounce.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-fill.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-fill.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,197 @@ +;;; erc-fill.el --- Filling IRC messages in various ways + +;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Andreas Fuchs +;; Mario Lang +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcFilling + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This package implements filling of messages sent and received. Use +;; `erc-fill-mode' to switch it on. Customize `erc-fill-function' to +;; change the style. + +;;; Code: + +(require 'erc) +(require 'erc-stamp); for the timestamp stuff + +(defgroup erc-fill nil + "Filling means to reformat long lines in different ways." + :group 'erc) + +;;;###autoload (autoload 'erc-fill-mode "erc-fill" nil t) +(erc-define-minor-mode erc-fill-mode + "Toggle ERC fill mode. +With numeric arg, turn ERC fill mode on if and only if arg is +positive. In ERC fill mode, messages in the channel buffers are +filled." + nil nil nil + :global t :group 'erc-fill + (if erc-fill-mode + (erc-fill-enable) + (erc-fill-disable))) + +(defun erc-fill-enable () + "Setup hooks for `erc-fill-mode'." + (interactive) + (add-hook 'erc-insert-modify-hook 'erc-fill) + (add-hook 'erc-send-modify-hook 'erc-fill)) + +(defun erc-fill-disable () + "Cleanup hooks, disable `erc-fill-mode'." + (interactive) + (remove-hook 'erc-insert-modify-hook 'erc-fill) + (remove-hook 'erc-send-modify-hook 'erc-fill)) + +(defcustom erc-fill-prefix nil + "Values used as `fill-prefix' for `erc-fill-variable'. +nil means fill with space, a string means fill with this string." + :group 'erc-fill + :type '(choice (const nil) string)) + +(defcustom erc-fill-function 'erc-fill-variable + "Function to use for filling messages. + +Variable Filling with an `erc-fill-prefix' of nil: + + this is a very very very long message with no + meaning at all + +Variable Filling with an `erc-fill-prefix' of four spaces: + + this is a very very very long message with no + meaning at all + +Static Filling with `erc-fill-static-center' of 27: + + foo bar baz + foo bar baz quuuuux + this is a very very very long message with no + meaning at all + +These two styles are implemented using `erc-fill-variable' and +`erc-fill-static'. You can, of course, define your own filling +function. Narrowing to the region in question is in effect while your +function is called." + :group 'erc-fill + :type '(choice (const :tag "Variable Filling" erc-fill-variable) + (const :tag "Static Filling" erc-fill-static) + function)) + +(defcustom erc-fill-static-center 27 + "Column around which all statically filled messages will be +centered. This column denotes the point where the ' ' character +between and the entered text will be put, thus aligning +nick names right and text left." + :group 'erc-fill + :type 'integer) + +(defcustom erc-fill-variable-maximum-indentation 17 + "If we indent a line after a long nick, don't indent more then this +characters. Set to nil to disable." + :group 'erc-fill + :type 'integer) + +(defcustom erc-fill-column 78 + "The column at which a filled paragraph is broken." + :group 'erc-fill + :type 'integer) + +;;;###autoload +(defun erc-fill () + "Fill a region using the function referenced in `erc-fill-function'. +You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'." + (unless (erc-string-invisible-p (buffer-substring (point-min) (point-max))) + (when erc-fill-function + (funcall erc-fill-function)))) + +(defun erc-fill-static () + "Fills a text such that messages start at column `erc-fill-static-center'." + (save-match-data + (goto-char (point-min)) + (looking-at "^\\(\\S-+\\)") + (let ((nick (match-string 1))) + (let ((fill-column (- erc-fill-column (erc-timestamp-offset))) + (fill-prefix (make-string erc-fill-static-center 32))) + (insert (make-string (max 0 (- erc-fill-static-center + (length nick) 1)) + 32)) + (erc-fill-regarding-timestamp)) + (erc-restore-text-properties)))) + +(defun erc-fill-variable () + "Fill from `point-min' to `point-max'." + (let ((fill-prefix erc-fill-prefix) + (fill-column (or erc-fill-column fill-column))) + (goto-char (point-min)) + (if fill-prefix + (let ((first-line-offset (make-string (erc-timestamp-offset) 32))) + (insert first-line-offset) + (fill-region (point-min) (point-max) t t) + (goto-char (point-min)) + (delete-char (length first-line-offset))) + (save-match-data + (let* ((nickp (looking-at "^\\(\\S-+\\)")) + (nick (if nickp + (match-string 1) + "")) + (fill-column (- erc-fill-column (erc-timestamp-offset))) + (fill-prefix (make-string (min (+ 1 (length nick)) + (- fill-column 1) + (or erc-fill-variable-maximum-indentation + fill-column)) + 32))) + (erc-fill-regarding-timestamp)))) + (erc-restore-text-properties))) + +(defun erc-fill-regarding-timestamp () + "Fills a text such that messages start at column `erc-fill-static-center'." + (fill-region (point-min) (point-max) t t) + (goto-char (point-min)) + (forward-line) + (indent-rigidly (point) (point-max) (erc-timestamp-offset))) + +(defun erc-timestamp-offset () + "Get length of timestamp if inserted left." + (if (and (boundp 'erc-timestamp-format) + erc-timestamp-format + (eq erc-insert-timestamp-function 'erc-insert-timestamp-left) + (not erc-hide-timestamps)) + (length (format-time-string erc-timestamp-format)) + 0)) + +(defun erc-restore-text-properties () + "Restore the property 'erc-parsed for the region." + (let* ((parsed-posn (text-property-not-all (point-min) (point-max) + 'erc-parsed nil)) + (parsed-prop (when parsed-posn + (get-text-property parsed-posn 'erc-parsed)))) + (put-text-property (point-min) (point-max) 'erc-parsed parsed-prop))) + +(provide 'erc-fill) + +;;; erc-fill.el ends here +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: 89224581-c2c2-4e26-92e5-e3a390dc516a diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-goodies.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-goodies.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,522 @@ +;; erc-goodies.el --- Collection of ERC modules + +;; Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation + +;; Author: Jorgen Schaefer + +;; Most code is taken verbatim from erc.el, see there for the original +;; authors. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This provides some small but still useful modes for ERC. + +;;; Code: + +(require 'erc) + +;; Imenu Autoload +(add-hook 'erc-mode-hook + (lambda () + (setq imenu-create-index-function 'erc-create-imenu-index))) +(autoload 'erc-create-imenu-index "erc-imenu" "Imenu index creation function") + +;;; Automatically scroll to bottom +(defcustom erc-input-line-position nil + "Specify where to position the input line when using `erc-scroll-to-bottom'. + +This should be an integer specifying the line of the buffer on which +the input line should stay. A value of \"-1\" would keep the input +line positioned on the last line in the buffer. This is passed as an +argument to `recenter'." + :group 'erc-display + :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))) + +(defun erc-add-scroll-to-bottom () + "A hook function for `erc-mode-hook' to recenter output at bottom of window. + +If you find that ERC hangs when using this function, try customizing +the value of `erc-input-line-position'. + +This works whenever scrolling happens, so it's added to +`window-scroll-functions' rather than `erc-insert-post-hook'." + ;;(make-local-hook 'window-scroll-functions) + (add-hook 'window-scroll-functions 'erc-scroll-to-bottom nil t)) + +(defun erc-scroll-to-bottom (window display-start) + "Recenter WINDOW so that `point' is on the last line. + +This is added to `window-scroll-functions' by `erc-add-scroll-to-bottom'. + +You can control which line is recentered to by customizing the +variable `erc-input-line-position'. + +DISPLAY-START is ignored." + (if (and window (window-live-p window)) + ;; Temporarily bind resize-mini-windows to nil so that users who have it + ;; set to a non-nil value will not suffer from premature minibuffer + ;; shrinkage due to the below recenter call. I have no idea why this + ;; works, but it solves the problem, and has no negative side effects. + ;; (Fran Litterio, 2003/01/07) + (let ((resize-mini-windows nil)) + (save-selected-window + (select-window window) + (save-restriction + (widen) + (when (and erc-insert-marker + ;; we're editing a line. Scroll. + (> (point) erc-insert-marker)) + (save-excursion + (goto-char (point-max)) + (recenter (or erc-input-line-position -1)) + (sit-for 0)))))))) + +;;; Make read only +(define-erc-module readonly nil + "This mode causes all inserted text to be read-only." + ((add-hook 'erc-insert-post-hook 'erc-make-read-only) + (add-hook 'erc-send-post-hook 'erc-make-read-only)) + ((remove-hook 'erc-insert-post-hook 'erc-make-read-only) + (remove-hook 'erc-send-post-hook 'erc-make-read-only))) + +(defun erc-make-read-only () + "Make all the text in the current buffer read-only. +Put this function on `erc-insert-post-hook' and/or `erc-send-post-hook'." + (put-text-property (point-min) (point-max) 'read-only t) + (put-text-property (point-min) (point-max) 'front-sticky t) + (put-text-property (point-min) (point-max) 'rear-nonsticky t)) + +;; Distingush non-commands +(defvar erc-noncommands-list '(erc-cmd-ME + erc-cmd-COUNTRY + erc-cmd-SV + erc-cmd-SM + erc-cmd-SMV + erc-cmd-LASTLOG) + "List of commands that are aliases for CTCP ACTION or for erc messages. + +If a command's function symbol is in this list, the typed command +does not appear in the ERC buffer after the user presses ENTER.") + +(define-erc-module noncommands nil + "This mode distinguishies non-commands. +Commands listed in `erc-insert-this' know how to display +themselves." + ((add-hook 'erc-send-pre-hook 'erc-send-distinguish-noncommands)) + ((remove-hook 'erc-send-pre-hook 'erc-send-distinguish-noncommands))) + +(defun erc-send-distinguish-noncommands (str) + "If STR is an ERC non-command, set `erc-insert-this' to nil." + (let* ((command (erc-extract-command-from-line str)) + (cmd-fun (and command + (car command)))) + (when (and cmd-fun + (not (string-match "\n.+$" str)) + (memq cmd-fun erc-noncommands-list)) + (setq erc-insert-this nil)))) + +;;; IRC control character processing. +(defgroup erc-control-characters nil + "Dealing with control characters" + :group 'erc) + +(defcustom erc-interpret-controls-p t + "*If non-nil, display IRC colours and other highlighting effects. + +If this is set to the symbol `remove', ERC removes all IRC colors and +highlighting effects. When this variable is non-nil, it can cause Emacs to run +slowly on systems lacking sufficient CPU speed. In chatty channels, or in an +emergency (message flood) it can be turned off to save processing time. See +`erc-toggle-interpret-controls'." + :group 'erc-control-characters + :type '(choice (const :tag "Highlight control characters" t) + (const :tag "Remove control characters" remove) + (const :tag "Display raw control characters" nil))) + +(defcustom erc-interpret-mirc-color nil + "*If non-nil, erc will interpret mIRC color codes." + :group 'erc-control-characters + :type 'boolean) + +(defcustom erc-beep-p nil + "Beep if C-g is in the server message. +The value `erc-interpret-controls-p' must also be t for this to work." + :group 'erc-control-characters + :type 'boolean) + +(defface erc-bold-face '((t (:bold t))) + "ERC bold face." + :group 'erc-faces) +(defface erc-inverse-face + '((t (:foreground "White" :background "Black"))) + "ERC inverse face." + :group 'erc-faces) +(defface erc-underline-face '((t (:underline t))) + "ERC underline face." + :group 'erc-faces) + +(defface fg:erc-color-face0 '((t (:foreground "White"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face1 '((t (:foreground "black"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face2 '((t (:foreground "blue4"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face3 '((t (:foreground "green4"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face4 '((t (:foreground "red"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face5 '((t (:foreground "brown"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face6 '((t (:foreground "purple"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face7 '((t (:foreground "orange"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face8 '((t (:foreground "yellow"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face9 '((t (:foreground "green"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face10 '((t (:foreground "lightblue1"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face11 '((t (:foreground "cyan"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face12 '((t (:foreground "blue"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face13 '((t (:foreground "deeppink"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face14 '((t (:foreground "gray50"))) + "ERC face." + :group 'erc-faces) +(defface fg:erc-color-face15 '((t (:foreground "gray90"))) + "ERC face." + :group 'erc-faces) + +(defface bg:erc-color-face0 '((t (:background "White"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face1 '((t (:background "black"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face2 '((t (:background "blue4"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face3 '((t (:background "green4"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face4 '((t (:background "red"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face5 '((t (:background "brown"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face6 '((t (:background "purple"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face7 '((t (:background "orange"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face8 '((t (:background "yellow"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face9 '((t (:background "green"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face10 '((t (:background "lightblue1"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face11 '((t (:background "cyan"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face12 '((t (:background "blue"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face13 '((t (:background "deeppink"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face14 '((t (:background "gray50"))) + "ERC face." + :group 'erc-faces) +(defface bg:erc-color-face15 '((t (:background "gray90"))) + "ERC face." + :group 'erc-faces) + +(defun erc-get-bg-color-face (n) + "Fetches the right face for background color N (0-15)." + (if (stringp n) (setq n (string-to-number n))) + (if (not (numberp n)) + (progn + (message "erc-get-bg-color-face: n is NaN: %S" n) + (beep) + 'default) + (when (> n 16) + (erc-log (format " Wrong color: %s" n)) + (setq n (mod n 16))) + (cond + ((and (>= n 0) (< n 16)) + (intern (concat "bg:erc-color-face" (number-to-string n)))) + (t (erc-log (format " Wrong color: %s" n)) 'default)))) + +(defun erc-get-fg-color-face (n) + "Fetches the right face for foreground color N (0-15)." + (if (stringp n) (setq n (string-to-number n))) + (if (not (numberp n)) + (progn + (message "erc-get-fg-color-face: n is NaN: %S" n) + (beep) + 'default) + (when (> n 16) + (erc-log (format " Wrong color: %s" n)) + (setq n (mod n 16))) + (cond + ((and (>= n 0) (< n 16)) + (intern (concat "fg:erc-color-face" (number-to-string n)))) + (t (erc-log (format " Wrong color: %s" n)) 'default)))) + +(define-erc-module irccontrols nil + "This mode enables the interpretation of IRC control chars." + ((add-hook 'erc-insert-modify-hook 'erc-controls-highlight) + (add-hook 'erc-send-modify-hook 'erc-controls-highlight)) + ((remove-hook 'erc-insert-modify-hook 'erc-controls-highlight) + (remove-hook 'erc-send-modify-hook 'erc-controls-highlight))) + +(defun erc-controls-interpret (str) + "Return a copy of STR after dealing with IRC control characters. +See `erc-interpret-controls-p' and `erc-interpret-mirc-color' for options." + (when str + (let ((s str)) + (cond ((eq erc-interpret-controls-p 'remove) + (erc-controls-strip s)) + (erc-interpret-controls-p + (let ((boldp nil) + (inversep nil) + (underlinep nil) + (fg nil) + (bg nil)) + (while (string-match erc-controls-highlight-regexp s) + (let ((control (match-string 1 s)) + (fg-color (match-string 2 s)) + (bg-color (match-string 4 s)) + (start (match-beginning 0)) + (end (+ (match-beginning 0) + (length (match-string 5 s))))) + (setq s (erc-replace-match-subexpression-in-string + "" s control 1 start)) + (cond ((and erc-interpret-mirc-color (or fg-color bg-color)) + (setq fg fg-color) + (setq bg bg-color)) + ((string= control "\C-b") + (setq boldp (not boldp))) + ((string= control "\C-v") + (setq inversep (not inversep))) + ((string= control "\C-_") + (setq underlinep (not underlinep))) + ((string= control "\C-c") + (setq fg nil + bg nil)) + ((string= control "\C-g") + (when erc-beep-p + (ding))) + ((string= control "\C-o") + (setq boldp nil + inversep nil + underlinep nil + fg nil + bg nil)) + (t nil)) + (erc-controls-propertize + start end boldp inversep underlinep fg bg s))) + s)) + (t s))))) + +(defun erc-controls-strip (str) + "Return a copy of STR with all IRC control characters removed." + (when str + (let ((s str)) + (while (string-match erc-controls-remove-regexp s) + (setq s (replace-match "" nil nil s))) + s))) + +(defvar erc-controls-remove-regexp + "\C-b\\|\C-_\\|\C-v\\|\C-g\\|\C-o\\|\C-c[0-9]?[0-9]?\\(,[0-9][0-9]?\\)?" + "Regular expression which matches control characters to remove.") + +(defvar erc-controls-highlight-regexp + (concat "\\(\C-b\\|\C-v\\|\C-_\\|\C-g\\|\C-o\\|" + "\C-c\\([0-9][0-9]?\\)?\\(,\\([0-9][0-9]?\\)\\)?\\)" + "\\([^\C-b\C-v\C-_\C-c\C-g\C-o\n]*\\)") + "Regular expression which matches control chars and the text to highlight.") + +(defun erc-controls-highlight () + "Highlight IRC control chars in the buffer. +This is useful for `erc-insert-modify-hook' and +`erc-send-modify-hook'. Also see `erc-interpret-controls-p' and +`erc-interpret-mirc-color'." + (goto-char (point-min)) + (cond ((eq erc-interpret-controls-p 'remove) + (while (re-search-forward erc-controls-remove-regexp nil t) + (replace-match ""))) + (erc-interpret-controls-p + (let ((boldp nil) + (inversep nil) + (underlinep nil) + (fg nil) + (bg nil)) + (while (re-search-forward erc-controls-highlight-regexp nil t) + (let ((control (match-string 1)) + (fg-color (match-string 2)) + (bg-color (match-string 4)) + (start (match-beginning 0)) + (end (+ (match-beginning 0) (length (match-string 5))))) + (replace-match "" nil nil nil 1) + (cond ((and erc-interpret-mirc-color (or fg-color bg-color)) + (setq fg fg-color) + (setq bg bg-color)) + ((string= control "\C-b") + (setq boldp (not boldp))) + ((string= control "\C-v") + (setq inversep (not inversep))) + ((string= control "\C-_") + (setq underlinep (not underlinep))) + ((string= control "\C-c") + (setq fg nil + bg nil)) + ((string= control "\C-g") + (when erc-beep-p + (ding))) + ((string= control "\C-o") + (setq boldp nil + inversep nil + underlinep nil + fg nil + bg nil)) + (t nil)) + (erc-controls-propertize start end + boldp inversep underlinep fg bg))))) + (t nil))) + +(defun erc-controls-propertize (from to boldp inversep underlinep fg bg + &optional str) + "Prepend properties from IRC control characters between FROM and TO. +If optional argument STR is provided, apply to STR, otherwise prepend properties +to a region in the current buffer." + (font-lock-prepend-text-property + from + to + 'face + (append (if boldp + '(erc-bold-face) + nil) + (if inversep + '(erc-inverse-face) + nil) + (if underlinep + '(erc-underline-face) + nil) + (if fg + (list (erc-get-fg-color-face fg)) + nil) + (if bg + (list (erc-get-bg-color-face bg)) + nil)) + str) + str) + +(defun erc-toggle-interpret-controls (&optional arg) + "Toggle interpretation of control sequences in messages. + +If ARG is positive, interpretation is turned on. +Else interpretation is turned off." + (interactive "P") + (cond ((and (numberp arg) (> arg 0)) + (setq erc-interpret-controls-p t)) + (arg (setq erc-interpret-controls-p nil)) + (t (setq erc-interpret-controls-p (not erc-interpret-controls-p)))) + (message "ERC color interpretation %s" + (if erc-interpret-controls-p "ON" "OFF"))) + +;; Smiley +(define-erc-module smiley nil + "This mode translates text-smileys such as :-) into pictures. +This requires the function `smiley-region', which is defined in +smiley.el, which is part of Gnus." + ((add-hook 'erc-insert-modify-hook 'erc-smiley) + (add-hook 'erc-send-modify-hook 'erc-smiley)) + ((remove-hook 'erc-insert-modify-hook 'erc-smiley) + (remove-hook 'erc-send-modify-hook 'erc-smiley))) + +(defun erc-smiley () + "Smilify a region. +This function should be used with `erc-insert-modify-hook'." + (when (fboundp 'smiley-region) + (smiley-region (point-min) (point-max)))) + +;; Unmorse +(define-erc-module unmorse nil + "This mode causes morse code in the current channel to be unmorsed." + ((add-hook 'erc-insert-modify-hook 'erc-unmorse)) + ((remove-hook 'erc-insert-modify-hook 'erc-unmorse))) + +(defun erc-unmorse () + "Unmorse some text. +Add this to `erc-insert-modify-hook' if you happen to be on a +channel that has weird people talking in morse to each other. + +See also `unmorse-region'." + (goto-char (point-min)) + (when (re-search-forward "[.-]+\\([.-]+[/ ]\\)+[.-]+" nil t) + (unmorse-region (match-beginning 0) (match-end 0)))) + +;;; erc-occur +(defun erc-occur (string &optional proc) + "Search for STRING in all buffers related to current server. +If called interactively and prefix argument is given, search on all connected +servers. If called from a program, PROC specifies the server process." + (interactive + (list (read-string "Search for: ") + (if current-prefix-arg + nil erc-server-process))) + (if (fboundp 'multi-occur) + (multi-occur (erc-buffer-list nil proc) string) + (error "`multi-occur' is not defined as a function"))) + +(provide 'erc-goodies) + +;; arch-tag: d987ae26-9e28-4c72-9596-e617309fb582 +;;; erc-goodies.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-ibuffer.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-ibuffer.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,192 @@ +;;; erc-ibuffer.el --- ibuffer integration with ERC + +;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcIbuffer + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file contains code related to Ibuffer and ERC. Totally alpha, +;; needs work. Usage: Type / C-e C-h when in Ibuffer-mode to see new +;; limiting commands + +;;; Code: + +(require 'ibuffer) +(require 'ibuf-ext) +(require 'erc) + +(defgroup erc-ibuffer nil + "The Ibuffer group for ERC." + :group 'erc) + +(defcustom erc-ibuffer-keyword-char ?k + "Char used to indicate a channel which had keyword traffic lately (hidden)." + :group 'erc-ibuffer + :type 'character) +(defcustom erc-ibuffer-pal-char ?p + "Char used to indicate a channel which had pal traffic lately (hidden)." + :group 'erc-ibuffer + :type 'character) +(defcustom erc-ibuffer-fool-char ?f + "Char used to indicate a channel which had fool traffic lately (hidden)." + :group 'erc-ibuffer + :type 'character) +(defcustom erc-ibuffer-dangerous-host-char ?d + "Char used to indicate a channel which had dangerous-host traffic lately +\(hidden)." + :group 'erc-ibuffer + :type 'character) + +(define-ibuffer-filter erc-server + "Toggle current view to buffers which are related to ERC servers." + (:description "erc servers" + :reader + (let ((regexp + (read-from-minibuffer "Limit by server (regexp) (RET for all): "))) + (if (string= regexp "") + ".*" + regexp))) + (with-current-buffer buf + (and (eq major-mode 'erc-mode) + (string-match qualifier (or erc-server-announced-name + erc-session-server))))) + +(define-ibuffer-column erc-modified (:name "M") + (if (and (boundp 'erc-track-mode) + erc-track-mode) + (let ((entry (assq (current-buffer) erc-modified-channels-alist))) + (if entry + (if (> (length entry) 1) + (cond ((eq 'pal (nth 1 entry)) + (string erc-ibuffer-pal-char)) + ((eq 'fool (nth 1 entry)) + (string erc-ibuffer-fool-char)) + ((eq 'keyword (nth 1 entry)) + (string erc-ibuffer-keyword-char)) + ((eq 'dangerous-host (nth 1 entry)) + (string erc-ibuffer-dangerous-host-char)) + (t "$")) + (string ibuffer-modified-char)) + " ")) + " ")) + +(define-ibuffer-column erc-server-name (:name "Server") + (if (and (boundp 'erc-server-process) (processp erc-server-process)) + (with-current-buffer (process-buffer erc-server-process) + (or erc-server-announced-name erc-session-server)) + "")) + +(define-ibuffer-column erc-target (:name "Target") + (if (eq major-mode 'erc-mode) + (cond ((and (boundp 'erc-server-process) (processp erc-server-process) + (eq (current-buffer) (process-buffer erc-server-process))) + (concat "Server " erc-session-server ":" + (erc-port-to-string erc-session-port))) + ((erc-channel-p (erc-default-target)) + (concat (erc-default-target))) + ((erc-default-target) + (concat "Query: " (erc-default-target))) + (t "(parted)")) + (buffer-name))) + +(define-ibuffer-column erc-topic (:name "Topic") + (if (and (eq major-mode 'erc-mode) + erc-channel-topic) + (erc-controls-interpret erc-channel-topic) + "")) + +(define-ibuffer-column + erc-members (:name "Users") + (if (and (eq major-mode 'erc-mode) + (boundp 'erc-channel-users) + (hash-table-p erc-channel-users) + (> (hash-table-size erc-channel-users) 0)) + (number-to-string (hash-table-size erc-channel-users)) + "")) + +(define-ibuffer-column erc-away (:name "A") + (if (and (boundp 'erc-server-process) + (processp erc-server-process) + (with-current-buffer (process-buffer erc-server-process) + erc-away)) + "A" + " ")) + +(define-ibuffer-column + erc-op (:name "O") + (if (and (eq major-mode 'erc-mode) + (erc-channel-user-op-p (erc-current-nick))) + "@" + " ")) + +(define-ibuffer-column erc-voice (:name "V") + (if (and (eq major-mode 'erc-mode) + (erc-channel-user-voice-p (erc-current-nick))) + "+" + " ")) + +(define-ibuffer-column erc-channel-modes (:name "Mode") + (if (and (eq major-mode 'erc-mode) + (or (> (length erc-channel-modes) 0) + erc-channel-user-limit)) + (concat (apply 'concat + "(+" erc-channel-modes) + (if erc-channel-user-limit + (format "l %d" erc-channel-user-limit) + "") + ")") + (if (not (eq major-mode 'erc-mode)) + mode-name + ""))) + +(define-ibuffer-column erc-nick (:name "Nick") + (if (eq major-mode 'erc-mode) + (erc-current-nick) + "")) + +(defvar erc-ibuffer-formats + '((mark erc-modified erc-away erc-op erc-voice " " (erc-nick 8 8) " " + (erc-target 18 40) (erc-members 5 5 :center) + (erc-channel-modes 6 16 :center) " " (erc-server-name 20 30) " " + (erc-topic 10 -1)) + (mark erc-modified erc-away erc-op erc-voice " " (erc-target 18 40) + (erc-members 5 5 :center) (erc-channel-modes 9 20 :center) " " + (erc-topic 10 -1)))) +(setq ibuffer-formats (append ibuffer-formats erc-ibuffer-formats)) + +(defvar erc-ibuffer-limit-map nil + "Prefix keymap to use for ERC related limiting.") +(define-prefix-command 'erc-ibuffer-limit-map) +(define-key 'erc-ibuffer-limit-map (kbd "s") 'ibuffer-limit-by-erc-server) +(define-key ibuffer-mode-map (kbd "/ \C-e") 'erc-ibuffer-limit-map) + +(provide 'erc-ibuffer) + +;;; erc-ibuffer.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: fbad56a5-8595-45e0-a8c8-d8bb91e26944 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-identd.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-identd.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,87 @@ +;;; erc-identd.el --- RFC1413 (identd authentication protocol) server + +;; Copyright (C) 2003 Free Software Foundation, Inc. + +;; Author: John Wiegley +;; Keywords: comm, processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; You can have a local identd server (running on port 8113; I use DNAT +;; to bind 113->8113) if you add this to .emacs.el: + +;; (add-hook 'erc-connect-pre-hook 'erc-identd-start) +;; (add-hook 'erc-disconnected-hook 'erc-identd-stop) + +;;; Code: + +(defvar erc-identd-process nil) + +(defun erc-identd-filter (proc string) + "This filter implements RFC1413 (identd authentication protocol)." + (let ((erc-identd-process proc)) + (when (string-match "\\([0-9]+\\)\\s-*,\\s-*\\([0-9]+\\)" string) + (let ((port-on-server (match-string 1 string)) + (port-on-client (match-string 2 string))) + (send-string erc-identd-process + (format "%s, %s : USERID : %s : %s\n" + port-on-server port-on-client + system-type (user-login-name))) + (process-send-eof erc-identd-process))))) + +(defun erc-identd-start (&optional port) + "Start an identd server listening to port 8113. +Port 113 (auth) will need to be redirected to port 8113 on your +machine -- using iptables, or a program like redir which can be +run from inetd. The idea is to provide a simple identd server +when you need one, without having to install one globally on your +system." + (interactive (list (read-string "Serve identd requests on port: " "8113"))) + (if (null port) + (setq port 8113) + (if (stringp port) + (setq port (string-to-number port)))) + (if erc-identd-process + (delete-process erc-identd-process)) + (if (fboundp 'make-network-process) + (setq erc-identd-process + (make-network-process :name "identd" + :buffer (generate-new-buffer "identd") + :service port :server t :noquery t + :filter 'erc-identd-filter)) + (open-network-stream-server "identd" (generate-new-buffer "identd") + port nil 'erc-identd-filter))) + +(defun erc-identd-stop (&rest ignore) + (interactive) + (when erc-identd-process + (delete-process erc-identd-process) + (setq erc-identd-process nil))) + +(provide 'erc-identd) + +;;; erc-identd.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: e0b5f926-0f35-40b9-8ddb-ca06b62a7544 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-imenu.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-imenu.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,143 @@ +;;; erc-imenu.el -- Imenu support for ERC + +;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcImenu + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file contains code related to Ibuffer and ERC. Totally alpha, +;; needs work. Usage: Type / C-e C-h when in Ibuffer-mode to see new +;; limiting commands + +;;; Code: + + +;; Author: Mario Lang + +;; This file is not part of GNU Emacs. But the same license applies. + +;;; Commentary: + +;; This package defines the function `erc-create-imenu-index'. ERC +;; uses this for `imenu-create-index-function', and autoloads it. +;; Therefore, nothing needs to be done to use this package. + +;;; Code: + +(require 'erc) +(require 'imenu) + +(defun erc-unfill-notice () + "Return text from point to a computed end as a string unfilled. +Don't rely on this function, read it first!" + (let ((str (buffer-substring + (save-excursion + (re-search-forward (regexp-quote erc-notice-prefix))) + (progn + (while (save-excursion + (forward-line 1) + (looking-at " ")) + (forward-line 1)) + (end-of-line) (point))))) + (with-temp-buffer + (insert str) + (goto-char (point-min)) + (while (re-search-forward "\n +" nil t) + (replace-match " ")) + (buffer-substring (point-min) (point-max))))) + +;;;###autoload +(defun erc-create-imenu-index () + (let ((index-alist '()) + (notice-alist '()) + (join-alist '()) + (left-alist '()) + (quit-alist '()) + (message-alist '()) + (mode-change-alist '()) + (topic-change-alist '()) + prev-pos) + (goto-char (point-max)) + (imenu-progress-message prev-pos 0) + (while (if (bolp) + (> (forward-line -1) + -1) + (progn (forward-line 0) + t)) + (imenu-progress-message prev-pos nil t) + (save-match-data + (when (looking-at (concat (regexp-quote erc-notice-prefix) + "\\(.+\\)$")) + (let ((notice-text ;; Ugly hack, but seems to work. + (save-excursion (erc-unfill-notice))) + (pos (point))) + (push (cons notice-text pos) notice-alist) + (or + (when (string-match "^\\(.*\\) has joined channel" notice-text) + (push (cons (match-string 1 notice-text) pos) join-alist)) + (when (string-match "^\\(.+\\) has left channel" notice-text) + (push (cons (match-string 1 notice-text) pos) left-alist)) + (when (string-match "^\\(.+\\) has quit\\(.*\\)$" notice-text) + (push (cons (concat (match-string 1 notice-text) + (match-string 2 notice-text)) + (point)) + quit-alist)) + (when (string-match + "^\\(\\S-+\\) (.+) has changed mode for \\S-+ to \\(.*\\)$" + notice-text) + (push (cons (concat (match-string 1 notice-text) ": " + (match-string 2 notice-text)) + (point)) + mode-change-alist)) + (when (string-match + "^\\(\\S-+\\) (.+) has set the topic for \\S-+: \\(.*\\)$" + notice-text) + (push (cons (concat (match-string 1 notice-text) ": " + (match-string 2 notice-text)) pos) + topic-change-alist))))) + (when (looking-at "<\\(\\S-+\\)> \\(.+\\)$") + (let ((from (match-string 1)) + (message-text (match-string 2))) + (push (cons (concat from ": " message-text) (point)) + message-alist))))) + (and notice-alist (push (cons "notices" notice-alist) index-alist)) + (and join-alist (push (cons "joined" join-alist) index-alist)) + (and left-alist (push (cons "parted" left-alist) index-alist)) + (and quit-alist (push (cons "quit" quit-alist) index-alist)) + (and mode-change-alist (push (cons "mode-change" mode-change-alist) + index-alist)) + (and message-alist (push (cons "messages" message-alist) index-alist)) + (and topic-change-alist (push (cons "topic-change" topic-change-alist) + index-alist)) + index-alist)) + +(provide 'erc-imenu) + +;;; erc-imenu.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 35c69082-ca29-43f7-a050-8da5f400de81 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-lang.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-lang.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,213 @@ +;;; erc-lang.el --- provide the LANG command to ERC + +;; Copyright (C) 2002, 2004 Free Software Foundation, Inc. + +;; Author: Alex Schroeder +;; Maintainer: Alex Schroeder +;; Version: 1.0.0 +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcLang +;; Keywords: comm languages processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This provides two commands: `language' is for everyday use, and +;; `erc-cmd-LANG' provides the /LANG command to ERC. + +;;; Code: + +(require 'erc) + +(defvar iso-638-languages + '(("aa" . "Afar") + ("ab" . "Abkhazian") + ("af" . "Afrikaans") + ("am" . "Amharic") + ("ar" . "Arabic") + ("as" . "Assamese") + ("ay" . "Aymara") + ("az" . "Azerbaijani") + ("ba" . "Bashkir") + ("be" . "Byelorussian") + ("bg" . "Bulgarian") + ("bh" . "Bihari") + ("bi" . "Bislama") + ("bn" . "Bengali; Bangla") + ("bo" . "Tibetan") + ("br" . "Breton") + ("ca" . "Catalan") + ("co" . "Corsican") + ("cs" . "Czech") + ("cy" . "Welsh") + ("da" . "Danish") + ("de" . "German") + ("dz" . "Bhutani") + ("el" . "Greek") + ("en" . "English") + ("eo" . "Esperanto") + ("es" . "Spanish") + ("et" . "Estonian") + ("eu" . "Basque") + ("fa" . "Persian") + ("fi" . "Finnish") + ("fj" . "Fiji") + ("fo" . "Faroese") + ("fr" . "French") + ("fy" . "Frisian") + ("ga" . "Irish") + ("gd" . "Scots Gaelic") + ("gl" . "Galician") + ("gn" . "Guarani") + ("gu" . "Gujarati") + ("ha" . "Hausa") + ("he" . "Hebrew (formerly iw)") + ("hi" . "Hindi") + ("hr" . "Croatian") + ("hu" . "Hungarian") + ("hy" . "Armenian") + ("ia" . "Interlingua") + ("id" . "Indonesian (formerly in)") + ("ie" . "Interlingue") + ("ik" . "Inupiak") + ("is" . "Icelandic") + ("it" . "Italian") + ("iu" . "Inuktitut") + ("ja" . "Japanese") + ("jw" . "Javanese") + ("ka" . "Georgian") + ("kk" . "Kazakh") + ("kl" . "Greenlandic") + ("km" . "Cambodian") + ("kn" . "Kannada") + ("ko" . "Korean") + ("ks" . "Kashmiri") + ("ku" . "Kurdish") + ("ky" . "Kirghiz") + ("la" . "Latin") + ("ln" . "Lingala") + ("lo" . "Laothian") + ("lt" . "Lithuanian") + ("lv" . "Latvian, Lettish") + ("mg" . "Malagasy") + ("mi" . "Maori") + ("mk" . "Macedonian") + ("ml" . "Malayalam") + ("mn" . "Mongolian") + ("mo" . "Moldavian") + ("mr" . "Marathi") + ("ms" . "Malay") + ("mt" . "Maltese") + ("my" . "Burmese") + ("na" . "Nauru") + ("ne" . "Nepali") + ("nl" . "Dutch") + ("no" . "Norwegian") + ("oc" . "Occitan") + ("om" . "(Afan) Oromo") + ("or" . "Oriya") + ("pa" . "Punjabi") + ("pl" . "Polish") + ("ps" . "Pashto, Pushto") + ("pt" . "Portuguese") + ("qu" . "Quechua") + ("rm" . "Rhaeto-Romance") + ("rn" . "Kirundi") + ("ro" . "Romanian") + ("ru" . "Russian") + ("rw" . "Kinyarwanda") + ("sa" . "Sanskrit") + ("sd" . "Sindhi") + ("sg" . "Sangho") + ("sh" . "Serbo-Croatian") + ("si" . "Sinhalese") + ("sk" . "Slovak") + ("sl" . "Slovenian") + ("sm" . "Samoan") + ("sn" . "Shona") + ("so" . "Somali") + ("sq" . "Albanian") + ("sr" . "Serbian") + ("ss" . "Siswati") + ("st" . "Sesotho") + ("su" . "Sundanese") + ("sv" . "Swedish") + ("sw" . "Swahili") + ("ta" . "Tamil") + ("te" . "Telugu") + ("tg" . "Tajik") + ("th" . "Thai") + ("ti" . "Tigrinya") + ("tk" . "Turkmen") + ("tl" . "Tagalog") + ("tn" . "Setswana") + ("to" . "Tonga") + ("tr" . "Turkish") + ("ts" . "Tsonga") + ("tt" . "Tatar") + ("tw" . "Twi") + ("ug" . "Uighur") + ("uk" . "Ukrainian") + ("ur" . "Urdu") + ("uz" . "Uzbek") + ("vi" . "Vietnamese") + ("vo" . "Volapuk") + ("wo" . "Wolof") + ("xh" . "Xhosa") + ("yi" . "Yiddish (formerly ji)") + ("yo" . "Yoruba") + ("za" . "Zhuang") + ("zh" . "Chinese") + ("zu" . "Zulu")) + "Alist of ISO language codes and language names. +This is based on the technical contents of ISO 639:1988 (E/F) +\"Code for the representation of names of languages\". + +Typed by Keld.Simonsen@dkuug.dk 1990-11-30 + +Minor corrections, 1992-09-08 by Keld Simonsen +Sundanese corrected, 1992-11-11 by Keld Simonsen +Telugu corrected, 1995-08-24 by Keld Simonsen +Hebrew, Indonesian, Yiddish corrected 1995-10-10 by Michael Everson +Inuktitut, Uighur, Zhuang added 1995-10-10 by Michael Everson +Sinhalese corrected, 1995-10-10 by Michael Everson +Faeroese corrected to Faroese, 1995-11-18 by Keld Simonsen +Sangro corrected to Sangho, 1996-07-28 by Keld Simonsen + +Two-letter lower-case symbols are used. +The Registration Authority for ISO 639 is Infoterm, Osterreichisches +Normungsinstitut (ON), Postfach 130, A-1021 Vienna, Austria.") + +(defun language (code) + "Return the language name for the ISO CODE." + (interactive (list (completing-read "ISO language code: " + iso-638-languages))) + (message (cdr (assoc code iso-638-languages)))) + +(defun erc-cmd-LANG (language) + "Display the language name for the language code given by LANGUAGE." + (let ((lang (cdr (assoc language iso-638-languages)))) + (erc-display-message + nil 'notice 'active + (or lang (concat line ": No such domain")))) + t) + +(provide 'erc-lang) + +;; arch-tag: 8ffb1563-cc03-4517-b067-16309d4ff97b +;;; erc-lang.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-list.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-list.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,396 @@ +;;; erc-list.el --- Provide a faster channel listing mechanism + +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. +;; Copyright (C) 2004 Brian Palmer + +;; Author: Mario Lang +;; Keywords: comm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides a simple derived mode for viewing Channel lists. +;; It also serves as a demonstration of how the new server hook facility +;; can be used. + +;;; Code: + +(require 'erc) +(require 'erc-nets) +(require 'sort) +(unless (fboundp 'make-overlay) + (require 'overlay)) +(eval-when-compile (require 'cl)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; User customizable variables. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defgroup erc-list nil + "Display IRC channels in another window when using /LIST" + :group 'erc) + +(defcustom erc-chanlist-progress-message t + "*Show progress message while accumulating channel list." + :group 'erc-list + :type 'boolean) + +(defcustom erc-no-list-networks nil + "*A list of network names on which the /LIST command refuses to work." + :group 'erc-list + :type '(repeat string)) + +(defcustom erc-chanlist-frame-parameters nil + "*If nil, the channel list is displayed in a new window; if non-nil, +this variable holds the frame parameters used to make a frame to +display the channel list." + :group 'erc-list + :type 'list) + +(defcustom erc-chanlist-hide-modeline nil + "*If nil, the channel list buffer has a modeline, otherwise the modeline is hidden." + :group 'erc-list + :type 'boolean) + +(defface erc-chanlist-header-face '((t (:bold t))) + "Face used for the headers in erc's channel list." + :group 'erc-faces) + +(defface erc-chanlist-odd-line-face '((t (:inverse-video t))) + "Face used for the odd lines in erc's channel list." + :group 'erc-faces) + +(defface erc-chanlist-even-line-face '((t (:inverse-video nil))) + "Face used for the even lines in erc's channel list." + :group 'erc-faces) + +(defface erc-chanlist-highlight '((t (:foreground "red"))) + "Face used to highlight the current line in the channel list." + :group 'erc-faces) + +;; This should perhaps be a defface that inherits values from the highlight face +;; but xemacs does not support inheritance +(defcustom erc-chanlist-highlight-face 'erc-chanlist-highlight + "Face used for highlighting the current line in a list." + :type 'face + :group 'erc-faces) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; All variables below this line are for internal use only. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defvar erc-chanlist-channel-line-regexp "^\\([#&\\*][^ \t\n]*\\)\\s-+[0-9]+" + "Regexp that matches a channel line in the channel list buffer.") + +(defvar erc-chanlist-buffer nil) +(make-variable-buffer-local 'erc-chanlist-buffer) + +(defvar erc-chanlist-last-time 0 + "A time value used to throttle the progress indicator.") + +(defvar erc-chanlist-frame nil + "The frame displaying the most recent channel list buffer.") + +(defvar erc-chanlist-sort-state 'channel + "The sort mode of the channel list buffer. Either 'channel or 'users.") +(make-variable-buffer-local 'erc-chanlist-sort-state) + +(defvar erc-chanlist-highlight-overlay nil + "The overlay used for erc chanlist highlighting") +(make-variable-buffer-local 'erc-chanlist-highlight-overlay) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Define erc-chanlist-mode. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defcustom erc-chanlist-mode-hook nil + "Hook run by erc-chanlist-mode." + :group 'erc-list + :type 'hook) + +(define-derived-mode erc-chanlist-mode fundamental-mode "ERC Channel List" + "Mode for viewing a channel list of a particular server. + +\\{erc-chanlist-mode-map}" + (local-set-key "\C-c\C-j" 'erc-join-channel) + (local-set-key "j" 'erc-chanlist-join-channel) + (local-set-key "n" 'next-line) + (local-set-key "p" 'previous-line) + (local-set-key "q" 'erc-chanlist-quit) + (local-set-key "s" 'erc-chanlist-toggle-sort-state) + (local-set-key "t" 'toggle-truncate-lines) + (setq erc-chanlist-sort-state 'channel) + (setq truncate-lines t) + (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Functions. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;###autoload +(defun erc-cmd-LIST (&rest channel) + "Display a buffer containing a list of channels on the current server. +Optional argument CHANNEL specifies a single channel to list (instead of every +available channel)." + (interactive + (remove "" (split-string + (read-from-minibuffer "List channels (RET for all): ") " "))) + (if (and (null channel) + (erc-member-ignore-case (erc-network-name) erc-no-list-networks)) + (erc-display-line "ERC is configured not to allow the /LIST command on this network!" + (current-buffer)) + (erc-display-line (erc-make-notice (concat "Listing channel" + (if channel + "." + "s. This may take a while.")))) + (erc-chanlist channel)) + t) + +;;;###autoload +(defun erc-chanlist (&optional channels) + "Show a channel listing of the current server in a special mode. +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." + (interactive) + (with-current-buffer (erc-server-buffer) + (erc-once-with-server-event + 321 + '(progn + (add-hook 'erc-server-322-functions 'erc-chanlist-322 nil t) + + (erc-once-with-server-event + 323 + '(progn + (remove-hook 'erc-server-322-functions 'erc-chanlist-322 t) + (let ((buf erc-chanlist-buffer)) + (if (not (buffer-live-p buf)) + (error "`erc-chanlist-buffer' does not refer to a live buffer")) + + (set-buffer buf) + (buffer-disable-undo) + (let (buffer-read-only + (sort-fold-case t)) + (sort-lines nil (point-min) (point-max)) + (setq erc-chanlist-sort-state 'channel) + + (let ((sum (count-lines (point-min) (point-max)))) + (goto-char (point-min)) + (insert (substitute-command-keys + (concat "'\\[erc-chanlist-toggle-sort-state]' toggle sort mode.\n" + "'\\[erc-chanlist-quit]' kill this buffer.\n" + "'\\[toggle-truncate-lines]' toggle line truncation.\n" + "'\\[erc-chanlist-join-channel]' join the channel listed on the current line.\n\n"))) + (insert (format "%d channels (sorted by %s).\n\n" + sum (if (eq erc-chanlist-sort-state 'channel) + "channel name" + "number of users")))) + + (insert (format "%-25s%5s %s\n------------------------ ----- ----------------------------\n" + "Channel" + "Users" + "Topic")) + + ;; Display the channel list buffer. + (if erc-chanlist-frame-parameters + (progn + (if (or (null erc-chanlist-frame) + (not (frame-live-p erc-chanlist-frame))) + (setq erc-chanlist-frame + (make-frame `((name . ,(format "Channels on %s" + erc-session-server)) + ,@erc-chanlist-frame-parameters)))) + (select-frame erc-chanlist-frame) + (switch-to-buffer buf) + (erc-prettify-channel-list)) + (pop-to-buffer buf) + (erc-prettify-channel-list)))) + (goto-char (point-min)) + (search-forward-regexp "^------" nil t) + (forward-line 1) + (erc-chanlist-highlight-line) + (message "") + t)) + + (setq erc-chanlist-buffer (get-buffer-create + (format "*Channels on %s*" + (erc-response.sender parsed)))) + (with-current-buffer erc-chanlist-buffer + (setq buffer-read-only nil) + (erase-buffer) + (erc-chanlist-mode) + (setq erc-server-process proc) + (if erc-chanlist-hide-modeline + (setq mode-line-format nil)) + (setq buffer-read-only t)) + t)) + + ;; Now that we've setup our callbacks, pull the trigger. + (if (interactive-p) + (message "Collecting channel list for server %s" erc-session-server)) + (erc-server-send (if (null channels) + "LIST" + (concat "LIST " + (mapconcat #'identity channels ",")))))) + +(defun erc-chanlist-322 (proc parsed) + "Process an IRC 322 message. + +The message carries information about one channel for the LIST +command." + (multiple-value-bind (channel num-users) + (cdr (erc-response.command-args parsed)) + (let ((topic (erc-response.contents parsed))) + (with-current-buffer erc-chanlist-buffer + (save-excursion + (goto-char (point-max)) + (let (buffer-read-only) + (insert (format "%-26s%4s %s\n" (erc-controls-strip channel) + num-users + (erc-controls-strip topic)))) + + ;; Maybe display a progress indicator in the minibuffer. + (when (and erc-chanlist-progress-message + (> (erc-time-diff + erc-chanlist-last-time (erc-current-time)) + 3)) + (setq erc-chanlist-last-time (erc-current-time)) + (message "Accumulating channel list ... %c" + (aref [?/ ?| ?\\ ?- ?! ?O ?o] (random 7)))) + + ;; Return success to prevent other hook functions from being run. + t))))) + +(defun erc-chanlist-post-command-hook () + "Keep the current line highlighted." + (ignore-errors + (save-excursion + (beginning-of-line) + (if (looking-at erc-chanlist-channel-line-regexp) + (erc-chanlist-highlight-line) + (erc-chanlist-dehighlight-line))))) + +(defun erc-chanlist-highlight-line () + "Highlight the current line." + (unless erc-chanlist-highlight-overlay + (setq erc-chanlist-highlight-overlay + (make-overlay (point-min) (point-min))) + ;; Detach it from the buffer. + (delete-overlay erc-chanlist-highlight-overlay) + (overlay-put erc-chanlist-highlight-overlay + 'face erc-chanlist-highlight-face) + ;; Expressly put it at a higher priority than the text + ;; properties used for faces later on. Gnu emacs promises that + ;; right now overlays are higher priority than text properties, + ;; but why take chances? + (overlay-put erc-chanlist-highlight-overlay 'priority 1)) + (move-overlay erc-chanlist-highlight-overlay (point) (1+ (point-at-eol)))) + +(defun erc-chanlist-dehighlight-line () + "Remove the line highlighting." + (delete-overlay erc-chanlist-highlight-overlay)) + +(defun erc-prettify-channel-list () + "Make the channel list buffer look pretty. +When this function runs, the current buffer must be the channel +list buffer, or it does nothing." + (if (eq major-mode 'erc-chanlist-mode) + (save-excursion + (let ((inhibit-read-only t)) + (goto-char (point-min)) + (when (search-forward-regexp "^-------" nil t) + (add-text-properties + (point-min) (1+ (point-at-eol)) '(face erc-chanlist-header-face)) + (forward-line 1)) + + (while (not (eobp)) + (add-text-properties + (point) (1+ (point-at-eol)) '(face erc-chanlist-odd-line-face)) + (forward-line 1) + (unless (eobp) + (add-text-properties + (point) (1+ (point-at-eol)) '(face erc-chanlist-even-line-face))) + (forward-line 1)))))) + +(defun erc-chanlist-toggle-sort-state () + "Toggle the channel list buffer sorting method. +Either sort by channel names or by number of users in each channel." + (interactive) + (let ((inhibit-read-only t) + (sort-fold-case t)) + (save-excursion + (goto-char (point-min)) + (search-forward-regexp "^-----" nil t) + (forward-line 1) + (unless (eobp) + (if (eq erc-chanlist-sort-state 'channel) + (progn + (sort-numeric-fields 2 (point) (point-max)) + (reverse-region (point) (point-max)) + (setq erc-chanlist-sort-state 'users)) + (sort-lines nil (point) (point-max)) + (setq erc-chanlist-sort-state 'channel)) + + (goto-char (point-min)) + (if (search-forward-regexp "^[0-9]+ channels (sorted by \\(.*\\)).$" + nil t) + (replace-match (if (eq erc-chanlist-sort-state 'channel) + "channel name" + "number of users") + nil nil nil 1)) + + (goto-char (point-min)) + (search-forward-regexp "^-----" nil t) + (forward-line 1) + (recenter -1) + + (erc-prettify-channel-list))))) + +(defun erc-chanlist-quit () + "Quit Chanlist mode. +Kill the channel list buffer, window, and frame (if there's a frame +devoted to the channel list)." + (interactive) + (kill-buffer (current-buffer)) + (if (eq (selected-frame) erc-chanlist-frame) + (delete-frame) + (delete-window))) + +(defun erc-chanlist-join-channel () + "Join the channel listed on the current line of the channel list buffer. +Private channels, which are shown as asterisks (*), are ignored." + (interactive) + (save-excursion + (beginning-of-line) + (when (looking-at erc-chanlist-channel-line-regexp) + (let ((channel-name (match-string 1))) + (when (and (stringp channel-name) + (not (string= channel-name "*"))) + (run-at-time 0.5 nil 'erc-join-channel channel-name)))))) + +(provide 'erc-list) + +;;; erc-list.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 4a13196a-a61b-465a-9926-044dfbc7e5ff diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-log.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-log.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,358 @@ +;;; erc-log.el --- Logging facilities for ERC. + +;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. + +;; Author: Lawrence Mitchell +;; Keywords: IRC, chat, client, Internet, logging + +;; Created 2003-04-26 +;; Logging code taken from erc.el and modified to use markers. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file implements log file writing support for ERC. + +;; Quick start: +;; +;; (setq erc-enable-logging t) +;; (setq erc-log-channels-directory "/path/to/logfiles") ; must be writable +;; +;; There are two ways to setup logging. The first will write to the log files +;; on each incoming or outgoing line - this may not be optimal on a laptop +;; HDD. To do this, M-x customize-variable erc-modules, and add "log". +;; +;; The second method will save buffers on /part, /quit, or killing the +;; channel buffer. To do this, add the following to your .emacs: +;; +;; (require 'erc-log) +;; +;; You may optionally want the following code, to save all ERC buffers +;; without confirmation when exiting emacs: +;; +;; (defadvice save-buffers-kill-emacs (before save-logs (&rest args) activate) +;; (save-some-buffers t (lambda () +;; (when (and (eq major-mode 'erc-mode) +;; (not (null buffer-file-name))) t)))) +;; +;; If you only want to save logs for some buffers, customise the +;; variable `erc-enable-logging'. + +;; How it works: +;; +;; If logging is enabled, at some point, `erc-save-buffer-in-logs' +;; will be called. The "end" of the buffer is taken from +;; `erc-insert-marker', while `erc-last-saved-position' holds the +;; position the buffer was last saved at (as a marker, or if the +;; buffer hasn't been saved before, as the number 1 (point-min)). + +;; The region between `erc-last-saved-position' and +;; `erc-insert-marker' is saved to the current buffer's logfile, and +;; `erc-last-saved-position' is updated to reflect this. + +;;; History: +;; 2003-04-26: logging code pulled out of erc.el. Switched to using +;; markers. + +;;; TODO: +;; * Erc needs a generalised make-safe-file-name function, so that +;; generated file names don't contain any invalid file characters. +;; +;; * Really, we need to lock the logfiles somehow, so that if a user +;; is running multiple emacsen and/or on the same channel as more +;; than one user, only one process writes to the logfile. This is +;; especially needed for those logfiles with no nick in them, as +;; these would become corrupted. +;; For a single emacs process, the problem could be solved using a +;; variable which contained the names of buffers already being +;; logged. This would require that logging be buffer-local, +;; possibly not a bad thing anyway, since many people don't want to +;; log the server buffer. +;; For multiple emacsen the problem is trickier. On some systems, +;; on could use the function `lock-buffer' and `unlock-buffer'. +;; However, file locking isn't implemented on all platforms, for +;; example, there is none on w32 systems. +;; A third possibility might be to fake lockfiles. However, this +;; might lead to problems if an emacs crashes, as the lockfile +;; would be left lying around. + +;;; Code: + +(require 'erc) +(eval-when-compile (require 'cl)) + +(defgroup erc-log nil + "Logging facilities for ERC." + :group 'erc) + +(defcustom erc-generate-log-file-name-function 'erc-generate-log-file-name-long + "*A function to generate a log filename. +The function must take five arguments: BUFFER, TARGET, NICK, SERVER and PORT. +BUFFER is the buffer to be saved, +TARGET is the name of the channel, or the target of the query, +NICK is the current nick, +SERVER and PORT are the parameters used to connect BUFFERs +`erc-server-process'." + :group 'erc-log + :type '(choice (const erc-generate-log-file-name-long) + (const erc-generate-log-file-name-short) + (const erc-generate-log-file-name-with-date) + (symbol))) + +(defcustom erc-save-buffer-on-part nil + "*Save the channel buffer content using `erc-save-buffer-in-logs' on PART." + :group 'erc-log + :type 'boolean) + +(defcustom erc-truncate-buffer-on-save nil + "Truncate any ERC (channel, query, server) buffer when it is saved." + :group 'erc-log + :type 'boolean) + +(defcustom erc-enable-logging t + "If non-nil, ERC will log IRC conversations. +This can either be a boolean value of nil or t, or a function. +If the value is a function, it will be called with one argument, the +name of the current ERC buffer. One possible function, which saves +all but server buffers is `erc-log-all-but-server-buffers'. + +This variable is buffer local. Setting it via \\[customize] sets the +default value. + +Log files are stored in `erc-log-channels-directory'." + :group 'erc-log + :type '(choice boolean + function)) +(make-variable-buffer-local 'erc-enable-logging) + +(defcustom erc-log-channels-directory "~/log" + "The directory to place log files for channels. +Leave blank to disable logging. If not nil, all the channel +buffers are logged in separate files in that directory. The +directory should not end with a trailing slash." + :group 'erc-log + :type '(choice directory + (const nil))) + +(defcustom erc-log-insert-log-on-open t + "*Insert log file contents into the buffer if a log file exists." + :group 'erc-log + :type 'boolean) + +(defcustom erc-save-queries-on-quit nil + "Save all query (also channel) buffers of the server on QUIT. +See the variable `erc-save-buffer-on-part' for details." + :group 'erc-log + :type 'boolean) + +(defcustom erc-log-file-coding-system (if (featurep 'xemacs) + 'binary + 'emacs-mule) + "*The coding system ERC should use for writing log files. + +This should ideally, be a \"catch-all\" coding system, like +`emacs-mule', or `iso-2022-7bit'." + :group 'erc-log) + +;;;###autoload (autoload 'erc-log-mode "erc-log" nil t) +(define-erc-module log nil + "Automatically logs things you receive on IRC into files. +Files are stored in `erc-log-channels-directory'; file name +format is defined through a formatting function on +`erc-generate-log-file-name-function'. + +Since automatic logging is not always a Good Thing (especially if +people say things in different coding systems), you can turn logging +behaviour on and off with the variable `erc-enable-logging', which can +also be a predicate function. To only log when you are not set away, use: + +\(setq erc-enable-logging + (lambda (buffer) + (with-current-buffer buffer + (not erc-away))))" + ;; enable + ((add-hook 'erc-insert-post-hook + 'erc-save-buffer-in-logs) + (add-hook 'erc-send-post-hook + 'erc-save-buffer-in-logs)) + ;; disable + ((remove-hook 'erc-insert-post-hook + 'erc-save-buffer-in-logs) + (remove-hook 'erc-send-post-hook + 'erc-save-buffer-in-logs))) + +(when erc-enable-logging + (add-hook 'erc-kill-buffer-hook + 'erc-save-buffer-in-logs) + (add-hook 'erc-kill-channel-hook + 'erc-save-buffer-in-logs) + (add-hook 'erc-quit-hook + 'erc-conditional-save-queries) + (add-hook 'erc-part-hook + 'erc-conditional-save-buffer)) + +(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs) + +;;;functionality referenced from erc.el +(defun erc-log-setup-logging () + "Setup the buffer-local logging variables in the current buffer. +This function is destined to be run from `erc-connect-pre-hook'." + (when (erc-logging-enabled) + (auto-save-mode -1) + (setq buffer-offer-save t + buffer-file-name "") + (set (make-local-variable 'write-file-functions) + '(erc-save-buffer-in-logs)) + (when erc-log-insert-log-on-open + (ignore-errors (insert-file-contents (erc-current-logfile)) + (move-marker erc-last-saved-position + (1- (point-max))))))) + +;;; Append, so that 'erc-initialize-log-marker keeps running first. +(add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append) + +(defun erc-log-all-but-server-buffers (buffer) + "Returns t if logging should be enabled in BUFFER. +Returns nil iff `erc-server-buffer-p' returns t." + (save-excursion + (save-window-excursion + (set-buffer buffer) + (not (erc-server-buffer-p))))) + +(defun erc-save-query-buffers (process) + "Save all buffers process." + (erc-with-all-buffers-of-server process + nil + (erc-save-buffer-in-logs))) + +(defun erc-conditional-save-buffer (buffer) + "Save Query BUFFER if `erc-save-queries-on-quit' is t." + (when erc-save-buffer-on-part + (erc-save-buffer-in-logs buffer))) + +(defun erc-conditional-save-queries (process) + "Save Query buffers of PROCESS if `erc-save-queries-on-quit' is t." + (when erc-save-queries-on-quit + (erc-save-query-buffers process))) + +;;;###autoload +(defun erc-logging-enabled (&optional buffer) + "Return non-nil if logging is enabled for BUFFER. +If BUFFER is nil, the value of `current-buffer' is used. +Logging is enabled if `erc-log-channels-directory' is non-nil, the directory +is writeable (it will be created as necessary) and +`erc-enable-logging' returns a non-nil value." + (and erc-log-channels-directory + (erc-directory-writable-p erc-log-channels-directory) + (if (functionp erc-enable-logging) + (funcall erc-enable-logging (or buffer (current-buffer))) + erc-enable-logging))) + +(defun erc-current-logfile (&optional buffer) + "Return the logfile to use for BUFFER. +If BUFFER is nil, the value of `current-buffer' is used. +This is determined by `erc-generate-log-file-name-function'. +The result is converted to lowercase, as IRC is case-insensitive" + (expand-file-name + (downcase (funcall erc-generate-log-file-name-function + (or buffer (current-buffer)) + (or (erc-default-target) (buffer-name buffer)) + (erc-current-nick) + erc-session-server erc-session-port)) + erc-log-channels-directory)) + +(defun erc-generate-log-file-name-with-date (buffer &rest ignore) + "This function computes a short log file name. +The name of the log file is composed of BUFFER and the current date. +This function is a possible value for `erc-generate-log-file-name-function'." + (concat (buffer-name buffer) "-" (format-time-string "%Y-%m-%d") ".txt")) + +(defun erc-generate-log-file-name-short (buffer &rest ignore) + "This function computes a short log file name. +In fact, it only uses the buffer name of the BUFFER argument, so +you can affect that using `rename-buffer' and the-like. This +function is a possible value for +`erc-generate-log-file-name-function'." + (concat (buffer-name buffer) ".txt")) + +(defun erc-generate-log-file-name-long (buffer target nick server port) + "Generates a log-file name in the way ERC always did it. +This results in a file name of the form #channel!nick@server:port.txt. +This function is a possible value for `erc-generate-log-file-name-function'." + (let ((file (concat + (if target (concat target "!")) + nick "@" server ":" (cond ((stringp port) port) + ((numberp port) + (number-to-string port))) ".txt"))) + ;; we need a make-safe-file-name function. + (convert-standard-filename file))) + +;;;###autoload +(defun erc-save-buffer-in-logs (&optional buffer) + "Append BUFFER contents to the log file, if logging is enabled. +If BUFFER is not provided, current buffer is used. +Logging is enabled if `erc-logging-enabled' returns non-nil. + +This is normally done on exit, to save the unsaved portion of the +buffer, since only the text that runs off the buffer limit is logged +automatically. + +You can save every individual message by putting this function on +`erc-insert-post-hook'." + (interactive) + (or buffer (setq buffer (current-buffer))) + (when (erc-logging-enabled buffer) + (let ((file (erc-current-logfile buffer)) + (coding-system-for-write erc-log-file-coding-system)) + (save-excursion + (with-current-buffer buffer + (save-restriction + (widen) + ;; early on in the initalisation, don't try and write the log out + (when (and (markerp erc-last-saved-position) + (> erc-insert-marker (1+ erc-last-saved-position))) + (write-region (1+ (marker-position erc-last-saved-position)) + (marker-position erc-insert-marker) + file t 'nomessage) + (if (and erc-truncate-buffer-on-save (interactive-p)) + (progn + (let ((inhibit-read-only t)) (erase-buffer)) + (move-marker erc-last-saved-position (point-max)) + (erc-display-prompt)) + (move-marker erc-last-saved-position + ;; If we place erc-last-saved-position at + ;; erc-insert-marker, because text gets + ;; inserted /before/ erc-insert-marker, + ;; the log file will not be saved + ;; (erc-last-saved-position will always + ;; be equal to erc-insert-marker). + (1- (marker-position erc-insert-marker))))) + (set-buffer-modified-p nil)))))) + t) + +(provide 'erc-log) + +;;; erc-log.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 54072f99-9f0a-4846-8908-2ccde92221de diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-match.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-match.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,658 @@ +;;; erc-match.el --- Highlight messages matching certain regexps + +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +;; Author: Andreas Fuchs +;; Keywords: comm, faces +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMatch + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file includes stuff to work with pattern matching in ERC. If +;; you were used to customizing erc-fools, erc-keywords, erc-pals, +;; erc-dangerous-hosts and the like, this file contains these +;; customizable variables. + +;; Usage: +;; Put (erc-match-mode 1) into your ~/.emacs file. + +;;; Code: + +(require 'erc) +(eval-when-compile (require 'cl)) + +;; Customisation: + +(defgroup erc-match nil + "Keyword and Friend/Foe/... recognition. +Group containing all things concerning pattern matching in ERC +messages." + :group 'erc) + +;;;###autoload (autoload 'erc-match-mode "erc-match") +(define-erc-module match nil + "This mode checks whether messages match certain patterns. If so, +they are hidden or highlighted. This is controlled via the variables +`erc-pals', `erc-fools', `erc-keywords', `erc-dangerous-hosts', and +`erc-current-nick-highlight-type'. For all these highlighting types, +you can decide whether the entire message or only the sending nick is +highlighted." + ((add-hook 'erc-insert-modify-hook 'erc-match-message 'append)) + ((remove-hook 'erc-insert-modify-hook 'erc-match-message))) + +;; Remaining customizations + +(defcustom erc-pals nil + "List of pals on IRC." + :group 'erc-match + :type '(repeat regexp)) + +(defcustom erc-fools nil + "List of fools on IRC." + :group 'erc-match + :type '(repeat regexp)) + +(defcustom erc-keywords nil + "List of keywords to highlight in all incoming messages. +Each entry in the list is either a regexp, or a cons cell with the +regexp in the car and the face to use in the cdr. If no face is +specified, `erc-keyword-face' is used." + :group 'erc-match + :type '(repeat (choice regexp + (list regexp face)))) + +(defcustom erc-dangerous-hosts nil + "List of regexps for hosts to highlight. +Useful to mark nicks from dangerous hosts." + :group 'erc-match + :type '(repeat regexp)) + +(defcustom erc-current-nick-highlight-type 'keyword + "*Determines how to highlight text in which your current nickname appears +\(does not apply to text sent by you\). + +The following values are allowed: + + nil - do not highlight the message at all + 'keyword - highlight all instances of current nickname in message + 'nick - highlight the nick of the user who typed your nickname + 'nick-or-keyword - highlight the nick of the user who typed your nickname, + or all instances of the current nickname if there was + no sending user + 'all - highlight the entire message where current nickname occurs + +Any other value disables highlighting of current nickname altogether." + :group 'erc-match + :type '(choice (const nil) + (const nick) + (const keyword) + (const nick-or-keyword) + (const all))) + +(defcustom erc-pal-highlight-type 'nick + "*Determines how to highlight messages by pals. +See `erc-pals'. + +The following values are allowed: + + nil - do not highlight the message at all + 'nick - highlight pal's nickname only + 'all - highlight the entire message from pal + +Any other value disables pal highlighting altogether." + :group 'erc-match + :type '(choice (const nil) + (const nick) + (const all))) + +(defcustom erc-fool-highlight-type 'nick + "*Determines how to highlight messages by fools. +See `erc-fools'. + +The following values are allowed: + + nil - do not highlight the message at all + 'nick - highlight fool's nickname only + 'all - highlight the entire message from fool + +Any other value disables fool highlighting altogether." + :group 'erc-match + :type '(choice (const nil) + (const nick) + (const all))) + +(defcustom erc-keyword-highlight-type 'keyword + "*Determines how to highlight messages containing keywords. +See variable `erc-keywords'. + +The following values are allowed: + + 'keyword - highlight keyword only + 'all - highlight the entire message containing keyword + +Any other value disables keyword highlighting altogether." + :group 'erc-match + :type '(choice (const nil) + (const keyword) + (const all))) + +(defcustom erc-dangerous-host-highlight-type 'nick + "*Determines how to highlight messages by nicks from dangerous-hosts. +See `erc-dangerous-hosts'. + +The following values are allowed: + + 'nick - highlight nick from dangerous-host only + 'all - highlight the entire message from dangerous-host + +Any other value disables dangerous-host highlighting altogether." + :group 'erc-match + :type '(choice (const nil) + (const nick) + (const all))) + + +(defcustom erc-log-matches-types-alist '((keyword . "ERC Keywords")) + "Alist telling ERC where to log which match types. +Valid match type keys are: +- keyword +- pal +- dangerous-host +- fool +- current-nick + +The other element of each cons pair in this list is the buffer name to +use for the logged message." + :group 'erc-match + :type '(repeat (cons (choice :tag "Key" + (const keyword) + (const pal) + (const dangerous-host) + (const fool) + (const current-nick)) + (string :tag "Buffer name")))) + +(defcustom erc-log-matches-flag 'away + "Flag specifying when matched message logging should happen. +When nil, don't log any matched messages. +When t, log messages. +When 'away, log messages only when away." + :group 'erc-match + :type '(choice (const nil) + (const away) + (const t))) + +(defcustom erc-log-match-format "%t<%n:%c> %m" + "Format for matched Messages. +This variable specifies how messages in the corresponding log buffers will +be formatted. The various format specs are: + +%t Timestamp (uses `erc-timestamp-format' if non-nil or \"[%Y-%m-%d %H:%M] \") +%n Nickname of sender +%u Nickname!user@host of sender +%c Channel in which this was received +%m Message" + :group 'erc-match + :type 'string) + +(defcustom erc-beep-match-types '(current-nick) + "Types of matches to beep for when a match occurs. +The function `erc-beep-on-match' needs to be added to `erc-text-matched-hook' +for beeping to work." + :group 'erc-match + :type '(choice (repeat :tag "Beep on match" (choice + (const current-nick) + (const keyword) + (const pal) + (const dangerous-host) + (const fool))) + (const :tag "Don't beep" nil))) + +(defcustom erc-text-matched-hook '(erc-log-matches) + "Hook run when text matches a given match-type. +Functions in this hook are passed as arguments: +\(match-type nick!user@host message) where MATCH-TYPE is a symbol of: +current-nick, keyword, pal, dangerous-host, fool" + :options '(erc-log-matches erc-hide-fools erc-beep-on-match) + :group 'erc-match + :type 'hook) + +;; Internal variables: + +;; This is exactly the same as erc-button-syntax-table. Should we +;; just put it in erc.el +(defvar erc-match-syntax-table + (let ((table (make-syntax-table))) + (modify-syntax-entry ?\( "w" table) + (modify-syntax-entry ?\) "w" table) + (modify-syntax-entry ?\[ "w" table) + (modify-syntax-entry ?\] "w" table) + (modify-syntax-entry ?\{ "w" table) + (modify-syntax-entry ?\} "w" table) + (modify-syntax-entry ?` "w" table) + (modify-syntax-entry ?' "w" table) + (modify-syntax-entry ?^ "w" table) + (modify-syntax-entry ?- "w" table) + (modify-syntax-entry ?_ "w" table) + (modify-syntax-entry ?| "w" table) + (modify-syntax-entry ?\\ "w" table) + table) + "Syntax table used when highlighting messages. +This syntax table should make all the legal nick characters word +constituents.") + +;; Faces: + +(defface erc-current-nick-face '((t (:bold t :foreground "DarkTurquoise"))) + "ERC face for occurrences of your current nickname." + :group 'erc-faces) + +(defface erc-dangerous-host-face '((t (:foreground "red"))) + "ERC face for people on dangerous hosts. +See `erc-dangerous-hosts'." + :group 'erc-faces) + +(defface erc-pal-face '((t (:bold t :foreground "Magenta"))) + "ERC face for your pals. +See `erc-pals'." + :group 'erc-faces) + +(defface erc-fool-face '((t (:foreground "dim gray"))) + "ERC face for fools on the channel. +See `erc-fools'." + :group 'erc-faces) + +(defface erc-keyword-face '((t (:bold t :foreground "pale green"))) + "ERC face for your keywords. +Note that this is the default face to use if +`erc-keywords' does not specify another." + :group 'erc-faces) + +;; Functions: + +(defun erc-add-entry-to-list (list prompt &optional completions) + "Add an entry interactively to a list. +LIST must be passed as a symbol +The query happens using PROMPT. +Completion is performed on the optional alist COMPLETIONS." + (let ((entry (completing-read + prompt + completions + (lambda (x) + (not (erc-member-ignore-case (car x) (symbol-value list))))))) + (if (erc-member-ignore-case entry (symbol-value list)) + (error (format "\"%s\" is already on the list" entry)) + (set list (cons entry (symbol-value list)))))) + +(defun erc-remove-entry-from-list (list prompt) + "Remove an entry interactively from a list. +LIST must be passed as a symbol. +The elements of LIST can be strings, or cons cells where the +car is the string." + (let* ((alist (mapcar (lambda (x) + (if (listp x) + x + (list x))) + (symbol-value list))) + (entry (completing-read + prompt + alist + nil + t))) + (if (erc-member-ignore-case entry (symbol-value list)) + ;; plain string + (set list (delete entry (symbol-value list))) + ;; cons cell + (set list (delete (assoc entry (symbol-value list)) + (symbol-value list)))))) + +;;;###autoload +(defun erc-add-pal () + "Add pal interactively to `erc-pals'." + (interactive) + (erc-add-entry-to-list 'erc-pals "Add pal: " (erc-get-server-nickname-alist))) + +;;;###autoload +(defun erc-delete-pal () + "Delete pal interactively to `erc-pals'." + (interactive) + (erc-remove-entry-from-list 'erc-pals "Delete pal: ")) + +;;;###autoload +(defun erc-add-fool () + "Add fool interactively to `erc-fools'." + (interactive) + (erc-add-entry-to-list 'erc-fools "Add fool: " + (erc-get-server-nickname-alist))) + +;;;###autoload +(defun erc-delete-fool () + "Delete fool interactively to `erc-fools'." + (interactive) + (erc-remove-entry-from-list 'erc-fools "Delete fool: ")) + +;;;###autoload +(defun erc-add-keyword () + "Add keyword interactively to `erc-keywords'." + (interactive) + (erc-add-entry-to-list 'erc-keywords "Add keyword: ")) + +;;;###autoload +(defun erc-delete-keyword () + "Delete keyword interactively to `erc-keywords'." + (interactive) + (erc-remove-entry-from-list 'erc-keywords "Delete keyword: ")) + +;;;###autoload +(defun erc-add-dangerous-host () + "Add dangerous-host interactively to `erc-dangerous-hosts'." + (interactive) + (erc-add-entry-to-list 'erc-dangerous-hosts "Add dangerous-host: ")) + +;;;###autoload +(defun erc-delete-dangerous-host () + "Delete dangerous-host interactively to `erc-dangerous-hosts'." + (interactive) + (erc-remove-entry-from-list 'erc-dangerous-hosts "Delete dangerous-host: ")) + +(defun erc-match-current-nick-p (nickuserhost msg) + "Check whether the current nickname is in MSG. +NICKUSERHOST will be ignored." + (with-syntax-table erc-match-syntax-table + (and msg + (string-match (concat "\\b" + (regexp-quote (erc-current-nick)) + "\\b") + msg)))) + +(defun erc-match-pal-p (nickuserhost msg) + "Check whether NICKUSERHOST is in `erc-pals'. +MSG will be ignored." + (and nickuserhost + (erc-list-match erc-pals nickuserhost))) + +(defun erc-match-fool-p (nickuserhost msg) + "Check whether NICKUSERHOST is in `erc-fools' or MSG is directed at a fool." + (and msg nickuserhost + (or (erc-list-match erc-fools nickuserhost) + (erc-match-directed-at-fool-p msg)))) + +(defun erc-match-keyword-p (nickuserhost msg) + "Check whether any keyword of `erc-keywords' matches for MSG. +NICKUSERHOST will be ignored." + (and msg + (erc-list-match + (mapcar (lambda (x) + (if (listp x) + (car x) + x)) + erc-keywords) + msg))) + +(defun erc-match-dangerous-host-p (nickuserhost msg) + "Check whether NICKUSERHOST is in `erc-dangerous-hosts'. +MSG will be ignored." + (and nickuserhost + (erc-list-match erc-dangerous-hosts nickuserhost))) + +(defun erc-match-directed-at-fool-p (msg) + "Check whether MSG is directed at a fool. +In order to do this, every entry in `erc-fools' will be used. +In any of the following situations, MSG is directed at an entry FOOL: + +- MSG starts with \"FOOL: \" or \"FOO, \" +- MSG contains \", FOOL.\" (actually, \"\\s. FOOL\\s.\")" + (let ((fools-beg (mapcar (lambda (entry) + (concat "^" entry "[:,] ")) + erc-fools)) + (fools-end (mapcar (lambda (entry) + (concat "\\s. " entry "\\s.")) + erc-fools))) + (or (erc-list-match fools-beg msg) + (erc-list-match fools-end msg)))) + +(defun erc-get-parsed-vector (point) + "Return the whole parsed vector on POINT." + (get-text-property point 'erc-parsed)) + +(defun erc-get-parsed-vector-nick (vect) + "Return nickname in the parsed vector VECT." + (let* ((untreated-nick (and vect (erc-response.sender vect))) + (maybe-nick (when untreated-nick + (car (split-string untreated-nick "!"))))) + (when (and (not (null maybe-nick)) + (erc-is-valid-nick-p maybe-nick)) + untreated-nick))) + +(defun erc-get-parsed-vector-type (vect) + "Return message type in the parsed vector VECT." + (and vect + (erc-response.command vect))) + +(defun erc-match-message () + "Mark certain keywords in a region. +Use this defun with `erc-insert-modify-hook'." + ;; This needs some refactoring. + (goto-char (point-min)) + (let* ((to-match-nick-dep '("pal" "fool" "dangerous-host")) + (to-match-nick-indep '("keyword" "current-nick")) + (vector (erc-get-parsed-vector (point-min))) + (nickuserhost (erc-get-parsed-vector-nick vector)) + (nickname (and nickuserhost + (nth 0 (erc-parse-user nickuserhost)))) + (old-pt (point)) + (nick-beg (and nickname + (re-search-forward (regexp-quote nickname) + (point-max) t) + (match-beginning 0))) + (nick-end (when nick-beg + (match-end 0))) + (message (buffer-substring (if (and nick-end + (<= (+ 2 nick-end) (point-max))) + (+ 2 nick-end) + (point-min)) + (point-max)))) + (when vector + (mapc + (lambda (match-type) + (goto-char (point-min)) + (let* ((match-prefix (concat "erc-" match-type)) + (match-pred (intern (concat "erc-match-" match-type "-p"))) + (match-htype (eval (intern (concat match-prefix + "-highlight-type")))) + (match-regex (if (string= match-type "current-nick") + (regexp-quote (erc-current-nick)) + (eval (intern (concat match-prefix "s"))))) + (match-face (intern (concat match-prefix "-face")))) + (when (funcall match-pred nickuserhost message) + (cond + ;; Highlight the nick of the message + ((and (eq match-htype 'nick) + nick-end) + (erc-put-text-property + nick-beg nick-end + 'face match-face (current-buffer))) + ;; Highlight the nick of the message, or the current + ;; nick if there's no nick in the message (e.g. /NAMES + ;; output) + ((and (string= match-type "current-nick") + (eq match-htype 'nick-or-keyword)) + (if nick-end + (erc-put-text-property + nick-beg nick-end + 'face match-face (current-buffer)) + (goto-char (+ 2 (or nick-end + (point-min)))) + (while (re-search-forward match-regex nil t) + (erc-put-text-property (match-beginning 0) (match-end 0) + 'face match-face)))) + ;; Highlight the whole message + ((eq match-htype 'all) + (erc-put-text-property + (point-min) (point-max) + 'face match-face (current-buffer))) + ;; Highlight all occurrences of the word to be + ;; highlighted. + ((and (string= match-type "keyword") + (eq match-htype 'keyword)) + (mapc (lambda (elt) + (let ((regex elt) + (face match-face)) + (when (consp regex) + (setq regex (car elt) + face (cdr elt))) + (goto-char (+ 2 (or nick-end + (point-min)))) + (while (re-search-forward regex nil t) + (erc-put-text-property + (match-beginning 0) (match-end 0) + 'face face)))) + match-regex)) + ;; Highlight all occurrences of our nick. + ((and (string= match-type "current-nick") + (eq match-htype 'keyword)) + (goto-char (+ 2 (or nick-end + (point-min)))) + (while (re-search-forward match-regex nil t) + (erc-put-text-property (match-beginning 0) (match-end 0) + 'face match-face))) + ;; Else twiddle your thumbs. + (t nil)) + (run-hook-with-args + 'erc-text-matched-hook + (intern match-type) + (or nickuserhost + (concat "Server:" (erc-get-parsed-vector-type vector))) + message)))) + (if nickuserhost + (append to-match-nick-dep to-match-nick-indep) + to-match-nick-indep))))) + +(defun erc-log-matches (match-type nickuserhost message) + "Log matches in a separate buffer, determined by MATCH-TYPE. +The behaviour of this function is controlled by the variables +`erc-log-matches-types-alist' and `erc-log-matches-flag'. Specify the +match types which should be logged in the former, and +deactivate/activate match logging in the latter. See +`erc-log-match-format'." + (let ((match-buffer-name (cdr (assq match-type + erc-log-matches-types-alist))) + (nick (nth 0 (erc-parse-user nickuserhost)))) + (when (and + (or (eq erc-log-matches-flag t) + (and (eq erc-log-matches-flag 'away) + erc-away)) + match-buffer-name) + (let ((line (format-spec erc-log-match-format + (format-spec-make + ?n nick + ?t (format-time-string + (or (and (boundp 'erc-timestamp-format) + erc-timestamp-format) + "[%Y-%m-%d %H:%M] ")) + ?c (or (erc-default-target) "") + ?m message + ?u nickuserhost)))) + (with-current-buffer (erc-log-matches-make-buffer match-buffer-name) + (toggle-read-only -1) + (point-max) + (insert line) + (toggle-read-only 1)))))) + +(defun erc-log-matches-make-buffer (name) + "Create or get a log-matches buffer named NAME and return it." + (let* ((buffer-already (get-buffer name)) + (buffer (or buffer-already + (get-buffer-create name)))) + (with-current-buffer buffer + (unless buffer-already + (insert " == Type \"q\" to dismiss messages ==\n") + (erc-view-mode-enter nil (lambda (buffer) + (when (y-or-n-p "Discard messages?") + (kill-buffer buffer))))) + buffer))) + +(defun erc-log-matches-come-back (proc parsed) + "Display a notice that messages were logged while away." + (when (and erc-away + (eq erc-log-matches-flag 'away)) + (mapc + (lambda (match-type) + (let ((buffer (get-buffer (cdr match-type))) + (buffer-name (cdr match-type))) + (when buffer + (let* ((last-msg-time (erc-emacs-time-to-erc-time + (with-current-buffer buffer + (get-text-property (1- (point-max)) + 'timestamp)))) + (away-time (erc-emacs-time-to-erc-time erc-away))) + (when (and away-time last-msg-time + (erc-time-gt last-msg-time away-time)) + (erc-display-message + nil 'notice 'active + (format "You have logged messages waiting in \"%s\"." + buffer-name)) + (erc-display-message + nil 'notice 'active + (format "Type \"C-c C-k %s RET\" to view them." + buffer-name))))))) + erc-log-matches-types-alist)) + nil) + +; This handler must be run _before_ erc-process-away is. +(add-hook 'erc-server-305-functions 'erc-log-matches-come-back nil) + +(defun erc-go-to-log-matches-buffer () + "Interactively open an erc-log-matches buffer." + (interactive) + (let ((buffer-name (completing-read "Switch to ERC Log buffer: " + (mapcar (lambda (x) + (cons (cdr x) t)) + erc-log-matches-types-alist) + (lambda (buffer-cons) + (get-buffer (car buffer-cons)))))) + (switch-to-buffer buffer-name))) + +(define-key erc-mode-map "\C-c\C-k" 'erc-go-to-log-matches-buffer) + +(defun erc-hide-fools (match-type nickuserhost message) + "Hide foolish comments. +This function should be called from `erc-text-matched-hook'." + (when (eq match-type 'fool) + (erc-put-text-properties (point-min) (point-max) + '(invisible intangible) + (current-buffer)))) + +(defun erc-beep-on-match (match-type nickuserhost message) + "Beep when text matches. +This function is meant to be called from `erc-text-matched-hook'." + (when (member match-type erc-beep-match-types) + (beep))) + +(provide 'erc-match) + +;;; erc-match.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 1f1f595e-abcc-4b0b-83db-598a1d3f0f82 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-menu.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-menu.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,121 @@ +;; erc-menu.el -- Menu-bar definitions for ERC + +;; Copyright (C) 2001, 2002, 2004, 2005 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm, processes, menu +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcMenu + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Loading this file defines a menu for ERC. + +;;; Code: + +(require 'easymenu) + +(defvar erc-menu-definition + (list "IRC" + ["Connect to server..." erc-select t] + ["Disconnect from server..." erc-quit-server erc-server-connected] + "-" + ["List channels..." erc-cmd-LIST + (and erc-server-connected (fboundp 'erc-cmd-LIST))] + ["Join channel..." erc-join-channel erc-server-connected] + ["Start a query..." erc-cmd-QUERY erc-server-connected] + "-" + ["List users in channel" erc-channel-names erc-channel-users] + ["List channel operators" erc-cmd-OPS erc-channel-users] + ["Input action..." erc-input-action (erc-default-target)] + ["Set topic..." erc-set-topic + (and (and (erc-default-target) (not (erc-query-buffer-p))) + (or (not (member "t" erc-channel-modes)) + (erc-channel-user-op-p (erc-current-nick))))] + (list "Channel modes" + ["Change mode..." erc-insert-mode-command + (erc-channel-user-op-p (erc-current-nick))] + ["No external send" (erc-toggle-channel-mode "n") + :active (erc-channel-user-op-p (erc-current-nick)) + :style toggle :selected (member "n" erc-channel-modes)] + ["Topic set by channel operator" (erc-toggle-channel-mode "t") + :style toggle :selected (member "t" erc-channel-modes) + :active (erc-channel-user-op-p (erc-current-nick))] + ["Invite only" (erc-toggle-channel-mode "i") + :style toggle :selected (member "i" erc-channel-modes) + :active (erc-channel-user-op-p (erc-current-nick))] + ["Private" (erc-toggle-channel-mode "p") + :style toggle :selected (member "p" erc-channel-modes) + :active (erc-channel-user-op-p (erc-current-nick))] + ["Secret" (erc-toggle-channel-mode "s") + :style toggle :selected (member "s" erc-channel-modes) + :active (erc-channel-user-op-p (erc-current-nick))] + ["Moderated" (erc-toggle-channel-mode "m") + :style toggle :selected (member "m" erc-channel-modes) + :active (erc-channel-user-op-p (erc-current-nick))] + ["Set a limit..." erc-set-channel-limit + (erc-channel-user-op-p (erc-current-nick))] + ["Set a key..." erc-set-channel-key + (erc-channel-user-op-p (erc-current-nick))]) + ["Leave this channel..." erc-part-from-channel erc-channel-users] + "-" + (list "Pals, fools and other keywords" + ["Add pal..." erc-add-pal] + ["Delete pal..." erc-delete-pal] + ["Add fool..." erc-add-fool] + ["Delete fool..." erc-delete-fool] + ["Add keyword..." erc-add-keyword] + ["Delete keyword..." erc-delete-keyword] + ["Add dangerous host..." erc-add-dangerous-host] + ["Delete dangerous host..." erc-delete-dangerous-host]) + "-" + (list "IRC services" + ["Identify to NickServ..." erc-nickserv-identify + (and erc-server-connected (functionp 'erc-nickserv-identify))]) + "-" + ["Save buffer in log" erc-save-buffer-in-logs + (fboundp 'erc-save-buffer-in-logs)] + ["Truncate buffer" erc-truncate-buffer (fboundp 'erc-truncate-buffer)] + "-" + ["Customize ERC" (customize-group 'erc) t] + ["Enable/Disable ERC Modules" (customize-variable 'erc-modules) t] + ["Show ERC version" erc-version t]) + "ERC menu definition.") + +;; `erc-mode-map' must be defined before doing this +(eval-after-load "erc" + '(progn + (easy-menu-define erc-menu erc-mode-map "ERC menu" erc-menu-definition) + (easy-menu-add erc-menu erc-mode-map) + + ;; for some reason the menu isn't automatically added to the menu bar + (when (featurep 'xemacs) + (add-hook 'erc-mode-hook + (lambda () (easy-menu-add erc-menu erc-mode-map)))))) + +(provide 'erc-menu) + +;;; erc-menu.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 671219f2-b082-4753-a185-1d0c7e0c05bd diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-nets.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-nets.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,861 @@ +;;; erc-nets.el --- IRC networks + +;; Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file deals with IRC networks. +;; +;; Usage: +;; +;; Put into your .emacs: +;; +;; (require 'erc-nets) +;; +;; M-x erc-server-select provides an alternative way to connect to servers by +;; choosing networks. +;; You can use (eq (erc-network) 'Network) if you'd like to set variables or do +;; certain actions according to which network you're connected to. +;; If a network you use is not listed in `erc-networks-alist', you can put +;; (add-to-list 'erc-networks-alist '(Network "irc.server-name.net")) in your +;; config file. + +;;; Code: + +(require 'erc) +(eval-when-compile (require 'cl)) + +;; Variables + +(defgroup erc-networks nil + "IRC Networks" + :group 'erc) + +(defcustom erc-server-alist +'(("4-irc: Random server" 4-irc "4-irc.com" 6667) + ("A5KNet: Random server" A5KNet "irc.a5knet.com" ((6660 6669))) + ("AbleNet: Random server" AbleNet "irc.ablenet.org" 6667) + ("Accessirc: Random server" Accessirc "irc.accessirc.net" 6667) + ("Acestar: Random server" Acestar "irc.acestar.org" 6667) + ("Action-IRC: Random server" Action-IRC "irc.action-irc.net" ((6660 6669))) + ("AfterNET: Random server" AfterNET "irc.afternet.org" 6667) + ("Alternativenet: Random server" Alternativenet "irc.altnet.org" 6667) + ("AmigaNet: Random server" AmigaNet "irc.amiganet.org" 6667) + ("AngelEyez: Random server" AngelEyez "irc.angeleyez.net" ((6666 7000))) + ("AnotherNet: Random server" Anothernet "irc.another.net" (6667 7000 )) + ("ArabChat: Random server" ArabChat "irc.arabchat.org" ((6660 6667))) + ("AsiaTalk: Random server" AsiaTalk "irc.asiatalk.org" ((6667 6669) 7000 )) + ("AstroLink: Random server" AstroLink "irc.astrolink.org" ((6660 6667))) + ("Asylumnet: Random server" Asylumnet "irc.asylum-net.org" ((6661 6669) 7000 7777 )) + ("Austnet: Random AU server" Austnet "au.austnet.org" 6667) + ("Austnet: Random NZ server" Austnet "nz.austnet.org" 6667) + ("Austnet: Random SG server" Austnet "sg.austnet.org" 6667) + ("Austnet: Random US server" Austnet "us.austnet.org" 6667) + ("AwesomeChat: Random server" AwesomeChat "irc.awesomechat.net" ((6661 6669))) + ("Awesomechristians: Random server" Awesomechristians "irc.awesomechristians.com" 7000) + ("Axenet: Random server" Axenet "irc.axenet.org" ((6660 6667))) + ("BeyondIRC: Random server" Beyondirc "irc.beyondirc.net" ((6660 6669))) + ("BGIRC: Random server" BGIRC "irc.bulgaria.org" ((6666 6669) 7000 )) + ("Blabbernet: Random server" Blabbernet "irc.blabber.net" (6667 7000 )) + ("Blitzed: Random server" Blitzed "irc.blitzed.org" (6667 7000 )) + ("Brasirc: Random server" Brasirc "irc.brasirc.net" ((6666 6667))) + ("Brasirc: BR, PA, Belem" Brasirc "irc.libnet.com.br" ((6666 6668) 7777 8002 )) + ("BRASnet: Random European server" BRASnet "eu.brasnet.org" ((6665 6669))) + ("BRASnet: Random US server" BRASnet "us.brasnet.org" ((6665 6669))) + ("BubbleNet: Random server" BubbleNet "irc.bubblenet.org" ((6667 6669))) + ("CCnet: Random server" CCnet "irc.cchat.net" (6667 7000 )) + ("CCnet: US, TX, Dallas" CCnet "irc2.cchat.net" (6667 7000 )) + ("Chat-Net: Random server" Chat-Net "irc.chat-net.org" 6667) + ("Chat-Solutions: Random server" Chat-Solutions "irc.chat-solutions.org" 6667) + ("Chatcafe: Random server" Chatcafe "irc.chatcafe.net" 6667) + ("Chatchannel: Random server" Chatchannel "irc.chatchannel.org" ((6666 6669) 7000 )) + ("ChatCircuit: Random server" ChatCircuit "irc.chatcircuit.com" 6668) + ("Chatlink: Random server" Chatlink "irc.chatlink.org" 6667) + ("Chatnet: Random AU server" Chatnet "au.chatnet.org" 6667) + ("Chatnet: Random EU server" Chatnet "eu.chatnet.org" 6667) + ("Chatnet: Random US server" Chatnet "us.chatnet.org" 6667) + ("ChatNut: Random server" ChatNut "irc.chatnut.net" (6667 7000 )) + ("Chatpinoy: Random server" Chatpinoy "irc.chatpinoy.com" 6667) + ("ChatPR: Random server" ChatPR "irc.chatpr.org" 6667) + ("Chatroom: Random server" Chatroom "irc.chatroom.org" 6667) + ("Chatster: Random server" Chatster "irc.chatster.org" 6667) + ("ChatX: Random server" ChatX "irc.chatx.net" 6667) + ("China263: Random server" China263 "irc.263.net" 6667) + ("Cineplex1: Random server" Cineplex1 "irc.cineplex1.com" ((6666 6668))) + ("CNN: CNN News discussions" CNN "chat.cnn.com" ((6667 6669) 7000 )) + ("CobraNet: Random server" CobraNet "irc.cobra.net" 6667) + ("Coolchat: Random server" Coolchat "irc.coolchat.net" 6667) + ("Criten: Random server" Criten "irc.criten.net" 6667) + ("Cyberchat: Random server" Cyberchat "irc.cyberchat.org" (6667 6668 )) + ("CyGanet: Random server" CyGanet "irc.cyga.net" 6667) + ("DALnet: AS, MY, Coins" DALnet "coins.dal.net" ((6663 6668) 7000 )) + ("DALnet: CA, ON, Sodre" DALnet "sodre.on.ca.dal.net" ((6661 6669) 7000 )) + ("DALnet: EU, DE, Nexgo" DALnet "nexgo.de.eu.dal.net" ((6664 6669) 7000 )) + ("DALnet: EU, NO, Powertech" DALnet "powertech.no.eu.dal.net" ((6666 6667) 7000 )) + ("DALnet: EU, SE, Borg" DALnet "borg.se.eu.dal.net" (6667 7000 )) + ("DALnet: EU, SE, Ced" DALnet "ced.se.eu.dal.net" (6667 7000 )) + ("DALnet: US, GA, Astro" DALnet "astro.ga.us.dal.net" ((6661 6669) 7000 )) + ("DALnet: US, GA, Dragons" DALnet "dragons.ga.us.dal.net" ((6661 6669) 7000 )) + ("DALnet: US, GA, Elysium" DALnet "elysium.ga.us.dal.net" ((6661 6669) 7000 )) + ("DALnet: US, MA, Twisted" DALnet "twisted.ma.us.dal.net" ((6660 6669) 7001 7002 )) + ("DALnet: US, MO, Global" DALnet "global.mo.us.dal.net" ((6661 6669) 7000 )) + ("DALnet: US, NJ, Liberty" DALnet "liberty.nj.us.dal.net" ((6662 6669) 7000 )) + ("DALnet: US, VA, Wombat" DALnet "wombat.va.us.dal.net" ((6661 6669) 7000 )) + ("DALnet: Random EU server" DALnet "irc.eu.dal.net" 6667) + ("DALnet: Random US server" DALnet "irc.dal.net" ((6660 6667))) + ("Dark-Tou-Net: Random server" Dark-Tou-Net "irc.d-t-net.de" 6667) + ("Darkfire: Random server" Darkfire "irc.darkfire.net" (6667 7000 8000 )) + ("DarkMyst: Random server" DarkMyst "irc.darkmyst.org" 6667) + ("Darkserv: Random server" Darkserv "irc.darkserv.net" 6667) + ("Darksystem: Random server" Darksystem "irc.darksystem.com" 6667) + ("Darktree: Random server" Darktree "irc.darktree.net" 6667) + ("DayNet: Random server" DayNet "irc.daynet.org" 6667) + ("Deepspace: Disability network" Deepspace "irc.deepspace.org" 6667) + ("Different: Random server" Different "irc.different.net" 6667) + ("Digarix: Random server" Digarix "irc.digarix.net" 6667) + ("Digatech: Random server" Digatech "irc.digatech.net" 6667) + ("Digital-Base: Random server" Digital-Base "irc.digital-base.net" ((6660 7000))) + ("Digitalirc: Random server" Digitalirc "irc.digitalirc.net" 6667) + ("Discussioni: Random server" Discussioni "irc.discussioni.org" ((6666 6669))) + ("DorukNet: TR, Istanbul" DorukNet "irc.doruk.net.tr" ((6660 6669) 7000 8888 )) + ("Dreamcast: Random server" Dreamcast "irc0.dreamcast.com" 6667) + ("DWChat: Random server" DWChat "irc.dwchat.net" 6667) + ("Dynastynet: Random server" Dynastynet "irc.dynastynet.net" 6667) + ("EFnet: CA, AB, Edmonton (arcti)" EFnet "irc.arcti.ca" 6667) + ("EFnet: CA, AB, Edmonton (mpls)" EFnet "irc.mpls.ca" ((6660 6669))) + ("EFnet: CA, ON, Toronto" EFnet "irc2.magic.ca" 6667) + ("EFnet: CA, QB, Montreal" EFnet "irc.qeast.net" 6667) + ("EFnet: EU, DK, Aarhus" EFnet "irc.inet.tele.dk" 6667) + ("EFnet: EU, FI, Helsinki" EFnet "efnet.cs.hut.fi" 6667) + ("EFnet: EU, FR, Paris" EFnet "irc.isdnet.fr" ((6667 6669))) + ("EFnet: EU, NL, Amsterdam" EFnet "efnet.vuurwerk.nl" 6667) + ("EFnet: EU, NO, Homelien" EFnet "irc.homelien.no" (5190 (6666 6667) (7000 7001) )) + ("EFnet: EU, NO, Oslo" EFnet "irc.daxnet.no" ((6666 7000))) + ("EFnet: EU, PL, Warszawa" EFnet "irc.efnet.pl" 6667) + ("EFnet: EU, RU, Moscow" EFnet "irc.rt.ru" ((6661 6669))) + ("EFnet: EU, SE, Dalarna" EFnet "irc.du.se" ((6666 6669))) + ("EFnet: EU, SE, Gothenberg" EFnet "irc.hemmet.chalmers.se" ((6666 7000))) + ("EFnet: EU, SE, Sweden" EFnet "irc.light.se" 6667) + ("EFnet: EU, UK, London (carrier)" EFnet "irc.carrier1.net.uk" ((6666 6669))) + ("EFnet: EU, UK, London (demon)" EFnet "efnet.demon.co.uk" ((6665 6669))) + ("EFnet: ME, IL, Inter" EFnet "irc.inter.net.il" ((6665 6669))) + ("EFnet: US, AZ, Phoenix" EFnet "irc.easynews.com" (6660 (6665 6667) 7000 )) + ("EFnet: US, CA, San Jose" EFnet "irc.concentric.net" ((6665 6668))) + ("EFnet: US, CA, San Luis Obispo" EFnet "irc.prison.net" ((6666 6667))) + ("EFnet: US, GA, Atlanta" EFnet "irc.mindspring.com" ((6660 6669))) + ("EFnet: US, MI, Ann Arbor" EFnet "irc.umich.edu" 6667) + ("EFnet: US, MN, Twin Cities" EFnet "irc.umn.edu" ((6665 6669))) + ("EFnet: US, NY, Mineola" EFnet "irc.lightning.net" ((6665 7000))) + ("EFnet: US, NY, New York (east)" EFnet "irc.east.gblx.net" 6667) + ("EFnet: US, NY, New York (flamed)" EFnet "irc.flamed.net" ((6665 6669))) + ("EFnet: US, TX, Houston" EFnet "ircd.lagged.org" ((6660 6669))) + ("EFnet: US, VA, Ashburn" EFnet "irc.secsup.uu.net" ((6665 6669) 8080 )) + ("EFnet: Random AU server" EFnet "au.rr.efnet.net" 6667) + ("EFnet: Random CA server" EFnet "ca.rr.efnet.net" 6667) + ("EFnet: Random EU server" EFnet "eu.rr.efnet.net" 6667) + ("EFnet: Random US server" EFnet "us.rr.efnet.net" 6667) + ("EgyptianIRC: Random server" EgyptianIRC "irc.egyptianirc.net" ((6667 6669))) + ("Eircnet: Random server" Eircnet "irc.eircnet.org" ((6660 6669) 7000 )) + ("Eleethal: Random server" Eleethal "irc.eleethal.com" ((6660 6669) 7000 )) + ("EntertheGame: Random server" EntertheGame "irc.enterthegame.com" ((6667 6669))) + ("EpiKnet: Random server" EpiKnet "irc.epiknet.org" ((6660 6669) 7000 7001 )) + ("EsperNet: Random server" EsperNet "irc.esper.net" (5555 (6667 6669) )) + ("Esprit: Random server" Esprit "irc.esprit.net" 6667) + ("euIRC: Random server" euIRC "irc.euirc.net" ((6665 6669))) + ("Evilzinc: Random server" Evilzinc "irc.evilzinc.net" ((6660 6669) 7000 8000 )) + ("ExodusIRC: Random server" ExodusIRC "irc.exodusirc.net" ((6660 6669))) + ("FDFnet: Random server" FDFnet "irc.fdfnet.net" ((6666 6668) 9999 )) + ("FEFnet: Random server" FEFnet "irc.fef.net" 6667) + ("Financialchat: Random server" Financialchat "irc.financialchat.com" ((6667 6669) 7000 )) + ("Forestnet: Random server" Forestnet "irc.forestnet.org" (6667 7000 )) + ("ForeverChat: Random server" ForeverChat "irc.foreverchat.net" ((6660 6669) 7000 )) + ("Fraggers: Random server" Fraggers "irc.fraggers.co.uk" ((6661 6669) (7000 7001) )) + ("FreedomChat: Random server" FreedomChat "chat.freedomchat.net" 6667) + ("FreedomIRC: Random server" FreedomIRC "irc.freedomirc.net" 6667) + ("Freenode: Random server" freenode "irc.freenode.net" 6667) + ("Freenode: Random EU server" freenode "irc.eu.freenode.net" 6667) + ("Freenode: Random US server" freenode "irc.us.freenode.net" 6667) + ("FunNet: Random server" FunNet "irc.funnet.org" 6667) + ("Galaxynet: Random server" GalaxyNet "irc.galaxynet.org" ((6662 6668) 7000 )) + ("Galaxynet: AU, NZ, Auckland" GalaxyNet "auckland.nz.galaxynet.org" ((6661 6669))) + ("Galaxynet: EU, BE, Online" GalaxyNet "online.be.galaxynet.org" ((6661 6669))) + ("Galaxynet: US, FL, Florida" GalaxyNet "gymnet.us.galaxynet.org" ((6661 6669))) + ("Gamesnet: Random east US server" Gamesnet "east.gamesnet.net" 6667) + ("Gamesnet: Random west US server" Gamesnet "west.gamesnet.net" 6667) + ("GammaForce: Random server" GammaForce "irc.gammaforce.org" ((6660 6669) 7000 )) + ("GIKInet: Random server" GIKInet "irc.giki.edu.pk" 6667) + ("GizNet: Random server" GizNet "irc.giznet.org" ((6666 6669) 7000 )) + ("Globalchat: Random server" Globalchat "irc.globalchat.org" 6667) + ("GlobIRC: Random server" GlobIRC "irc.globirc.net" ((6666 6668) 9999 )) + ("Goldchat: Random server" Goldchat "irc.goldchat.nl" ((6660 6669) 7000 )) + ("Goodchatting: Random server" Goodchatting "irc.goodchatting.com" ((6661 6669) 7000 )) + ("GravityLords: Random server" GravityLords "irc.gravitylords.net" 6667) + ("Grnet: Random EU server" GRnet "gr.irc.gr" (6667 7000 )) + ("Grnet: Random server" GRnet "srv.irc.gr" (6667 7000 )) + ("Grnet: Random US server" GRnet "us.irc.gr" (6667 7000 )) + ("GulfChat: Random server" GulfChat "irc.gulfchat.net" ((6660 6669))) + ("HabberNet: Random server" HabberNet "irc.habber.net" 6667) + ("HanIRC: Random server" HanIRC "irc.hanirc.org" 6667) + ("Hellenicnet: Random server" Hellenicnet "irc.mirc.gr" (6667 7000 )) + ("IceNet: Random server" IceNet "irc.icenet.org.za" 6667) + ("ICQnet: Random server" ICQnet "irc.icq.com" 6667) + ("Infatech: Random server" Infatech "irc.infatech.net" ((6660 6669))) + ("Infinity: Random server" Infinity "irc.infinity-irc.org" 6667) + ("Infomatrix: Random server" Infomatrix "irc.infomatrix.net" 6667) + ("Inside3D: Random server" Inside3D "irc.inside3d.net" ((6661 6669))) + ("InterlinkChat: Random server" InterlinkChat "irc.interlinkchat.net" ((6660 6669) 7000 )) + ("IRC-Chile: Random server" IRC-Chile "irc.cl" 6667) + ("IRC-Hispano: Random server" IRC-Hispano "irc.irc-hispano.org" 6667) + ("IRCchat: Random server" IRCchat "irc.ircchat.tk" 6667) + ("IRCGate: Random server" IRCGate "irc.ircgate.net" ((6667 6669))) + ("IRCGeeks: Random server" IRCGeeks "irc.ircgeeks.org" ((6660 6669))) + ("IRChat: Random server" IRChat "irc.irchat.net" ((6660 6669))) + ("IrcLordz: Random server" IrcLordz "irc.irclordz.com" 6667) + ("IrcMalta: Random server" IrcMalta "irc.ircmalta.org" ((6660 6667))) + ("IRCnet: EU, FR, Random" IRCnet "irc.fr.ircnet.net" 6667) + ("IRCnet: EU, IT, Random" IRCnet "irc.ircd.it" ((6665 6669))) + ("IRCnet: AS, IL, Haifa" IRCnet "ircnet.netvision.net.il" ((6661 6668))) + ("IRCnet: AS, JP, Tokyo" IRCnet "irc.tokyo.wide.ad.jp" 6667) + ("IRCnet: AS, TW, Seed" IRCnet "irc.seed.net.tw" 6667) + ("IRCnet: EU, AT, Linz" IRCnet "linz.irc.at" ((6666 6668))) + ("IRCnet: EU, AT, Wien" IRCnet "vienna.irc.at" ((6666 6669))) + ("IRCnet: EU, BE, Brussels" IRCnet "irc.belnet.be" 6667) + ("IRCnet: EU, BE, Zaventem" IRCnet "ircnet.wanadoo.be" ((6661 6669))) + ("IRCnet: EU, CZ, Prague" IRCnet "irc.felk.cvut.cz" 6667) + ("IRCnet: EU, DE, Berlin" IRCnet "irc.fu-berlin.de" ((6665 6669))) + ("IRCnet: EU, DE, Dusseldorf" IRCnet "irc.freenet.de" ((6665 6669))) + ("IRCnet: EU, DE, Stuttgart" IRCnet "irc.belwue.de" ((6665 6669))) + ("IRCnet: EU, DK, Copenhagen" IRCnet "irc.ircnet.dk" 6667) + ("IRCnet: EU, EE, Tallinn" IRCnet "irc.estpak.ee" ((6666 6668))) + ("IRCnet: EU, FI, Helsinki" IRCnet "irc.cs.hut.fi" 6667) + ("IRCnet: EU, GR, Thessaloniki" IRCnet "irc.ee.auth.gr" ((6666 6669))) + ("IRCnet: EU, HU, Budapest" IRCnet "irc.elte.hu" 6667) + ("IRCnet: EU, IS, Reykjavik (ircnet)" IRCnet "irc.ircnet.is" ((6661 6669))) + ("IRCnet: EU, IS, Reykjavik (simnet)" IRCnet "irc.simnet.is" ((6661 6669))) + ("IRCnet: EU, IT, Rome" IRCnet "irc.tin.it" ((6665 6669))) + ("IRCnet: EU, NL, Amsterdam (nlnet)" IRCnet "irc.nl.uu.net" ((6660 6669))) + ("IRCnet: EU, NL, Amsterdam (xs4all)" IRCnet "irc.xs4all.nl" ((6660 6669))) + ("IRCnet: EU, NL, Enschede" IRCnet "irc.snt.utwente.nl" ((6660 6669))) + ("IRCnet: EU, NL, Nijmegen" IRCnet "irc.sci.kun.nl" ((6660 6669))) + ("IRCnet: EU, NO, Oslo" IRCnet "irc.ifi.uio.no" 6667) + ("IRCnet: EU, NO, Trondheim" IRCnet "irc.pvv.ntnu.no" 6667) + ("IRCnet: EU, PL, Lublin" IRCnet "lublin.irc.pl" ((6666 6668))) + ("IRCnet: EU, PL, Warsaw" IRCnet "warszawa.irc.pl" ((6666 6668))) + ("IRCnet: EU, RU, Moscow" IRCnet "irc.msu.ru" 6667) + ("IRCnet: EU, SE, Lulea" IRCnet "irc.ludd.luth.se" ((6661 6669))) + ("IRCnet: EU, UK, London (Demon)" IRCnet "ircnet.demon.co.uk" ((6665 6669))) + ("IRCnet: EU, UK, London (Easynet)" IRCnet "ircnet.easynet.co.uk" ((6666 6669))) + ("IRCnet: US, NY, New York" IRCnet "irc.stealth.net" ((6660 6669))) + ("IRCnet: Random AU server" IRCnet "au.ircnet.org" 6667) + ("IRCnet: Random EU server" IRCnet "eu.ircnet.org" ((6665 6668))) + ("IRCnet: Random US server" IRCnet "us.ircnet.org" ((6665 6668))) + ("IRCSoulZ: Random server" IRCSoulZ "irc.ircsoulz.net" 6667) + ("IRCSul: BR, PR, Maringa" IRCSul "irc.wnet.com.br" 6667) + ("IrcTalk: Random server" IrcTalk "irc.irctalk.net" ((6660 6669))) + ("Irctoo: Random server" Irctoo "irc.irctoo.net" 6667) + ("IRCtown: Random server" IRCtown "irc.irctown.net" ((6666 6669) 7000 )) + ("IRCworld: Random server" IRCworld "irc.ircworld.org" 6667) + ("ircXtreme: Random server" ircXtreme "irc.ircXtreme.net" ((6660 6669))) + ("Israelnet: Random server" Israelnet "irc.israel.net" 6667) + ("K0wNet: Random server" K0wNet "irc.k0w.net" ((6660 6669))) + ("KDFSnet: Random server" KDFSnet "irc.kdfs.net" ((6667 6669))) + ("Kemik: Random server" Kemik "irc.kemik.net" 6667) + ("Kewl.Org: Random server" Kewl.Org "irc.kewl.org" (6667 7000 )) + ("Kickchat: Random server" Kickchat "irc.kickchat.com" ((6660 6669) 7000 )) + ("Kidsworld: Random server" KidsWorld "irc.kidsworld.org" ((6666 6669))) + ("Knightnet: AF, ZA, Durban" Knightnet "orc.dbn.za.knightnet.net" (6667 5555 )) + ("Knightnet: US, CA, Goldengate" Knightnet "goldengate.ca.us.knightnet.net" (6667 5555 )) + ("Konfido.Net: Random server" Konfido.Net "irc.konfido.net" 6667) + ("KreyNet: Random server" Kreynet "irc.krey.net" 6667) + ("Krono: Random server" Krono "irc.krono.net" ((6660 6669) 7000 )) + ("Krushnet: Random server" Krushnet "irc.krushnet.org" 6667) + ("LagNet: Random server" LagNet "irc.lagnet.org.za" 6667) + ("LagNet: AF, ZA, Cape Town" LagNet "reaper.lagnet.org.za" 6667) + ("LagNet: AF, ZA, Johannesburg" LagNet "mystery.lagnet.org.za" 6667) + ("Librenet: Random server" Librenet "irc.librenet.net" 6667) + ("LinkNet: Random server" LinkNet "irc.link-net.org" ((6667 6669))) + ("Liquidized: Random server" Liquidized "irc.liquidized.net" (6667 7000 )) + ("M-IRC: Random server" M-IRC "irc.m-sys.org" ((6667 6669))) + ("MagicStar: Random server" MagicStar "irc.magicstar.net" 6667) + ("Mavra: Random server" Mavra "irc.mavra.net" 6667) + ("MediaDriven: Random server" MediaDriven "irc.mediadriven.com" ((6667 6669))) + ("mIRC-X: Random server" mIRC-X "irc.mircx.com" (6667 7000 )) + ("Morat: Random server" Morat "irc.morat.net" 6667) + ("MusicCity: Random server" MusicCity "chat.musiccity.com" 6667) + ("Mysteria: Random server" Mysteria "irc.mysteria.net" (6667 7000 )) + ("Mysterychat: Random server" Mysterychat "irc.mysterychat.net" ((6667 6669))) + ("Mystical: Random server" Mystical "irc.mystical.net" (6667 7000 )) + ("Narancs: Random server" Narancs "irc.narancs.com" ((6667 6669) 7000 )) + ("Net-France: Random server" Net-France "irc.net-france.com" 6667) + ("Nevernet: Random server" Nevernet "irc.nevernet.net" 6667) + ("Newnet: Random server" Newnet "irc.newnet.net" ((6665 6667))) + ("Nexusirc: Random server" Nexusirc "irc.nexusirc.org" 6667) + ("Nightstar: Random server" NightStar "irc.nightstar.net" ((6665 6669))) + ("NitrousNet: Random server" NitrousNet "irc.nitrousnet.net" 6667) + ("Novernet: Random server" Novernet "irc.novernet.com" ((6665 6669) 7000 )) + ("Nullrouted: Random server" Nullrouted "irc.nullrouted.org" ((6666 6669) 7000 )) + ("NullusNet: Random server" NullusNet "irc.nullus.net" 6667) + ("OpChat: Random server" OpChat "irc.opchat.org" ((6667 6669))) + ("Othernet: Random server" Othernet "irc.othernet.org" 6667) + ("Othernet: US, FL, Miami" Othernet "miami.fl.us.othernet.org" 6667) + ("Othernet: US, MO, StLouis" Othernet "stlouis.mo.us.othernet.org" 6667) + ("Otherside: Random server" OtherSide "irc.othersideirc.net" 6667) + ("Outsiderz: Random server" Outsiderz "irc.outsiderz.com" 6667) + ("OzOrg: AU, Perth" OzOrg "iinet.perth.oz.org" 6667) + ("Peacefulhaven: Random server" Peacefulhaven "irc.peacefulhaven.net" ((6660 6669) 7000 )) + ("PhazedIRC: Random server" PhazedIRC "irc.phazedirc.net" 6667) + ("Philchat: Random server" Philchat "irc.philchat.net" 6667) + ("phrozN: Random server" phrozN "irc.phrozn.net" 6667) + ("PiNet: Random server" PiNet "irc.praetorians.org" ((6665 6669))) + ("Pinoycentral: Random server" Pinoycentral "chat.abs-cbn.com" 6667) + ("Planetarion: Random server" Planetarion "irc.planetarion.com" 6667) + ("POLNet: Random server" POLNet "irc.ircnet.pl" 6667) + ("Psionics: CA, PQ, Montreal" Psionics "chat.psionics.net" ((6660 6669))) + ("PTirc: Random server" PTirc "irc.ptirc.com.pt" 6667) + ("PTlink: Random server" PTlink "irc.ptlink.net" 6667) + ("PTnet: Random server" PTnet "irc.ptnet.org" 6667) + ("QChat: Random server" QChat "irc.qchat.net" 6667) + ("QuakeNet: Random German server" QuakeNet "de.quakenet.org" ((6667 6669))) + ("QuakeNet: Random server" QuakeNet "irc.quakenet.eu.org" ((6667 6669))) + ("QuakeNet: Random Swedish server" QuakeNet "se.quakenet.org" ((6667 6669))) + ("QuakeNet: Random UK server" QuakeNet "uk.quakenet.org" ((6667 6669))) + ("QuakeNet: Random US server" QuakeNet "us.quakenet.org" ((6667 6669))) + ("Realirc: Random server" Realirc "irc.realirc.org" 6667) + ("RealmNET: Random server" RealmNET "irc.realmnet.com" 6667) + ("Rebelchat: Random server" Rebelchat "irc.rebelchat.org" 6667) + ("Red-Latina: Random server" Red-Latina "irc.red-latina.org" 6667) + ("RedLatona: Random server" RedLatona "irc.redlatona.net" (6667 6668 )) + ("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))) + ("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) )) + ("Rusnet: EU, UA, Kiev" Rusnet "irc.kar.net" ((6667 6669) (7770 7775) )) + ("Sandnet: Random server" Sandnet "irc.sandnet.net" ((6660 6669) 7000 )) + ("Scunc: Random server" Scunc "irc.scunc.net" 6667) + ("SerbianCafe: Random server" SerbianCafe "irc.serbiancafe.ws" ((6665 6669))) + ("SexNet: Random server" SexNet "irc.sexnet.org" 6667) + ("ShadowFire: Random server" ShadowFire "irc.shadowfire.org" 6667) + ("ShadowWorld: Random server" ShadowWorld "irc.shadowworld.net" 6667) + ("SkyNet: Random server" SkyNet "irc.bronowski.pl" ((6666 6668))) + ("Slashnet: Random server" Slashnet "irc.slashnet.org" 6667) + ("SolarStone: Random server" SolarStone "irc.solarstone.net" ((6660 6669))) + ("Sorcerynet: Random server" Sorcery "irc.sorcery.net" (6667 7000 9000 )) + ("Sorcerynet: EU, SE, Karlskrona" Sorcery "nexus.sorcery.net" (6667 7000 9000 )) + ("Sorcerynet: US, CA, Palo Alto" Sorcery "kechara.sorcery.net" (6667 7000 9000 )) + ("SourceIRC: Random server" SourceIRC "irc.sourceirc.net" ((6667 6669) 7000 )) + ("SpaceTronix: Random server" SpaceTronix "irc.spacetronix.net" ((6660 6669) 7000 )) + ("Spirit-Harmony: Random server" Spirit-Harmony "irc.spirit-harmony.com" ((6661 6669))) + ("StarChat: Random server" StarChat "irc.starchat.net" ((6667 6669) 7000 )) + ("StarEquinox: Random server" StarEquinox "irc.starequinox.net" ((6660 6669))) + ("StarLink: Random server" Starlink "irc.starlink.net" ((6660 6669))) + ("StarLink-irc: Random server" starlink-irc "irc.starlink-irc.org" 6667) + ("StarWars-IRC: Random server" StarWars-IRC "irc.starwars-irc.net" ((6663 6667))) + ("Stormdancing: Random server" Stormdancing "irc.stormdancing.net" ((6664 6669) 7000 9000 )) + ("Superchat: Random server" Superchat "irc.superchat.org" ((6660 6668))) + ("Sysopnet: Random server" Sysopnet "irc.sysopnet.org" ((6666 6668))) + ("Telstra: Random server" Telstra "irc.telstra.com" ((6667 6669))) + ("TR-net: EU, TR, Ankara" TR-net "irc.dominet.com.tr" 6667) + ("TR-net: EU, Tr, Istanbul" TR-net "irc.teklan.com.tr" 6667) + ("Tri-net: Random server" Tri-net "irc.tri-net.org" 6667) + ("TriLink: Random server" TriLink "irc.ft4u.net" 6667) + ("TurkishChat: Random server" TurkishChat "irc.turkishchat.org" ((6660 6669) 7000 )) + ("UberNinja: Random server" UberNinja "irc.uberninja.net" ((6667 6669))) + ("UICN: Random server" UICN "irc.uicn.net" 6667) + ("UltraIRC: Random server" UltraIRC "irc.ultrairc.net" 6667) + ("UnderChat: Random server" UnderChat "irc.underchat.it" ((6660 6669) 7000 )) + ("Undernet: CA, ON, Toronto" Undernet "toronto.on.ca.undernet.org" ((6661 6669))) + ("Undernet: CA, QC, Montreal" Undernet "montreal.qu.ca.undernet.org" ((6660 6669))) + ("Undernet: EU, AT, Graz" Undernet "graz.at.eu.undernet.org" ((6661 6669))) + ("Undernet: EU, BE, Antwerp" Undernet "flanders.be.eu.undernet.org" ((6660 6669))) + ("Undernet: EU, BE, Brussels" Undernet "brussels.be.eu.undernet.org" 6667) + ("Undernet: EU, CH, Geneva" Undernet "geneva.ch.eu.undernet.org" ((6660 6669) 7777 8000 )) + ("Undernet: EU, FR, Caen" Undernet "caen.fr.eu.undernet.org" ((6666 6669))) + ("Undernet: EU, NL, Diemen" Undernet "diemen.nl.eu.undernet.org" ((6660 6669))) + ("Undernet: EU, NL, Haarlem" Undernet "haarlem.nl.eu.undernet.org" ((6660 6669))) + ("Undernet: EU, NO, Oslo" Undernet "oslo.no.eu.undernet.org" ((6660 6669))) + ("Undernet: EU, SE, Stockholm" Undernet "stockholm.se.eu.undernet.org" ((6666 6669))) + ("Undernet: EU, UK, Surrey" Undernet "surrey.uk.eu.undernet.org" ((6660 6669))) + ("Undernet: US, AZ, Mesa" Undernet "mesa.az.us.undernet.org" ((6665 6667))) + ("Undernet: US, CA, San Diego" Undernet "sandiego.ca.us.undernet.org" ((6660 6670))) + ("Undernet: US, DC, Washington" Undernet "washington.dc.us.undernet.org" ((6660 6669))) + ("Undernet: US, KS, Manhattan" Undernet "manhattan.ks.us.undernet.org" ((6660 6669))) + ("Undernet: US, NV, Las Vegas" Undernet "lasvegas.nv.us.undernet.org" ((6660 6669))) + ("Undernet: US, TX, Austin" Undernet "austin.tx.us.undernet.org" ((6660 6669))) + ("Undernet: US, UT, Saltlake" Undernet "saltlake.ut.us.undernet.org" ((6660 6669))) + ("Undernet: US, VA, Arlington" Undernet "arlington.va.us.undernet.org" ((6660 6669))) + ("Undernet: US, VA, McLean" Undernet "mclean.va.us.undernet.org" ((6666 6669))) + ("Undernet: Random EU server" Undernet "eu.undernet.org" 6667) + ("Undernet: Random US server" Undernet "us.undernet.org" 6667) + ("UnderZ: Random server" UnderZ "irc.underz.org" ((6667 6668))) + ("UniChat: Random server" UniChat "irc.uni-chat.net" 6667) + ("UnionLatina: Random server" UnionLatina "irc.unionlatina.org" 6667) + ("Univers: Random server" Univers "irc.univers.org" ((6665 6669))) + ("UnixR: Random server" UnixR "irc.unixr.net" ((6667 6669))) + ("Vidgamechat: Random server" Vidgamechat "irc.vidgamechat.com" 6667) + ("VirtuaNet: Random server" VirtuaNet "irc.virtuanet.org" ((6660 6669) 7000 )) + ("Vitamina: Random server" Vitamina "irc.vitamina.ca" 6667) + ("Voila: Random server" Voila "irc.voila.fr" 6667) + ("Wahou: Random server" Wahou "irc.wahou.org" ((6665 6669))) + ("Warpednet: Random server" Warpednet "irc.warped.net" 6667) + ("Weaklinks: Random server" Weaklinks "irc.weaklinks.net" ((6667 6669))) + ("Webnet: Random server" Webnet "irc.webchat.org" ((6667 6669) 7000 )) + ("Webnet: US, CA, Santa Clara" Webnet "webmaster.ca.us.webchat.org" ((6661 6669))) + ("WinChat: Random server" WinChat "irc.winchat.net" ((6661 6669))) + ("WinIRC: Random server" WinIRC "irc.winirc.org" ((6667 6669) 4400 )) + ("WorldIRC: Random server" WorldIRC "irc.worldirc.org" ((6660 6667))) + ("WyldRyde: Random server" WyldRyde "irc.wyldryde.net" ((6666 6669))) + ("XentoniX: Random server" XentoniX "irc.xentonix.net" ((6661 6669))) + ("Xevion: Random server" Xevion "irc.xevion.net" (6667 7000 )) + ("XNet: Random server" XNet "irc.xnet.org" 6667) + ("XWorld: Random server" XWorld "irc.xworld.org" 6667) + ("ZAnet Net: Random server" ZAnetNet "irc.zanet.net" 6667) + ("ZAnet Org: UK, London" ZAnetOrg "mystic.zanet.org.za" 6667) + ("ZiRC: Random server" ZiRC "irc.zirc.org" ((6660 6669))) + ("ZUHnet: Random server" ZUHnet "irc.zuh.net" 6667) + ("Zurna: Random server" Zurna "irc.zurna.net" 6667)) + "Alist of irc servers. (NAME NET HOST PORTS) where +NAME is a name for that server, +NET is a symbol indicating to which network from `erc-networks-alist' this + server corresponds, +HOST is the servers hostname and +PORTS is either a number, a list of numbers, or a list of port ranges." + :group 'erc-networks + :type 'sexp) + +(defcustom erc-networks-alist + '((4-irc "4-irc.com") + (A5KNet "a5knet.com") + (AbleNet "ablenet.org") + (Accessirc "accessirc.net") + (Acestar "acestar.org") + (Action-IRC "action-irc.net") + (AfterNET "afternet.org") + (Alternativenet "altnet.org") + (AmigaNet "amiganet.org") + (AngelEyez "angeleyez.net") + (Anothernet "another.net") + (ArabChat "arabchat.org") + (AsiaTalk "asiatalk.org") + (AstroLink "astrolink.org") + (Asylumnet "asylumnet.org") + (Austnet "austnet.org") + (AwesomeChat "awesomechat.net") + (Awesomechristians "awesomechristians.com") + (Axenet "axenet.org") + (Beyondirc "beyondirc.net") + (BGIRC "bulgaria.org") + (Blabbernet "blabber.net") + (Blitzed "blitzed.org") + (BrasIRC "brasirc.net") + (BRASnet "brasnet.org") + (BubbleNet "bubblenet.org") + (CCnet "christian-chat.net") + (Chat-Net "chat-net.org") + (Chat-Solutions "chat-solutions.org") + (Chatcafe "chatcafe.net") + (Chatchannel "chatchannel.org") + (ChatCircuit "chatcircuit.com") + (Chatlink "chatlink.org") + (Chatnet "chatnet.org") + (ChatNut "chatnut.net") + (Chatpinoy "chatpinoy.com") + (ChatPR "chatpr.org") + (Chatroom "chatroom.org") + (Chatster "chatster.org") + (ChatX "chatx.net") + (China263 "263.net") + (Cineplex1 "cineplex1.com") + (CNN "cnn.com") + (CobraNet "cobra.net") + (Coolchat "coolchat.net") + (Criten "criten.net") + (Cyberchat "cyberchat.org") + (CyGanet "cyga.net") + (DALnet "dal.net") + (Dark-Tou-Net "d-t-net.de") + (Darkfire "darkfire.net") + (DarkMyst "darkmyst.org") + (Darkserv "darkserv.net") + (Darksystem "darksystem.com") + (Darktree "darktree.net") + (DayNet "daynet.org") + (Deepspace "deepspace.org") + (Different "different.net") + (Digarix "digarix.net") + (Digatech "digatech.net") + (Digital-Base "digital-base.net") + (Digitalirc "digitalirc.net") + (Discussioni "discussioni.org") + (DorukNet "doruk.net.tr") + (DWChat "dwchat.net") + (Dynastynet "dynastynet.net") + (EFnet nil) + (EgyptianIRC "egyptianirc.net") + (Eircnet "eircnet.org") + (Eleethal "eleethal.com") + (EntertheGame "enterthegame.com") + (EpiKnet "epiknet.org") + (EsperNet "esper.net") + (Esprit "esprit.net") + (euIRC "euirc.net") + (Evilzinc "evilzinc.net") + (ExodusIRC "exodusirc.net") + (FDFnet "fdfnet.net") + (FEFnet "fef.net") + (Financialchat "financialchat.com") + (Forestnet "forestnet.org") + (ForeverChat "foreverchat.net") + (Fraggers "fraggers.co.uk") + (FreedomChat "freedomchat.net") + (FreedomIRC "freedomirc.net") + (freenode "freenode.net") + (FunNet "funnet.org") + (GalaxyNet "galaxynet.org") + (Gamesnet "gamesnet.net") + (GammaForce "gammaforce.org") + (GIKInet "giki.edu.pk") + (GizNet "giznet.org") + (Globalchat "globalchat.org") + (GlobIRC "globirc.net") + (Goldchat "goldchat.nl") + (Goodchatting "goodchatting.com") + (GravityLords "gravitylords.net") + (GRnet "irc.gr") + (GulfChat "gulfchat.net") + (HabberNet "habber.net") + (HanIRC "hanirc.org") + (Hellenicnet "mirc.gr") + (IceNet "icenet.org.za") + (ICQnet "icq.com") + (iip "anon.iip") + (Infatech "infatech.net") + (Infinity "infinity-irc.org") + (Infomatrix "infomatrix.net") + (Inside3D "inside3d.net") + (InterlinkChat "interlinkchat.net") + (IRC-Chile "irc.cl") + (IRC-Hispano "irc-hispano.org") + (IRCchat "ircchat.tk") + (IRCGate "ircgate.net") + (IRCGeeks "ircgeeks.org") + (IRChat "irchat.net") + (IrcLordz "irclordz.com") + (IrcMalta "ircmalta.org") + (IRCnet nil) + (IRCSoulZ "ircsoulz.net") + (IRCSul "wnet.com.br") + (IrcTalk "irctalk.net") + (Irctoo "irctoo.net") + (IRCtown "irc.irctown.net") + (IRCworld "ircworld.org") + (ircXtreme "ircXtreme.net") + (Israelnet "israel.net") + (K0wNet "k0w.net") + (KDFSnet "kdfs.net") + (Kemik "kemik.net") + (Kewl\.Org "kewl.org") + (Kickchat "kickchat.com") + (KidsWorld "kidsworld.org") + (Knightnet "knightnet.net") + (Konfido\.Net "konfido.net") + (Kreynet "krey.net") + (Krono "krono.net") + (Krushnet "krushnet.org") + (LagNet "lagnet.org.za") + (Librenet "librenet.net") + (LinkNet "link-net.org") + (Liquidized "liquidized.net") + (M-IRC "m-sys.org") + (MagicStar "magicstar.net") + (Mavra "mavra.net") + (MediaDriven "mediadriven.com") + (mIRC-X "mircx.com") + (Morat "morat.net") + (MusicCity "musiccity.com") + (Mysteria "mysteria.net") + (Mysterychat "mysterychat.net") + (Mystical "mystical.net") + (Narancs "narancs.com") + (Net-France "net-france.com") + (Nevernet "nevernet.net") + (Newnet "newnet.net") + (Nexusirc "nexusirc.org") + (NightStar "nightstar.net") + (NitrousNet "nitrousnet.net") + (Novernet "novernet.com") + (Nullrouted "nullrouted.org") + (NullusNet "nullus.net") + (OpChat "opchat.org") + (Openprojects "openprojects.net") + (Othernet "othernet.org") + (OtherSide "othersideirc.net") + (Outsiderz "outsiderz.com") + (OzOrg "oz.org") + (Peacefulhaven "peacefulhaven.net") + (PhazedIRC "phazedirc.net") + (Philchat "philchat.net") + (phrozN "phrozn.net") + (PiNet "praetorians.org") + (Pinoycentral "abs-cbn.com") + (Planetarion "planetarion.com") + (POLNet "ircnet.pl") + (Psionics "psionics.net") + (PTirc "ptirc.com.pt") + (PTlink "ptlink.net") + (PTnet "ptnet.org") + (QChat "qchat.net") + (QuakeNet "quakenet.org") + (Realirc "realirc.org") + (RealmNET "realmnet.com") + (Rebelchat "rebelchat.org") + (Red-Latina "red-latina.org") + (RedLatona "redlatona.net") + (Relicnet "relic.net") + (Rezosup "rezosup.org") + (Risanet "risanet.com") + (Rubiks "rubiks.net") + (Rusnet "nil") + (Sandnet "sandnet.net") + (Scunc "scunc.net") + (SerbianCafe "serbiancafe.ws") + (SexNet "sexnet.org") + (ShadowFire "shadowfire.org") + (ShadowWorld "shadowworld.net") + (SkyNet "bronowski.pl") + (SlashNET "slashnet.org") + (SolarStone "solarstone.net") + (Sorcery "sorcery.net") + (SourceIRC "sourceirc.net") + (SpaceTronix "spacetronix.net") + (Spirit-Harmony "spirit-harmony.com") + (StarChat "starchat.net") + (StarEquinox "starequinox.net") + (Starlink "starlink.net") + (starlink-irc "starlink-irc.org") + (StarWars-IRC "starwars-irc.net") + (Stormdancing "stormdancing.net") + (Superchat "superchat.org") + (Sysopnet "sysopnet.org") + (Telstra "telstra.com") + (TR-net "dominet.com.tr") + (Tri-net "tri-net.org") + (TriLink "ft4u.net") + (TurkishChat "turkishchat.org") + (UberNinja "uberninja.net") + (UICN "uicn.net") + (UltraIRC "ultrairc.net") + (UnderChat "underchat.it") + (Undernet "undernet.org") + (UnderZ "underz.org") + (UniChat "irc.uni-chat.net") + (UnionLatina "unionlatina.org") + (Univers "univers.org") + (UnixR "unixr.net") + (Vidgamechat "vidgamechat.com") + (VirtuaNet "virtuanet.org") + (Vitamina "vitamina.ca") + (Voila "voila.fr") + (Wahou "wf-net.org") + (Warpednet "warped.net") + (Weaklinks "weaklinks.net") + (Webnet "webchat.org") + (WinChat "winchat.net") + (WinIRC "winirc.org") + (WorldIRC "worldirc.org") + (WyldRyde "wyldryde.net") + (XentoniX "xentonix.net") + (Xevion "xevion.net") + (XNet "xnet.org") + (XWorld "xworld.org") + (ZAnetNet "zanet.net") + (ZAnetOrg "zanet.org.za") + (ZiRC "zirc.org") + (ZUHnet "zuh.net") + (Zurna "zurna.net")) + "Alist of IRC networks. (NET MATCHER) where +NET is a symbol naming that IRC network and +MATCHER is used to find a corresponding network to a server while connected to + it. If it is regexp, it's used to match against `erc-server-announced-name'. + It can also be a function (predicate). Then it is executed with the + server buffer as current-buffer." + :group 'erc-networks + :type '(repeat + (list :tag "Network" + (symbol :tag "Network name") + (choice :tag "Network's common server ending" + (regexp) + (const :tag "Network has no common server ending" nil))))) + +(defvar erc-network nil + "The name of the network you are connected to (a symbol).") +(make-variable-buffer-local 'erc-network) + +;; Functions: + +;;;###autoload +(defun erc-determine-network () + "Return the name of the network or \"Unknown\" as a symbol. Use the +server parameter NETWORK if provided, otherwise parse the server name and +search for a match in `erc-networks-alist'." + ;; The server made it easy for us and told us the name of the NETWORK + (if (assoc "NETWORK" erc-server-parameters) + (intern (cdr (assoc "NETWORK" erc-server-parameters))) + (or + ;; Loop through `erc-networks-alist' looking for a match. + (let ((server (or erc-server-announced-name erc-session-server))) + (loop for (name matcher) in erc-networks-alist + when (and matcher + (string-match (concat matcher "\\'") server)) + do (return name))) + 'Unknown))) + +(defun erc-network () + "Return the value of `erc-network' for the current server." + (with-current-buffer (erc-server-buffer) erc-network)) + +(defun erc-current-network () + "Deprecated. Use `erc-network' instead. Return the name of this server's +network as a symbol." + (with-current-buffer (erc-server-buffer) + (intern (downcase (symbol-name erc-network))))) + +(erc-make-obsolete 'erc-current-network 'erc-network + "Obsolete since erc-nets 1.5") + +(defun erc-network-name () + "Returns the name of the current network as a string." + (with-current-buffer (erc-server-buffer) (symbol-name erc-network))) + +(defun erc-set-network-name (proc parsed) + "Set `erc-network' to the value returned by `erc-determine-network'." + (unless erc-server-connected + (setq erc-network (erc-determine-network))) + nil) + +(defun erc-unset-network-name (nick ip reason) + "Set `erc-network' to nil." + (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) + +(defun erc-ports-list (ports) + "Return a list of PORTS. + +PORTS should be a list of either: + A number, in which case it is returned a list. + Or a pair of the form (LOW HIGH), in which case, a list of all the + numbers between LOW and HIGH (inclusive) is returned. + +As an example: + (erc-ports-list '(1)) => (1) + (erc-ports-list '((1 5))) => (1 2 3 4 5) + (erc-ports-list '(1 (3 5))) => (1 3 4 5)" + (let (result) + (dolist (p ports) + (cond ((numberp p) + (push p result)) + ((listp p) + (setq result (nconc (loop for i from (cadr p) downto (car p) + collect i) + result))))) + (nreverse result))) + +;;;###autoload +(defun erc-server-select () + "Interactively select a server to connect to using `erc-server-alist'." + (interactive) + (let* ((completion-ignore-case t) + (net (intern + (completing-read "Network: " + (erc-delete-dups + (mapcar (lambda (x) + (list (symbol-name (nth 1 x)))) + erc-server-alist))))) + (srv (assoc + (completing-read "Server: " + (delq nil + (mapcar (lambda (x) + (when (equal (nth 1 x) net) + x)) + erc-server-alist))) + erc-server-alist)) + (host (nth 2 srv)) + (ports (if (listp (nth 3 srv)) + (erc-ports-list (nth 3 srv)) + (list (nth 3 srv)))) + (port (nth (random (length ports)) ports))) + (erc host port erc-nick erc-user-full-name t))) + +;;; The following experimental +;; It does not work yet, help me with it if you +;; think it is worth the effort. + +(defvar erc-settings + '((pals freenode ("kensanata" "shapr" "anti\\(fuchs\\|gone\\)")) + (format-nick-function (freenode "#emacs") erc-format-@nick)) + "Experimental: Alist of configuration options. +The format is (VARNAME SCOPE VALUE) where +VARNAME is a symbol identifying the configuration option, +SCOPE is either a symbol which identifies an entry from + `erc-networks-alist' or a list (NET TARGET) where NET is a network symbol and + TARGET is a string identifying the channel/query target. +VALUE is the options value.") + +(defun erc-get (var &optional net target) + (let ((items erc-settings) + elt val) + (while items + (setq elt (car items) + items (cdr items)) + (when (eq (car elt) var) + (cond ((and net target (listp (nth 1 elt)) + (eq net (car (nth 1 elt))) + (string-equal target (nth 1 (nth 1 elt)))) + (setq val (nth 2 elt) + items nil)) + ((and net (eq net (nth 1 elt))) + (setq val (nth 2 elt) + items nil)) + ((and (not net) (not target) (not (nth 1 elt))) + (setq val (nth 2 elt) + items nil))))) + val)) + +(erc-get 'pals 'freenode) + + +(provide 'erc-nets) + +;;; erc-nets.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 68cccabd-f66b-456c-9abe-5f993a2dc91c diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-netsplit.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-netsplit.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,212 @@ +;;; erc-netsplit.el --- Reduce JOIN/QUIT messages on netsplits + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This module hides quit/join messages if a netsplit occurs. +;; To enable, add the following to your ~/.emacs: +;; (require 'erc-netsplit) +;; (erc-netsplit-mode 1) + +;;; Code: + +(require 'erc) +(eval-when-compile (require 'cl)) + +(defgroup erc-netsplit nil + "Netsplit detection tries to automatically figure when a +netsplit happens, and filters the QUIT messages. It also keeps +track of netsplits, so that it can filter the JOIN messages on a netjoin too." + :group 'erc) + +;;;###autoload (autoload 'erc-netsplit-mode "erc-netsplit") +(define-erc-module netsplit nil + "This mode hides quit/join messages if a netsplit occurs." + ((erc-netsplit-install-message-catalogs) + (add-hook 'erc-server-JOIN-functions 'erc-netsplit-JOIN) + (add-hook 'erc-server-MODE-functions 'erc-netsplit-MODE) + (add-hook 'erc-server-QUIT-functions 'erc-netsplit-QUIT) + (add-hook 'erc-timer-hook 'erc-netsplit-timer)) + ((remove-hook 'erc-server-JOIN-functions 'erc-netsplit-JOIN) + (remove-hook 'erc-server-MODE-functions 'erc-netsplit-MODE) + (remove-hook 'erc-server-QUIT-functions 'erc-netsplit-QUIT) + (remove-hook 'erc-timer-hook 'erc-netsplit-timer))) + +(defcustom erc-netsplit-show-server-mode-changes-flag nil + "Set to t to enable display of server mode changes." + :group 'erc-netsplit + :type 'boolean) + +(defcustom erc-netsplit-debug nil + "If non-nil, debug messages will be shown in the +sever buffer." + :group 'erc-netsplit + :type 'boolean) + +(defcustom erc-netsplit-regexp "^[^ @!\"]+\\.[^ @!]+ [^ @!]+\\.[^ @!\"]+$" + "This regular expression should match quit reasons produced +by netsplits." + :group 'erc-netsplit + :type 'regexp) + +(defcustom erc-netsplit-hook nil + "Run whenever a netsplit is detected the first time. +Args: PROC is the process the netsplit originated from and + SPLIT is the netsplit (e.g. \"server.name.1 server.name.2\")." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-netjoin-hook nil + "Run whenever a netjoin is detected the first time. +Args: PROC is the process the netjoin originated from and + SPLIT is the netsplit (e.g. \"server.name.1 server.name.2\")." + :group 'erc-hooks + :type 'hook) + +(defvar erc-netsplit-list nil + "This is a list of the form +\((\"a.b.c.d e.f.g\" TIMESTAMP FIRST-JOIN \"nick1\" ... \"nickn\") ...) +where FIRST-JOIN is t or nil, depending on whether or not the first +join from that split has been detected or not.") +(make-variable-buffer-local 'erc-netsplit-list) + +(defun erc-netsplit-install-message-catalogs () + (erc-define-catalog + 'english + '((netsplit . "netsplit: %s") + (netjoin . "netjoin: %s, %N were split") + (netjoin-done . "netjoin: All lost souls are back!") + (netsplit-none . "No netsplits in progress") + (netsplit-wholeft . "split: %s missing: %n %t")))) + +(defun erc-netsplit-JOIN (proc parsed) + "Show/don't show rejoins." + (let ((nick (erc-response.sender parsed)) + (no-next-hook nil)) + (dolist (elt erc-netsplit-list) + (if (member nick (nthcdr 3 elt)) + (progn + (if (not (caddr elt)) + (progn + (erc-display-message + parsed 'notice (process-buffer proc) + 'netjoin ?s (car elt) ?N (length (nthcdr 3 elt))) + (setcar (nthcdr 2 elt) t) + (run-hook-with-args 'erc-netjoin-hook proc (car elt)))) + ;; need to remove this nick, perhaps the whole entry here. + ;; Note that by removing the nick now, we can't tell if further + ;; join messages (for other channels) should also be + ;; suppressed. + (if (null (nthcdr 4 elt)) + (progn + (erc-display-message + parsed 'notice (process-buffer proc) + 'netjoin-done ?s (car elt)) + (setq erc-netsplit-list (delq elt erc-netsplit-list))) + (delete nick elt)) + (setq no-next-hook t)))) + no-next-hook)) + +(defun erc-netsplit-MODE (proc parsed) + "Hide mode changes from servers." + ;; regexp matches things with a . in them, and no ! or @ in them. + (when (string-match "^[^@!]+\\.[^@!]+$" (erc-response.sender parsed)) + (and erc-netsplit-debug + (erc-display-message + parsed 'notice (process-buffer proc) + "[debug] server mode change.")) + (not erc-netsplit-show-server-mode-changes-flag))) + +(defun erc-netsplit-QUIT (proc parsed) + "Detect netsplits." + (let ((split (erc-response.contents parsed)) + (nick (erc-response.sender parsed)) + ass) + (when (string-match erc-netsplit-regexp split) + (setq ass (assoc split erc-netsplit-list)) + (if ass + ;; element for this netsplit exists already + (progn + (setcdr (nthcdr 2 ass) (cons nick (nthcdr 3 ass))) + (when (caddr ass) + ;; There was already a netjoin for this netsplit, it + ;; seems like the old one didn't get finished... + (erc-display-message + parsed 'notice (process-buffer proc) + 'netsplit ?s split) + (setcar (nthcdr 2 ass) t) + (run-hook-with-args 'erc-netsplit-hook proc split))) + ;; element for this netsplit does not yet exist + (setq erc-netsplit-list + (cons (list split + (erc-current-time) + nil + nick) + erc-netsplit-list)) + (erc-display-message + parsed 'notice (process-buffer proc) + 'netsplit ?s split) + (run-hook-with-args 'erc-netsplit-hook proc split)) + t))) + +(defun erc-netsplit-timer (now) + "Clean cruft from `erc-netsplit-list' older than 10 minutes." + (dolist (elt erc-netsplit-list) + (when (> (erc-time-diff (cadr elt) now) 600) + (when erc-netsplit-debug + (erc-display-message + nil 'notice (current-buffer) + (concat "Netsplit: Removing " (car elt)))) + (setq erc-netsplit-list (delq elt erc-netsplit-list))))) + +;;;###autoload +(defun erc-cmd-WHOLEFT () + "Show who's gone." + (with-current-buffer (erc-server-buffer) + (if (null erc-netsplit-list) + (erc-display-message + nil 'notice 'active + 'netsplit-none) + (dolist (elt erc-netsplit-list) + (erc-display-message + nil 'notice 'active + 'netsplit-wholeft ?s (car elt) + ?n (mapconcat 'erc-extract-nick (nthcdr 3 elt) " ") + ?t (if (caddr elt) + "(joining)" + ""))))) + t) + +(defalias 'erc-cmd-WL 'erc-cmd-WHOLEFT) + +(provide 'erc-netsplit) + +;;; erc-netsplit.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 61a85cb0-7e7b-4312-a4f6-313c7a25a6e8 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-nicklist.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-nicklist.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,411 @@ +;;; erc-nicklist.el --- Display channel nicknames in a side buffer. + +;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc. + +;; Filename: erc-nicklist.el +;; Author: Lawrence Mitchell +;; Created: 2004-04-30 +;; Keywords: IRC chat client Internet + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: +;; +;; This provides a minimal mIRC style nicklist buffer for ERC. To +;; activate, do M-x erc-nicklist RET in the channel buffer you want +;; the nicklist to appear for. To close and quit the nicklist +;; buffer, do M-x erc-nicklist-quit RET. +;; +;; TODO: +;; o Somehow associate nicklist windows with channel windows so they +;; appear together, and if one gets buried, then the other does. +;; +;; o Make "Query" and "Message" work. +;; +;; o Prettify the actual list of nicks in some way. +;; +;; o Add a proper erc-module that people can turn on and off, figure +;; out a way of creating the nicklist window at an appropriate time +;; --- probably in `erc-join-hook'. +;; +;; o Ensure XEmacs compatibility --- the mouse-menu support is likely +;; broken. +;; +;; o Add option to display in a separate frame --- will again need to +;; be able to associate the nicklist with the currently active +;; channel buffer or something similar. +;; +;; o Allow toggling of visibility of nicklist via ERC commands. + +;;; History: +;; + +;; Changes by Edgar Gonçalves +;; Jun 25 2005: +;; - images are changed to a standard set of names. +;; - /images now contain gaim's status icons. +;; May 31 2005: +;; - tooltips are improved. they try to access bbdb for a nice nick! +;; Apr 26 2005: +;; - erc-nicklist-channel-users-info was fixed (sorting bug) +;; - Away names don't need parenthesis when using icons +;; Apr 26 2005: +;; - nicks can display icons of their connection type (msn, icq, for now) +;; Mar 15 2005: +;; - nicks now are different for unvoiced and op users +;; - nicks now have tooltips displaying more info +;; Mar 18 2005: +;; - queries now work ok, both on menu and keyb shortcut RET. +;; - nicklist is now sorted ignoring the case. Voiced nicks will +;; appear according to `erc-nicklist-voiced-position'. + +;;; Code: + +(require 'erc) +(condition-case nil + (require 'erc-bbdb) + (error nil)) +(eval-when-compile (require 'cl)) + +(defgroup erc-nicklist nil + "Display a list of nicknames in a separate window." + :group 'erc) + +(defcustom erc-nicklist-use-icons t + "*If non-nil, display an icon instead of the name of the chat medium. +By \"chat medium\", we mean IRC, AOL, MSN, ICQ, etc." + :group 'erc-nicklist + :type 'boolean) + +(defcustom erc-nicklist-icons-directory + (concat default-directory "images/") + "*Directory of the PNG files for chat icons. +Icons are displayed if `erc-nicklist-use-icons' is non-nil." + :group 'erc-nicklist + :type 'string) + +(defcustom erc-nicklist-voiced-position 'bottom + "*Position of voiced nicks in the nicklist. +The value can be `top', `bottom' or nil (don't sort)." + :group 'erc-nicklist + :type '(choice + (const :tag "Top" 'top) + (const :tag "Bottom" 'bottom) + (const :tag "Mixed" nil))) + +(defcustom erc-nicklist-window-size 20.0 + "*The size of the nicklist window. + +This specifies a percentage of the channel window width. + +A negative value means the nicklist window appears on the left of the +channel window, and vice versa." + :group 'erc-nicklist + :type 'float) + + +(defun erc-nicklist-buffer-name (&optional buffer) + "Return the buffer name for a nicklist associated with BUFFER. + +If BUFFER is nil, use the value of `current-buffer'." + (format " *%s-nicklist*" (buffer-name (or buffer (current-buffer))))) + +(defun erc-nicklist-make-window () + "Create an ERC nicklist window. + +See also `erc-nicklist-window-size'." + (let ((width (floor (* (window-width) (/ erc-nicklist-window-size 100.0)))) + (buffer (erc-nicklist-buffer-name)) + window) + (split-window-horizontally (- width)) + (setq window (next-window)) + (set-window-buffer window (get-buffer-create buffer)) + (with-current-buffer buffer + (set-window-dedicated-p window t)))) + + +(defvar erc-nicklist-images-alist '() + "Alist that maps a connection type to an icon.") + +(defun erc-nicklist-insert-medium-name-or-icon (host channel is-away) + "Inserts an icon or a string identifying the current host type. +This is configured using `erc-nicklist-use-icons' and +`erc-nicklist-icons-directory'." + ;; identify the network (for bitlebee usage): + (let ((bitlbee-p (save-match-data + (string-match "\\`&bitlbee\\b" + (buffer-name channel))))) + (cond ((and bitlbee-p + (string= "login.icq.com" host)) + (if erc-nicklist-use-icons + (if is-away + (insert-image (cdr (assoc 'icq-away + erc-nicklist-images-alist))) + (insert-image (cdr (assoc 'icq + erc-nicklist-images-alist)))) + (insert "ICQ"))) + (bitlbee-p + (if erc-nicklist-use-icons + (if is-away + (insert-image (cdr (assoc 'msn-away + erc-nicklist-images-alist))) + (insert-image (cdr (assoc 'msn + erc-nicklist-images-alist)))) + (insert "MSN"))) + (t + (if erc-nicklist-use-icons + (if is-away + (insert-image (cdr (assoc 'irc-away + erc-nicklist-images-alist))) + (insert-image (cdr (assoc 'irc + erc-nicklist-images-alist)))) + (insert "IRC")))) + (insert " "))) + +(defun erc-nicklist-search-for-nick (finger-host) + "Return the bitlbee-nick field for this contact given FINGER-HOST. +Seach for the BBDB record of this contact. If not found, return nil." + (when (boundp 'erc-bbdb-bitlbee-name-field) + (let ((record (car + (erc-member-if + #'(lambda (r) + (let ((fingers (bbdb-record-finger-host r))) + (when fingers + (string-match finger-host + (car (bbdb-record-finger-host r)))))) + (bbdb-records))))) + (when record + (bbdb-get-field record erc-bbdb-bitlbee-name-field))))) + +(defun erc-nicklist-insert-contents (channel) + "Insert the nicklist contents, with text properties and the optional images." + (setq buffer-read-only nil) + (erase-buffer) + (dolist (u (erc-nicklist-channel-users-info channel)) + (let* ((server-user (car u)) + (channel-user (cdr u)) + (nick (erc-server-user-nickname server-user)) + (host (erc-server-user-host server-user)) + (login (erc-server-user-login server-user)) + (full-name(erc-server-user-full-name server-user)) + (info (erc-server-user-info server-user)) + (channels (erc-server-user-buffers server-user)) + (op (erc-channel-user-op channel-user)) + (voice (erc-channel-user-voice channel-user)) + (bbdb-nick (erc-nicklist-search-for-nick (concat login "@" host))) + (away-status (if voice "" "\n(Away)")) + (balloon-text (concat bbdb-nick (if (string= "" bbdb-nick) + "" "\n") + "Login: " login "@" host + away-status))) + (erc-nicklist-insert-medium-name-or-icon host channel (not voice)) + (unless (or voice erc-nicklist-use-icons) + (setq nick (concat "(" nick ")"))) + (when op + (setq nick (concat nick " (OP)"))) + (insert (erc-propertize nick + 'erc-nicklist-nick nick + 'mouse-face 'highlight + 'erc-nicklist-channel channel + 'help-echo balloon-text) + "\n"))) + (erc-nicklist-mode)) + + +(defun erc-nicklist () + "Create an ERC nicklist buffer." + (interactive) + (let ((channel (current-buffer))) + (unless (or (not erc-nicklist-use-icons) + erc-nicklist-images-alist) + (setq erc-nicklist-images-alist + `((msn . ,(create-image (concat erc-nicklist-icons-directory + "msn-online.png"))) + (msn-away . ,(create-image (concat erc-nicklist-icons-directory + "msn-offline.png"))) + (irc . ,(create-image (concat erc-nicklist-icons-directory + "irc-online.png"))) + (irc-away . ,(create-image (concat erc-nicklist-icons-directory + "irc-offline.png"))) + (icq . ,(create-image (concat erc-nicklist-icons-directory + "icq-online.png"))) + (icq-away . ,(create-image (concat erc-nicklist-icons-directory + "icq-offline.png")))))) + (erc-nicklist-make-window) + (with-current-buffer (get-buffer (erc-nicklist-buffer-name channel)) + (erc-nicklist-insert-contents channel))) + (add-hook 'erc-channel-members-changed-hook #'erc-nicklist-update)) + +(defun erc-nicklist-update () + "Update the ERC nicklist buffer." + (let ((b (get-buffer (erc-nicklist-buffer-name))) + (channel (current-buffer))) + (when b + (with-current-buffer b + (erc-nicklist-insert-contents channel))))) + +(defvar erc-nicklist-mode-map + (let ((map (make-sparse-keymap))) + (define-key map (kbd "") 'erc-nicklist-menu) + (define-key map "\C-j" 'erc-nicklist-kbd-menu) + (define-key map "q" 'erc-nicklist-quit) + (define-key map (kbd "RET") 'erc-nicklist-kbd-cmd-QUERY) + map) + "Keymap for `erc-nicklist-mode'.") + +(define-derived-mode erc-nicklist-mode fundamental-mode + "Nicklist" + "Major mode for the ERC nicklist buffer." + (setq buffer-read-only t)) + +(defun erc-nicklist-call-erc-command (command point buffer window) + "Call an ERC COMMAND. + +Depending on what COMMAND is, it's called with one of POINT, BUFFER, +or WINDOW as arguments." + (when command + (let* ((p (text-properties-at point)) + (b (plist-get p 'erc-nicklist-channel))) + (if (memq command '(erc-nicklist-quit ignore)) + (funcall command window) + ;; EEEK! Horrble, but it's the only way we can ensure the + ;; response goes to the correct buffer. + (erc-set-active-buffer b) + (switch-to-buffer-other-window b) + (funcall command (plist-get p 'erc-nicklist-nick)))))) + +(defun erc-nicklist-cmd-QUERY (user &optional server) + "Opens a query buffer with USER." + ;; FIXME: find a way to switch to that buffer afterwards... + (let ((send (if server + (format "QUERY %s %s" user server) + (format "QUERY %s" user)))) + (erc-cmd-QUERY user) + t)) + +(defun erc-nicklist-kbd-cmd-QUERY (&optional window) + (interactive) + (let* ((p (text-properties-at (point))) + (server (plist-get p 'erc-nicklist-channel)) + (nick (plist-get p 'erc-nicklist-nick)) + (nick (or (and (string-match "(\\(.*\\))" nick) + (match-string 1 nick)) + nick)) + (nick (or (and (string-match "\\+\\(.*\\)" nick) + (match-string 1 nick)) + nick)) + (send (format "QUERY %s %s" nick server))) + (switch-to-buffer-other-window server) + (erc-cmd-QUERY nick))) + + +(defvar erc-nicklist-menu + (let ((map (make-sparse-keymap "Action"))) + (define-key map [erc-cmd-WHOIS] + '("Whois" . erc-cmd-WHOIS)) + (define-key map [erc-cmd-DEOP] + '("Deop" . erc-cmd-DEOP)) + (define-key map [erc-cmd-MSG] + '("Message" . erc-cmd-MSG)) ;; TODO! + (define-key map [erc-nicklist-cmd-QUERY] + '("Query" . erc-nicklist-kbd-cmd-QUERY)) + (define-key map [ignore] + '("Cancel" . ignore)) + (define-key map [erc-nicklist-quit] + '("Close nicklist" . erc-nicklist-quit)) + map) + "Menu keymap for the ERC nicklist.") + +(defun erc-nicklist-quit (&optional window) + "Delete the ERC nicklist. + +Deletes WINDOW and stops updating the nicklist buffer." + (interactive) + (let ((b (window-buffer window))) + (with-current-buffer b + (set-buffer-modified-p nil) + (kill-this-buffer) + (remove-hook 'erc-channel-members-changed-hook 'erc-nicklist-update)))) + + +(defun erc-nicklist-kbd-menu () + "Show the ERC nicklist menu." + (interactive) + (let* ((point (point)) + (window (selected-window)) + (buffer (current-buffer))) + (with-current-buffer buffer + (erc-nicklist-call-erc-command + (car (x-popup-menu point + erc-nicklist-menu)) + point + buffer + window)))) + +(defun erc-nicklist-menu (&optional arg) + "Show the ERC nicklist menu. + +ARG is a parametrized event (see `interactive')." + (interactive "e") + (let* ((point (nth 1 (cadr arg))) + (window (car (cadr arg))) + (buffer (window-buffer window))) + (with-current-buffer buffer + (erc-nicklist-call-erc-command + (car (x-popup-menu arg + erc-nicklist-menu)) + point + buffer + window)))) + + +(defun erc-nicklist-channel-users-info (channel) + "Return a nick-sorted list of all users on CHANNEL. +Result are elements in the form (SERVER-USER . CHANNEL-USER). The +list has all the voiced users according to +`erc-nicklist-voiced-position'." + (let* ((nicks (erc-sort-channel-users-alphabetically + (with-current-buffer channel (erc-get-channel-user-list))))) + (if erc-nicklist-voiced-position + (let ((voiced-nicks (erc-remove-if-not + #'(lambda (x) + (null (erc-channel-user-voice (cdr x)))) + nicks)) + (devoiced-nicks (erc-remove-if-not + #'(lambda (x) + (erc-channel-user-voice + (cdr x))) + nicks))) + (cond ((eq erc-nicklist-voiced-position 'top) + (append devoiced-nicks voiced-nicks)) + ((eq erc-nicklist-voiced-position 'bottom) + (append voiced-nicks devoiced-nicks)))) + nicks))) + + + +(provide 'erc-nicklist) + +;;; erc-nicklist.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: db37a256-87a7-4544-bd90-e5f16c9f5ca5 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-nickserv.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-nickserv.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,337 @@ +;;; erc-nickserv.el --- Identify to NickServ + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; There are two ways to go about identifying yourself automatically to +;; NickServ with this module. The more secure way is to listen for identify +;; requests from the user NickServ. Another way is to identify yourself to +;; NickServ directly after a successful connection and every time you change +;; your nickname. This method is rather insecure, though, because no checks +;; are made to test if NickServ is the real NickServ for a given network or +;; server. + +;; As a default, ERC has the data for the official nickname services on the +;; networks Austnet, BrasNET, Dalnet, freenode, GalaxyNet, and Slashnet. +;; You can add more by using M-x customize-variable RET erc-nickserv-alist. + +;; Usage: +;; +;; Put into your .emacs: +;; +;; (require 'erc-nickserv) +;; (erc-services-mode 1) +;; +;; Add your nickname and NickServ password to `erc-nickserv-passwords'. +;; Using the freenode network as an example: +;; +;; (setq erc-nickserv-passwords '((freenode (("nickname" "password"))))) +;; +;; The default automatic identification mode is autodetection of NickServ +;; identify requests. Set the variable `erc-nickserv-identify-mode' if +;; you'd like to change this behavior. You can also change the way +;; automatic identification is handled by using: +;; +;; M-x erc-nickserv-identify-mode +;; +;; If you'd rather not identify yourself automatically but would like access +;; to the functions contained in this file, just load this file without +;; enabling `erc-services-mode'. +;; + +;;; Code: + +(require 'erc) +(require 'erc-nets) +(eval-when-compile (require 'cl)) + +;; Customization: + +(defgroup erc-services nil + "Configuration for IRC services. + +On some networks, there exists a special type of automated irc bot, +called Services. Those usually allow you to register your nickname, +post/read memos to other registered users who are currently offline, +and do various other things. + +This group allows you to set variables to somewhat automate +communication with those Services." + :group 'erc) + +;;;###autoload (autoload 'erc-services-mode "erc-nickserv" nil t) +(define-erc-module services nickserv + "This mode automates communication with services." + ((erc-nickserv-identify-mode erc-nickserv-identify-mode)) + ((remove-hook 'erc-server-NOTICE-functions + 'erc-nickserv-identify-autodetect) + (remove-hook 'erc-after-connect + 'erc-nickserv-identify-on-connect) + (remove-hook 'erc-nick-changed-functions + 'erc-nickserv-identify-on-nick-change))) + +;;;###autoload +(defun erc-nickserv-identify-mode (mode) + "Set up hooks according to which MODE the user has chosen." + (interactive + (list (intern (completing-read + "Choose Nickserv identify mode (RET to disable): " + '(("autodetect") ("nick-change")) nil t)))) + (cond ((eq mode 'autodetect) + (setq erc-nickserv-identify-mode 'autodetect) + (add-hook 'erc-server-NOTICE-functions + 'erc-nickserv-identify-autodetect) + (remove-hook 'erc-nick-changed-functions + 'erc-nickserv-identify-on-nick-change) + (remove-hook 'erc-after-connect + 'erc-nickserv-identify-on-connect)) + ((eq mode 'nick-change) + (setq erc-nickserv-identify-mode 'nick-change) + (add-hook 'erc-after-connect + 'erc-nickserv-identify-on-connect) + (add-hook 'erc-nick-changed-functions + 'erc-nickserv-identify-on-nick-change) + (remove-hook 'erc-server-NOTICE-functions + 'erc-nickserv-identify-autodetect)) + (t + (setq erc-nickserv-identify-mode nil) + (remove-hook 'erc-server-NOTICE-functions + 'erc-nickserv-identify-autodetect) + (remove-hook 'erc-after-connect + 'erc-nickserv-identify-on-connect) + (remove-hook 'erc-nick-changed-functions + 'erc-nickserv-identify-on-nick-change)))) + +(defcustom erc-nickserv-identify-mode 'autodetect + "The mode which is used when identifying to Nickserv. + +Possible settings are:. + +'autodetect - Identify when the real Nickserv sends an identify request. +'nick-change - Identify when you change your nickname. +nil - Disables automatic Nickserv identification. + +You can also use M-x erc-nickserv-identify-mode to change modes." + :group 'erc-services + :type '(choice (const autodetect) + (const nick-change) + (const nil)) + :set (lambda (sym val) + (set-default sym val) + (erc-nickserv-identify-mode val))) + +(defcustom erc-prompt-for-nickserv-password t + "Ask for the password when identifying to NickServ." + :group 'erc-services + :type 'boolean) + +(defcustom erc-nickserv-passwords nil + "Passwords used when identifying to NickServ automatically. + +Example of use: + (setq erc-nickserv-passwords + '((freenode ((\"nick-one\" . \"password\") + (\"nick-two\" . \"password\"))) + (DALnet ((\"nick\" . \"password\")))))" + :group 'erc-services + :type '(repeat + (list :tag "Network" + (choice :tag "Network name" + (const freenode) + (const DALnet) + (const GalaxyNet) + (const SlashNET) + (const BRASnet) + (const iip) + (const Austnet) + (symbol :tag "Network name")) + (repeat :tag "Nickname and password" + (cons :tag "Identity" + (string :tag "Nick") + (string :tag "Password")))))) + +;; Variables: + +(defcustom erc-nickserv-alist + '((DALnet + "NickServ!service@dal.net" + "/msg\\s-NickServ@services.dal.net\\s-IDENTIFY\\s-" + "NickServ@services.dal.net" + "IDENTIFY" + nil) + (freenode + "NickServ!NickServ@services." + "/msg\\s-NickServ\\s-IDENTIFY\\s-" + "NickServ" + "IDENTIFY" + nil) + (GalaxyNet + "NS!nickserv@galaxynet.org" + "Please\\s-change\\s-nicks\\s-or\\s-authenticate." + "NS@services.galaxynet.org" + "AUTH" + t) + (SlashNET + "NickServ!services@services.slashnet.org" + "/msg\\s-NickServ\\s-IDENTIFY\\s-password" + "NickServ@services.slashnet.org" + "IDENTIFY" + nil) + (iip + "Trent@anon.iip" + "type\\s-/squery\\s-Trent\\s-identify\\s-" + "Trent@anon.iip" + "IDENTIFY" + nil + "SQUERY") + (BRASnet + "NickServ!services@brasnet.org" + "/NickServ\\s-IDENTIFY\\s-senha" + "NickServ" + "IDENTIFY" + nil + "") + (Austnet + "NickOP!service@austnet.org" + "/msg\\s-NickOP@austnet.org\\s-identify\\s-" + "nickop@austnet.org" + "identify" + nil) + (Azzurra + "NickServ!service@azzurra.org" + "/ns\\s-IDENTIFY\\s-password" + "NickServ" + "IDENTIFY" + nil) + (OFTC + "NickServ!services@services.oftc.net" + "/msg\\s-NickServ\\s-IDENTIFY\\s-\^_password" + "NickServ" + "IDENTIFY" + nil)) + "Alist of NickServer details, sorted by network. +Every element in the list has the form + \(SYMBOL NICKSERV REGEXP NICK KEYWORD USE-CURRENT ANSWER) + +SYMBOL is a network identifier, a symbol, as used in `erc-networks-alist'. +NICKSERV is the description of the nickserv in the form nick!user@host. +REGEXP is a regular expression matching the message from nickserv. +NICK is nickserv's nickname. Use nick@server where necessary/possible. +KEYWORD is the keyword to use in the reply message to identify yourself. +USE-CURRENT indicates whether the current nickname must be used when + identifying. +ANSWER is the command to use for the answer. The default is 'privmsg. + This last element is optional." + :group 'erc-services + :type '(repeat + (list :tag "Nickserv data" + (symbol :tag "Network name") + (string :tag "Nickserv's nick!user@host") + (regexp :tag "Identify request sent by Nickserv") + (string :tag "Identify to") + (string :tag "Identify keyword") + (boolean :tag "Use current nick in identify message?") + (choice :tag "Command to use (optional)" + (string :tag "Command") + (const :tag "No special command necessary" nil))))) + +;; Functions: + +(defun erc-nickserv-identify-autodetect (proc parsed) + "Check for a NickServ identify request everytime a notice is received. +Make sure it is the real NickServ for this network and that it has +specifically asked the user to IDENTIFY. +If `erc-prompt-for-nickserv-password' is non-nil, prompt the user for the +password for this nickname, otherwise try to send it automatically." + (unless (and (null erc-nickserv-passwords) + (null erc-prompt-for-nickserv-password)) + (let* ((network (erc-network)) + (nickserv (nth 1 (assoc network erc-nickserv-alist))) + (identify-regex (nth 2 (assoc network erc-nickserv-alist))) + (sspec (erc-response.sender parsed)) + (nick (car (erc-response.command-args parsed))) + (msg (erc-response.contents parsed))) + ;; continue only if we're sure it's the real nickserv for this network + ;; and it's asked us to identify + (when (and nickserv (equal sspec nickserv) + (string-match identify-regex msg)) + (erc-log "NickServ IDENTIFY request detected") + (erc-nickserv-call-identify-function nick) + nil)))) + +(defun erc-nickserv-identify-on-connect (server nick) + "Identify to Nickserv after the connection to the server is established." + (unless (and (null erc-nickserv-passwords) + (null erc-prompt-for-nickserv-password)) + (erc-nickserv-call-identify-function nick))) + +(defun erc-nickserv-identify-on-nick-change (nick old-nick) + "Identify to Nickserv whenever your nick changes." + (unless (and (null erc-nickserv-passwords) + (null erc-prompt-for-nickserv-password)) + (erc-nickserv-call-identify-function nick))) + +(defun erc-nickserv-call-identify-function (nickname) + "Call `erc-nickserv-identify' interactively or run it with NICKNAME's +password. +The action is determined by the value of `erc-prompt-for-nickserv-password'." + (if erc-prompt-for-nickserv-password + (call-interactively 'erc-nickserv-identify) + (when erc-nickserv-passwords + (erc-nickserv-identify + (cdr (assoc nickname + (nth 1 (assoc (erc-network) + erc-nickserv-passwords)))))))) + +;;;###autoload +(defun erc-nickserv-identify (password) + "Send an \"identify \" message to NickServ. +When called interactively, read the password using `read-passwd'." + (interactive + (list (read-passwd + (format "NickServ password for %s on %s (RET to cancel): " + (erc-current-nick) + (or (and (erc-network) + (symbol-name (erc-network))) + "Unknown network"))))) + (when (and password (not (string= "" password))) + (let* ((erc-auto-discard-away nil) + (network (erc-network)) + (nickserv-info (assoc network erc-nickserv-alist)) + (nickserv (or (nth 3 nickserv-info) "NickServ")) + (identify-word (or (nth 4 nickserv-info) "IDENTIFY")) + (nick (if (nth 5 nickserv-info) + (concat (erc-current-nick) " ") + "")) + (msgtype (or (nth 6 nickserv-info) "PRIVMSG"))) + (erc-message msgtype + (concat nickserv " " identify-word " " nick password))))) + +(provide 'erc-nickserv) + +;;; erc-nickserv.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: d401c8aa-d938-4255-96a9-3efb64c47e58 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-notify.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-notify.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,254 @@ +;;; erc-notify.el --- Online status change notification + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This module defines a new command, /NOTIFY +;; See the docstring of `erc-cmd-NOTIFY' for details. + +;;; Code: + +(require 'erc) +(require 'erc-nets) +(eval-when-compile + (require 'cl) + (require 'pcomplete)) + +;;;; Customizable variables + +(defgroup erc-notify nil + "Track online status of certain nicknames." + :group 'erc) + +(defcustom erc-notify-list nil + "*List of nicknames you want to be notified about online/offline +status change." + :group 'erc-notify + :type '(repeat string)) + +(defcustom erc-notify-interval 60 + "*Time interval (in seconds) for checking online status of notificated +people." + :group 'erc-notify + :type 'integer) + +(defcustom erc-notify-signon-hook nil + "*Hook run after someone on `erc-notify-list' has signed on. +Two arguments are passed to the function, SERVER and NICK, both +strings." + :group 'erc-notify + :type 'hook + :options '(erc-notify-signon)) + +(defcustom erc-notify-signoff-hook nil + "*Hook run after someone on `erc-notify-list' has signed off. +Two arguments are passed to the function, SERVER and NICK, both +strings." + :group 'erc-notify + :type 'hook + :options '(erc-notify-signoff)) + +(defun erc-notify-signon (server nick) + (message "%s signed on at %s" nick server)) + +(defun erc-notify-signoff (server nick) + (message "%s signed off from %s" nick server)) + +;;;; Internal variables + +(defvar erc-last-ison nil + "Last ISON information received through `erc-notify-timer'.") +(make-variable-buffer-local 'erc-last-ison) + +(defvar erc-last-ison-time 0 + "Last time ISON was sent to the server in `erc-notify-timer'.") +(make-variable-buffer-local 'erc-last-ison-time) + +;;;; Setup + +(defun erc-notify-install-message-catalogs () + (erc-define-catalog + 'english + '((notify_current . "Notificated people online: %l") + (notify_list . "Current notify list: %l") + (notify_on . "Detected %n on IRC network %m") + (notify_off . "%n has left IRC network %m")))) + +;;;###autoload (autoload 'erc-notify-mode "erc-notify" nil t) +(define-erc-module notify nil + "Periodically check for the online status of certain users and report +changes." + ((add-hook 'erc-timer-hook 'erc-notify-timer) + (add-hook 'erc-server-JOIN-functions 'erc-notify-JOIN) + (add-hook 'erc-server-NICK-functions 'erc-notify-NICK) + (add-hook 'erc-server-QUIT-functions 'erc-notify-QUIT)) + ((remove-hook 'erc-timer-hook 'erc-notify-timer) + (remove-hook 'erc-server-JOIN-functions 'erc-notify-JOIN) + (remove-hook 'erc-server-NICK-functions 'erc-notify-NICK) + (remove-hook 'erc-server-QUIT-functions 'erc-notify-QUIT))) + +;;;; Timer handler + +(defun erc-notify-timer (now) + (when (and erc-notify-list + (> (erc-time-diff + erc-last-ison-time now) + erc-notify-interval)) + (erc-once-with-server-event + 303 + '(let* ((server (erc-response.sender parsed)) + (ison-list (delete "" (split-string + (erc-response.contents parsed)))) + (new-list ison-list) + (old-list (with-current-buffer (erc-server-buffer) + erc-last-ison))) + (while new-list + (when (not (erc-member-ignore-case (car new-list) old-list)) + (run-hook-with-args 'erc-notify-signon-hook server (car new-list)) + (erc-display-message + parsed 'notice proc + 'notify_on ?n (car new-list) ?m (erc-network-name))) + (setq new-list (cdr new-list))) + (while old-list + (when (not (erc-member-ignore-case (car old-list) ison-list)) + (run-hook-with-args 'erc-notify-signoff-hook server (car old-list)) + (erc-display-message + parsed 'notice proc + 'notify_off ?n (car old-list) ?m (erc-network-name))) + (setq old-list (cdr old-list))) + (setq erc-last-ison ison-list) + t)) + (erc-server-send + (concat "ISON " (mapconcat 'identity erc-notify-list " "))) + (setq erc-last-ison-time now))) + +(defun erc-notify-JOIN (proc parsed) + "Check if channel joiner is on `erc-notify-list' and not on `erc-last-ison'. +If this condition is satisfied, produce a notify_on message and add the nick +to `erc-last-ison' to prevent any further notifications." + (let ((nick (erc-extract-nick (erc-response.sender parsed)))) + (when (and (erc-member-ignore-case nick erc-notify-list) + (not (erc-member-ignore-case nick erc-last-ison))) + (add-to-list 'erc-last-ison nick) + (run-hook-with-args 'erc-notify-signon-hook + (or erc-server-announced-name erc-session-server) + nick) + (erc-display-message + parsed 'notice proc + 'notify_on ?n nick ?m (erc-network-name))) + nil)) + +(defun erc-notify-NICK (proc parsed) + "Check if new nick is on `erc-notify-list' and not on `erc-last-ison'. +If this condition is satisfied, produce a notify_on message and add the nick +to `erc-last-ison' to prevent any further notifications." + (let ((nick (erc-response.contents parsed))) + (when (and (erc-member-ignore-case nick erc-notify-list) + (not (erc-member-ignore-case nick erc-last-ison))) + (add-to-list 'erc-last-ison nick) + (run-hook-with-args 'erc-notify-signon-hook + (or erc-server-announced-name erc-session-server) + nick) + (erc-display-message + parsed 'notice proc + 'notify_on ?n nick ?m (erc-network-name))) + nil)) + +(defun erc-notify-QUIT (proc parsed) + "Check if quitter is on `erc-notify-list' and on `erc-last-ison'. +If this condition is satisfied, produce a notify_off message and remove the +nick from `erc-last-ison' to prevent any further notifications." + (let ((nick (erc-extract-nick (erc-response.sender parsed)))) + (when (and (erc-member-ignore-case nick erc-notify-list) + (erc-member-ignore-case nick erc-last-ison)) + (setq erc-last-ison (erc-delete-if `(lambda (el) + (string= ,(erc-downcase nick) + (erc-downcase el))) + erc-last-ison)) + (run-hook-with-args 'erc-notify-signoff-hook + (or erc-server-announced-name erc-session-server) + nick) + (erc-display-message + parsed 'notice proc + 'notify_off ?n nick ?m (erc-network-name))) + nil)) + +;;;; User level command + +;;;###autoload +(defun erc-cmd-NOTIFY (&rest args) + "Change `erc-notify-list' or list current notify-list members online. +Without args, list the current list of notificated people online, +with args, toggle notify status of people." + (cond + ((null args) + ;; Print current notificated people (online) + (let ((ison (with-current-buffer (erc-server-buffer) erc-last-ison))) + (if (not ison) + (erc-display-message + nil 'notice 'active "No ison-list yet!") + (erc-display-message + nil 'notice 'active + 'notify_current ?l ison)))) + ((string= (car args) "-l") + (erc-display-message nil 'notice 'active + 'notify_list ?l (mapconcat 'identity erc-notify-list + " "))) + (t + (while args + (if (erc-member-ignore-case (car args) erc-notify-list) + (progn + (setq erc-notify-list (delete (car args) erc-notify-list)) + ;; Remove the nick from the value of erc-last-ison in + ;; every server buffer. This prevents seeing a signoff + ;; notification for a nick that you have just _removed_ + ;; from your notify list. + (dolist (buf (erc-buffer-list)) + (with-current-buffer buf + (if (erc-server-buffer-p) + (setq erc-last-ison (delete (car args) erc-last-ison)))))) + (setq erc-notify-list (cons (erc-string-no-properties (car args)) + erc-notify-list))) + (setq args (cdr args))) + (erc-display-message + nil 'notice 'active + 'notify_list ?l (mapconcat 'identity erc-notify-list " ")))) + t) + +;;;###autoload +(defun pcomplete/erc-mode/NOTIFY () + (pcomplete-here (pcomplete-erc-all-nicks))) + +(erc-notify-install-message-catalogs) + +(provide 'erc-notify) + +;;; erc-notify.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 0fb19dd0-1359-458a-89b7-81dc195a588e diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-page.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-page.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,108 @@ +;; erc-page.el - CTCP PAGE support for ERC + +;; Copyright (C) 2002, 2004 Free Software Foundation + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Requiring this file will make ERC react to CTCP PAGE messages +;; received, and it will provide a new /PAGE command to send such +;; messages yourself. To enable it, customize the variable +;; `erc-page-mode'. + +;;; Code: + +(require 'erc) + +;;;###autoload (autoload 'erc-page-mode "erc-page") +(define-erc-module page ctcp-page + "Process CTCP PAGE requests from IRC." + nil nil) + +(erc-define-catalog-entry 'english 'CTCP-PAGE "Page from %n (%u@%h): %m") + +(defgroup erc-page nil + "React to CTCP PAGE messages." + :group 'erc) + +(defcustom erc-page-function nil + "A function to process a \"page\" request. +If nil, this prints the page message in the minibuffer and calls +`beep'. If non-nil, it must be a function that takes two arguments: +SENDER and MSG, both strings. + +Example for your ~/.emacs file: + +\(setq erc-page-function + (lambda (sender msg) + (play-sound-file \"/home/alex/elisp/erc/sounds/ni.wav\") + (message \"IRC Page from %s: %s\" sender msg)))" + :group 'erc-page + :type '(choice (const nil) + (function))) + +(defcustom erc-ctcp-query-PAGE-hook '(erc-ctcp-query-PAGE) + "List of functions to be called when a CTCP PAGE is received. +This is called from `erc-process-ctcp-query'. The functions are called +with six arguments: PROC NICK LOGIN HOST TO MSG. Note that you can +also set `erc-page-function' to a function, which only gets two arguments, +SENDER and MSG, so that might be easier to use." + :group 'erc-page + :type '(repeat function)) + +(defun erc-ctcp-query-PAGE (proc nick login host to msg) + "Deal with an CTCP PAGE query, if `erc-page-mode' is non-nil. +This will call `erc-page-function', if defined, or it will just print +a message and `beep'. In addition to that, the page message is also +inserted into the server buffer." + (when (and erc-page-mode + (string-match "PAGE\\(\\s-+.*\\)?$" msg)) + (let* ((m (match-string 1 msg)) + (page-msg (if m (erc-controls-interpret (substring m 1)) + "[no message]")) + text) + (if m (setq m (substring m 1))) + (setq text (erc-format-message 'CTCP-PAGE + ?n nick ?u login + ?h host ?m page-msg)) + (if erc-page-function + (funcall erc-page-function nick page-msg) + ;; if no function is defined + (message "%s" text) + (beep)) + ;; insert text into buffer + (erc-display-message + nil 'notice nil text))) + nil) + +(defun erc-cmd-PAGE (line &optional force) + "Send a CTCP page to the user given as the first word in LINE. +The rest of LINE is the message to send. Note that you will only +receive pages if `erc-page-mode' is on." + (when (string-match "^\\s-*\\(\\S-+\\) ?\\(.*\\)" line) + (let ((nick (match-string 1 line)) + (msg (match-string 2 line))) + (erc-cmd-CTCP nick "PAGE" msg)))) + +(put 'erc-cmd-PAGE 'do-not-parse-args t) + +(provide 'erc-page) + +;; arch-tag: 82fd2e0e-6060-4dd2-9788-8c1411e844de +;;; erc-page.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-pcomplete.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-pcomplete.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,275 @@ +;;; erc-pcomplete.el --- Provides programmable completion for ERC + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Sacha Chua +;; Keywords: comm, convenience +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcCompletion + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file replaces erc-complete.el. It provides nick completion +;; for ERC based on pcomplete. If you do not have pcomplete, you may +;; try to use erc-complete.el. +;; +;; To use, (require 'erc-auto) or (require 'erc-pcomplete), then +;; (erc-pcomplete-mode 1) +;; +;; If you want nickname completions ordered such that the most recent +;; speakers are listed first, set +;; `erc-pcomplete-order-nickname-completions' to `t'. +;; +;; See CREDITS for other contributors. +;; +;;; Code: + +(require 'pcomplete) +(require 'erc) +(require 'erc-compat) +(require 'time-date) +(eval-when-compile (require 'cl)) + +(defgroup erc-pcomplete nil + "Programmable completion for ERC" + :group 'erc) + +(defcustom erc-pcomplete-nick-postfix ": " + "*When `pcomplete' is used in the first word after the prompt, +add this string to nicks completed." + :group 'erc-pcomplete + :type 'string) + +(defcustom erc-pcomplete-order-nickname-completions t + "If t, channel nickname completions will be ordered such that +the most recent speakers are listed first." + :group 'erc-pcomplete + :type 'boolean) + +;;;###autoload (autoload 'erc-completion-mode "erc-pcomplete" nil t) +(define-erc-module pcomplete Completion + "In ERC Completion mode, the TAB key does completion whenever possible." + ((add-hook 'erc-mode-hook 'pcomplete-erc-setup) + (add-hook 'erc-complete-functions 'erc-pcomplete) + (erc-buffer-list #'pcomplete-erc-setup)) + ((remove-hook 'erc-mode-hook 'pcomplete-erc-setup) + (remove-hook 'erc-complete-functions 'erc-pcomplete))) + +(defun erc-pcomplete () + "Complete the nick before point." + (interactive) + (when (> (point) (erc-beg-of-input-line)) + (let ((last-command (if (eq last-command 'erc-complete-word) + 'pcomplete + last-command))) + (call-interactively 'pcomplete)) + t)) + +;;; Setup function + +(defun pcomplete-erc-setup () + "Setup `erc-mode' to use pcomplete." + (set (make-local-variable 'pcomplete-ignore-case) + t) + (set (make-local-variable 'pcomplete-use-paring) + nil) + (set (make-local-variable 'pcomplete-suffix-list) + '(? ?:)) + (set (make-local-variable 'pcomplete-parse-arguments-function) + 'pcomplete-parse-erc-arguments) + (set (make-local-variable 'pcomplete-command-completion-function) + 'pcomplete/erc-mode/complete-command) + (set (make-local-variable 'pcomplete-command-name-function) + 'pcomplete-erc-command-name) + (set (make-local-variable 'pcomplete-default-completion-function) + (lambda () (pcomplete-here (pcomplete-erc-nicks))))) + +;;; Programmable completion logic + +(defun pcomplete/erc-mode/complete-command () + (pcomplete-here + (append + (pcomplete-erc-commands) + (pcomplete-erc-nicks erc-pcomplete-nick-postfix)))) + +(defvar erc-pcomplete-ctcp-commands + '("ACTION" "CLIENTINFO" "ECHO" "FINGER" "PING" "TIME" "USERINFO" "VERSION")) + +(defun pcomplete/erc-mode/CTCP () + (pcomplete-here (pcomplete-erc-nicks)) + (pcomplete-here erc-pcomplete-ctcp-commands)) + +(defun pcomplete/erc-mode/CLEARTOPIC () + (pcomplete-here (pcomplete-erc-channels))) + +(defun pcomplete/erc-mode/DEOP () + (while (pcomplete-here (pcomplete-erc-ops)))) + +(defun pcomplete/erc-mode/DESCRIBE () + (pcomplete-here (pcomplete-erc-nicks))) + +(defun pcomplete/erc-mode/IDLE () + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/KICK () + (pcomplete-here (pcomplete-erc-channels)) + (pcomplete-here (pcomplete-erc-nicks))) + +(defun pcomplete/erc-mode/LOAD () + (pcomplete-here (pcomplete-entries))) + +(defun pcomplete/erc-mode/MODE () + (pcomplete-here (pcomplete-erc-channels)) + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/ME () + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/SAY () + (pcomplete-here (pcomplete-erc-nicks)) + (pcomplete-here (pcomplete-erc-nicks)) + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/MSG () + (pcomplete-here (append (pcomplete-erc-all-nicks) + (pcomplete-erc-channels))) + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/NAMES () + (while (pcomplete-here (pcomplete-erc-channels)))) + +(defalias 'pcomplete/erc-mode/NOTICE 'pcomplete/erc-mode/MSG) + +(defun pcomplete/erc-mode/OP () + (while (pcomplete-here (pcomplete-erc-not-ops)))) + +(defun pcomplete/erc-mode/PART () + (pcomplete-here (pcomplete-erc-channels))) + +(defalias 'pcomplete/erc-mode/LEAVE 'pcomplete/erc-mode/PART) + +(defun pcomplete/erc-mode/QUERY () + (pcomplete-here (append (pcomplete-erc-all-nicks) + (pcomplete-erc-channels))) + (while (pcomplete-here (pcomplete-erc-nicks))) + ) + +(defun pcomplete/erc-mode/SOUND () + (while (pcomplete-here (pcomplete-entries)))) + +(defun pcomplete/erc-mode/TOPIC () + (pcomplete-here (pcomplete-erc-channels))) + +(defun pcomplete/erc-mode/WHOIS () + (while (pcomplete-here (pcomplete-erc-nicks)))) + +(defun pcomplete/erc-mode/UNIGNORE () + (pcomplete-here (with-current-buffer (erc-server-buffer) erc-ignore-list))) + +;;; Functions that provide possible completions. + +(defun pcomplete-erc-commands () + "Returns a list of strings of the defined user commands." + (let ((case-fold-search nil)) + (mapcar (lambda (x) + (concat "/" (downcase (substring (symbol-name x) 8)))) + (apropos-internal "erc-cmd-[A-Z]+")))) + +(defun pcomplete-erc-ops () + "Returns a list of nicks with ops." + (let (ops) + (maphash (lambda (nick cdata) + (if (and (cdr cdata) + (erc-channel-user-op (cdr cdata))) + (setq ops (cons nick ops)))) + erc-channel-users) + ops)) + +(defun pcomplete-erc-not-ops () + "Returns a list of nicks without ops." + (let (not-ops) + (maphash (lambda (nick cdata) + (if (and (cdr cdata) + (not (erc-channel-user-op (cdr cdata)))) + (setq not-ops (cons nick not-ops)))) + erc-channel-users) + not-ops)) + + +(defun pcomplete-erc-nicks (&optional postfix) + "Returns a list of nicks in the current channel." + (let ((users (erc-get-channel-user-list))) + (if erc-pcomplete-order-nickname-completions + (setq users (erc-sort-channel-users-by-activity users))) + (mapcar (lambda (x) + (concat (erc-server-user-nickname (car x)) postfix)) + users))) + +(defun pcomplete-erc-all-nicks (&optional postfix) + "Returns a list of all nicks on the current server." + (let (nicks) + (with-current-buffer (process-buffer erc-server-process) + (maphash (lambda (nick user) + (setq nicks (cons (concat nick postfix) nicks))) + erc-server-users)) + nicks)) + +(defun pcomplete-erc-channels () + "Returns a list of channels associated with the current server." + (mapcar (lambda (buf) (with-current-buffer buf (erc-default-target))) + (erc-channel-list erc-server-process))) + +;;; Functions for parsing + +(defun pcomplete-erc-command-name () + "Returns the command name of the first argument." + (if (eq (elt (pcomplete-arg 'first) 0) ?/) + (upcase (substring (pcomplete-arg 'first) 1)) + "SAY")) + +(defun pcomplete-parse-erc-arguments () + "Returns a list of parsed whitespace-separated arguments. +These are the words from the beginning of the line after the prompt +up to where point is right now." + (let* ((start erc-input-marker) + (end (point)) + args beginnings) + (save-excursion + (if (< (skip-chars-backward " \t\n" start) 0) + (setq args '("") + beginnings (list end))) + (setq end (point)) + (while (< (skip-chars-backward "^ \t\n" start) 0) + (setq beginnings (cons (point) beginnings) + args (cons (buffer-substring-no-properties + (point) end) + args)) + (skip-chars-backward " \t\n" start) + (setq end (point)))) + (cons args beginnings))) + +(provide 'erc-pcomplete) + +;;; erc-pcomplete.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: 32a7703b-be87-45a4-82f3-9eed5a628911 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-replace.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-replace.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,93 @@ +;; erc-replace.el -- wash and massage messages inserted into the buffer + +;; Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc. + +;; Author: Andreas Fuchs +;; Maintainer: Mario Lang (mlang@delysid.org) +;; Keywords: IRC, client, Internet +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcReplace + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This module allows you to systematically replace text in incoming +;; messages. Load erc-replace, and customize `erc-replace-alist'. +;; Then add to your ~/.emacs: + +;; (require 'erc-replace) +;; (erc-replace-mode 1) + +;;; Code: + +(require 'erc) + +(defgroup erc-replace nil + "Replace text from incoming messages" + :group 'erc) + +(defcustom erc-replace-alist nil + "Alist describing text to be replaced in incoming messages. +This is useful for filters. + +The alist has elements of the form (FROM . TO). FROM can be a regular +expression or a variable, or any sexp, TO can be a string or a +function to call, or any sexp. If a function, it will be called with +one argument, the string to be replaced, and it should return a +replacement string." + :group 'erc-replace + :type '(repeat (cons :tag "Search & Replace" + (choice :tag "From" + regexp + variable + sexp) + (choice :tag "To" + string + function + sexp)))) + +(defun erc-replace-insert () + "Function to run from `erc-insert-modify-hook'. +It replaces text according to `erc-replace-alist'." + (mapcar (lambda (elt) + (goto-char (point-min)) + (let ((from (car elt)) + (to (cdr elt))) + (unless (stringp from) + (setq from (eval from))) + (while (re-search-forward from nil t) + (cond ((stringp to) + (replace-match to)) + ((and (symbolp to) (fboundp to)) + (replace-match (funcall to (match-string 0)))) + (t + (eval to)))))) + erc-replace-alist)) + +;;;###autoload (autoload 'erc-replace-mode "erc-replace") +(define-erc-module replace nil + "This mode replaces incoming text according to `erc-replace-alist'." + ((add-hook 'erc-insert-modify-hook + 'erc-replace-insert)) + ((remove-hook 'erc-insert-modify-hook + 'erc-replace-insert))) + +(provide 'erc-replace) + +;; arch-tag: dd904a59-d8a6-47f8-ac3a-76b698289a18 +;;; erc-replace.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-ring.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-ring.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,148 @@ +;; erc-ring.el -- Command history handling for erc using ring.el + +;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Alex Schroeder +;; Keywords: comm +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcHistory + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file implements an input ring -- a history of the stuff you +;; wrote. To activate: +;; +;; (require 'erc-auto) or (require 'erc-ring) +;; (erc-ring-mode 1) +;; +;; Use M-n and M-p to navigate the ring + +;;; Code: + +(require 'erc) +(require 'comint) +(require 'ring) + +;;;###autoload (autoload 'erc-ring-mode "erc-ring" nil t) +(define-erc-module ring nil + "Stores input in a ring so that previous commands and messages can +be recalled using M-p and M-n." + ((add-hook 'erc-send-pre-hook 'erc-add-to-input-ring) + (define-key erc-mode-map "\M-p" 'erc-previous-command) + (define-key erc-mode-map "\M-n" 'erc-next-command)) + ((remove-hook 'erc-send-pre-hook 'erc-add-to-input-ring) + (define-key erc-mode-map "\M-p" 'undefined) + (define-key erc-mode-map "\M-n" 'undefined))) + +(defvar erc-input-ring nil "Input ring for erc.") +(make-variable-buffer-local 'erc-input-ring) + +(defvar erc-input-ring-index nil + "Position in the input ring for erc. +If nil, the input line is blank and the user is conceptually 'after' +the most recently added item in the ring. If an integer, the input +line is non-blank and displays the item from the ring indexed by this +variable.") +(make-variable-buffer-local 'erc-input-ring-index) + +(defun erc-input-ring-setup () + "Do the setup required so that we can use comint style input rings. +Call this function when setting up the mode." + (setq erc-input-ring (make-ring comint-input-ring-size)) + (setq erc-input-ring-index nil)) + +(defun erc-add-to-input-ring (s) + "Add string S to the input ring and reset history position." + (unless erc-input-ring (erc-input-ring-setup)) + (ring-insert erc-input-ring s) + (setq erc-input-ring-index nil)) + +(defun erc-clear-input-ring () + "Remove all entries from the input ring, then call garbage-collect. +You might use this for security purposes if you have typed a command +containing a password." + (interactive) + (setq erc-input-ring (make-ring comint-input-ring-size) + erc-input-ring-index nil) + (garbage-collect) + (message "ERC input ring cleared.")) + +(defun erc-previous-command () + "Replace current command with the previous one from the history." + (interactive) + (unless erc-input-ring (erc-input-ring-setup)) + ;; if the ring isn't empty + (when (> (ring-length erc-input-ring) 0) + (if (and erc-input-ring-index + (= (ring-length erc-input-ring) (1+ erc-input-ring-index))) + (progn + (erc-replace-current-command "") + (setq erc-input-ring-index nil)) + + ;; If we are not viewing old input and there's text in the input + ;; area, push it on the history ring before moving back through + ;; the input history, so it will be there when we return to the + ;; front. + (if (null erc-input-ring-index) + (when (> (point-max) erc-input-marker) + (erc-add-to-input-ring (buffer-substring erc-input-marker + (point-max))) + (setq erc-input-ring-index 0))) + + (setq erc-input-ring-index (if erc-input-ring-index + (ring-plus1 erc-input-ring-index + (ring-length erc-input-ring)) + 0)) + (erc-replace-current-command (ring-ref erc-input-ring + erc-input-ring-index))))) + +(defun erc-next-command () + "Replace current command with the next one from the history." + (interactive) + (unless erc-input-ring (erc-input-ring-setup)) + ;; if the ring isn't empty + (when (> (ring-length erc-input-ring) 0) + (if (and erc-input-ring-index + (= 0 erc-input-ring-index)) + (progn + (erc-replace-current-command "") + (setq erc-input-ring-index nil)) + (setq erc-input-ring-index (ring-minus1 (or erc-input-ring-index 0) + (ring-length erc-input-ring))) + (erc-replace-current-command (ring-ref erc-input-ring + erc-input-ring-index))))) + + +(defun erc-replace-current-command (s) + "Replace current command with string S." + ;; delete line + (let ((inhibit-read-only t)) + (delete-region + (progn (goto-char erc-insert-marker) (erc-bol)) + (goto-char (point-max))) + (insert s))) + +(provide 'erc-ring) + +;;; erc-ring.el ends here +;; Local Variables: +;; indent-tabs-mode: nil +;; End: + +;; arch-tag: b77924a8-a80e-489d-84cd-b351761ea5c8 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-sound.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-sound.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,149 @@ +;;; erc-sound.el --- CTCP SOUND support for ERC + +;; Copyright (C) 2002, 2003 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This used to be in erc.el, I (Jorgen) just extracted it from there +;; and put it in this file. Bugs and features are those of the +;; original author. + +;;; Code: + +(require 'erc) + +;;;###autoload (autoload 'erc-sound-mode "erc-sound") +(define-erc-module sound ctcp-sound + "In ERC sound mode, the client will respond to CTCP SOUND requests +and play sound files as requested." + ;; Enable: + ((define-key erc-mode-map "\C-c\C-s" 'erc-toggle-sound)) + ;; Disable: + ((define-key erc-mode-map "\C-c\C-s" 'undefined))) + +(erc-define-catalog-entry 'english 'CTCP-SOUND "%n (%u@%h) plays %s:%m") + +(defgroup erc-sound nil + "Make ERC play bells and whistles while chatting with people." + :group 'erc) + +(defcustom erc-play-sound t + "*Play sound on SOUND ctcp requests (used in ICQ chat)." + :group 'erc-sound + :type 'boolean) + +(defcustom erc-sound-path nil + "List of directories that contain sound samples to play on SOUND events." + :group 'erc-sound + :type '(repeat directory)) + +(defcustom erc-default-sound nil + "Play this sound if the requested file was not found." + :group 'erc-sound + :type '(choice (const nil) + file)) + +(defcustom erc-play-command "play" + "Command for playing sound samples." + :group 'erc-sound + :type 'string) + +(defun erc-cmd-SOUND (line &optional force) + "Play the sound given in LINE." + (cond + ((string-match "^\\s-*\\(\\S-+\\)\\(\\s-.*\\)?$" line) + (let ((file (match-string 1 line)) + (msg (match-string 2 line)) + (tgt (erc-default-target))) + (if (null msg) + (setq msg "") + ;; remove the first white space + (setq msg (substring msg 1))) + (if tgt + (progn + (erc-send-ctcp-message tgt (format "SOUND %s %s" file msg) force) + (if erc-play-sound (erc-play-sound file))) + (erc-display-message nil 'error (current-buffer) 'no-target)) + t)) + (t nil))) + +(defvar erc-ctcp-query-SOUND-hook '(erc-ctcp-query-SOUND)) +(defun erc-ctcp-query-SOUND (proc nick login host to msg) + (when (string-match "^SOUND\\s-+\\(\\S-+\\)\\(\\(\\s-+.*\\)\\|\\(\\s-*\\)\\)$" msg) + (let ((sound (match-string 1 msg)) + (comment (match-string 2 msg))) + (when erc-play-sound (erc-play-sound sound)) + (erc-display-message + nil 'notice nil + 'CTCP-SOUND ?n nick ?u login ?h host ?s sound ?m comment))) + nil) + +(defun erc-play-sound (file) + "Plays a sound file located in one of the directories in `erc-sound-path' +with a command `erc-play-command'." + (let ((filepath (erc-find-file file erc-sound-path))) + (if (and (not filepath) erc-default-sound) + (setq filepath erc-default-sound)) + (cond ((and filepath (file-exists-p filepath)) + (if (and (fboundp 'device-sound-enabled-p) + (device-sound-enabled-p)) + ; For XEmacs + (play-sound-file filepath) +; (start-process "erc-sound" nil erc-play-command filepath) + (start-process "erc-sound" nil "/bin/tcsh" "-c" + (concat erc-play-command " " filepath)))) + (t (beep))) + (erc-log (format "Playing sound file %S" filepath)))) + +;(defun erc-play-sound (file) +; "Plays a sound file located in one of the directories in `erc-sound-path' +; with a command `erc-play-command'." +; (let ((filepath nil) +; (paths erc-sound-path)) +; (while (and paths +; (progn (setq filepath (expand-file-name file (car paths))) +; (not (file-exists-p filepath)))) +; (setq paths (cdr paths))) +; (if (and (not (and filepath (file-exists-p filepath))) +; erc-default-sound) +; (setq filepath erc-default-sound)) +; (cond ((and filepath (file-exists-p filepath)) +;; (start-process "erc-sound" nil erc-play-command filepath) +; (start-process "erc-sound" nil "/bin/tcsh" "-c" +; (concat erc-play-command " " filepath)) +; ) +; (t (beep))) +; (erc-log (format "Playing sound file %S" filepath)))) + +(defun erc-toggle-sound (&optional arg) + "Toggles playing sounds on and off. With positive argument, + turns them on. With any other argument turns sounds off." + (interactive "P") + (cond ((and (numberp arg) (> arg 0)) + (setq erc-play-sound t)) + (arg (setq erc-play-sound nil)) + (t (setq erc-play-sound (not erc-play-sound)))) + (message "ERC sound is %s" (if erc-play-sound "ON" "OFF"))) + + +(provide 'erc-sound) + +;; arch-tag: 53657d1d-007f-4a20-91c1-588e71cf0cee +;;; erc-sound.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-speedbar.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-speedbar.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,370 @@ +;;; erc-speedbar.el --- Speedbar support for ERC + +;; Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Contributor: Eric M. Ludlam + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This module provides integration of ERC into the Speedbar. + +;;; TODO / ideas: + +;; * Write intelligent update function: +;; update-channel, update-nick, remove-nick-from-channel, ... +;; * Use indicator-strings for op/voice +;; * Extract/convert face notes field from bbdb if available and show +;; it using sb-image.el +;; +;;; Code: + +(require 'erc) +(require 'speedbar) +(condition-case nil (require 'dframe) (error nil)) +(eval-when-compile (require 'cl)) + +;;; Customization: + +(defgroup erc-speedbar nil + "Integration of ERC in the Speedbar" + :group 'erc) + +(defcustom erc-speedbar-sort-users-type 'activity + "How channel nicknames are sorted. + +'activity - Sort users by channel activity +'alphabetical - Sort users alphabetically +nil - Do not sort users" + :group 'erc-speedbar + :type '(choice (const :tag "Sort users by channel activity" activity) + (const :tag "Sort users alphabetically" alphabetical) + (const :tag "Do not sort users" nil))) + +(defvar erc-speedbar-key-map nil + "Keymap used when in erc display mode.") + +(defun erc-install-speedbar-variables () + "Install those variables used by speedbar to enhance ERC." + (if erc-speedbar-key-map + nil + (setq erc-speedbar-key-map (speedbar-make-specialized-keymap)) + + ;; Basic tree features + (define-key erc-speedbar-key-map "e" 'speedbar-edit-line) + (define-key erc-speedbar-key-map "\C-m" 'speedbar-edit-line) + (define-key erc-speedbar-key-map "+" 'speedbar-expand-line) + (define-key erc-speedbar-key-map "=" 'speedbar-expand-line) + (define-key erc-speedbar-key-map "-" 'speedbar-contract-line)) + + (speedbar-add-expansion-list '("ERC" erc-speedbar-menu-items + erc-speedbar-key-map + erc-speedbar-server-buttons)) + (speedbar-add-mode-functions-list + '("ERC" (speedbar-item-info . erc-speedbar-item-info)))) + +(defvar erc-speedbar-menu-items + '(["Goto buffer" speedbar-edit-line t] + ["Expand Node" speedbar-expand-line + (save-excursion (beginning-of-line) + (looking-at "[0-9]+: *.\\+. "))] + ["Contract Node" speedbar-contract-line + (save-excursion (beginning-of-line) + (looking-at "[0-9]+: *.-. "))]) + "Additional menu-items to add to speedbar frame.") + +;; Make sure our special speedbar major mode is loaded +(if (featurep 'speedbar) + (erc-install-speedbar-variables) + (add-hook 'speedbar-load-hook 'erc-install-speedbar-variables)) + +;;; ERC hierarchy display method +;;;###autoload +(defun erc-speedbar-browser () + "Initialize speedbar to display an ERC browser. +This will add a speedbar major display mode." + (interactive) + (require 'speedbar) + ;; Make sure that speedbar is active + (speedbar-frame-mode 1) + ;; Now, throw us into Info mode on speedbar. + (speedbar-change-initial-expansion-list "ERC") + (speedbar-get-focus)) + +(defun erc-speedbar-buttons (buffer) + "Create buttons for speedbar in BUFFER." + (erase-buffer) + (let (serverp chanp queryp) + (with-current-buffer buffer + (setq serverp (eq buffer (process-buffer erc-server-process))) + (setq chanp (erc-channel-p (erc-default-target))) + (setq queryp (erc-query-buffer-p))) + (cond (serverp + (erc-speedbar-channel-buttons nil 0 buffer)) + (chanp + (erc-speedbar-insert-target buffer 0) + (forward-line -1) + (erc-speedbar-expand-channel "+" buffer 0)) + (queryp + (erc-speedbar-insert-target buffer 0)) + (t (ignore))))) + +(defun erc-speedbar-server-buttons (directory depth) + "Insert the initial list of servers you are connected to." + (let ((servers (erc-buffer-list + (lambda () + (eq (current-buffer) + (process-buffer erc-server-process)))))) + (when servers + (speedbar-with-writable + (dolist (server servers) + (speedbar-make-tag-line + 'bracket ?+ 'erc-speedbar-expand-server server + (buffer-name server) 'erc-speedbar-goto-buffer server nil + depth)) + t)))) + +(defun erc-speedbar-expand-server (text server indent) + (cond ((string-match "+" text) + (speedbar-change-expand-button-char ?-) + (if (speedbar-with-writable + (save-excursion + (end-of-line) (forward-char 1) + (erc-speedbar-channel-buttons nil (1+ indent) server))) + (speedbar-change-expand-button-char ?-) + (speedbar-change-expand-button-char ??))) + ((string-match "-" text) ;we have to contract this node + (speedbar-change-expand-button-char ?+) + (speedbar-delete-subblock indent)) + (t (error "Ooops... not sure what to do"))) + (speedbar-center-buffer-smartly)) + +(defun erc-speedbar-channel-buttons (directory depth server-buffer) + (when (get-buffer server-buffer) + (let* ((proc (with-current-buffer server-buffer erc-server-process)) + (targets (erc-buffer-list + (lambda () + (not (eq (process-buffer erc-server-process) + (current-buffer)))) + proc))) + (when targets + (speedbar-with-writable + (dolist (target targets) + (erc-speedbar-insert-target target depth)) + t))))) + +(defun erc-speedbar-insert-target (buffer depth) + (if (with-current-buffer buffer + (erc-channel-p (erc-default-target))) + (speedbar-make-tag-line + 'bracket ?+ 'erc-speedbar-expand-channel buffer + (buffer-name buffer) 'erc-speedbar-goto-buffer buffer nil + depth) + ;; Query target + (speedbar-make-tag-line + nil nil nil nil + (buffer-name buffer) 'erc-speedbar-goto-buffer buffer nil + depth))) + +(defun erc-speedbar-expand-channel (text channel indent) + "For the line matching TEXT, in CHANNEL, expand or contract a line. +INDENT is the current indentation level." + (cond + ((string-match "+" text) + (speedbar-change-expand-button-char ?-) + (speedbar-with-writable + (save-excursion + (end-of-line) (forward-char 1) + (let ((modes (with-current-buffer channel + (concat (apply 'concat + erc-channel-modes) + (cond + ((and erc-channel-user-limit + erc-channel-key) + (if erc-show-channel-key-p + (format "lk %.0f %s" + erc-channel-user-limit + erc-channel-key) + (format "kl %.0f" erc-channel-user-limit))) + (erc-channel-user-limit + ;; Emacs has no bignums + (format "l %.0f" erc-channel-user-limit)) + (erc-channel-key + (if erc-show-channel-key-p + (format "k %s" erc-channel-key) + "k")) + (t ""))))) + (topic (erc-controls-interpret + (with-current-buffer channel erc-channel-topic)))) + (speedbar-make-tag-line + 'angle ?i nil nil + (concat "Modes: +" modes) nil nil nil + (1+ indent)) + (unless (string= topic "") + (speedbar-make-tag-line + 'angle ?i nil nil + (concat "Topic: " topic) nil nil nil + (1+ indent))) + (let ((names (cond ((eq erc-speedbar-sort-users-type 'alphabetical) + (erc-sort-channel-users-alphabetically + (with-current-buffer channel + (erc-get-channel-user-list)))) + ((eq erc-speedbar-sort-users-type 'activity) + (erc-sort-channel-users-by-activity + (with-current-buffer channel + (erc-get-channel-user-list)))) + (t (with-current-buffer channel + (erc-get-channel-user-list)))))) + (when names + (speedbar-with-writable + (dolist (entry names) + (erc-speedbar-insert-user entry ?+ (1+ indent)))))))))) + ((string-match "-" text) + (speedbar-change-expand-button-char ?+) + (speedbar-delete-subblock indent)) + (t (error "Ooops... not sure what to do"))) + (speedbar-center-buffer-smartly)) + +(defun erc-speedbar-insert-user (entry exp-char indent) + "Insert one user based on the channel member list ENTRY. +EXP-CHAR is the expansion character to use. +INDENT is the current indentation level." + (let* ((user (car entry)) + (cuser (cdr entry)) + (nick (erc-server-user-nickname user)) + (host (erc-server-user-host user)) + (info (erc-server-user-info user)) + (login (erc-server-user-login user)) + (name (erc-server-user-full-name user)) + (voice (and cuser (erc-channel-user-voice cuser))) + (op (and cuser (erc-channel-user-op cuser))) + (nick-str (concat (if op "@" "") (if voice "+" "") nick)) + (finger (concat login (when (or login host) "@") host)) + (sbtoken (list finger name info))) + (if (or login host name info) ; we want to be expandable + (speedbar-make-tag-line + 'bracket ?+ 'erc-speedbar-expand-user sbtoken + nick-str nil sbtoken nil + indent) + (when (equal exp-char ?-) + (forward-line -1) + (erc-speedbar-expand-user "+" (list finger name info) indent)) + (speedbar-make-tag-line + 'statictag ?? nil nil + nick-str nil nil nil + indent)))) + +(defun erc-speedbar-update-channel (buffer) + "Update the speedbar information about a ERC buffer. The update +is only done when the channel is actually expanded already." + ;; This is only a rude hack and doesn't care about multiserver usage + ;; yet, consider this a brain storming, better ideas? + (with-current-buffer speedbar-buffer + (save-excursion + (goto-char (point-min)) + (when (re-search-forward (concat "^1: *.+. *" + (regexp-quote (buffer-name buffer))) + nil t) + (beginning-of-line) + (speedbar-delete-subblock 1) + (erc-speedbar-expand-channel "+" buffer 1))))) + +(defun erc-speedbar-expand-user (text token indent) + (cond ((string-match "+" text) + (speedbar-change-expand-button-char ?-) + (speedbar-with-writable + (save-excursion + (end-of-line) (forward-char 1) + (let ((finger (nth 0 token)) + (name (nth 1 token)) + (info (nth 2 token))) + (when finger + (speedbar-make-tag-line + nil nil nil nil + finger nil nil nil + (1+ indent))) + (when name + (speedbar-make-tag-line + nil nil nil nil + name nil nil nil + (1+ indent))) + (when info + (speedbar-make-tag-line + nil nil nil nil + info nil nil nil + (1+ indent))))))) + ((string-match "-" text) + (speedbar-change-expand-button-char ?+) + (speedbar-delete-subblock indent)) + (t (error "Ooops... not sure what to do"))) + (speedbar-center-buffer-smartly)) + +(defun erc-speedbar-goto-buffer (text buffer indent) + "When user clicks on TEXT, goto an ERC buffer. +The INDENT level is ignored." + (if (featurep 'dframe) + (progn + (dframe-select-attached-frame speedbar-frame) + (let ((bwin (get-buffer-window buffer 0))) + (if bwin + (progn + (select-window bwin) + (raise-frame (window-frame bwin))) + (if dframe-power-click + (let ((pop-up-frames t)) + (select-window (display-buffer buffer))) + (dframe-select-attached-frame speedbar-frame) + (switch-to-buffer buffer))))) + (let ((bwin (get-buffer-window buffer 0))) + (if bwin + (progn + (select-window bwin) + (raise-frame (window-frame bwin))) + (if speedbar-power-click + (let ((pop-up-frames t)) (select-window (display-buffer buffer))) + (dframe-select-attached-frame speedbar-frame) + (switch-to-buffer buffer)))))) + +(defun erc-speedbar-line-text () + "Return the text for the item on the current line." + (beginning-of-line) + (when (re-search-forward "[]>] " nil t) + (buffer-substring-no-properties (point) (point-at-eol)))) + +(defun erc-speedbar-item-info () + "Display information about the current buffer on the current line." + (let ((data (speedbar-line-token)) + (txt (erc-speedbar-line-text))) + (cond ((and data (listp data)) + (message "%s: %s" txt (car data))) + ((bufferp data) + (message "Channel: %s" txt)) + (t + (message "%s" txt))))) + +(provide 'erc-speedbar) +;;; erc-speedbar.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 7a6558a4-3308-4bf5-a284-e1d042c933c6 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-spelling.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-spelling.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,93 @@ +;;; erc-spelling.el --- use flyspell in ERC + +;; Copyright (C) 2005, 2006 Free Software Foundation, Inc. + +;; Author: Jorgen Schaefer +;; Keywords: irc +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcSpelling + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This is an ERC module to enable flyspell mode in ERC buffers. This +;; ensures correct behavior of flyspell, and even sets up a +;; channel-local dictionary if so required. + +;;; Code: + +(require 'erc) +(require 'flyspell) + +;;;###autoload (autoload 'erc-spelling-mode "erc-spelling" nil t) +(define-erc-module spelling nil + "Enable flyspell mode in ERC buffers." + ;; Use erc-connect-pre-hook instead of erc-mode-hook as pre-hook is + ;; called AFTER the server buffer is initialized. + ((add-hook 'erc-connect-pre-hook 'erc-spelling-init) + (mapc (lambda (buffer) + (with-current-buffer buffer (erc-spelling-init))) + (erc-buffer-list))) + ((remove-hook 'erc-connect-pre-hook 'erc-spelling-init) + (mapc (lambda (buffer) + (with-current-buffer buffer (flyspell-mode 0))) + (erc-buffer-list)))) + +(defcustom erc-spelling-dictionaries nil + "An alist mapping buffer names to dictionaries. +The `car' of every cell is a buffer name, the `cadr' is the +string name of an associated dictionary. +The dictionary is inherited from server buffers, so if you want a +default dictionary for some server, you can use a server buffer +name here." + :type '(choice (const nil) + (repeat (cons (string :tag "Buffer name") + (string :tag "Dictionary")))) + :group 'erc-spelling) + +(defun erc-spelling-init () + "Enable flyspell mode in an ERC buffer." + (let ((name (downcase (buffer-name))) + (dicts erc-spelling-dictionaries)) + (while (and dicts + (not (string= name (downcase (caar dicts))))) + (setq dicts (cdr dicts))) + (setq ispell-local-dictionary + (if dicts + (cadr (car dicts)) + (let ((server (erc-server-buffer))) + (if server + (with-current-buffer server + ispell-local-dictionary) + nil))))) + (setq flyspell-generic-check-word-p 'erc-spelling-flyspell-verify) + (flyspell-mode 1)) + +(put 'erc-mode + 'flyspell-mode-predicate + 'erc-spelling-flyspell-verify) + +(defun erc-spelling-flyspell-verify () + "Flyspell only the input line, nothing else." + (> (point) + erc-input-marker)) + +(provide 'erc-spelling) + +;; arch-tag: 04ae1c46-0fd1-4e1a-8b80-55bfa471c945 +;;; erc-spelling.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-stamp.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-stamp.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,341 @@ +;;; erc-stamp.el --- Timestamping for Emacs IRC CLient + +;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm, processes, timestamp +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcStamp + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; The code contained in this module is responsible for inserting +;; timestamps into ERC buffers. In order to actually activate this, +;; you must call `erc-timestamp-mode'. + +;; You can choose between two different ways of inserting timestamps. +;; Customize `erc-insert-timestamp-function' and +;; `erc-insert-away-timestamp-function'. + +;;; Code: + +(require 'erc) +(require 'erc-compat) + +(defgroup erc-stamp nil + "For long conversation on IRC it is sometimes quite +useful to have individual messages timestamp. This +group provides settings related to the format and display +of timestamp information in `erc-mode' buffer. + +For timestamping to be activated, you just need to load `erc-stamp' +in your .emacs file or interactively using `load-library'." + :group 'erc) + +(defcustom erc-timestamp-format "[%H:%M]" + "*If set to a string, messages will be timestamped. +This string is processed using `format-time-string'. +Good examples are \"%T\" and \"%H:%M\". + +If nil, timestamping is turned off." + :group 'erc-stamp + :type '(choice (const nil) + (string))) + +(defcustom erc-insert-timestamp-function 'erc-insert-timestamp-right + "*Function to use to insert timestamps. + +It takes a single argument STRING which is the final string +which all text-properties already appended. This function only cares about +inserting this string at the right position. Narrowing is in effect +while it is called, so (point-min) and (point-max) determine the region to +operate on." + :group 'erc-stamp + :type '(choice (const :tag "Right" erc-insert-timestamp-right) + (const :tag "Left" erc-insert-timestamp-left) + function)) + +(defcustom erc-away-timestamp-format "<%H:%M>" + "*Timestamp format used when marked as being away. + +If nil, timestamping is turned off when away unless `erc-timestamp-format' +is set. + +If `erc-timestamp-format' is set, this will not be used." + :group 'erc-stamp + :type '(choice (const nil) + (string))) + +(defcustom erc-insert-away-timestamp-function 'erc-insert-timestamp-right + "*Function to use to insert the away timestamp. + +See `erc-insert-timestamp-function' for details." + :group 'erc-stamp + :type '(choice (const :tag "Right" erc-insert-timestamp-right) + (const :tag "Left" erc-insert-timestamp-left) + function)) + +(defcustom erc-hide-timestamps nil + "*If non-nil, timestamps will be invisible. + +This is useful for logging, because, although timestamps will be +hidden, they will still be present in the logs." + :group 'erc-stamp + :type 'boolean) + +(defcustom erc-echo-timestamps nil + "*If non-nil, print timestamp in the minibuffer when point is moved. +Using this variable, you can turn off normal timestamping, +and simply move point to an irc message to see its timestamp +printed in the minibuffer." + :group 'erc-stamp + :type 'boolean) + +(defcustom erc-echo-timestamp-format "Timestamped %A, %H:%M:%S" + "*Format string to be used when `erc-echo-timestamps' is non-nil. +This string specifies the format of the timestamp being echoed in +the minibuffer." + :group 'erc-stamp + :type 'string) + +(defcustom erc-timestamp-intangible t + "*Whether the timestamps should be intangible, i.e. prevent the point +from entering them and instead jump over them." + :group 'erc-stamp + :type 'boolean) + +(defface erc-timestamp-face '((t (:bold t :foreground "green"))) + "ERC timestamp face." + :group 'erc-faces) + +;;;###autoload (autoload 'erc-timestamp-mode "erc-stamp" nil t) +(define-erc-module stamp timestamp + "This mode timestamps messages in the channel buffers." + ((add-hook 'erc-mode-hook 'erc-munge-invisibility-spec) + (add-hook 'erc-insert-modify-hook 'erc-add-timestamp t) + (add-hook 'erc-send-modify-hook 'erc-add-timestamp t)) + ((remove-hook 'erc-mode-hook 'erc-munge-invisibility-spec) + (remove-hook 'erc-insert-modify-hook 'erc-add-timestamp) + (remove-hook 'erc-send-modify-hook 'erc-add-timestamp))) + +(defun erc-add-timestamp () + "Add timestamp and text-properties to message. + +This function is meant to be called from `erc-insert-modify-hook' +or `erc-send-modify-hook'." + (unless (get-text-property (point) 'invisible) + (let ((ct (current-time))) + (if (fboundp erc-insert-timestamp-function) + (funcall erc-insert-timestamp-function + (erc-format-timestamp ct erc-timestamp-format)) + (error "Timestamp function unbound")) + (when (and (fboundp erc-insert-away-timestamp-function) + erc-away-timestamp-format + (with-current-buffer (erc-server-buffer) erc-away) + (not erc-timestamp-format)) + (funcall erc-insert-away-timestamp-function + (erc-format-timestamp ct erc-away-timestamp-format))) + (add-text-properties (point-min) (point-max) + (list 'timestamp ct)) + (add-text-properties (point-min) (point-max) + (list 'point-entered 'erc-echo-timestamp))))) + +(defvar erc-timestamp-last-inserted nil + "Last timestamp inserted into the buffer.") +(make-variable-buffer-local 'erc-timestamp-last-inserted) + +(defcustom erc-timestamp-only-if-changed-flag t + "*Insert timestamp only if its value changed since last insertion. +If `erc-insert-timestamp-function' is `erc-insert-timestamp-left', a +string of spaces which is the same size as the timestamp is added to +the beginning of the line in its place. If you use +`erc-insert-timestamp-right', nothing gets inserted in place of the +timestamp." + :group 'erc-stamp + :type 'boolean) + +(defcustom erc-timestamp-right-column nil + "*If non-nil, the column at which the timestamp is inserted, +if the timestamp is to be printed to the right. If nil, +`erc-insert-timestamp-right' will use other means to determine +the correct column." + :group 'erc-stamp + :type '(choice + (integer :tag "Column number") + (const :tag "Unspecified" nil))) + +(defcustom erc-timestamp-right-align-by-pixel nil + "*If non-nil, insert the right timestamp based on a pixel value. +This is needed when variable-width text precedes a timestamp. +Unfortunately, it only works in Emacs 22 and when using the X +Window System." + :group 'erc-stamp + :type 'boolean) + +(defun erc-insert-timestamp-left (string) + "Insert timestamps at the beginning of the line." + (goto-char (point-min)) + (let* ((ignore-p (and erc-timestamp-only-if-changed-flag + (string-equal string erc-timestamp-last-inserted))) + (len (length string)) + (s (if ignore-p (make-string len ? ) string))) + (unless ignore-p (setq erc-timestamp-last-inserted string)) + (erc-put-text-property 0 len 'field 'erc-timestamp s) + (insert s))) + +(defun erc-insert-aligned (string pos &optional fallback) + "Insert STRING based on a fraction of the width of the buffer. +Fraction is roughly (/ POS (window-width)). + +If `erc-timestamp-right-align-by-pixel' is nil, use +\(- POS FALLBACK) to determine how many spaces to insert." + (if (not erc-timestamp-right-align-by-pixel) + (insert (make-string (- pos fallback) ? ) string) + (insert " ") + (let ((offset (floor (* (/ (1- pos) (window-width) 1.0) + (nth 2 (window-inside-pixel-edges)))))) + (put-text-property (1- (point)) (point) 'display + `(space :align-to (,offset)))) + (insert string))) + +(defun erc-insert-timestamp-right (string) + "Insert timestamp on the right side of the screen. +STRING is the timestamp to insert. The function is a possible value +for `erc-insert-timestamp-function'. + +If `erc-timestamp-only-if-changed-flag' is nil, a timestamp is always +printed. If this variable is non-nil, a timestamp is only printed if +it is different from the last. + +If `erc-timestamp-right-column' is set, its value will be used as the +column at which the timestamp is to be printed. If it is nil, and +`erc-fill-mode' is active, then the timestamp will be printed just +before `erc-fill-column'. Otherwise, if the current buffer is +shown in a window, that window's width is used. If the buffer is +not shown, and `fill-column' is set, then the timestamp will be +printed just `fill-column'. As a last resort, the timestamp will +be printed just before the window-width." + (unless (and erc-timestamp-only-if-changed-flag + (string-equal string erc-timestamp-last-inserted)) + (setq erc-timestamp-last-inserted string) + (goto-char (point-max)) + (forward-char -1);; before the last newline + (let* ((current-window (get-buffer-window (current-buffer))) + (pos (cond + (erc-timestamp-right-column + (+ erc-timestamp-right-column (length string))) + ((and (boundp 'erc-fill-mode) + erc-fill-mode + (boundp 'erc-fill-column)) + (1+ erc-fill-column)) + (current-window + (- (window-width current-window) + 1)) + (fill-column + (1+ fill-column)) + (t + (- (window-width) + 1)))) + (from (point)) + (col (current-column)) + indent) + ;; deal with variable-width characters + (setq pos (- pos (string-width string)) + ;; the following is a kludge that works with most + ;; international input + col (+ col (ceiling (/ (- col (- (point) (point-at-bol))) 1.6)))) + (if (< col pos) + (erc-insert-aligned string pos col) + (newline) + (setq from (point)) + (indent-to pos) + (insert string)) + (erc-put-text-property from (1+ (point)) 'field 'erc-timestamp) + (erc-put-text-property from (1+ (point)) 'rear-nonsticky t) + (when erc-timestamp-intangible + (erc-put-text-property from (1+ (point)) 'intangible t))))) + +;; for testing: (setq erc-timestamp-only-if-changed-flag nil) + +(defun erc-format-timestamp (time format) + "Return TIME formatted as string according to FORMAT. +Return the empty string if FORMAT is nil." + (if format + (let ((ts (format-time-string format time))) + (erc-put-text-property 0 (length ts) 'face 'erc-timestamp-face ts) + (erc-put-text-property 0 (length ts) 'invisible 'timestamp ts) + (erc-put-text-property 0 (length ts) + 'isearch-open-invisible 'timestamp ts) + ;; N.B. Later use categories instead of this harmless, but + ;; inelegant, hack. -- BPT + (when erc-timestamp-intangible + (erc-put-text-property 0 (length ts) 'intangible t ts)) + ts) + "")) + +;; This function is used to munge `buffer-invisibility-spec to an +;; appropriate value. Currently, it only handles timestamps, thus its +;; location. If you add other features which affect invisibility, +;; please modify this function and move it to a more appropriate +;; location. +(defun erc-munge-invisibility-spec () + (if erc-hide-timestamps + (setq buffer-invisibility-spec + (if (listp buffer-invisibility-spec) + (cons 'timestamp buffer-invisibility-spec) + (list 't 'timestamp))) + (setq buffer-invisibility-spec + (if (listp buffer-invisibility-spec) + (remove 'timestamp buffer-invisibility-spec) + (list 't))))) + +(defun erc-hide-timestamps () + "Hide timestamp information from display." + (interactive) + (setq erc-hide-timestamps t) + (erc-munge-invisibility-spec)) + +(defun erc-show-timestamps () + "Show timestamp information on display. +This function only works if `erc-timestamp-format' was previously +set, and timestamping is already active." + (interactive) + (setq erc-hide-timestamps nil) + (erc-munge-invisibility-spec)) + +(defun erc-echo-timestamp (before now) + "Print timestamp text-property of an IRC message. +Argument BEFORE is where point was before it got moved and +NOW is position of point currently." + (when erc-echo-timestamps + (let ((stamp (get-text-property now 'timestamp))) + (when stamp + (message (format-time-string erc-echo-timestamp-format + stamp)))))) + +(provide 'erc-stamp) + +;;; erc-stamp.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 9f6d31bf-61ba-45c5-bdbf-56331486ea27 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-track.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-track.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,839 @@ +;;; erc-track.el --- Track modified channel buffers + +;; Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm, faces +;; URL: http://www.emacswiki.org/cgi-bin/wiki.pl?ErcChannelTracking + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; Highlights keywords and pals (friends), and hides or highlights fools +;; (using a dark color). Add to your ~/.emacs: + +;; (require 'erc-track) +;; (erc-track-mode 1) + +;; Todo: +;; * Add extensibility so that custom functions can track +;; custom modification types. + +(eval-when-compile (require 'cl)) +(require 'erc) +(require 'erc-compat) +(require 'erc-match) + +;;; Code: + +(defgroup erc-track nil + "Track active buffers and show activity in the modeline." + :group 'erc) + +(defcustom erc-track-visibility t + "Where do we look for buffers to determine their visibility? +The value of this variable determines, when a buffer is considered +visible or invisible. New messages in invisible buffers are tracked, +while switching to visible buffers when they are tracked removes them +from the list. See also `erc-track-when-inactive-mode'. + +Possible values are: + +t - all frames +visible - all visible frames +nil - only the selected frame +selected-visible - only the selected frame if it is visible + +Activity means that there was no user input in the last 10 seconds." + :group 'erc-track + :type '(choice (const :tag "All frames" t) + (const :tag "All visible frames" visible) + (const :tag "Only the selected frame" nil) + (const :tag "Only the selected frame if it was active" + active))) + +(defcustom erc-track-exclude nil + "A list targets (channel names or query targets) which should not be tracked." + :group 'erc-track + :type '(repeat string)) + +(defcustom erc-track-exclude-types '("NICK") + "*List of message types to be ignored. +This list could look like '(\"JOIN\" \"PART\")." + :group 'erc-track + :type 'erc-message-type) + +(defcustom erc-track-exclude-server-buffer nil + "*If true, don't perform tracking on the server buffer; this is +useful for excluding all the things like MOTDs from the server and +other miscellaneous functions." + :group 'erc-track + :type 'boolean) + +(defcustom erc-track-shorten-start 1 + "This number specifies the minimum number of characters a channel name in +the mode-line should be reduced to." + :group 'erc-track + :type 'number) + +(defcustom erc-track-shorten-cutoff 4 + "All channel names longer than this value will be shortened." + :group 'erc-track + :type 'number) + +(defcustom erc-track-shorten-aggressively nil + "*If non-nil, channel names will be shortened more aggressively. +Usually, names are not shortened if this will save only one character. +Example: If there are two channels, #linux-de and #linux-fr, then +normally these will not be shortened. When shortening aggressively, +however, these will be shortened to #linux-d and #linux-f. + +If this variable is set to `max', then channel names will be shortened +to the max. Usually, shortened channel names will remain unique for a +given set of existing channels. When shortening to the max, the shortened +channel names will be unique for the set of active channels only. +Example: If there are tow active channels #emacs and #vi, and two inactive +channels #electronica and #folk, then usually the active channels are +shortened to #em and #v. When shortening to the max, however, #emacs is +not compared to #electronica -- only to #vi, therefore it can be shortened +even more and the result is #e and #v. + +This setting is used by `erc-track-shorten-names'." + :group 'erc-track + :type '(choice (const :tag "No" nil) + (const :tag "Yes" t) + (const :tag "Max" max))) + +(defcustom erc-track-shorten-function 'erc-track-shorten-names + "*This function will be used to reduce the channel names before display. +It takes one argument, CHANNEL-NAMES which is a list of strings. +It should return a list of strings of the same number of elements. +If nil instead of a function, shortening is disabled." + :group 'erc-track + :type '(choice (const :tag "Disabled") + function)) + +(defcustom erc-track-use-faces t + "*Use faces in the mode-line. +The faces used are the same as used for text in the buffers. +\(e.g. `erc-pal-face' is used if a pal sent a message to that channel.)" + :group 'erc-track + :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) + "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)) + +(defcustom erc-track-priority-faces-only nil + "Only track text highlighted with a priority face. +If you would like to ignore changes in certain channels where there +are no faces corresponding to your `erc-track-faces-priority-list', set +this variable. You can set a list of channel name strings, so those +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 + :type '(choice (const nil) + (repeat string) + (const all))) + +(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' + +Any other value means add to the end of `global-mode-string'." + :group 'erc-track + :type '(choice (const :tag "Just before mode information" before-modes) + (const :tag "Just after mode information" after-modes) + (const :tag "After all other information" nil)) + :set (lambda (sym val) + (set sym val) + (when (and (boundp 'erc-track-mode) + erc-track-mode) + (erc-track-remove-from-mode-line) + (erc-track-add-to-mode-line val)))) + +(defun erc-modified-channels-object (strings) + "Generate a new `erc-modified-channels-object' based on STRINGS. +If STRINGS is nil, we initialize `erc-modified-channels-object' to +an appropriate initial value for this flavor of Emacs." + (if strings + (if (featurep 'xemacs) + (let ((e-m-c-s '("["))) + (push (cons (extent-at 0 (car strings)) (car strings)) + e-m-c-s) + (dolist (string (cdr strings)) + (push "," e-m-c-s) + (push (cons (extent-at 0 string) string) + e-m-c-s)) + (push "] " e-m-c-s) + (reverse e-m-c-s)) + (concat (if (eq erc-track-position-in-mode-line 'after-modes) + "[" " [") + (mapconcat 'identity (nreverse strings) ",") + (if (eq erc-track-position-in-mode-line 'before-modes) + "] " "]"))) + (if (featurep 'xemacs) '() ""))) + +(defvar erc-modified-channels-object (erc-modified-channels-object nil) + "Internal object used for displaying modified channels in the mode line.") + +(put 'erc-modified-channels-object 'risky-local-variable t); allow properties + +(defvar erc-modified-channels-alist nil + "An ALIST used for tracking channel modification activity. +Each element looks like (BUFFER COUNT FACE) where BUFFER is a buffer +object of the channel the entry corresponds to, COUNT is a number +indicating how often activity was noticed, and FACE is the face to use +when displaying the buffer's name. See `erc-track-faces-priority-list', +and `erc-track-showcount'. + +Entries in this list should only happen for buffers where activity occurred +while the buffer was not visible.") + +(defcustom erc-track-showcount nil + "If non-nil, count of unseen messages will be shown for each channel." + :type 'boolean + :group 'erc-track) + +(defcustom erc-track-showcount-string ":" + "The string to display between buffer name and the count in the mode line. +The default is a colon, resulting in \"#emacs:9\"." + :type 'string + :group 'erc-track) + +(defcustom erc-track-switch-from-erc t + "If non-nil, `erc-track-switch-buffer' will return to the last non-erc buffer +when there are no more active channels." + :type 'boolean + :group 'erc-track) + +(defcustom erc-track-switch-direction 'oldest + "Direction `erc-track-switch-buffer' should switch. + + oldest - find oldest active buffer + newest - find newest active buffer + leastactive - find buffer with least unseen messages + mostactive - find buffer with most unseen messages." + :group 'erc-track + :type '(choice (const oldest) + (const newest) + (const leastactive) + (const mostactive))) + + +(defun erc-track-remove-from-mode-line () + "Remove `erc-track-modified-channels' from the mode-line" + (when (boundp 'mode-line-modes) + (setq mode-line-modes + (remove '(t erc-modified-channels-object) mode-line-modes))) + (when (consp global-mode-string) + (setq global-mode-string + (delq 'erc-modified-channels-object global-mode-string)))) + +(defun erc-track-add-to-mode-line (position) + "Add `erc-track-modified-channels' to POSITION in the mode-line. +See `erc-track-position-in-mode-line' for possible values." + ;; CVS Emacs has a new format string, and global-mode-string + ;; is very far to the right. + (cond ((and (eq position 'before-modes) + (boundp 'mode-line-modes)) + (add-to-list 'mode-line-modes + '(t erc-modified-channels-object))) + ((and (eq position 'after-modes) + (boundp 'mode-line-modes)) + (add-to-list 'mode-line-modes + '(t erc-modified-channels-object) t)) + (t + (when (not global-mode-string) + (setq global-mode-string '(""))) ; Padding for mode-line wart + (add-to-list 'global-mode-string + 'erc-modified-channels-object + t)))) + +;;; Shortening of names + +(defun erc-track-shorten-names (channel-names) + "Call `erc-unique-channel-names' with the correct parameters. +This function is a good value for `erc-track-shorten-function'. +The list of all channels is returned by `erc-all-buffer-names'. +CHANNEL-NAMES is the list of active channel names. +Only channel names longer than `erc-track-shorten-cutoff' are +actually shortened, and they are only shortened to a minimum +of `erc-track-shorten-start' characters." + (erc-unique-channel-names + (erc-all-buffer-names) + channel-names + (lambda (s) + (> (length s) erc-track-shorten-cutoff)) + erc-track-shorten-start)) + +(defvar erc-default-recipients) + +(defun erc-all-buffer-names () + "Return all channel or query buffer names. +Note that we cannot use `erc-channel-list' with a nil argument, +because that does not return query buffers." + (save-excursion + (let (result) + (dolist (buf (buffer-list)) + (set-buffer buf) + (when (or (eq major-mode 'erc-mode) (eq major-mode 'erc-dcc-chat-mode)) + (setq result (cons (buffer-name) result)))) + result))) + +(defun erc-unique-channel-names (all active &optional predicate start) + "Return a list of unique channel names. +ALL is the list of all channel and query buffer names. +ACTIVE is the list of active buffer names. +PREDICATE is a predicate that should return non-nil if a name needs + no shortening. +START is the minimum length of the name used." + (if (eq 'max erc-track-shorten-aggressively) + ;; Return the unique substrings of all active channels. + (erc-unique-substrings active predicate start) + ;; Otherwise, determine the unique substrings of all channels, and + ;; for every active channel, return the corresponding substring. + ;; Given the names of the active channels, we now need to find the + ;; corresponding short name from the list of all substrings. To + ;; avoid problems when there are two channels and one is a + ;; substring of the other (notorious examples are #hurd and + ;; #hurd-bunny), every candidate gets the longest possible + ;; substring. + (let ((all-substrings (sort + (erc-unique-substrings all predicate start) + (lambda (a b) (> (length a) (length b))))) + result) + (dolist (channel active) + (let ((substrings all-substrings) + candidate + winner) + (while (and substrings (not winner)) + (setq candidate (car substrings) + substrings (cdr substrings)) + (when (and (string= candidate + (substring channel + 0 + (min (length candidate) + (length channel)))) + (not (member candidate result))) + (setq winner candidate))) + (setq result (cons winner result)))) + (nreverse result)))) + +(defun erc-unique-substrings (strings &optional predicate start) + "Return a list of unique substrings of STRINGS." + (if (or (not (numberp start)) + (< start 0)) + (setq start 2)) + (mapcar + (lambda (str) + (let* ((others (delete str (copy-sequence strings))) + (maxlen (length str)) + (i (min start + (length str))) + candidate + done) + (if (and (functionp predicate) (not (funcall predicate str))) + ;; do not shorten if a predicate exists and it returns nil + str + ;; Start with smallest substring candidate, ie. length 1. + ;; Then check all the others and see whether any of them starts + ;; with the same substring. While there is such another + ;; element in the list, increase the length of the candidate. + (while (not done) + (if (> i maxlen) + (setq done t) + (setq candidate (substring str 0 i) + done (not (erc-unique-substring-1 candidate others)))) + (setq i (1+ i))) + (if (and (= (length candidate) (1- maxlen)) + (not erc-track-shorten-aggressively)) + str + candidate)))) + strings)) + +(defun erc-unique-substring-1 (candidate others) + "Return non-nil when any string in OTHERS starts with CANDIDATE." + (let (result other (maxlen (length candidate))) + (while (and others + (not result)) + (setq other (car others) + others (cdr others)) + (when (and (>= (length other) maxlen) + (string= candidate (substring other 0 maxlen))) + (setq result other))) + result)) + +;;; Test: + +(erc-assert + (and + ;; verify examples from the doc strings + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi"))) + '("#em" "#vi")) ; emacs is different from electronica + (equal (let ((erc-track-shorten-aggressively t)) + (erc-unique-channel-names + '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi"))) + '("#em" "#v")) ; vi is shortened by one letter + (equal (let ((erc-track-shorten-aggressively 'max)) + (erc-unique-channel-names + '("#emacs" "#vi" "#electronica" "#folk") + '("#emacs" "#vi"))) + '("#e" "#v")) ; emacs need not be different from electronica + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("#linux-de" "#linux-fr") + '("#linux-de" "#linux-fr"))) + '("#linux-de" "#linux-fr")) ; shortening by one letter is too aggressive + (equal (let ((erc-track-shorten-aggressively t)) + (erc-unique-channel-names + '("#linux-de" "#linux-fr") + '("#linux-de" "#linux-fr"))) + '("#linux-d" "#linux-f")); now we want to be aggressive + ;; specific problems + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("#dunnet" "#lisp" "#sawfish" "#fsf" "#guile" + "#testgnome" "#gnu" "#fsbot" "#hurd" "#hurd-bunny" + "#emacs") + '("#hurd-bunny" "#hurd" "#sawfish" "#lisp"))) + '("#hurd-" "#hurd" "#s" "#l")) + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-substrings + '("#emacs" "#vi" "#electronica" "#folk"))) + '("#em" "#vi" "#el" "#f")) + (equal (let ((erc-track-shorten-aggressively t)) + (erc-unique-substrings + '("#emacs" "#vi" "#electronica" "#folk"))) + '("#em" "#v" "#el" "#f")) + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("#emacs" "#burse" "+linux.de" "#starwars" + "#bitlbee" "+burse" "#ratpoison") + '("+linux.de" "#starwars" "#burse"))) + '("+l" "#s" "#bu")) + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("fsbot" "#emacs" "deego") + '("fsbot"))) + '("fs")) + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("fsbot" "#emacs" "deego") + '("fsbot") + (lambda (s) + (> (length s) 4)) + 1)) + '("f")) + (equal (let ((erc-track-shorten-aggressively nil)) + (erc-unique-channel-names + '("fsbot" "#emacs" "deego") + '("fsbot") + (lambda (s) + (> (length s) 4)) + 2)) + '("fs")) + (let ((erc-track-shorten-aggressively nil)) + (equal (erc-unique-channel-names '("deego" "#hurd" "#hurd-bunny" "#emacs") + '("#hurd" "#hurd-bunny")) + '("#hurd" "#hurd-"))) + ;; general examples + (let ((erc-track-shorten-aggressively t)) + (and (equal (erc-unique-substring-1 "abc" '("ab" "abcd")) "abcd") + (not (erc-unique-substring-1 "a" '("xyz" "xab"))) + (equal (erc-unique-substrings '("abc" "xyz" "xab")) + '("ab" "xy" "xa")) + (equal (erc-unique-substrings '("abc" "abcdefg")) + '("abc" "abcd")))) + (let ((erc-track-shorten-aggressively nil)) + (and (equal (erc-unique-substring-1 "abc" '("ab" "abcd")) "abcd") + (not (erc-unique-substring-1 "a" '("xyz" "xab"))) + (equal (erc-unique-substrings '("abc" "xyz" "xab")) + '("abc" "xyz" "xab")) + (equal (erc-unique-substrings '("abc" "abcdefg")) + '("abc" "abcd")))))) + +;;; Module + +;;;###autoload (autoload 'erc-track-mode "erc-track" nil t) +(define-erc-module track track-modified-channels + "This mode tracks ERC channel buffers with activity." + ((erc-track-add-to-mode-line erc-track-position-in-mode-line) + (setq erc-modified-channels-object (erc-modified-channels-object nil)) + (erc-update-mode-line) + (if (featurep 'xemacs) + (defadvice switch-to-buffer (after erc-update (&rest args) activate) + (erc-modified-channels-update)) + (add-hook 'window-configuration-change-hook 'erc-modified-channels-update)) + (add-hook 'erc-insert-post-hook 'erc-track-modified-channels) + (add-hook 'erc-disconnected-hook 'erc-modified-channels-update)) + ((erc-track-remove-from-mode-line) + (if (featurep 'xemacs) + (ad-disable-advice 'switch-to-buffer 'after 'erc-update) + (remove-hook 'window-configuration-change-hook + 'erc-modified-channels-update)) + (remove-hook 'erc-disconnected-hook 'erc-modified-channels-update) + (remove-hook 'erc-insert-post-hook 'erc-track-modified-channels))) + +;;;###autoload (autoload 'erc-track-when-inactive-mode "erc-track" nil t) +(define-erc-module track-when-inactive nil + "This mode enables channel tracking even for visible buffers, +if you are inactivity." + ((if (featurep 'xemacs) + (defadvice switch-to-buffer (after erc-update-when-inactive (&rest args) activate) + (erc-user-is-active)) + (add-hook 'window-configuration-change-hook 'erc-user-is-active)) + (add-hook 'erc-send-completed-hook 'erc-user-is-active) + (add-hook 'erc-server-001-functions 'erc-user-is-active)) + ((erc-track-remove-from-mode-line) + (if (featurep 'xemacs) + (ad-disable-advice 'switch-to-buffer 'after 'erc-update-when-inactive) + (remove-hook 'window-configuration-change-hook 'erc-user-is-active)) + (remove-hook 'erc-send-completed-hook 'erc-user-is-active) + (remove-hook 'erc-server-001-functions 'erc-user-is-active) + (remove-hook 'erc-timer-hook 'erc-user-is-active))) + +;;; Visibility + +(defvar erc-buffer-activity nil + "Last time the user sent something.") + +(defvar erc-buffer-activity-timeout 10 + "How many seconds of inactivity by the user +to consider when `erc-track-visibility' is set to +only consider active buffers visible.") + +(defun erc-user-is-active (&rest ignore) + "Set `erc-buffer-activity'." + (setq erc-buffer-activity (erc-current-time)) + (erc-track-modified-channels)) + +(defun erc-buffer-visible (buffer) + "Return non-nil when the buffer is visible." + (if erc-track-when-inactive-mode + (when erc-buffer-activity; could be nil + (and (get-buffer-window buffer erc-track-visibility) + (<= (erc-time-diff erc-buffer-activity (erc-current-time)) + erc-buffer-activity-timeout))) + (get-buffer-window buffer erc-track-visibility))) + +;;; Tracking the channel modifications + +(defvar erc-modified-channels-update-inside nil + "Variable to prevent running `erc-modified-channels-update' multiple +times. Without it, you cannot debug `erc-modified-channels-display', +because the debugger also cases changes to the window-configuration.") + +(defun erc-modified-channels-update (&rest args) + "This function updates the information in `erc-modified-channels-alist' +according to buffer visibility. It calls +`erc-modified-channels-display' at the end. This should usually be +called via `window-configuration-change-hook'. +ARGS are ignored." + (interactive) + (unless erc-modified-channels-update-inside + (let ((erc-modified-channels-update-inside t)) + (mapcar (lambda (elt) + (let ((buffer (car elt))) + (when (or (not (bufferp buffer)) + (not (buffer-live-p buffer)) + (erc-buffer-visible buffer) + (not (with-current-buffer buffer + erc-server-connected))) + (erc-modified-channels-remove-buffer buffer)))) + erc-modified-channels-alist) + (erc-modified-channels-display) + (force-mode-line-update t)))) + +(defun erc-make-mode-line-buffer-name (string buffer &optional faces count) + "Return STRING as a button that switches to BUFFER when clicked. +If FACES are provided, color STRING with them." + ;; We define a new sparse keymap every time, because 1. this data + ;; structure is very small, the alternative would require us to + ;; defvar a keymap, 2. the user is not interested in customizing it + ;; (really?), 3. the defun needs to switch to BUFFER, so we would + ;; need to save that value somewhere. + (let ((map (make-sparse-keymap)) + (name (if erc-track-showcount + (concat string + erc-track-showcount-string + (int-to-string count)) + (copy-sequence string)))) + (define-key map (vector 'mode-line 'mouse-2) + `(lambda (e) + (interactive "e") + (save-selected-window + (select-window + (posn-window (event-start e))) + (switch-to-buffer ,buffer)))) + (define-key map (vector 'mode-line 'mouse-3) + `(lambda (e) + (interactive "e") + (save-selected-window + (select-window + (posn-window (event-start e))) + (switch-to-buffer-other-window ,buffer)))) + (put-text-property 0 (length name) 'local-map map name) + (when (and faces erc-track-use-faces) + (put-text-property 0 (length name) 'face faces name)) + name)) + +(defun erc-modified-channels-display () + "Set `erc-modified-channels-object' +according to `erc-modified-channels-alist'. +Use `erc-make-mode-line-buffer-name' to create buttons." + (if (or + (eq 'mostactive erc-track-switch-direction) + (eq 'leastactive erc-track-switch-direction)) + (erc-track-sort-by-activest)) + (if (null erc-modified-channels-alist) + (setq erc-modified-channels-object (erc-modified-channels-object nil)) + ;; erc-modified-channels-alist contains all the data we need. To + ;; better understand what is going on, we split things up into + ;; four lists: BUFFERS, COUNTS, SHORT-NAMES, and FACES. These + ;; four lists we use to create a new + ;; `erc-modified-channels-object' using + ;; `erc-make-mode-line-buffer-name'. + (let* ((buffers (mapcar 'car erc-modified-channels-alist)) + (counts (mapcar 'cadr erc-modified-channels-alist)) + (faces (mapcar 'cddr erc-modified-channels-alist)) + (long-names (mapcar #'(lambda (buf) + (or (buffer-name buf) + "")) + buffers)) + (short-names (if (functionp erc-track-shorten-function) + (funcall erc-track-shorten-function + long-names) + long-names)) + strings) + (while buffers + (when (car short-names) + (setq strings (cons (erc-make-mode-line-buffer-name + (car short-names) + (car buffers) + (car faces) + (car counts)) + strings))) + (setq short-names (cdr short-names) + buffers (cdr buffers) + counts (cdr counts) + faces (cdr faces))) + (when (featurep 'xemacs) + (erc-modified-channels-object nil)) + (setq erc-modified-channels-object + (erc-modified-channels-object strings))))) + +(defun erc-modified-channels-remove-buffer (buffer) + "Remove BUFFER from `erc-modified-channels-alist'." + (interactive "bBuffer: ") + (setq erc-modified-channels-alist + (delete (assq buffer erc-modified-channels-alist) + erc-modified-channels-alist)) + (when (interactive-p) + (erc-modified-channels-display))) + +(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)) + +(defun erc-track-modified-channels () + "Hook function for `erc-insert-post-hook' to check if the current +buffer should be added to the modeline as a hidden, modified +channel. Assumes it will only be called when current-buffer +is in `erc-mode'." + (let ((this-channel (or (erc-default-target) + (buffer-name (current-buffer))))) + (if (and (not (erc-buffer-visible (current-buffer))) + (not (member this-channel erc-track-exclude)) + (not (and erc-track-exclude-server-buffer + (string= this-channel + (buffer-name (erc-server-buffer))))) + (not (erc-message-type-member + (or (erc-find-parsed-property) + (point-min)) + erc-track-exclude-types))) + ;; If the active buffer is not visible (not shown in a + ;; window), and not to be excluded, determine the kinds of + ;; faces used in the current message, and unless the user + ;; wants to ignore changes in certain channels where there + ;; are no faces corresponding to `erc-track-faces-priority-list', + ;; and the faces in the current message are found in said + ;; priority list, add the buffer to the erc-modified-channels-alist, + ;; if it is not already there. If the buffer is already on the list + ;; (in the car), change its face attribute (in the cddr) if + ;; necessary. See `erc-modified-channels-alist' for the + ;; exact data structure used. + (let ((faces (erc-faces-in (buffer-string)))) + (unless (and + (or (eq erc-track-priority-faces-only 'all) + (member this-channel erc-track-priority-faces-only)) + (not (catch 'found + (dolist (f faces) + (when (member f erc-track-faces-priority-list) + (throw 'found t)))))) + (if (not (assq (current-buffer) erc-modified-channels-alist)) + ;; Add buffer, faces and counts + (setq erc-modified-channels-alist + (cons (cons (current-buffer) + (cons 1 (erc-track-find-face faces))) + erc-modified-channels-alist)) + ;; Else modify the face for the buffer, if necessary. + (when faces + (let* ((cell (assq (current-buffer) + erc-modified-channels-alist)) + (old-face (cddr cell)) + (new-face (erc-track-find-face + (if old-face + (cons old-face faces) + faces)))) + (setcdr cell (cons (1+ (cadr cell)) new-face))))) + ;; And display it + (erc-modified-channels-display))) + ;; Else if the active buffer is the current buffer, remove it + ;; from our list. + (when (or (erc-buffer-visible (current-buffer)) + (and this-channel + (assq (current-buffer) erc-modified-channels-alist) + (member this-channel erc-track-exclude))) + ;; Remove it from mode-line if buffer is visible or + ;; channel was added to erc-track-exclude recently. + (erc-modified-channels-remove-buffer (current-buffer)) + (erc-modified-channels-display))))) + +(defun erc-faces-in (str) + "Return a list of all faces used in STR." + (let ((i 0) + (m (length str)) + (faces (erc-list (get-text-property 0 'face str)))) + (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))) + faces)) + +(erc-assert + (let ((str "is bold")) + (put-text-property 3 (length str) + 'face '(bold erc-current-nick-face) + str) + (erc-faces-in str))) + +(defun erc-find-parsed-property () + "Find the next occurrence of the `erc-parsed' text property." + (text-property-not-all (point-min) (point-max) 'erc-parsed nil)) + +;;; Buffer switching + +(defvar erc-track-last-non-erc-buffer nil + "Stores the name of the last buffer you were in before activating +`erc-track-switch-buffers'") + +(defun erc-track-sort-by-activest () + "Sort erc-modified-channels-alist by activity. +That means the number of unseen messages in a channel." + (setq erc-modified-channels-alist + (sort erc-modified-channels-alist + (lambda (a b) (> (nth 1 a) (nth 1 b)))))) + +(defun erc-track-get-active-buffer (arg) + "Return the buffer name of ARG in `erc-modified-channels-alist'. +Negative arguments index in the opposite direction. This direction is +relative to `erc-track-switch-direction'" + (let ((dir erc-track-switch-direction) + offset) + (when (< arg 0) + (setq dir (case dir + (oldest 'newest) + (newest 'oldest) + (mostactive 'leastactive) + (leastactive 'mostactive))) + (setq arg (- arg))) + (setq offset (case dir + ((oldest leastactive) + (- (length erc-modified-channels-alist) arg)) + (t (1- arg)))) + ;; normalise out of range user input + (cond ((>= offset (length erc-modified-channels-alist)) + (setq offset (1- (length erc-modified-channels-alist)))) + ((< offset 0) + (setq offset 0))) + (car (nth offset erc-modified-channels-alist)))) + +(defun erc-track-switch-buffer (arg) + "Switch to the next active ERC buffer, or if there are no active buffers, +switch back to the last non-ERC buffer visited. Next is defined by +`erc-track-switch-direction', a negative argument will reverse this." + (interactive "p") + (when erc-track-mode + (cond (erc-modified-channels-alist + ;; if we're not in erc-mode, set this buffer to return to + (unless (eq major-mode 'erc-mode) + (setq erc-track-last-non-erc-buffer (current-buffer))) + ;; and jump to the next active channel + (switch-to-buffer (erc-track-get-active-buffer arg))) + ;; if no active channels, switch back to what we were doing before + ((and erc-track-last-non-erc-buffer + erc-track-switch-from-erc + (buffer-live-p erc-track-last-non-erc-buffer)) + (switch-to-buffer erc-track-last-non-erc-buffer))))) + +;; These bindings are global, because they pop us from any other +;; buffer to an active ERC buffer! + +(global-set-key (kbd "C-c C-@") 'erc-track-switch-buffer) +(global-set-key (kbd "C-c C-SPC") 'erc-track-switch-buffer) + +(provide 'erc-track) + +;;; erc-track.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 11b439f5-e5d7-4c6c-bb3f-eda98f9b0ac1 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-truncate.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-truncate.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,121 @@ +;;; erc-truncate.el --- Functions for truncating ERC buffers + +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +;; Author: Andreas Fuchs +;; Keywords: IRC, chat, client, Internet, logging + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This implements buffer truncation (and optional log file writing +;; support for the Emacs IRC client. Use `erc-truncate-mode' to switch +;; on. Use `erc-enable-logging' to enable logging of the stuff which +;; is getting truncated. + +;;; Code: + +(require 'erc) + +(defgroup erc-truncate nil + "Truncate buffers when they reach a certain size" + :group 'erc) + +(defcustom erc-max-buffer-size 30000 + "*Maximum size in chars of each ERC buffer. +Used only when auto-truncation is enabled. +\(see `erc-truncate-buffer' and `erc-insert-post-hook')." + :group 'erc-truncate + :type 'integer) + +;;;###autoload (autoload 'erc-truncate-mode "erc-truncate" nil t) +(define-erc-module truncate nil + "Truncate a query buffer if it gets too large. +This prevents the query buffer from getting too large, which can +bring any grown emacs to its knees after a few days worth of +tracking heavy-traffic channels." + ;;enable + ((add-hook 'erc-insert-post-hook 'erc-truncate-buffer)) + ;; disable + ((remove-hook 'erc-insert-post-hook 'erc-truncate-buffer))) + +;;;###autoload +(defun erc-truncate-buffer-to-size (size &optional buffer) + "Truncates the buffer to the size SIZE. +If BUFFER is not provided, the current buffer is assumed. The deleted +region is logged if `erc-logging-enabled' returns non-nil." + ;; If buffer is non-nil, but get-buffer does not return anything, + ;; then this is a bug. If buffer is a buffer name, get the buffer + ;; object. If buffer is nil, use the current buffer. + (if (not buffer) + (setq buffer (current-buffer)) + (unless (get-buffer buffer) + (error "erc-truncate-buffer-to-size: %S is not a buffer" buffer))) + (when (> (buffer-size buffer) (+ size 512)) + (save-excursion + (set-buffer buffer) + ;; Note that when erc-insert-post-hook runs, the buffer is + ;; narrowed to the new message. So do this delicate widening. + ;; I am not sure, I think this was not recommended behaviour in + ;; Emacs 20. + (save-restriction + (widen) + (let ((end (- erc-insert-marker size))) + ;; truncate at line boundaries + (goto-char end) + (beginning-of-line) + (setq end (point)) + ;; try to save the current buffer using + ;; `erc-save-buffer-in-logs'. We use this, in case the + ;; user has both `erc-save-buffer-in-logs' and + ;; `erc-truncate-buffer' in `erc-insert-post-hook'. If + ;; this is the case, only the non-saved part of the current + ;; buffer should be saved. Rather than appending the + ;; deleted part of the buffer to the log file. + ;; + ;; Alternatively this could be made conditional on: + ;; (not (memq 'erc-save-buffer-in-logs + ;; erc-insert-post-hook)) + ;; Comments? + (when (and (boundp 'erc-enable-logging) + erc-enable-logging + (erc-logging-enabled buffer)) + (erc-save-buffer-in-logs)) + ;; disable undoing for the truncating + (buffer-disable-undo) + (let ((inhibit-read-only t)) + (delete-region (point-min) end))) + (buffer-enable-undo))))) + +;;;###autoload +(defun erc-truncate-buffer () + "Truncates the current buffer to `erc-max-buffer-size'. +Meant to be used in hooks, like `erc-insert-post-hook'." + (interactive) + (erc-truncate-buffer-to-size erc-max-buffer-size)) + +(provide 'erc-truncate) +;;; erc-truncate.el ends here +;; +;; Local Variables: +;; indent-tabs-mode: t +;; tab-width: 8 +;; End: + +;; arch-tag: 22a2ea78-871f-4870-8f1e-efe534170311 diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc-xdcc.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc-xdcc.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,130 @@ +;;; erc-xdcc.el --- XDCC file-server support for ERC + +;; Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +;; Author: Mario Lang +;; Keywords: comm, processes + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; This file provides a very simple XDCC file server for the Emacs IRC Client. + +;;; Code: + +(require 'erc-dcc) + +(defcustom erc-xdcc-files nil + "*List of files to offer via XDCC. +Your friends should issue \"/ctcp yournick XDCC list\" to see this." + :group 'erc-dcc + :type '(repeat file)) + +(defcustom erc-xdcc-verbose-flag t + "*Report XDCC CTCP requests in the server buffer." + :group 'erc-dcc + :type 'boolean) + +(defcustom erc-xdcc-handler-alist + '(("help" . erc-xdcc-help) + ("list" . erc-xdcc-list) + ("send" . erc-xdcc-send)) + "*Sub-command handler alist for XDCC CTCP queries." + :group 'erc-dcc + :type '(alist :key-type (string :tag "Sub-command") :value-type function)) + +(defcustom erc-xdcc-help-text + '(("Hey " nick ", wondering how this works? Pretty easy.") + ("Available commands: XDCC [" + (mapconcat 'car erc-xdcc-handler-alist "|") "]") + ("Type \"/ctcp " (erc-current-nick) + " XDCC list\" to see the list of offered files, then type \"/ctcp " + (erc-current-nick) " XDCC send #\" to get a particular file number.")) + "*Help text sent in response to XDCC help command. +A list of messages, each consisting of strings and expressions, expressions +being evaluated and should return stings." + :group 'erc-dcc + :type '(repeat (repeat :tag "Message" (choice string sexp)))) + +;;;###autoload +(defun erc-xdcc-add-file (file) + "Add a file to `erc-xdcc-files'." + (interactive "fFilename to add to XDCC: ") + (if (file-exists-p file) + (add-to-list 'erc-xdcc-files file))) + +(defun erc-xdcc-reply (proc nick msg) + (process-send-string proc + (format "PRIVMSG %s :%s\n" nick msg))) + +;; CTCP query handlers + +(defvar erc-ctcp-query-XDCC-hook '(erc-xdcc) + "Hook called whenever a CTCP XDCC message is received.") + +(defun erc-xdcc (proc nick login host to query) + "Handle incoming CTCP XDCC queries." + (when erc-xdcc-verbose-flag + (erc-display-message nil 'notice proc + (format "XDCC %s (%s@%s) sends %S" nick login host query))) + (let* ((args (cdr (delete "" (split-string query " ")))) + (handler (cdr (assoc (downcase (car args)) erc-xdcc-handler-alist)))) + (if (and handler (functionp handler)) + (funcall handler proc nick login host (cdr args)) + (erc-xdcc-reply + proc nick + (format "Unknown XDCC sub-command, try \"/ctcp %s XDCC help\"" + (erc-current-nick)))))) + +(defun erc-xdcc-help (proc nick login host args) + "Send basic help information to NICK." + (mapc + (lambda (msg) + (erc-xdcc-reply proc nick + (mapconcat (lambda (elt) (if (stringp elt) elt (eval elt))) msg ""))) + erc-xdcc-help-text)) + +(defun erc-xdcc-list (proc nick login host args) + "Show the contents of `erc-xdcc-files' via privmsg to NICK." + (if (null erc-xdcc-files) + (erc-xdcc-reply proc nick "No files offered, sorry") + (erc-xdcc-reply proc nick "Num Filename") + (erc-xdcc-reply proc nick "--- -------------") + (let ((n 0)) + (dolist (file erc-xdcc-files) + (erc-xdcc-reply proc nick + (format "%02d. %s" + (setq n (1+ n)) + (erc-dcc-file-to-name file))))))) + +(defun erc-xdcc-send (proc nick login host args) + "Send a file to NICK." + (let ((n (string-to-number (car args))) + (len (length erc-xdcc-files))) + (cond + ((= len 0) + (erc-xdcc-reply proc nick "No files offered, sorry")) + ((or (< n 1) (> n len)) + (erc-xdcc-reply proc nick (format "%d out of range" n))) + (t (erc-dcc-send-file nick (nth (1- n) erc-xdcc-files) proc))))) + +(provide 'erc-xdcc) + +;; arch-tag: a13b62fe-2399-4562-af4e-f18a8dd4b9c8 +;;; erc-xdcc.el ends here diff -r dbd791ef90a1 -r 9b150bc96d33 lisp/erc/erc.el --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lisp/erc/erc.el Mon Jan 30 18:06:22 2006 +0000 @@ -0,0 +1,6144 @@ +;; erc.el --- An Emacs Internet Relay Chat client + +;; Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +;; 2006 Free Software Foundation, Inc. +;; Copyright (C) 2004 Brian Palmer + +;; Author: Alexander L. Belikoff (alexander@belikoff.net) +;; Contributors: Sergey Berezin (sergey.berezin@cs.cmu.edu), +;; Mario Lang (mlang@delysid.org), +;; Alex Schroeder (alex@gnu.org) +;; Andreas Fuchs (afs@void.at) +;; Gergely Nagy (algernon@midgard.debian.net) +;; David Edmondson (dme@dme.org) +;; Maintainer: Mario Lang (mlang@delysid.org) +;; Keywords: IRC, chat, client, Internet + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 2, or (at your option) +;; any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs; see the file COPYING. If not, write to the +;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301, USA. + +;;; Commentary: + +;; ERC is an IRC client for Emacs. + +;; For more information, see the following URLs: +;; * http://sf.net/projects/erc/ +;; * http://www.emacswiki.org/cgi-bin/wiki.pl?EmacsIRCClient + +;; Jul-26-2001. erc.el is now in CVS on SourceForge. I invite everyone +;; who wants to hack it to contact me in order to +;; get write access on the CVS. + +;; Installation: + +;; Put erc.el in your load-path, and put (require 'erc) in your .emacs. + +;; Configuration: + +;; Use M-x customize-group RET erc RET to get an overview +;; of all the variables you can tweak. + +;; Usage: + +;; To connect to an IRC server, do +;; +;; M-x erc-select RET +;; +;; After you are connected to a server, you can use C-h m or have a look at +;; the IRC menu. + +;;; History: +;; + +;;; Code: + +(defconst erc-version-string "Version 5.1 (Emacs 22)" + "ERC version. This is used by function `erc-version'.") + +(eval-when-compile (require 'cl)) +(require 'font-lock) +(require 'pp) +(require 'thingatpt) +(require 'erc-compat) +(require 'erc-menu) + +(defvar erc-official-location + "http://erc.sf.net (comments mailto://mlang@delysid.org)" + "Location of the ERC client on the Internet.") + +(defgroup erc nil + "Emacs Internet Relay Chat client." + :link '(url-link "http://www.emacswiki.org/cgi-bin/wiki.pl?EmacsIRCClient") + :prefix "erc-" + :group 'applications) + +(defgroup erc-buffers nil + "Creating new ERC buffers" + :group 'erc) + +(defgroup erc-display nil + "Settings for how various things are displayed" + :group 'erc) + +(defgroup erc-mode-line-and-header nil + "Displaying information in the mode-line and header" + :group 'erc-display) + +(defgroup erc-ignore nil + "Ignoring certain messages" + :group 'erc) + +(defgroup erc-query nil + "Using separate buffers for private discussions" + :group 'erc) + +(defgroup erc-quit-and-part nil + "Quitting and parting channels" + :group 'erc) + +(defgroup erc-paranoia nil + "Know what is sent and received; control the display of sensitive data." + :group 'erc) + +(defgroup erc-scripts nil + "Running scripts at startup and with /LOAD" + :group 'erc) + +(require 'erc-backend) + +;; compatibility with older ERC releases + +(if (fboundp 'defvaralias) + (progn + (defvaralias 'erc-announced-server-name 'erc-server-announced-name) + (erc-make-obsolete-variable 'erc-announced-server-name + 'erc-server-announced-name + "ERC 5.1") + (defvaralias 'erc-process 'erc-server-process) + (erc-make-obsolete-variable 'erc-process 'erc-server-process "ERC 5.1") + (defvaralias 'erc-default-coding-system 'erc-server-coding-system) + (erc-make-obsolete-variable 'erc-default-coding-system + 'erc-server-coding-system + "ERC 5.1")) + (message (concat "ERC: The function `defvaralias' is not bound. See the " + "NEWS file for variable name changes since ERC 5.0.4."))) + +(defalias 'erc-send-command 'erc-server-send) +(erc-make-obsolete 'erc-send-command 'erc-server-send "ERC 5.1") + +;; tunable connection and authentication parameters + +(defcustom erc-server nil + "IRC server to use. +See function `erc-compute-server' for more details on connection +parameters and authentication." + :group 'erc + :type '(choice (const nil) string)) + +(defcustom erc-port nil + "IRC port to use." + :group 'erc + :type '(choice (const nil) number string)) + +(defcustom erc-nick nil + "Nickname to use. + +Can be either a string, or a list of strings. +In the latter case, if the first nick in the list is already in use, +other nicks are tried in the list order. + +See function `erc-compute-nick' for more details on connection +parameters and authentication." + :group 'erc + :type '(choice (const nil) + (string :tag "Nickname") + (repeat string))) + +(defcustom erc-nick-uniquifier "`" + "The character to append to the nick if it is already in use." + :group 'erc + :type 'string) + +(defcustom erc-manual-set-nick-on-bad-nick-p nil + "If the nickname you chose isn't available, ERC should not automatically +attempt to set another nickname. You can manually set another nickname with +the /NICK command." + :group 'erc + :type 'boolean) + +(defcustom erc-user-full-name nil + "User full name. + +See function `erc-compute-full-name' for more details on connection +parameters and authentication." + :group 'erc + :type '(choice (const nil) string function) + :set (lambda (sym val) + (if (functionp val) + (set sym (funcall val)) + (set sym val)))) + +(defvar erc-password nil + "ERC password to use in authentication (not necessary).") + +(defcustom erc-user-mode nil + "Initial user modes to be set after a connection is established." + :group 'erc + :type '(choice (const nil) string function)) + + +(defcustom erc-prompt-for-password t + "Asks before using the default password, or whether to enter a new one." + :group 'erc + :type 'boolean) + +(defcustom erc-warn-about-blank-lines t + "Warn the user if they attempt to send a blank line." + :group 'erc + :type 'boolean) + +(defcustom erc-send-whitespace-lines nil + "If set to non-nil, send lines consisting of only whitespace." + :group 'erc + :type 'boolean) + +(defcustom erc-hide-prompt nil + "If non-nil, do not display the prompt for commands. + +\(A command is any input starting with a '/'). + +See also the variables `erc-prompt' and `erc-command-indicator'." + :group 'erc-display + :type 'boolean) + +;; tunable GUI stuff + +(defcustom erc-show-my-nick t + "If non-nil, display one's own nickname when sending a message. + +If non-nil, \"\" will be shown. +If nil, only \"> \" will be shown." + :group 'erc-display + :type 'boolean) + +(define-widget 'erc-message-type 'set + "A set of standard IRC Message types." + :args '((const "JOIN") + (const "KICK") + (const "NICK") + (const "PART") + (const "QUIT") + (const "MODE") + (repeat :inline t :tag "Others" (string :tag "IRC Message Type")))) + +(defcustom erc-hide-list nil + "*List of IRC type messages to hide. +A typical value would be '(\"JOIN\" \"PART\" \"QUIT\")." + :group 'erc-ignore + :type 'erc-message-type) + +(defvar erc-session-password nil + "The password used for the current session.") +(make-variable-buffer-local 'erc-session-password) + +(defcustom erc-disconnected-hook nil + "Run this hook with arguments (NICK IP REASON) when disconnected. +This happens before automatic reconnection. Note, that +`erc-server-QUIT-functions' might not be run when we disconnect, +simply because we do not necessarily receive the QUIT event." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-complete-functions nil + "These functions get called when the user hits TAB in ERC. +Each function in turn is called until one returns non-nil to +indicate it has handled the input." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-join-hook nil + "Hook run when we join a channel. Hook functions are called +without arguments, with the current buffer set to the buffer of +the new channel. + +See also `erc-server-JOIN-functions', `erc-part-hook'." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-quit-hook nil + "Hook run when processing a quit command directed at our nick. + +The hook receives one argument, the current PROCESS. +See also `erc-server-QUIT-functions' and `erc-disconnected-hook'." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-part-hook nil + "Hook run when processing a PART message directed at our nick. + +The hook receives one argument, the current BUFFER. +See also `erc-server-QUIT-functions', `erc-quit-hook' and +`erc-disconnected-hook'." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-kick-hook nil + "Hook run when processing a KICK message directed at our nick. + +The hook receives one argument, the current BUFFER. +See also `erc-server-PART-functions' and `erc-part-hook'." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-nick-changed-functions nil + "List of functions run when your nick was successfully changed. + +Each function should accept two arguments, NEW-NICK and OLD-NICK." + :group 'erc-hooks + :type 'hook) + +(defcustom erc-connect-pre-hook '(erc-initialize-log-marker) + "Hook called just before `erc' calls `erc-connect'. +Functions are run in the buffer-to-be." + :group 'erc-hooks + :type 'hook) + + +(defvar erc-channel-users nil + "A hash table of members in the current channel, which +associates nicknames with cons cells of the form: +\(USER . MEMBER-DATA) where USER is a pointer to an +erc-server-user struct, and MEMBER-DATA is a pointer to an +erc-channel-user struct.") +(make-variable-buffer-local 'erc-channel-users) + +(defvar erc-server-users nil + "A hash table of users on the current server, which associates +nicknames with erc-server-user struct instances.") +(make-variable-buffer-local 'erc-server-users) + +(defun erc-downcase (string) + "Convert STRING to IRC standard conforming downcase." + (let ((s (downcase string)) + (c '((?\[ . ?\{) + (?\] . ?\}) + (?\\ . ?\|) + (?~ . ?^)))) + (save-match-data + (while (string-match "[]\\[~]" s) + (aset s (match-beginning 0) + (cdr (assq (aref s (match-beginning 0)) c))))) + s)) + +(defstruct (erc-server-user (:type vector) :named) + ;; User data + nickname host login full-name info + ;; Buffers + ;; + ;; This is an alist of the form (BUFFER . CHANNEL-DATA), where + ;; CHANNEL-DATA is either nil or an erc-channel-user struct. + (buffers nil) + ) + +(defstruct (erc-channel-user (:type vector) :named) + op voice + ;; Last message time (in the form of the return value of + ;; (current-time) + ;; + ;; This is useful for ordered name completion. + (last-message-time nil)) + +(defsubst erc-get-channel-user (nick) + "Finds the (USER . CHANNEL-DATA) element corresponding to NICK +in the current buffer's `erc-channel-users' hash table." + (gethash (erc-downcase nick) erc-channel-users)) + +(defsubst erc-get-server-user (nick) + "Finds the USER corresponding to NICK in the current server's +`erc-server-users' hash table." + (with-current-buffer (process-buffer erc-server-process) + (gethash (erc-downcase nick) erc-server-users))) + +(defsubst erc-add-server-user (nick user) + "This function is for internal use only. + +Adds USER with nickname NICK to the `erc-server-users' hash table." + (with-current-buffer (process-buffer erc-server-process) + (puthash (erc-downcase nick) user erc-server-users))) + +(defsubst erc-remove-server-user (nick) + "This function is for internal use only. + +Removes the user with nickname NICK from the `erc-server-users' +hash table. This user is not removed from the +`erc-channel-users' lists of other buffers. + +See also: `erc-remove-user'." + (with-current-buffer (process-buffer erc-server-process) + (remhash (erc-downcase nick) erc-server-users))) + +(defun erc-change-user-nickname (user new-nick) + "This function is for internal use only. + +Changes the nickname of USER to NEW-NICK in the +`erc-server-users' hash table. The `erc-channel-users' lists of +other buffers are also changed." + (let ((nick (erc-server-user-nickname user))) + (setf (erc-server-user-nickname user) new-nick) + (with-current-buffer (process-buffer erc-server-process) + (remhash (erc-downcase nick) erc-server-users) + (puthash (erc-downcase new-nick) user erc-server-users)) + (dolist (buf (erc-server-user-buffers user)) + (if (buffer-live-p buf) + (with-current-buffer buf + (let ((cdata (erc-get-channel-user nick))) + (remhash (erc-downcase nick) erc-channel-users) + (puthash (erc-downcase new-nick) cdata + erc-channel-users))))))) + +(defun erc-remove-channel-user (nick) + "This function is for internal use only. + +Removes the user with nickname NICK from the `erc-channel-users' +list for this channel. If this user is not in the +`erc-channel-users' list of any other buffers, the user is also +removed from the server's `erc-server-users' list. + +See also: `erc-remove-server-user' and `erc-remove-user'." + (let ((channel-data (erc-get-channel-user nick))) + (when channel-data + (let ((user (car channel-data))) + (setf (erc-server-user-buffers user) + (delq (current-buffer) + (erc-server-user-buffers user))) + (remhash (erc-downcase nick) erc-channel-users) + (if (null (erc-server-user-buffers user)) + (erc-remove-server-user nick)))))) + +(defun erc-remove-user (nick) + "This function is for internal use only. + +Removes the user with nickname NICK from the `erc-server-users' +list as well as from all `erc-channel-users' lists. + +See also: `erc-remove-server-user' and +`erc-remove-channel-user'." + (let ((user (erc-get-server-user nick))) + (when user + (let ((buffers (erc-server-user-buffers user))) + (dolist (buf buffers) + (if (buffer-live-p buf) + (with-current-buffer buf + (remhash (erc-downcase nick) erc-channel-users) + (run-hooks 'erc-channel-members-changed-hook))))) + (erc-remove-server-user nick)))) + +(defun erc-remove-channel-users () + "This function is for internal use only. + +Removes all users in the current channel. This is called by +`erc-server-PART' and `erc-server-QUIT'." + (when (and erc-server-connected + (erc-server-process-alive) + (hash-table-p erc-channel-users)) + (maphash (lambda (nick cdata) + (erc-remove-channel-user nick)) + erc-channel-users) + (clrhash erc-channel-users))) + +(defsubst erc-channel-user-op-p (nick) + "Return `t' if NICK is an operator in the current channel." + (and nick + (hash-table-p erc-channel-users) + (let ((cdata (erc-get-channel-user nick))) + (and cdata (cdr cdata) + (erc-channel-user-op (cdr cdata)))))) + +(defsubst erc-channel-user-voice-p (nick) + "Return `t' if NICK has voice in the current channel." + (and nick + (hash-table-p erc-channel-users) + (let ((cdata (erc-get-channel-user nick))) + (and cdata (cdr cdata) + (erc-channel-user-voice (cdr cdata)))))) + +(defun erc-get-channel-user-list () + "Returns a list of users in the current channel. Each element +of the list is of the form (USER . CHANNEL-DATA), where USER is +an erc-server-user struct, and CHANNEL-DATA is either `nil' or an +erc-channel-user struct. + +See also: `erc-sort-channel-users-by-activity'" + (let (users) + (if (hash-table-p erc-channel-users) + (maphash (lambda (nick cdata) + (setq users (cons cdata users))) + erc-channel-users)) + users)) + +(defun erc-get-server-nickname-list () + "Returns a list of known nicknames on the current server." + (if (erc-server-process-alive) + (with-current-buffer (erc-server-buffer) + (let (nicks) + (when (hash-table-p erc-server-users) + (maphash (lambda (n user) + (setq nicks + (cons (erc-server-user-nickname user) + nicks))) + erc-server-users) + nicks))))) + +(defun erc-get-channel-nickname-list () + "Returns a list of known nicknames on the current channel." + (let (nicks) + (when (hash-table-p erc-channel-users) + (maphash (lambda (n cdata) + (setq nicks + (cons (erc-server-user-nickname (car cdata)) + nicks))) + erc-channel-users) + nicks))) + +(defun erc-get-server-nickname-alist () + "Returns an alist of known nicknames on the current server." + (if (erc-server-process-alive) + (with-current-buffer (erc-server-buffer) + (let (nicks) + (when (hash-table-p erc-server-users) + (maphash (lambda (n user) + (setq nicks + (cons (cons (erc-server-user-nickname user) nil) + nicks))) + erc-server-users) + nicks))))) + +(defun erc-get-channel-nickname-alist () + "Returns an alist of known nicknames on the current channel." + (let (nicks) + (when (hash-table-p erc-channel-users) + (maphash (lambda (n cdata) + (setq nicks + (cons (cons (erc-server-user-nickname (car cdata)) nil) + nicks))) + erc-channel-users) + nicks))) + +(defun erc-sort-channel-users-by-activity (list) + "Sorts LIST such that users which have spoken most recently are +listed first. LIST must be of the form (USER . CHANNEL-DATA). + +See also: `erc-get-channel-user-list'." + (sort list + (lambda (x y) + (when (and + (cdr x) (cdr y)) + (let ((tx (erc-channel-user-last-message-time (cdr x))) + (ty (erc-channel-user-last-message-time (cdr y)))) + (if tx + (if ty + (time-less-p ty tx) + t) + nil)))))) + +(defun erc-sort-channel-users-alphabetically (list) + "Sort LIST so that users' nicknames are in alphabetical order. +LIST must be of the form (USER . CHANNEL-DATA). + +See also: `erc-get-channel-user-list'." + (sort list + (lambda (x y) + (when (and + (cdr x) (cdr y)) + (let ((nickx (downcase (erc-server-user-nickname (car x)))) + (nicky (downcase (erc-server-user-nickname (car y))))) + (if nickx + (if nicky + (string-lessp nickx nicky) + t) + nil)))))) + +(defvar erc-channel-topic nil + "A topic string for the channel. Should only be used in channel-buffers.") +(make-variable-buffer-local 'erc-channel-topic) + +(defvar erc-channel-modes nil + "List of strings representing channel modes. +E.g. '(\"i\" \"m\" \"s\" \"b Quake!*@*\") +\(not sure the ban list will be here, but why not)") +(make-variable-buffer-local 'erc-channel-modes) + +(defvar erc-insert-marker nil + "The place where insertion of new text in erc buffers should happen.") +(make-variable-buffer-local 'erc-insert-marker) + +(defvar erc-input-marker nil + "The marker where input should be inserted.") +(make-variable-buffer-local 'erc-input-marker) + +(defun erc-string-no-properties (string) + "Return a copy of STRING will all text-properties removed." + (let ((newstring (copy-sequence string))) + (set-text-properties 0 (length newstring) nil newstring) + newstring)) + +(defcustom erc-prompt "ERC>" + "Prompt used by ERC. Trailing whitespace is not required." + :group 'erc-display + :type '(choice string function)) + +(defun erc-prompt () + "Return the input prompt as a string. + +See also the variable `erc-prompt'." + (let ((prompt (if (functionp erc-prompt) + (funcall erc-prompt) + erc-prompt))) + (if (> (length prompt) 0) + (concat prompt " ") + prompt))) + +(defcustom erc-command-indicator nil + "Indicator used by ERC for showing commands. + +If non-nil, this will be used in the ERC buffer to indicate +commands (i.e., input starting with a '/'). + +If nil, the prompt will be constructed from the variable `erc-prompt'." + :group 'erc-display + :type '(choice (const nil) string function)) + +(defun erc-command-indicator () + "Return the command indicator prompt as a string. + +This only has any meaning if the variable `erc-command-indicator' is non-nil." + (and erc-command-indicator + (let ((prompt (if (functionp erc-command-indicator) + (funcall erc-command-indicator) + erc-command-indicator))) + (if (> (length prompt) 0) + (concat prompt " ") + prompt)))) + +(defcustom erc-notice-prefix "*** " + "*Prefix for all notices." + :group 'erc-display + :type 'string) + +(defcustom erc-notice-highlight-type 'all + "*Determines how to highlight notices. +See `erc-notice-prefix'. + +The following values are allowed: + + 'prefix - highlight notice prefix only + 'all - highlight the entire notice + +Any other value disables notice's highlighting altogether." + :group 'erc-display + :type '(choice (const :tag "highlight notice prefix only" prefix) + (const :tag "highlight the entire notice" all) + (const :tag "don't highlight notices at all" nil))) + +(defcustom erc-echo-notice-hook nil + "*Specifies a list of functions to call to echo a private +notice. Each function is called with four arguments, the string +to display, the parsed server message, the target buffer (or +nil), and the sender. The functions are called in order, until a +function evaluates to non-nil. These hooks are called after +those specified in `erc-echo-notice-always-hook'. + +See also: `erc-echo-notice-always-hook', +`erc-echo-notice-in-default-buffer', +`erc-echo-notice-in-target-buffer', +`erc-echo-notice-in-minibuffer', +`erc-echo-notice-in-server-buffer', +`erc-echo-notice-in-active-non-server-buffer', +`erc-echo-notice-in-active-buffer', +`erc-echo-notice-in-user-buffers', +`erc-echo-notice-in-user-and-target-buffers', +`erc-echo-notice-in-first-user-buffer'" + :group 'erc-hooks + :type 'hook + :options '(erc-echo-notice-in-default-buffer + erc-echo-notice-in-target-buffer + erc-echo-notice-in-minibuffer + erc-echo-notice-in-server-buffer + erc-echo-notice-in-active-non-server-buffer + erc-echo-notice-in-active-buffer + erc-echo-notice-in-user-buffers + erc-echo-notice-in-user-and-target-buffers + erc-echo-notice-in-first-user-buffer)) + +(defcustom erc-echo-notice-always-hook + '(erc-echo-notice-in-default-buffer) + "*Specifies a list of functions to call to echo a private +notice. Each function is called with four arguments, the string +to display, the parsed server message, the target buffer (or +nil), and the sender. The functions are called in order, and all +functions are called. These hooks are called before those +specified in `erc-echo-notice-hook'. + +See also: `erc-echo-notice-hook', +`erc-echo-notice-in-default-buffer', +`erc-echo-notice-in-target-buffer', +`erc-echo-notice-in-minibuffer', +`erc-echo-notice-in-server-buffer', +`erc-echo-notice-in-active-non-server-buffer', +`erc-echo-notice-in-active-buffer', +`erc-echo-notice-in-user-buffers', +`erc-echo-notice-in-user-and-target-buffers', +`erc-echo-notice-in-first-user-buffer'" + :group 'erc-hooks + :type 'hook + :options '(erc-echo-notice-in-default-buffer + erc-echo-notice-in-target-buffer + erc-echo-notice-in-minibuffer + erc-echo-notice-in-server-buffer + erc-echo-notice-in-active-non-server-buffer + erc-echo-notice-in-active-buffer + erc-echo-notice-in-user-buffers + erc-echo-notice-in-user-and-target-buffers + erc-echo-notice-in-first-user-buffer)) + +;; other tunable parameters + +(defcustom erc-whowas-on-nosuchnick nil + "*If non-nil, do a whowas on a nick if no such nick." + :group 'erc + :type 'boolean) + +(defcustom erc-verbose-server-ping nil + "*If non-nil, show every time you get a PING or PONG from the server." + :group 'erc-paranoia + :type 'boolean) + +(defcustom erc-public-away-p nil + "*Let others know you are back when you are no longer marked away. +This happens in this form: +* is back (gone for