erc-commit
[Top][All Lists]
Advanced

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

[Erc-commit] [commit][emacs22] Update from CVS


From: mwolson
Subject: [Erc-commit] [commit][emacs22] Update from CVS
Date: Sun, 14 Oct 2007 00:48:00 -0400

commit aaa11b32733a14487c82ec9519a26080a002a7b3
Author: Michael Olson <address@hidden>
Date:   Sat Feb 11 17:52:28 2006 +0000

    Update from CVS
    
    2006-02-11  Diane Murray  <address@hidden>
    
       * erc-list.el: Define `list' module which sets the alias
       `erc-cmd-LIST' to `erc-list-channels' when enabled and
       `erc-list-channels-simple' when disabled.
       (erc-list-channels): Was `erc-cmd-LIST', renamed.
       (erc-list-channels-simple): New function.
    
       * erc.el (erc-modules): Added `list' to enabled modules. Changed
       `capab-identify' description.  Moved customization options left in
       source code.
    
       * erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
    
       * erc-capab.el: Put a little more detail into Usage section.
       (define-erc-module): Run `erc-capab-identify-setup' in all open
       server buffers when enabling.
       (erc-capab-identify-setup): Make PROC and PARSED optional
       arguments.
       (erc-capab-identify-add-prefix): Simplified nickname regexp.  This
       should now also match nicknames that are formatted differently
       than the default.
    
       * erc-spelling.el (define-erc-module): Make sure there's a buffer
       before calling `with-current-buffer'.
    git-archimport-id: address@hidden/erc--cvs--0--patch-110

