Commit 597993cf authored by Miles Bader's avatar Miles Bader

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-22

Creator:  Michael Olson <mwolson@gnu.org>

Install ERC.
parent 33c7860d
2006-01-29 Michael Olson <mwolson@gnu.org>
* Makefile.in (install-arch-indep, uninstall): Add ERC.
* info/dir (ERC): New entry.
2006-01-29 Eli Zaretskii <eliz@gnu.org>
* info/dir: Fix last change.
......
......@@ -497,7 +497,7 @@ install-arch-indep: mkdir info
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* rcirc*; 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 @@ install-arch-indep: mkdir info
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 rcirc; 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 @@ uninstall:
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* rcirc*)
(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))
......
2006-01-29 Michael Olson <mwolson@gnu.org>
* NEWS: Add entry for ERC.
2006-01-27 Chong Yidong <cyd@stupidchicken.com>
* TODO: Make SYNC_INPUT the default.
......
This diff is collapsed.
......@@ -1504,6 +1504,17 @@ colors as on X.
* 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
......
......@@ -41,6 +41,8 @@ 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.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
;;; erc-autoaway.el --- Provides autoaway for ERC
;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; 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
;;; erc-autojoin.el --- autojoin channels on connect and reconnects
;; Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
;; Author: Alex Schroeder <alex@gnu.org>
;; 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
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
2006-01-29 Michael Olson <mwolson@gnu.org>
* makefile.w32-in ($(infodir)/erc, erc.dvi): New targets.
* Makefile.in (INFO_TARGETS, DVI_TARGETS): Add ERC.
* faq.texi (New in Emacs 22): Mention ERC.
2006-01-28 Luc Teirlinck <teirllm@auburn.edu>
* rcirc.texi: Capitalize dir entry for consistency with the entry
......
This diff is collapsed.
This diff is collapsed.
......@@ -1146,7 +1146,7 @@ operation on X. Mouse wheel support is now enabled by default.
@cindex New modes
Many new modes and packages have been included in Emacs, such as Leim,
Calc, Tramp and URL, as well as IDO, CUA, rcirc, conf-mode,
Calc, Tramp and URL, as well as IDO, CUA, rcirc, ERC, conf-mode,
python-mode, table, tumme, SES, ruler, Flymake, Org, etc.
@cindex Documentation
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment