erc-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Erc-commit] [commit][emacs22] M-x erc RET can now be used to start ERC.


From: mwolson
Subject: [Erc-commit] [commit][emacs22] M-x erc RET can now be used to start ERC.
Date: Sun, 14 Oct 2007 00:48:28 -0400

commit 9983b9a5c0b4a14d2defe68ee222c4b7bee532f7
Author: Diane Murray <address@hidden>
Date:   Sun Sep 3 21:38:17 2006 +0000

    M-x erc RET can now be used to start ERC.
    
    * erc.el: (erc-open): Renamed from `erc'.
      (erc-before-connect): Change erc-select to erc.
      (erc): Renamed from `erc-select'.  Use `erc-open'.
      (erc-select): Defined as alias of `erc'.
      (erc-ssl): Renamed from `erc-select-ssl'.  Use `erc'.
      (erc-select-ssl): Defined as alias of `erc-ssl'.
      (erc-cmd-SERVER): Use `erc'.
      (erc-query, erc-handle-irc-url): Use `erc-open'.
    
    * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'.
    
    * erc-menu.el (erc-menu-definition): Use `erc'.
    
    * erc-networks.el: Updated copyright years.
      (erc-server-select): Use keyword arguments when calling `erc'.
    
    * erc.texi (Getting Started, Connecting): Changed erc-select to
      erc.
    
    * README: Changed erc-select to erc.
    
    * NEWS: Added note about these changes.
    
    * FOR-RELEASE: Marked this item as done.
    git-archimport-id: address@hidden/erc--main--0--patch-48

diff --git a/ChangeLog b/ChangeLog
index 4b466ae..edcd70b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2006-09-03  Diane Murray  <address@hidden>
+
+       * erc.el: M-x erc RET can now be used to start ERC.
+       (erc-open): Renamed from `erc'.
+       (erc-before-connect): Change erc-select to erc.
+       (erc): Renamed from `erc-select'.  Use `erc-open'.
+       (erc-select): Defined as alias of `erc'.
+       (erc-ssl): Renamed from `erc-select-ssl'.  Use `erc'.
+       (erc-select-ssl): Defined as alias of `erc-ssl'.
+       (erc-cmd-SERVER): Use `erc'.
+       (erc-query, erc-handle-irc-url): Use `erc-open'.
+
+       * erc-backend.el (erc-process-sentinel-1, JOIN): Use `erc-open'.
+
+       * erc-menu.el (erc-menu-definition): Use `erc'.
+
+       * erc-networks.el: Updated copyright years.
+       (erc-server-select): Use keyword arguments when calling `erc'.
+
+       * erc.texi (Getting Started, Connecting): Changed erc-select to
+       erc.
+
+       * README: Changed erc-select to erc.
+
+       * NEWS: Added note about these changes.
+
+       * FOR-RELEASE: Marked this item as done.
+
 2006-08-21  Diane Murray  <address@hidden>
 
        * erc-track.el (erc-track-mode-line-mouse-face): New variable.
diff --git a/FOR-RELEASE b/FOR-RELEASE
index c37607d..76a4f9a 100644
--- a/FOR-RELEASE
+++ b/FOR-RELEASE
@@ -19,7 +19,7 @@ other IRC clients, like Circe.
 
 ** Source
 
-*** Make M-x erc start a session.
+*** [DONE] Make M-x erc start a session.
 New users never think of using M-x erc-select.
 
 *** Change keybinding definitions for `erc-track-switch-buffer'.
diff --git a/NEWS b/NEWS
index ec5c217..4c69e9e 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ ERC NEWS                                                       
-*- outline -*-
 
 * Changes in ERC 5.2 (unreleased)
 
+** M-x erc RET now starts ERC.
+`erc-select' has been changed to `erc'.  `erc-select' still remains as
+an alias of `erc'. Likewise, `erc-select-ssl' has been renamed to
+`erc-ssl' with `erc-select-ssl' as its alias.  The function that was
+known as `erc' is now `erc-open'.
+
 ** New modules
 
 *** Capab identify (erc-capab.el)
diff --git a/README b/README
index e06df1d..33b30e4 100644
--- a/README
+++ b/README
@@ -24,8 +24,8 @@ http://www.emacswiki.org/cgi-bin/wiki.pl?LoadPath
 Usage
 -----
 