diff --git a/ChangeLog b/ChangeLog
index ea74df4..d42385f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2006-02-11  Diane Murray  <address@hidden>
+
+       * erc-list.el: Define `list' module which sets the alias
+       `erc-cmd-LIST' to `erc-list-channels' when enabled and
+       `erc-list-channels-simple' when disabled.
+       (erc-list-channels): Was `erc-cmd-LIST', renamed.
+       (erc-list-channels-simple): New function.
+
+       * erc.el (erc-modules): Added `list' to enabled modules.  Changed
+       `capab-identify' description.  Moved customization options left in
+       source code.
+
+       * erc-menu.el (erc-menu-definition): Use `erc-list-channels'.
+
+       * erc-capab.el: Put a little more detail into Usage section.
+       (define-erc-module): Run `erc-capab-identify-setup' in all open
+       server buffers when enabling.
+       (erc-capab-identify-setup): Make PROC and PARSED optional
+       arguments.
+       (erc-capab-identify-add-prefix): Simplified nickname regexp.  This
+       should now also match nicknames that are formatted differently
+       than the default.
+
+       * erc-spelling.el (define-erc-module): Make sure there's a buffer
+       before calling `with-current-buffer'.
+
 2006-02-10  Michael Olson  <address@hidden>
 
        * Makefile (debbuild): Split from debrelease.
diff --git a/erc-capab.el b/erc-capab.el
index 0f45f3d..c77f989 100644
--- a/erc-capab.el
+++ b/erc-capab.el
@@ -50,23 +50,27 @@
 
 ;;; Usage:
 
-;; Enable the module `capab-identify' (see the documentation for
-;; `erc-modules').  `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, no prefix will be
-;; inserted, but the flag sent by the server will still be stripped.
+;; Put the following in your ~/.emacs file.
+
+;; (require 'erc-capab)
+;; (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
+;; `erc-capab-identify-disable'), no prefix will be inserted, but the
+;; flag sent by the server will still be stripped.
 
 ;;; Todo:
 
 ;; Somebody who knows about autoload cookies could please add them where
 ;; necessary.
-;; Make sure nickname regexp works with other format-nick functions.
 
 ;;; Code:
 
 (require 'erc)
 
-(defconst erc-capab-version "$Revision: 1.3 $"
+(defconst erc-capab-version "$Revision: 1.4 $"
   "ERC CAPAB revision number.")
 
 ;;; Customization:
@@ -94,7 +98,11 @@
              'erc-capab-identify-remove/set-identified-flag)
    (add-hook 'erc-server-NOTICE-functions
              'erc-capab-identify-remove/set-identified-flag)
-   (add-hook 'erc-insert-modify-hook 'erc-capab-identify-add-prefix t))
+   (add-hook 'erc-insert-modify-hook 'erc-capab-identify-add-prefix t)
+   (mapc (lambda (buffer)
+           (when buffer
+             (with-current-buffer buffer (erc-capab-identify-setup))))
+         (erc-buffer-list 'erc-server-buffer-p)))
   ((remove-hook 'erc-server-005-functions 'erc-capab-identify-setup)
    (remove-hook 'erc-server-290-functions 'erc-capab-identify-activate)
    ;; we don't remove the `erc-capab-identify-remove/set-identified-flag' hooks
@@ -113,11 +121,14 @@
 
 ;;; Functions:
 
-(defun erc-capab-identify-setup (proc parsed)
+(defun erc-capab-identify-setup (&optional proc parsed)
   "Set up CAPAB IDENTIFY on the current server.
 
-PROC is the current server's process.
-PARSED is the current message, a response struct."
+Optional argument PROC is the current server's process.
+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)))
 
@@ -174,13 +185,9 @@ PARSED is an `erc-parsed' response struct."
                      (erc-get-parsed-vector (point)))))
       (when (and nickname
                  (goto-char (point-min))
-                 (re-search-forward
-                  ;; matches nick in channel, msg, notice, and action messages
-                  ;; this assumes the default action format is used
-                  (concat "\\(<\\|[^\\*]?\\* ?\\|-\\)"
-                          "\\(" (regexp-quote nickname) "\\)")
-                  nil t))
-        (goto-char (match-beginning 2))
+                 ;; assuming the first use of `nickname' is the sender's nick
+                 (re-search-forward (regexp-quote nickname) nil t))
+        (goto-char (match-beginning 0))
         (insert erc-capab-identify-prefix)))))
 
 (defun erc-capab-find-parsed ()
diff --git a/erc-list.el b/erc-list.el
index da442c9..019be8f 100644
--- a/erc-list.el
+++ b/erc-list.el
@@ -38,7 +38,7 @@
   (require 'overlay))
 (eval-when-compile (require 'cl))
 
-(defconst erc-list-version "$Revision: 1.48 $"
+(defconst erc-list-version "$Revision: 1.49 $"
   "ERC channel list revision number")
 
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -143,12 +143,19 @@ display the channel list."
   (setq truncate-lines t)
   (add-hook 'post-command-hook 'erc-chanlist-post-command-hook 'append 'local))
 
+;; Define module:
+;;;###autoload (autoload 'erc-list-mode "erc-list")
+(define-erc-module list nil
+  "List channels nicely in a separate buffer."
+  ((defalias 'erc-cmd-LIST 'erc-list-channels))
+  ((defalias 'erc-cmd-LIST 'erc-list-channels-simple)))
+
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Functions.
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
 ;;;###autoload
-(defun erc-cmd-LIST (&rest channel)
+(defun erc-list-channels (&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)."
@@ -166,6 +173,18 @@ available channel)."
     (erc-chanlist channel))
   t)
 
+(defun erc-list-channels-simple (&optional line)
+  "Send the LIST command to the current server with optional channels LINE."
+  (when (string-match "^\\s-*\\(.*\\)$" line)
+    (let ((channels (match-string 1 line)))
+      (erc-log (format "cmd: LIST: %s" channels))
+      (erc-server-send
+       (if (string= channels "")
+          "LIST"
+        (concat "LIST :" channels))))
+    t))
+(put 'erc-list-channels-simple 'do-not-parse-args t)
+
 ;;;###autoload
 (defun erc-chanlist (&optional channels)
   "Show a channel listing of the current server in a special mode.
diff --git a/erc-menu.el b/erc-menu.el
index 07e1e10..d7a20ba 100644
--- a/erc-menu.el
+++ b/erc-menu.el
@@ -31,7 +31,7 @@
 
 (require 'easymenu)
 
-(defconst erc-menu-version "$Revision: 1.24 $"
+(defconst erc-menu-version "$Revision: 1.25 $"
   "ERC menu revision")
 
 (defvar erc-menu-definition
@@ -39,8 +39,8 @@
        ["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))]
+       ["List channels..." erc-list-channels
+        (and erc-server-connected (fboundp 'erc-list-channels))]
        ["Join channel..." erc-join-channel erc-server-connected]
        ["Start a query..." erc-cmd-QUERY erc-server-connected]
        "-"
diff --git a/erc-spelling.el b/erc-spelling.el
index f3748ad..aaa5293 100644
--- a/erc-spelling.el
+++ b/erc-spelling.el
@@ -34,7 +34,7 @@
 (require 'erc)
 (require 'flyspell)
 
-(defconst erc-spelling-version "$Revision: 1.10 $"
+(defconst erc-spelling-version "$Revision: 1.11 $"
   "ERC spelling revision.")
 
 ;;;###autoload (autoload 'erc-spelling-mode "erc-spelling" nil t)
@@ -44,11 +44,13 @@
   ;; 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)))
+           (when 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)))
+           (when buffer
+             (with-current-buffer buffer (flyspell-mode 0))))
          (erc-buffer-list))))
 
 (defcustom erc-spelling-dictionaries nil
diff --git a/erc.el b/erc.el
index 0a47c60..1a6d0a7 100644
--- a/erc.el
+++ b/erc.el
@@ -66,7 +66,7 @@
 
 ;;; Code:
 
-(defconst erc-version-string "Version 5.1.1 (CVS) $Revision: 1.805 $"
+(defconst erc-version-string "Version 5.1.1 (CVS) $Revision: 1.806 $"
   "ERC version.  This is used by function `erc-version'.")
 
 (eval-when-compile (require 'cl))
@@ -1727,7 +1727,7 @@ all channel buffers on all servers."
 
 (defcustom erc-modules '(netsplit fill button match track completion readonly
                                  ring autojoin noncommands irccontrols
-                                 stamp)
+                                 stamp list)
   "A list of modules which erc should enable.
 If you set the value of this without using `customize' remember to call
 \(erc-update-modules) after you change it.  When using `customize', modules
@@ -1748,42 +1748,47 @@ removed from the list will be disabled."
         ;; this test is for the case where erc hasn't been loaded yet
         (when (fboundp 'erc-update-modules)
           (erc-update-modules)))
-  :type '(set :greedy t
-             (const :tag "Set away status automatically" autoaway)
-             (const :tag "Join channels automatically" autojoin)
-             (const :tag "Integrate with Big Brother Database" bbdb)
-             (const :tag "Buttonize URLs, nicknames, and other text" button)
-             (const :tag "Mark unidentified users on servers supporting CAPAB 
IDENTIFY-MSG"
-                    capab-identify)
-             (const :tag "Wrap long lines" fill)
-             (const :tag "Highlight or remove IRC control characters"
-                    irccontrols)
-             (const :tag "Save buffers in logs" log)
-             (const :tag "Highlight pals, fools, and other keywords" match)
-             (const :tag "Detect netsplits" netsplit)
-             (const :tag "Don't display non-IRC commands after evaluation"
-                    noncommands)
-             (const :tag
-                    "Notify when the online status of certain users changes"
-                    notify)
-             (const :tag "Complete nicknames and commands (programmable)"
-                    completion)
-             (const :tag "Complete nicknames and commands (old)" hecomplete)
-             (const :tag "Make displayed lines read-only" readonly)
-             (const :tag "Replace text in messages" replace)
-             (const :tag "Enable an input history" ring)
-             (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
-             (const :tag "Identify to Nickserv (IRC Services) automatically"
-                    services)
-             (const :tag "Convert smileys to pretty icons" smiley)
-             (const :tag "Play sounds when you receive CTCP SOUND requests"
-                    sound)
-             (const :tag "Add timestamps to messages" stamp)
-             (const :tag "Check spelling" spelling)
-             (const :tag "Track channel activity in the mode-line" track)
-             (const :tag "Truncate buffers to a certain size" truncate)
-             (const :tag "Translate morse code in messages" unmorse)
-             (repeat :tag "Others" :inline t symbol))
+  :type
+  '(set
+    :greedy t
+    (const :tag "Set away status automatically" autoaway)
+    (const :tag "Join channels automatically" autojoin)
+    (const :tag "Integrate with Big Brother Database" bbdb)
+    (const :tag "Buttonize URLs, nicknames, and other text" button)
+    (const
+     :tag
+     "Mark unidentified users on freenode and other servers supporting CAPAB"
+     capab-identify)
+    (const :tag "Wrap long lines" fill)
+    (const :tag "Highlight or remove IRC control characters"
+          irccontrols)
+    (const :tag "List channels in a separate buffer" list)
+    (const :tag "Save buffers in logs" log)
+    (const :tag "Highlight pals, fools, and other keywords" match)
+    (const :tag "Detect netsplits" netsplit)
+    (const :tag "Don't display non-IRC commands after evaluation"
+          noncommands)
+    (const :tag
+          "Notify when the online status of certain users changes"
+          notify)
+    (const :tag "Complete nicknames and commands (programmable)"
+          completion)
+    (const :tag "Complete nicknames and commands (old)" hecomplete)
+    (const :tag "Make displayed lines read-only" readonly)
+    (const :tag "Replace text in messages" replace)
+    (const :tag "Enable an input history" ring)
+    (const :tag "Scroll to the bottom of the buffer" scrolltobottom)
+    (const :tag "Identify to Nickserv (IRC Services) automatically"
+          services)
+    (const :tag "Convert smileys to pretty icons" smiley)
+    (const :tag "Play sounds when you receive CTCP SOUND requests"
+          sound)
+    (const :tag "Add timestamps to messages" stamp)
+    (const :tag "Check spelling" spelling)
+    (const :tag "Track channel activity in the mode-line" track)
+    (const :tag "Truncate buffers to a certain size" truncate)
+    (const :tag "Translate morse code in messages" unmorse)
+    (repeat :tag "Others" :inline t symbol))
   :group 'erc)
 
 (defun erc-update-modules ()




reply via email to

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