]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/erc/erc.el (erc-channel-receive-names): Silence compiler warning.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 4 Oct 2014 03:04:51 +0000 (23:04 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 4 Oct 2014 03:04:51 +0000 (23:04 -0400)
(erc-format-@nick, erc-update-modes): Idem.

lisp/erc/ChangeLog
lisp/erc/erc.el

index 300bcfc74da3c171a4fe7710c8e4e053ac53f34f..fd8f83bd78b61d0a0fc1a569bd866a910b211dfc 100644 (file)
@@ -1,3 +1,8 @@
+2014-10-04  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * erc.el (erc-channel-receive-names): Silence compiler warning.
+       (erc-format-@nick, erc-update-modes): Idem.
+
 2014-10-03  Kelvin White  <kwhite@gnu.org>
 
        * erc.el (erc-rename-buffers): Use defcustom instead of defvar for
index 2825481c2a1d58081288d5ac0acd936cf1915076..2fd41a34ad4ad73b05e3da8eaa2ba4a711ce28e7 100644 (file)
@@ -4246,7 +4246,7 @@ See also `erc-format-nick-function'."
            (erc-propertize "+" 'help-echo "voice"))
           (t ""))))
 
-(defun erc-format-@nick (&optional user channel-data)
+(defun erc-format-@nick (&optional user _channel-data)
   "Format the nickname of USER showing if USER has a voice, is an
 operator, half-op, admin or owner. Owners have \"~\", admins have
 \"&\", operators have \"@\" and users with voice have \"+\" as a
@@ -4770,22 +4770,24 @@ channel."
          (hop-ch (cdr (assq ?h prefix)))
          (adm-ch (cdr (assq ?a prefix)))
          (own-ch (cdr (assq ?q prefix)))
-         names name op voice halfop admin owner)
-    (setq names (delete "" (split-string names-string)))
+         (names (delete "" (split-string names-string)))
+        name op voice halfop admin owner)
     (let ((erc-channel-members-changed-hook nil))
       (dolist (item names)
-        (let ((updatep t))
+        (let ((updatep t)
+             (ch (aref item 0)))
           (setq name item op 'off voice 'off halfop 'off admin 'off owner 'off)
-          (if (rassq (elt item 0) prefix)
+          (if (rassq ch prefix)
               (if (= (length item) 1)
                  (setq updatep nil)
                (setq name (substring item 1))
-               (setf (pcase (aref item 0)
+               (setf (pcase ch
                        ((pred (eq voice-ch)) voice)
                        ((pred (eq hop-ch))   halfop)
                        ((pred (eq op-ch))    op)
                        ((pred (eq adm-ch))   admin)
-                       ((pred (eq own-ch))   owner))
+                       ((pred (eq own-ch))   owner)
+                       (_ (error "Unknown prefix char `%S'" ch) voice))
                      'on)))
           (when updatep
             (puthash (erc-downcase name) t
@@ -5086,7 +5088,7 @@ arg-modes is a list of triples of the form:
         (list add-modes remove-modes arg-modes))
     nil))
 
-(defun erc-update-modes (tgt mode-string &optional nick host login)
+(defun erc-update-modes (tgt mode-string &optional _nick _host _login)
   "Update the mode information for TGT, provided as MODE-STRING.
 Optional arguments: NICK, HOST and LOGIN - the attributes of the
 person who changed the modes."