-Use M-x erc-select to connect to a server.  You can connect to
-multiple servers.
+Use M-x erc to connect to a server.  You can connect to multiple
+servers.
 
 Customization
 -------------
diff --git a/erc-backend.el b/erc-backend.el
index e9e0596..442b60c 100644
--- a/erc-backend.el
+++ b/erc-backend.el
@@ -552,8 +552,8 @@ Conditionally try to reconnect and take appropriate action."
     (if (erc-server-reconnect-p 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)
+        (erc-open erc-session-server erc-session-port erc-server-current-nick
+                  erc-session-user-full-name t erc-session-password)
       ;; terminate, do not reconnect
       (erc-display-message nil 'error (current-buffer)
                            'terminated ?e event))))
@@ -1085,11 +1085,11 @@ add things to `%s' instead."
         (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))
+                      (setq buffer (erc-open 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)
diff --git a/erc-menu.el b/erc-menu.el
index a398e35..2556edf 100644
--- a/erc-menu.el
+++ b/erc-menu.el
@@ -32,7 +32,7 @@
 
 (defvar erc-menu-definition
   (list "ERC"
-       ["Connect to server..." erc-select t]
+       ["Connect to server..." erc t]
        ["Disconnect from server..." erc-quit-server erc-server-connected]
        "-"
        ["List channels..." erc-list-channels
diff --git a/erc-networks.el b/erc-networks.el
index 387ddbb..fb7c92a 100644
--- a/erc-networks.el
+++ b/erc-networks.el
@@ -1,6 +1,6 @@
 ;;; erc-networks.el --- IRC networks
 
-;; Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2002, 2004, 2005, 2006 Free Software Foundation, Inc.
 
 ;; Author: Mario Lang <address@hidden>
 ;; Keywords: comm
@@ -809,7 +809,7 @@ As an example:
                    (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)))
+    (erc :server host :port port)))
 
 ;;; The following experimental
 ;; It does not work yet, help me with it if you
diff --git a/erc.el b/erc.el
index d1fe2d3..aac6edb 100644
--- a/erc.el
+++ b/erc.el
@@ -57,7 +57,7 @@
 
 ;; To connect to an IRC server, do
 ;;
-;; M-x erc-select RET
+;; M-x erc RET
 ;;
 ;; After you are connected to a server, you can use C-h m or have a look at
 ;; the IRC menu.
@@ -1888,8 +1888,8 @@ removed from the list will be disabled."
             (display-buffer buffer)
           (switch-to-buffer buffer)))))
 
-(defun erc (&optional server port nick full-name
-                     connect passwd tgt-list channel process)
+(defun erc-open (&optional server port nick full-name
+                          connect passwd tgt-list channel process)
   "ERC is a powerful, modular, and extensible IRC client.
 
 Connect to SERVER on PORT as NICK with FULL-NAME.
@@ -2032,7 +2032,7 @@ If no buffer matches, return nil."
 
 (defcustom erc-before-connect nil
   "Hook called before connecting to a server.
-This hook gets executed before `erc-select' actually invokes `erc-mode'
+This hook gets executed before `erc' actually invokes `erc-mode'
 with your input data.  The functions in here get called with three
 parameters, SERVER, PORT and NICK."
   :group 'erc-hooks
@@ -2098,11 +2098,11 @@ functions in here get called with the parameters SERVER 
and NICK."
     (list :server server :port port :nick nick :password passwd)))
 
 ;;;###autoload
