changeset 92888:1ad2ece503eb

(top-level): CL not required when compiling. (org-irc-visit-erc): Replace runtime CL functions.
author Glenn Morris <rgm@gnu.org>
date Fri, 14 Mar 2008 02:36:25 +0000
parents a8351fbe7e61
children 284bbbc59bdb
files lisp/textmodes/org-irc.el
diffstat 1 files changed, 12 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/org-irc.el	Fri Mar 14 02:35:13 2008 +0000
+++ b/lisp/textmodes/org-irc.el	Fri Mar 14 02:36:25 2008 +0000
@@ -1,13 +1,13 @@
 ;;; org-irc.el --- Store links to IRC sessions
-;;
+
 ;; Copyright (C) 2008  Free Software Foundation, Inc.
-;;
+
 ;; Author: Philip Jackson <emacs@shellarchive.co.uk>
 ;; Keywords: erc, irc, link, org
 ;; Version: 1.3
-;;
+
 ;; This file is part of GNU Emacs.
-;;
+
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 ;; the Free Software Foundation; either version 3, or (at your option)
@@ -22,9 +22,9 @@
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ;; Boston, MA 02110-1301, USA.
-;;
+
 ;;; Commentary:
-;;
+
 ;; Link to an IRC session. Only ERC has been implemented at the
 ;; moment.
 ;;
@@ -47,13 +47,9 @@
 ;;
 ;; If, when the resulting link is visited, there is no connection to a
 ;; requested server then one will be created.
-;;
+
 ;;; Code:
 
-
-(eval-when-compile
-  (require 'cl))
-
 (require 'org)
 (require 'erc)
 (require 'erc-log)
@@ -203,10 +199,10 @@
         (let ((chan-name (pop link)))
           ;; if we got a channel name then switch to it or join it
           (if chan-name
-              (let ((chan-buf (find-if
-                               (lambda (x)
-                                 (string= (buffer-name x) chan-name))
-                               buffer-list)))
+              (let ((chan-buf (catch 'found
+                                (dolist (x buffer-list)
+                                  (if (string= (buffer-name x) chan-name)
+                                      (throw 'found x))))))
                 (if chan-buf
                     (progn
                       (switch-to-buffer chan-buf)
@@ -214,8 +210,7 @@
                       ;; then start a chat with them
                       (let ((nick (pop link)))
                         (when nick
-                          (if (find nick (erc-get-server-nickname-list)
-                                    :test 'string=)
+                          (if (member nick (erc-get-server-nickname-list))
                               (progn
                                 (goto-char (point-max))
                                 (insert (concat nick ": ")))