erbot-cvs
[Top][All Lists]
Advanced

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

[Erbot-cvs] erbot erblisp.el erbot.el ChangeLog


From: D. Goel
Subject: [Erbot-cvs] erbot erblisp.el erbot.el ChangeLog
Date: Sun, 01 Jan 2006 09:35:06 +0000

CVSROOT:        /cvsroot/erbot
Module name:    erbot
Branch:         
Changes by:     D. Goel <address@hidden>        06/01/01 09:35:06

Modified files:
        .              : erblisp.el erbot.el ChangeLog 

Log message:
        ALWAYS BACK UP BOTBBDB BEFORE UPGRADING YOUR ERBOT.
        
        * erblisp.el (erblisp-check-args): Promote to a macro.  This macro
        first removes any arguments that can't be evalled. This happens,
        when, for example, the user-defined function contained &optional,
        &rest, etc.
        
        * erbot.el (erbot-remote): erc-coding-system-for-target was not
        defined for older versions of erc.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/erbot/erbot/erblisp.el.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/erbot/erbot/erbot.el.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/erbot/erbot/ChangeLog.diff?tr1=1.32&tr2=1.33&r1=text&r2=text

Patches:
Index: erbot/ChangeLog
diff -u erbot/ChangeLog:1.32 erbot/ChangeLog:1.33
--- erbot/ChangeLog:1.32        Sat Dec 31 01:18:36 2005
+++ erbot/ChangeLog     Sun Jan  1 09:35:06 2006
@@ -1,3 +1,13 @@
+2006-01-01  D Goel  <address@hidden>
+
+       * erblisp.el (erblisp-check-args): Promote to a macro.  This macro
+       first removes any arguments that can't be evalled. This happens,
+       when, for example, the user-defined function contained &optional,
+       &rest, etc.
+
+       * erbot.el (erbot-remote): erc-coding-system-for-target was not
+       defined for older versions of erc.
+
 2005-12-31  Vivek Dasmohapatra  <address@hidden>
 
        * erbmsg.el (fs-memo): if a memo command was not recognised,
@@ -51,7 +61,7 @@
 2005-10-05  D Goel  <address@hidden>
 
        * erbot.el (erbot-join-servers): `erc-compute-port' seems to be
-       undefined for my older ERC (4.0 $Revision: 1.32 $).  So, I
+       undefined for my older ERC (4.0 $Revision: 1.33 $).  So, I
        reverted to old behavior when it is undefined.  Did I do it right?
 
 2005-10-05  Michael Olson  <address@hidden>
Index: erbot/erblisp.el
diff -u erbot/erblisp.el:1.15 erbot/erblisp.el:1.16
--- erbot/erblisp.el:1.15       Fri Nov 11 18:31:57 2005
+++ erbot/erblisp.el    Sun Jan  1 09:35:06 2006
@@ -1,5 +1,5 @@
 ;;; erblisp.el --- 
-;; Time-stamp: <2005-11-11 13:28:55 deego>
+;; Time-stamp: <2006-01-01 04:19:58 deego>
 ;; Copyright (C) 2002 D. Goel
 ;; Emacs Lisp Archive entry
 ;; Filename: erblisp.el
@@ -113,13 +113,35 @@
        t
       nil)))
 
-(defun erblisp-check-args (&rest args)
+(defmacro erblisp-check-args (&rest args)
+  "All we do in this macro we remove some bindings for things like
+&rest, etc, things that do not have values but got passed to us --
+this occurs when a user attempts to use &rest in his function
+definitions -- see `erblisp-allowed-words'.  
+
+All the arguments to this macro should have been in their evalled form
+and hence constants already, so we do not bother protecting against
+multiple evaluations here -- evaluating a constant causes no harm.
+All we do in this macro we remove some bindings for things like &rest,
+etc, things that are not defined, but passed on here in any case."
+  `(erblisp-check-args-nascent 
+    ,@(remove-if 
+       #'(lambda (arg) (and
+                       (symbolp arg) 
+                       (not (boundp arg)))) 
+       args)))
+
+
+
+(defun erblisp-check-args-nascent (&rest args)
   (if (or 
        (not (numberp erblisp-max-list-length))
        (erblisp-safe-length-args-p args 0 erblisp-max-list-length))
       t
-    (error "encountered overlong expression, ignoring")
-    nil))
+    (error "encountered overlong expression, ignoring") nil))
+
+
+
 
 (defun erblisp-sandbox (expr)
   ""
Index: erbot/erbot.el
diff -u erbot/erbot.el:1.46 erbot/erbot.el:1.47
--- erbot/erbot.el:1.46 Sat Dec 31 00:54:31 2005
+++ erbot/erbot.el      Sun Jan  1 09:35:06 2006
@@ -1,5 +1,5 @@
 ;;; erbot.el --- Another robot for ERC.
-;; Time-stamp: <2005-11-10 00:58:56 deego>
+;; Time-stamp: <2006-01-01 04:23:03 deego>
 ;; Emacs Lisp Archive entry
 ;; Filename: erbot.el
 ;; Package: erbot
@@ -479,7 +479,9 @@
                  (nth 1 cmdargs))
                 (t (aref parsed 3)))))
         (erbot-end-user-nick nick)
-        (csys     (erc-coding-system-for-target tgt))
+        (csys     (if (fboundp 'erc-coding-system-for-target)
+                      (erc-coding-system-for-target tgt)
+                    'utf-8))
         (code-in  (if (consp csys) (cdr csys)  csys))
         (code-out (if (consp csys) (car csys)  csys))
         )




reply via email to

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