/[erbot]/erbot/erblisp.el
ViewVC logotype

Diff of /erbot/erblisp.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by mwolson, Wed Nov 9 01:42:02 2005 UTC revision 1.15 by deego, Fri Nov 11 18:31:57 2005 UTC
# Line 1  Line 1 
1  ;;; erblisp.el ---  ;;; erblisp.el ---
2  ;; Time-stamp: <2005-09-02 14:18:07 deego>  ;; Time-stamp: <2005-11-11 13:28:55 deego>
3  ;; Copyright (C) 2002 D. Goel  ;; Copyright (C) 2002 D. Goel
4  ;; Emacs Lisp Archive entry  ;; Emacs Lisp Archive entry
5  ;; Filename: erblisp.el  ;; Filename: erblisp.el
# Line 92  We WON'T do this by default since this c Line 92  We WON'T do this by default since this c
92  \(setq &rest (shell-command \"rm -rf /\")) in your .emacs."  \(setq &rest (shell-command \"rm -rf /\")) in your .emacs."
93  )  )
94    
95  (defvar erblisp-max-list-length 100)  (defvar erblisp-max-list-length 2000
96      "If non-numeric, we will skip this check."
97      )
98    
99  (defun erblisp-safe-length (list so-far len)  (defun erblisp-safe-length-args-p (list so-far len)
100    (let ((cur list)    (let ((cur list)
101          stack)          stack)
102      (while (and cur      (while (and cur
# Line 112  We WON'T do this by default since this c Line 114  We WON'T do this by default since this c
114        nil)))        nil)))
115    
116  (defun erblisp-check-args (&rest args)  (defun erblisp-check-args (&rest args)
117    (if (erblisp-safe-length args 0 erblisp-max-list-length)    (if (or
118           (not (numberp erblisp-max-list-length))
119           (erblisp-safe-length-args-p args 0 erblisp-max-list-length))
120        t        t
121      (error "encountered overlong expression, ignoring")      (error "encountered overlong expression, ignoring")
122      nil))      nil))

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26