Commit ff59d266 authored by Miles Bader's avatar Miles Bader

Release ERC 5.2.

I have updated the version of ERC to 5.2, since it fixes a bug with C-c
C-SPC being bound globally by default.  For the full list of changes in
this version, see etc/ERC-NEWS.

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-687
Creator:  Michael Olson <mwolson@gnu.org>
parent 25c8c159
2007-04-01 Michael Olson <mwolson@gnu.org>
* ERC-NEWS: Update for the ERC 5.2 release. Most of these entries
were for previously-committed changes.
2007-03-31 Michael Albinus <michael.albinus@gmx.de>
* PROBLEMS: Remove Tramp problem; it has been fixed.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -40,6 +40,49 @@ yourself back when you type something."
"The Emacs idletimer.
This is only used when `erc-autoaway-idle-method' is set to 'emacs.")
(defvar erc-autoaway-last-sent-time (erc-current-time)
"The last time the user sent something.")
(defvar erc-autoaway-caused-away nil
"Indicates whether this module was responsible for setting the
user's away status.")
(eval-when-compile (defvar erc-autoaway-idle-seconds))
(defun erc-autoaway-reestablish-idletimer ()
"Reestablish the Emacs idletimer.
If `erc-autoaway-idle-method' is 'emacs, you must call this
function each time you change `erc-autoaway-idle-seconds'."
(interactive)
(when erc-autoaway-idletimer
(erc-cancel-timer erc-autoaway-idletimer))
(setq erc-autoaway-idletimer
(run-with-idle-timer erc-autoaway-idle-seconds
t
'erc-autoaway-set-away
erc-autoaway-idle-seconds)))
(defun erc-autoaway-some-server-buffer ()
"Return some ERC server buffer if its connection is alive.
If none is found, return nil."
(car (erc-buffer-list #'erc-open-server-buffer-p)))
(defun erc-autoaway-insinuate-maybe (&optional server &rest ignored)
"Add autoaway reset function to `post-command-hook' if at least one
ERC process is alive.
This is used when `erc-autoaway-idle-method' is 'user."
(when (or server (erc-autoaway-some-server-buffer))
(add-hook 'post-command-hook 'erc-autoaway-reset-idle-user)))
(defun erc-autoaway-remove-maybe (&rest ignored)
"Remove the autoaway reset function from `post-command-hook' if
no ERC process is alive.
This is used when `erc-autoaway-idle-method' is 'user."
(unless (erc-autoaway-some-server-buffer)
(remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user)))
;;;###autoload (autoload 'erc-autoaway-mode "erc-autoaway")
(define-erc-module autoaway nil
"In ERC autoaway mode, you can be set away automatically.
......@@ -65,24 +108,31 @@ set you no longer away.
Related variables: `erc-public-away-p' and `erc-away-nickname'."
;; Enable:
((when (boundp 'erc-autoaway-idle-method)
(add-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators)
(setq erc-autoaway-last-sent-time (erc-current-time))
(cond
((eq erc-autoaway-idle-method 'irc)
(add-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc)
(add-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc))
((eq erc-autoaway-idle-method 'user)
(add-hook 'post-command-hook 'erc-autoaway-reset-idle-user))
(add-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe)
(add-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe)
(erc-autoaway-insinuate-maybe))
((eq erc-autoaway-idle-method 'emacs)
(erc-autoaway-reestablish-idletimer)))
(add-hook 'erc-timer-hook 'erc-autoaway-possibly-set-away)
(add-hook 'erc-server-305-functions 'erc-autoaway-reset-indicators)))
;; Disable:
((when (boundp 'erc-autoaway-idle-method)
(remove-hook 'erc-connect-pre-hook 'erc-autoaway-reset-indicators)
(cond
((eq erc-autoaway-idle-method 'irc)
(remove-hook 'erc-send-completed-hook 'erc-autoaway-reset-idle-irc)
(remove-hook 'erc-server-001-functions 'erc-autoaway-reset-idle-irc))
((eq erc-autoaway-idle-method 'user)
(remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user))
(remove-hook 'post-command-hook 'erc-autoaway-reset-idle-user)
(remove-hook 'erc-after-connect 'erc-autoaway-insinuate-maybe)
(remove-hook 'erc-disconnected-hook 'erc-autoaway-remove-maybe))
((eq erc-autoaway-idle-method 'emacs)
(erc-cancel-timer erc-autoaway-idletimer)
(setq erc-autoaway-idletimer nil)))
......@@ -104,9 +154,12 @@ definitions of being idle."
(const :tag "Emacs idle time" emacs)
(const :tag "Last IRC action" irc))
:set (lambda (sym val)
(erc-autoaway-disable)
(set-default sym val)
(erc-autoaway-enable)))
(if erc-autoaway-mode
(progn
(erc-autoaway-disable)
(set sym val)
(erc-autoaway-enable))
(set sym val))))
(defcustom erc-auto-set-away t
"*If non-nil, set away after `erc-autoaway-idle-seconds' seconds of idling.
......@@ -133,21 +186,6 @@ See `erc-auto-discard-away'."
:group 'erc-autoaway
:type 'regexp)
(eval-when-compile (defvar erc-autoaway-idle-seconds))
(defun erc-autoaway-reestablish-idletimer ()
"Reestablish the Emacs idletimer.
If `erc-autoaway-idle-method' is 'emacs, you must call this
function each time you change `erc-autoaway-idle-seconds'."
(interactive)
(when erc-autoaway-idletimer
(erc-cancel-timer erc-autoaway-idletimer))
(setq erc-autoaway-idletimer
(run-with-idle-timer erc-autoaway-idle-seconds
t
'erc-autoaway-set-away
erc-autoaway-idle-seconds)))
(defcustom erc-autoaway-idle-seconds 1800
"*Number of seconds after which ERC will set you automatically away.
If you are changing this variable using lisp instead of customizing it,
......@@ -167,19 +205,12 @@ in seconds."
:group 'erc-autoaway
:type 'string)
(defvar erc-autoaway-last-sent-time (erc-current-time)
"The last time the user sent something.")
(defvar erc-autoaway-caused-away nil
"Indicates whether this module was responsible for setting the
user's away status.")
(defun erc-autoaway-reset-idle-user (&rest stuff)
"Reset the stored user idle time.
This is one global variable since a user talking on one net can
talk on another net too."
(when erc-auto-discard-away
(erc-autoaway-set-back))
(erc-autoaway-set-back #'erc-autoaway-remove-maybe))
(setq erc-autoaway-last-sent-time (erc-current-time)))
(defun erc-autoaway-reset-idle-irc (line &rest stuff)
......@@ -192,12 +223,24 @@ talk on another net too."
(erc-autoaway-set-back))
(setq erc-autoaway-last-sent-time (erc-current-time)))
(defun erc-autoaway-set-back ()
"Discard the away state globally."
(let ((server-buffer (car (erc-buffer-list #'erc-server-buffer-p))))
(when (and erc-autoaway-caused-away
(with-current-buffer server-buffer (erc-away-p)))
(erc-cmd-GAWAY ""))))
(defun erc-autoaway-set-back (&optional none-alive-func)
"Discard the away state globally.
NONE-ALIVE-FUNC is the function to call if no ERC processes are alive."
(let ((server-buffer (erc-autoaway-some-server-buffer)))
(if (and erc-autoaway-caused-away
(buffer-live-p server-buffer)
(with-current-buffer server-buffer erc-away))
(erc-cmd-GAWAY "")
(when none-alive-func (funcall none-alive-func)))))
(defun erc-autoaway-some-open-server-buffer ()
"Return some ERC server buffer if its connection is alive and the
user is not away.
If none is found, return nil."
(car (erc-buffer-list (lambda ()
(and (erc-open-server-buffer-p)
(not erc-away))))))
(defun erc-autoaway-possibly-set-away (current-time)
"Set autoaway when `erc-auto-set-away' is true and the idletime is
......@@ -207,7 +250,7 @@ exceeds `erc-autoaway-idle-seconds'."
;; whenever the server sends something to the client.
(when (and erc-auto-set-away
(not erc-autoaway-caused-away)
(not (erc-away-p)))
(erc-autoaway-some-open-server-buffer))
(let ((idle-time (erc-time-diff erc-autoaway-last-sent-time
current-time)))
(when (>= idle-time erc-autoaway-idle-seconds)
......@@ -215,15 +258,17 @@ exceeds `erc-autoaway-idle-seconds'."
nil 'notice nil
(format "Setting automatically away after %i seconds of idle-time"
idle-time))
(erc-autoaway-set-away idle-time)))))
(erc-autoaway-set-away idle-time t)))))
(defun erc-autoaway-set-away (idle-time &optional notest)
"Set the away state globally.
(defun erc-autoaway-set-away (idle-time)
"Set the away state globally."
If NOTEST is specified, do not check to see whether there is an
activer server buffer available."
;; Note that the idle timer runs, even when Emacs is inactive. In
;; order to prevent flooding when we connect, we test for an
;; existing process.
(when (and (erc-server-process-alive)
(not (erc-away-p)))
(when (or notest (erc-autoaway-some-open-server-buffer))
(setq erc-autoaway-caused-away t)
(erc-cmd-GAWAY (format erc-autoaway-message idle-time))))
......
This diff is collapsed.
......@@ -56,10 +56,12 @@
"This mode buttonizes all messages according to `erc-button-alist'."
((add-hook 'erc-insert-modify-hook 'erc-button-add-buttons 'append)
(add-hook 'erc-send-modify-hook 'erc-button-add-buttons 'append)
(add-hook 'erc-complete-functions 'erc-button-next))
(add-hook 'erc-complete-functions 'erc-button-next)
(add-hook 'erc-mode-hook 'erc-button-add-keys))
((remove-hook 'erc-insert-modify-hook 'erc-button-add-buttons)
(remove-hook 'erc-send-modify-hook 'erc-button-add-buttons)
(remove-hook 'erc-complete-functions 'erc-button-next)))
(remove-hook 'erc-complete-functions 'erc-button-next)
(remove-hook 'erc-mode-hook 'erc-button-add-keys)))
;; Make XEmacs use `erc-button-face'.
(when (featurep 'xemacs)
......@@ -241,6 +243,16 @@ PAR is a number of a regexp grouping whose text will be passed to
This syntax table should make all the legal nick characters word
constituents.")
(defvar erc-button-keys-added nil
"Internal variable used to keep track of whether we've added the
global-level ERC button keys yet.")
(defun erc-button-add-keys ()
"Add ERC mode-level button movement keys. This is only done once."
(unless erc-button-keys-added
(define-key erc-mode-map (kbd "<backtab>") 'erc-button-previous)
(setq erc-button-keys-added t)))
(defun erc-button-add-buttons ()
"Find external references in the current buffer and make buttons of them.
\"External references\" are things like URLs, as
......
......@@ -56,8 +56,10 @@
;; (erc-capab-identify-mode 1)
;; `erc-capab-identify-prefix' will now be added to the beginning of
;; unidentified users' nicknames. The default is an asterisk, "*". If
;; the value of this variable is nil or you disable this module (see
;; unidentified users' nicknames. The default is an asterisk, "*".
;; You can customize the prefix and the face used to display it,
;; `erc-capab-identify-unidentified'. If the value of
;; `erc-capab-identify-prefix' is nil or you disable this module (see
;; `erc-capab-identify-disable'), no prefix will be inserted, but the
;; flag sent by the server will still be stripped.
......@@ -73,14 +75,19 @@
:group 'erc)
(defcustom erc-capab-identify-prefix "*"
"The prefix used for unidentified users."
"The prefix used for unidentified users.
If you change this from the default \"*\", be sure to use a
character not found in IRC nicknames to avoid confusion."
:group 'erc-capab
:type '(choice string (const nil)))
;;; Define module:
(defface erc-capab-identify-unidentified '((t)) ; same as `erc-default-face'
"Face to use for `erc-capab-identify-prefix'."
:group 'erc-capab
:group 'erc-faces)
(define-erc-response-handler (290)
"Handle dancer-ircd CAPAB messages." nil nil)
;;; Define module:
;;;###autoload (autoload 'erc-capab-identify-mode "erc-capab" nil t)
(define-erc-module capab-identify nil
......@@ -124,9 +131,9 @@ Optional argument PARSED is the current message, a response struct.
These arguments are sent to this function when called as a hook in
`erc-server-005-functions'."
(unless erc-capab-identify-sent
(erc-capab-send-identify-messages)))
(erc-capab-identify-send-messages)))
(defun erc-capab-send-identify-messages ()
(defun erc-capab-identify-send-messages ()
"Send CAPAB IDENTIFY messages if the server supports it."
(when (and (stringp erc-server-version)
(string-match "^\\(dancer-ircd\\|hyperion\\)" erc-server-version)
......@@ -175,7 +182,7 @@ PARSED is an `erc-parsed' response struct."
(when (and erc-capab-identify-prefix
(erc-with-server-buffer erc-capab-identify-activated))
(goto-char (or (erc-find-parsed-property) (point-min)))
(let ((nickname (erc-capab-get-unidentified-nickname
(let ((nickname (erc-capab-identify-get-unidentified-nickname
(erc-get-parsed-vector (point)))))
(when (and nickname
(goto-char (point-min))
......@@ -183,10 +190,9 @@ PARSED is an `erc-parsed' response struct."
(re-search-forward (regexp-quote nickname) nil t))
(goto-char (match-beginning 0))
(insert (erc-propertize erc-capab-identify-prefix
'face (get-char-property (- (point) 1)
'face)))))))
'face 'erc-capab-identify-unidentified))))))
(defun erc-capab-get-unidentified-nickname (parsed)
(defun erc-capab-identify-get-unidentified-nickname (parsed)
"Return the nickname of the user if unidentified.
PARSED is an `erc-parsed' response struct."
(when (and (erc-response-p parsed)
......
......@@ -161,14 +161,6 @@ avoid corrupting the original SEQ."
(setq newseq (cons el newseq))))
(nreverse newseq)))
;; Provide a simpler replacement for `gensym'.
(defvar *erc-sym-counter* 0)
(defun erc-gensym ()
"Generate a new uninterned symbol."
(let ((num (prog1 *erc-sym-counter*
(setq *erc-sym-counter* (1+ *erc-sym-counter*)))))
(make-symbol (format "*erc-sym-%d*" num))))
;; Copied from cl-extra.el
(defun erc-subseq (seq start &optional end)
"Return the subsequence of SEQ from START to END.
......
;;; erc-fill.el --- Filling IRC messages in various ways
;; Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002, 2003, 2004, 2006,
;; 2007 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Mario Lang <mlang@delysid.org>
......@@ -187,14 +188,6 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
(length (format-time-string erc-timestamp-format))
0))
(defun erc-restore-text-properties ()
"Restore the property 'erc-parsed for the region."
(let* ((parsed-posn (text-property-not-all (point-min) (point-max)
'erc-parsed nil))
(parsed-prop (when parsed-posn
(get-text-property parsed-posn 'erc-parsed))))
(put-text-property (point-min) (point-max) 'erc-parsed parsed-prop)))
(provide 'erc-fill)
;;; erc-fill.el ends here
......
......@@ -127,8 +127,7 @@
(define-ibuffer-column erc-away (:name "A")
(if (and erc-server-process
(processp erc-server-process)
(with-current-buffer (process-buffer erc-server-process)
erc-away))
(erc-away-time))
"A"
" "))
......
......@@ -42,12 +42,26 @@
(defvar erc-identd-process nil)
(defgroup erc-identd nil
"Run a local identd server."
:group 'erc)
(defcustom erc-identd-port 8113
"Port to run the identd server on if not specified in the argument for
`erc-identd-start'.
This can be either a string or a number."
:group 'erc-identd
:type '(choice (const :tag "None" nil)
(integer :tag "Port number")
(string :tag "Port string")))
;;;###autoload (autoload 'erc-identd-mode "erc-identd")
(define-erc-module identd nil
"This mode launches an identd server on port 8113."
((add-hook 'erc-connect-pre-hook 'erc-identd-start)
((add-hook 'erc-connect-pre-hook 'erc-identd-quickstart)
(add-hook 'erc-disconnected-hook 'erc-identd-stop))
((remove-hook 'erc-connect-pre-hook 'erc-identd-start)
((remove-hook 'erc-connect-pre-hook 'erc-identd-quickstart)
(remove-hook 'erc-disconnected-hook 'erc-identd-stop)))
(defun erc-identd-filter (proc string)
......@@ -71,12 +85,11 @@ run from inetd. The idea is to provide a simple identd server
when you need one, without having to install one globally on your
system."
(interactive (list (read-string "Serve identd requests on port: " "8113")))
(if (null port)
(setq port 8113)
(if (stringp port)
(setq port (string-to-number port))))
(if erc-identd-process
(delete-process erc-identd-process))
(unless port (setq port erc-identd-port))
(when (stringp port)
(setq port (string-to-number port)))
(when erc-identd-process
(delete-process erc-identd-process))
(setq erc-identd-process
(make-network-process :name "identd"
:buffer nil
......@@ -85,6 +98,11 @@ system."
:filter 'erc-identd-filter))
(set-process-query-on-exit-flag erc-identd-process nil))
(defun erc-identd-quickstart (&rest ignored)
"Start the identd server with the default port.
The default port is specified by `erc-identd-port'."
(erc-identd-start))
;;;###autoload
(defun erc-identd-stop (&rest ignore)
(interactive)
......
......@@ -85,7 +85,9 @@
;;; Code:
(require 'erc)
(eval-when-compile (require 'cl))
(eval-when-compile
(require 'erc-networks)
(require 'cl))
(defgroup erc-log nil
"Logging facilities for ERC."
......@@ -100,10 +102,12 @@ NICK is the current nick,
SERVER and PORT are the parameters used to connect BUFFERs
`erc-server-process'."
:group 'erc-log
:type '(choice (const erc-generate-log-file-name-long)
(const erc-generate-log-file-name-short)
(const erc-generate-log-file-name-with-date)
(symbol)))
:type '(choice (const :tag "Long style" erc-generate-log-file-name-long)
(const :tag "Long, but with network name rather than server"
erc-generate-log-file-name-network)
(const :tag "Short" erc-generate-log-file-name-short)
(const :tag "With date" erc-generate-log-file-name-with-date)
(symbol :tag "Other function")))
(defcustom erc-truncate-buffer-on-save nil
"Truncate any ERC (channel, query, server) buffer when it is saved."
......@@ -197,7 +201,7 @@ also be a predicate function. To only log when you are not set away, use:
\(setq erc-enable-logging
(lambda (buffer)
(with-current-buffer buffer
(not erc-away))))"
(null (erc-away-time)))))"
;; enable
((when erc-log-write-after-insert
(add-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs))
......@@ -211,8 +215,7 @@ also be a predicate function. To only log when you are not set away, use:
;; append, so that 'erc-initialize-log-marker runs first
(add-hook 'erc-connect-pre-hook 'erc-log-setup-logging 'append)
(dolist (buffer (erc-buffer-list))
(when (buffer-live-p buffer)
(with-current-buffer buffer (erc-log-setup-logging)))))
(erc-log-setup-logging buffer)))
;; disable
((remove-hook 'erc-insert-post-hook 'erc-save-buffer-in-logs)
(remove-hook 'erc-send-post-hook 'erc-save-buffer-in-logs)
......@@ -223,30 +226,38 @@ also be a predicate function. To only log when you are not set away, use:
(remove-hook 'erc-part-hook 'erc-conditional-save-buffer)
(remove-hook 'erc-connect-pre-hook 'erc-log-setup-logging)
(dolist (buffer (erc-buffer-list))
(when (buffer-live-p buffer)
(with-current-buffer buffer (erc-log-disable-logging))))))
(erc-log-disable-logging buffer))))
(define-key erc-mode-map "\C-c\C-l" 'erc-save-buffer-in-logs)
;;; functionality referenced from erc.el
(defun erc-log-setup-logging ()
(defun erc-log-setup-logging (buffer)
"Setup the buffer-local logging variables in the current buffer.
This function is destined to be run from `erc-connect-pre-hook'."
(when (erc-logging-enabled)
(auto-save-mode -1)
(setq buffer-file-name nil)
(set (make-local-variable 'write-file-functions)
'(erc-save-buffer-in-logs))
(when erc-log-insert-log-on-open
(ignore-errors (insert-file-contents (erc-current-logfile))
(move-marker erc-last-saved-position
(1- (point-max)))))))
(defun erc-log-disable-logging ()
"Disable logging in the current buffer."
(when (erc-logging-enabled)
(setq buffer-offer-save nil
erc-enable-logging nil)))
This function is destined to be run from `erc-connect-pre-hook'.
The current buffer is given by BUFFER."
(when (erc-logging-enabled buffer)
(with-current-buffer buffer
(auto-save-mode -1)
(setq buffer-file-name nil)
(cond ((boundp 'write-file-functions)
(set (make-local-variable 'write-file-functions)
'(erc-save-buffer-in-logs)))
((boundp 'local-write-file-hooks)
(setq local-write-file-hooks '(erc-save-buffer-in-logs)))
(t
(set (make-local-variable 'write-file-hooks)
'(erc-save-buffer-in-logs))))
(when erc-log-insert-log-on-open
(ignore-errors (insert-file-contents (erc-current-logfile))
(move-marker erc-last-saved-position
(1- (point-max))))))))
(defun erc-log-disable-logging (buffer)
"Disable logging in BUFFER."
(when (erc-logging-enabled buffer)
(with-current-buffer buffer
(setq buffer-offer-save nil
erc-enable-logging nil))))
(defun erc-log-all-but-server-buffers (buffer)
"Returns t if logging should be enabled in BUFFER.
......@@ -340,6 +351,19 @@ This function is a possible value for `erc-generate-log-file-name-function'."
;; we need a make-safe-file-name function.
(convert-standard-filename file)))
(defun erc-generate-log-file-name-network (buffer target nick server port)
"Generates a log-file name using the network name rather than server name.
This results in a file name of the form #channel!nick@network.txt.
This function is a possible value for `erc-generate-log-file-name-function'."
(require 'erc-networks)
(let ((file (concat
(if target (concat target "!"))
nick "@"
(or (with-current-buffer buffer (erc-network-name)) server)
".txt")))
;; we need a make-safe-file-name function.
(convert-standard-filename file)))
;;;###autoload
(defun erc-save-buffer-in-logs (&optional buffer)
"Append BUFFER contents to the log file, if logging is enabled.
......
;;; erc-match.el --- Highlight messages matching certain regexps
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
;; 2007 Free Software Foundation, Inc.
;; Author: Andreas Fuchs <asf@void.at>
;; Keywords: comm, faces
......@@ -540,7 +541,7 @@ deactivate/activate match logging in the latter. See
(when (and
(or (eq erc-log-matches-flag t)
(and (eq erc-log-matches-flag 'away)
erc-away))
(erc-away-time)))
match-buffer-name)
(let ((line (format-spec erc-log-match-format
(format-spec-make
......@@ -572,7 +573,7 @@ deactivate/activate match logging in the latter. See
(defun erc-log-matches-come-back (proc parsed)
"Display a notice that messages were logged while away."
(when (and erc-away
(when (and (erc-away-time)
(eq erc-log-matches-flag 'away))
(mapc
(lambda (match-type)
......@@ -583,7 +584,7 @@ deactivate/activate match logging in the latter. See
(with-current-buffer buffer
(get-text-property (1- (point-max))
'timestamp))))
(away-time (erc-emacs-time-to-erc-time erc-away)))
(away-time (erc-emacs-time-to-erc-time (erc-away-time))))
(when (and away-time last-msg-time
(erc-time-gt last-msg-time away-time))
(erc-display-message
......
;; erc-menu.el -- Menu-bar definitions for ERC
;; Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
;; Copyright (C) 2001, 2002, 2004, 2005, 2006,
;; 2007 Free Software Foundation, Inc.
;; Author: Mario Lang <mlang@delysid.org>
;; Keywords: comm, processes, menu
......@@ -75,8 +76,8 @@
(erc-channel-user-op-p (erc-current-nick))]
["Set a key..." erc-set-channel-key
(erc-channel-user-op-p (erc-current-nick))])
["Leave this channel..." erc-part-from-channel erc-channel-users]
"-")
["Leave this channel..." erc-part-from-channel erc-channel-users])
"-"
(list "Pals, fools and other keywords"
["Add pal..." erc-add-pal]
["Delete pal..." erc-delete-pal]
......
......@@ -184,7 +184,7 @@ join from that split has been detected or not.")
;;;###autoload
(defun erc-cmd-WHOLEFT ()
"Show who's gone."
(with-current-buffer (erc-server-buffer)
(erc-with-server-buffer
(if (null erc-netsplit-list)
(erc-display-message
nil 'notice 'active
......
......@@ -317,6 +317,7 @@
("Novernet: Random server" Novernet "irc.novernet.com" ((6665 6669) 7000 ))
("Nullrouted: Random server" Nullrouted "irc.nullrouted.org" ((6666 6669) 7000 ))
("NullusNet: Random server" NullusNet "irc.nullus.net" 6667)
("OFTC: Random server" OFTC "irc.oftc.net" ((6667 6670) 7000))
("OpChat: Random server" OpChat "irc.opchat.org" ((6667 6669)))
("Othernet: Random server" Othernet "irc.othernet.org" 6667)
("Othernet: US, FL, Miami" Othernet "miami.fl.us.othernet.org" 6667)
......@@ -611,6 +612,7 @@ PORTS is either a number, a list of numbers, or a list of port ranges."
(Novernet "novernet.com")
(Nullrouted "nullrouted.org")
(NullusNet "nullus.net")
(OFTC "oftc.net")
(OpChat "opchat.org")
(Openprojects "openprojects.net")
(Othernet "othernet.org")
......@@ -737,12 +739,12 @@ search for a match in `erc-networks-alist'."
(defun erc-network ()
"Return the value of `erc-network' for the current server."
(with-current-buffer (erc-server-buffer) erc-network))
(erc-with-server-buffer erc-network))
(defun erc-current-network ()
"Deprecated. Use `erc-network' instead. Return the name of this server's
network as a symbol."
(with-current-buffer (erc-server-buffer)
(erc-with-server-buffer
(intern (downcase (symbol-name erc-network)))))
(erc-make-obsolete 'erc-current-network 'erc-network
......@@ -750,7 +752,7 @@ network as a symbol."
(defun erc-network-name ()
"Returns the name of the current network as a string."
(with-current-b