aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-01-08 06:09:02 +0000
committerRichard M. Stallman1997-01-08 06:09:02 +0000
commitdebff3c309833b9dd3939c474c2c446fa49f0f86 (patch)
tree2609cbf636f4557fc9e11b3c4e21858238114d6d
parent49b6d120a67691348e884015dd2c343bd1a0d954 (diff)
downloademacs-debff3c309833b9dd3939c474c2c446fa49f0f86.tar.gz
emacs-debff3c309833b9dd3939c474c2c446fa49f0f86.zip
(when, unless): Definitions moved from cl.el.
-rw-r--r--lisp/subr.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/subr.el b/lisp/subr.el
index 22056046416..b674f364e46 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -43,17 +43,13 @@ BODY should be a list of lisp expressions."
43 ;; depend on backquote.el. 43 ;; depend on backquote.el.
44 (list 'function (cons 'lambda cdr))) 44 (list 'function (cons 'lambda cdr)))
45 45
46;;(defmacro defun-inline (name args &rest body) 46(defmacro when (cond &rest body)
47;; "Create an \"inline defun\" (actually a macro). 47 "(when COND BODY...): if COND yields non-nil, do BODY, else return nil."
48;;Use just like `defun'." 48 (list 'if cond (cons 'progn body)))
49;; (nconc (list 'defmacro name '(&rest args))
50;; (if (stringp (car body))
51;; (prog1 (list (car body))
52;; (setq body (or (cdr body) body))))
53;; (list (list 'cons (list 'quote
54;; (cons 'lambda (cons args body)))
55;; 'args))))
56 49
50(defmacro unless (cond &rest body)
51 "(unless COND BODY...): if COND yields nil, do BODY, else return nil."
52 (cons 'if (cons cond (cons nil body))))
57 53
58;;;; Keymap support. 54;;;; Keymap support.
59 55