-(defun* erc-select (&key (server (erc-compute-server))
-                        (port   (erc-compute-port))
-                        (nick   (erc-compute-nick))
-                        password
-                        (full-name (erc-compute-full-name)))
+(defun* erc (&key (server (erc-compute-server))
+                 (port   (erc-compute-port))
+                 (nick   (erc-compute-nick))
+                 password
+                 (full-name (erc-compute-full-name)))
   "Select connection parameters and run ERC.
 Non-interactively, it takes keyword arguments
    (server (erc-compute-server))
@@ -2113,7 +2113,7 @@ Non-interactively, it takes keyword arguments
 
 That is, if called with
 
-   (erc-select :server \"irc.freenode.net\" :full-name \"Harry S Truman\")
+   (erc :server \"irc.freenode.net\" :full-name \"Harry S Truman\")
 
 server and full-name will be set to those values, whereas
 `erc-compute-port', `erc-compute-nick' and `erc-compute-full-name' will
@@ -2121,15 +2121,18 @@ be invoked for the values of the other parameters."
   (interactive (erc-select-read-args))
 
   (run-hook-with-args 'erc-before-connect server port nick)
-  (erc server port nick erc-user-full-name t password))
+  (erc-open server port nick erc-user-full-name t password))
 
+(defalias 'erc-select 'erc)
 
-(defun erc-select-ssl (&rest r)
+(defun erc-ssl (&rest r)
   "Interactively select SSL connection parameters and run ERC.
-Arguments are as to erc-select."
+Arguments are the same as for `erc'."
   (interactive (erc-select-read-args))
   (let ((erc-server-connect-function 'erc-open-ssl-stream))
-    (apply 'erc-select r)))
+    (apply 'erc r)))
+
+(defalias 'erc-select-ssl 'erc-ssl)
 
 (defun erc-open-ssl-stream (name buffer host port)
   "Open an SSL stream to an IRC server.
@@ -3178,7 +3181,7 @@ the message given by REASON."
   "Connect to SERVER, leaving existing connection intact."
   (erc-log (format "cmd: SERVER: %s" server))
   (condition-case nil
-      (erc-select :server server :nick (erc-current-nick))
+      (erc :server server :nick (erc-current-nick))
     (error
      (message "Cannot find host %s." server)
      (beep)))
@@ -3695,15 +3698,15 @@ To change how this query window is displayed, use `let' 
to bind
               (buffer-live-p server)
               (set-buffer server))
     (error "Couldn't switch to server buffer"))
-  (let ((buf (erc erc-session-server
-                 erc-session-port
-                 (erc-current-nick)
-                 erc-session-user-full-name
-                 nil
-                 nil
-                 (list target)
-                 target
-                 erc-server-process)))
+  (let ((buf (erc-open erc-session-server
+                      erc-session-port
+                      (erc-current-nick)
+                      erc-session-user-full-name
+                      nil
+                      nil
+                      (list target)
+                      target
+                      erc-server-process)))
     (unless buf
       (error "Couldn't open query window"))
     (erc-update-mode-line)
@@ -6224,10 +6227,10 @@ Otherwise, connect to HOST:PORT as USER and /join 
CHANNEL."
     (with-current-buffer (or server-buffer (current-buffer))
       (if (and server-buffer channel)
          (erc-cmd-JOIN channel)
-       (erc host port (or user (erc-compute-nick)) (erc-compute-full-name)
-            (not server-buffer) password nil channel
-            (when server-buffer
-              (get-buffer-process server-buffer)))))))
+       (erc-open host port (or user (erc-compute-nick)) (erc-compute-full-name)
+                 (not server-buffer) password nil channel
+                 (when server-buffer
+                   (get-buffer-process server-buffer)))))))
 
 (provide 'erc)
 
diff --git a/erc.texi b/erc.texi
index ac41ca1..2a28e5b 100644
--- a/erc.texi
+++ b/erc.texi
@@ -276,7 +276,7 @@ itself.  An example follows.
 (require 'erc)
 @end lisp
 
-Once ERC is loaded, the command @kbd{M-x erc-select} will start ERC and
+Once ERC is loaded, the command @kbd{M-x erc} will start ERC and
 prompt for the server to connect to.
 
 @c PRE5_2: Sample session, including:
@@ -525,11 +525,11 @@ Translate morse code in messages
 @section Connecting to an IRC Server
 @cindex connecting
 
-The easiest way to connect to an IRC server is to call
address@hidden erc-select}.  If you want to assign this function to a
-keystroke, the following will help you figure out its parameters.
+The easiest way to connect to an IRC server is to call @kbd{M-x erc}.
+If you want to assign this function to a keystroke, the following will
+help you figure out its parameters.
 
address@hidden erc-select
address@hidden erc
 Select connection parameters and run ERC.
 Non-interactively, it takes the following keyword arguments.
 
@@ -548,7 +548,7 @@ That is, if called with the following arguments, 
@var{server} and
 parameters.
 
 @example
-(erc-select :server "irc.freenode.net" :full-name "Harry S Truman")
+(erc :server "irc.freenode.net" :full-name "Harry S Truman")
 @end example
 @end defun
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]