summaryrefslogtreecommitdiff
path: root/lisp/erc/erc-networks.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-11-19 12:24:12 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2012-11-19 12:24:12 -0500
commit19dc72069c79865d5464737b4ce10ed25a3be49b (patch)
tree58eb37bf96ecbb9659eba0b95f6fa42ea4551a5d /lisp/erc/erc-networks.el
parent855b17af8fd8a96e1ca66a652b88f34479df12d7 (diff)
downloademacs-19dc72069c79865d5464737b4ce10ed25a3be49b.tar.gz
Use cl-lib instead of cl, and interactive-p => called-interactively-p.
* lisp/erc/erc-track.el, lisp/erc/erc-networks.el, lisp/erc/erc-netsplit.el: * lisp/erc/erc-dcc.el, lisp/erc/erc-backend.el: Use cl-lib, nth, pcase, and called-interactively-p instead of cl. * lisp/erc/erc-speedbar.el, lisp/erc/erc-services.el: * lisp/erc/erc-pcomplete.el, lisp/erc/erc-notify.el, lisp/erc/erc-match.el: * lisp/erc/erc-log.el, lisp/erc/erc-join.el, lisp/erc/erc-ezbounce.el: * lisp/erc/erc-capab.el: Don't require cl since we don't use it. * lisp/erc/erc.el: Use cl-lib, nth, pcase, and called-interactively-p i.s.o cl. (erc-lurker-ignore-chars, erc-common-server-suffixes): Move before first use. * lisp/json.el: Don't require cl since we don't use it. * lisp/color.el: Don't require cl. (color-complement): `caddr' -> `nth 2'. * test/automated/ert-x-tests.el: Use cl-lib. * test/automated/ert-tests.el: Use lexical-binding and cl-lib.
Diffstat (limited to 'lisp/erc/erc-networks.el')
-rw-r--r--lisp/erc/erc-networks.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/erc/erc-networks.el b/lisp/erc/erc-networks.el
index 89372555ccc..5089ff6b4ba 100644
--- a/lisp/erc/erc-networks.el
+++ b/lisp/erc/erc-networks.el
@@ -40,7 +40,7 @@
;;; Code:
(require 'erc)
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
;; Variables
@@ -729,10 +729,10 @@ search for a match in `erc-networks-alist'."
(or
;; Loop through `erc-networks-alist' looking for a match.
(let ((server (or erc-server-announced-name erc-session-server)))
- (loop for (name matcher) in erc-networks-alist
- when (and matcher
- (string-match (concat matcher "\\'") server))
- do (return name)))
+ (cl-loop for (name matcher) in erc-networks-alist
+ when (and matcher
+ (string-match (concat matcher "\\'") server))
+ do (cl-return name)))
'Unknown)))
(defun erc-network ()
@@ -789,8 +789,8 @@ As an example:
(cond ((numberp p)
(push p result))
((listp p)
- (setq result (nconc (loop for i from (cadr p) downto (car p)
- collect i)
+ (setq result (nconc (cl-loop for i from (cadr p) downto (car p)
+ collect i)
result)))))
(nreverse result)))