1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
|
diff -ub elib-1.0.orig/avltree.el elib-1.0/avltree.el
--- elib-1.0.orig/avltree.el 1995-12-10 16:50:53.000000000 -0800
+++ elib-1.0/avltree.el 2008-06-22 15:31:48.000000000 -0700
@@ -69,19 +69,19 @@
(defmacro elib-avl-node-create (left right data balance)
;; Create and return an avl-tree node.
- (` (vector (, left) (, right) (, data) (, balance))))
+ `(vector ,left ,right ,data ,balance))
(defmacro elib-avl-node-balance (node)
;; Return the balance field of a node.
- (` (aref (, node) 3)))
+ `(aref ,node 3))
(defmacro elib-avl-node-set-balance (node newbal)
;; Set the balance field of a node.
- (` (aset (, node) 3 (, newbal))))
+ `(aset ,node 3 ,newbal))
@@ -96,20 +96,20 @@
(defmacro elib-avl-root (tree)
;; Return the root node for an avl-tree. INTERNAL USE ONLY.
- (` (elib-node-left (car (cdr (, tree))))))
+ `(elib-node-left (car (cdr ,tree))))
(defmacro elib-avl-dummyroot (tree)
;; Return the dummy node of an avl-tree. INTERNAL USE ONLY.
- (` (car (cdr (, tree)))))
+ `(car (cdr ,tree)))
(defmacro elib-avl-cmpfun (tree)
;; Return the compare function of AVL tree TREE. INTERNAL USE ONLY.
- (` (cdr (cdr (, tree)))))
+ `(cdr (cdr ,tree)))
;; ----------------------------------------------------------------
@@ -412,20 +412,20 @@
;; INTERNAL USE ONLY.
(let ((node root)
- (stack (elib-stack-create))
+ (stack (stack-create))
(go-left t))
- (elib-stack-push stack nil)
+ (stack-push stack nil)
(while node
(if (and go-left
(elib-node-left node))
(progn ; Do the left subtree first.
- (elib-stack-push stack node)
+ (stack-push stack node)
(setq node (elib-node-left node)))
(funcall map-function node) ; Apply the function...
(if (elib-node-right node) ; and do the right subtree.
(setq node (elib-node-right node)
go-left t)
- (setq node (elib-stack-pop stack)
+ (setq node (stack-pop stack)
go-left nil))))))
diff -ub elib-1.0.orig/bintree.el elib-1.0/bintree.el
--- elib-1.0.orig/bintree.el 1995-12-10 16:50:53.000000000 -0800
+++ elib-1.0/bintree.el 2008-06-22 15:28:45.000000000 -0700
@@ -64,19 +64,19 @@
(defmacro elib-bintree-root (tree)
;; Return the root node for a binary tree. INTERNAL USE ONLY.
- (` (elib-node-left (car (cdr (, tree))))))
+ `(elib-node-left (car (cdr ,tree))))
(defmacro elib-bintree-dummyroot (tree)
;; Return the dummy node of a binary tree. INTERNAL USE ONLY.
- (` (car (cdr (, tree)))))
+ `(car (cdr ,tree)))
(defmacro elib-bintree-cmpfun (tree)
;; Return the compare function of binary tree TREE. INTERNAL USE ONLY."
- (` (cdr (cdr (, tree)))))
+ `(cdr (cdr ,tree)))
@@ -90,20 +90,20 @@
;; INTERNAL USE ONLY."
(let ((node root)
- (stack (elib-stack-create))
+ (stack (stack-create))
(go-left t))
- (elib-stack-push stack nil)
+ (stack-push stack nil)
(while node
(if (and go-left
(elib-node-left node))
(progn ; Do the left subtree first.
- (elib-stack-push stack node)
+ (stack-push stack node)
(setq node (elib-node-left node)))
(funcall map-function node) ; Apply the function...
(if (elib-node-right node) ; and do the right subtree.
(setq node (elib-node-right node)
go-left t)
- (setq node (elib-stack-pop stack)
+ (setq node (stack-pop stack)
go-left nil))))))
diff -ub elib-1.0.orig/cookie.el elib-1.0/cookie.el
--- elib-1.0.orig/cookie.el 1995-12-10 16:50:54.000000000 -0800
+++ elib-1.0/cookie.el 2008-06-22 15:38:55.000000000 -0700
@@ -139,13 +139,13 @@
(let ((old-buffer (make-symbol "old-buffer"))
(hnd (make-symbol "collection")))
- (` (let* (((, old-buffer) (current-buffer))
- ((, hnd) (, collection))
- (dll (elib-collection->dll (, hnd))))
- (set-buffer (elib-collection->buffer (, hnd)))
+ `(let* ((,old-buffer (current-buffer))
+ (,hnd ,collection)
+ (dll (elib-collection->dll ,hnd)))
+ (set-buffer (elib-collection->buffer ,hnd))
(unwind-protect
- (progn (,@ forms))
- (set-buffer (, old-buffer)))))))
+ (progn ,@forms)
+ (set-buffer ,old-buffer)))))
(put 'elib-set-buffer-bind-dll-let* 'lisp-indent-hook 2)
@@ -160,14 +160,14 @@
(let ((old-buffer (make-symbol "old-buffer"))
(hnd (make-symbol "collection")))
- (` (let* (((, old-buffer) (current-buffer))
- ((, hnd) (, collection))
- (dll (elib-collection->dll (, hnd)))
- (,@ varlist))
- (set-buffer (elib-collection->buffer (, hnd)))
+ `(let* ((,old-buffer (current-buffer))
+ (,hnd ,collection)
+ (dll (elib-collection->dll ,hnd))
+ ,@varlist)
+ (set-buffer (elib-collection->buffer ,hnd))
(unwind-protect
- (progn (,@ forms))
- (set-buffer (, old-buffer)))))))
+ (progn ,@forms)
+ (set-buffer ,old-buffer)))))
(defmacro elib-filter-hf (collection tin)
@@ -179,12 +179,12 @@
(let ((tempvar (make-symbol "tin"))
(tmpcoll (make-symbol "tmpcollection")))
- (` (let (((, tempvar) (, tin))
- ((, tmpcoll) (, collection)))
- (if (or (eq (, tempvar) (elib-collection->header (, tmpcoll)))
- (eq (, tempvar) (elib-collection->footer (, tmpcoll))))
+ `(let ((,tempvar ,tin)
+ (,tmpcoll ,collection))
+ (if (or (eq ,tempvar (elib-collection->header ,tmpcoll))
+ (eq ,tempvar (elib-collection->footer ,tmpcoll)))
nil
- (, tempvar))))))
+ ,tempvar))))
diff -ub elib-1.0.orig/dll-debug.el elib-1.0/dll-debug.el
--- elib-1.0.orig/dll-debug.el 1995-12-10 16:50:54.000000000 -0800
+++ elib-1.0/dll-debug.el 2008-06-22 15:25:14.000000000 -0700
@@ -74,9 +74,9 @@
(defmacro dll-insert-after (node element)
(let ((node-v (make-symbol "node"))
(element-v (make-symbol "element")))
- (` (let (((, node-v) (, node))
- ((, element-v) (, element)))
- (setcdr (, node-v) (cons (, element-v) (cdr (, node-v))))))))
+ `(let ((,node-v ,node)
+ (,element-v ,element))
+ (setcdr ,node-v (cons ,element-v (cdr ,node-v))))))
;;; ===================================================================
;;; The public functions which operate on doubly linked lists.
@@ -86,7 +86,7 @@
"Get the element of a NODE in a doubly linked list DLL.
Args: DLL NODE."
- (` (car (, node))))
+ `(car ,node))
(defun dll-create ()
diff -ub elib-1.0.orig/dll.el elib-1.0/dll.el
--- elib-1.0.orig/dll.el 1995-12-10 16:50:54.000000000 -0800
+++ elib-1.0/dll.el 2008-06-22 15:22:58.000000000 -0700
@@ -89,7 +89,7 @@
"Get the element of a NODE in a doubly linked list DLL.
Args: DLL NODE."
- (` (elib-node-data (, node))))
+ `(elib-node-data ,node))
(defun dll-create ()
diff -ub elib-1.0.orig/elib-node.el elib-1.0/elib-node.el
--- elib-1.0.orig/elib-node.el 1995-12-10 16:50:53.000000000 -0800
+++ elib-1.0/elib-node.el 2008-06-22 15:21:46.000000000 -0700
@@ -49,42 +49,42 @@
(defmacro elib-node-create (left right data)
;; Create a tree node from LEFT, RIGHT and DATA.
- (` (vector (, left) (, right) (, data))))
+ `(vector ,left ,right ,data))
(defmacro elib-node-left (node)
;; Return the left pointer of NODE.
- (` (aref (, node) 0)))
+ `(aref ,node 0))
(defmacro elib-node-right (node)
;; Return the right pointer of NODE.
- (` (aref (, node) 1)))
+ `(aref ,node 1))
(defmacro elib-node-data (node)
;; Return the data of NODE.
- (` (aref (, node) 2)))
+ `(aref ,node 2))
(defmacro elib-node-set-left (node newleft)
;; Set the left pointer of NODE to NEWLEFT.
- (` (aset (, node) 0 (, newleft))))
+ `(aset ,node 0 ,newleft))
(defmacro elib-node-set-right (node newright)
;; Set the right pointer of NODE to NEWRIGHT.
- (` (aset (, node) 1 (, newright))))
+ `(aset ,node 1 ,newright))
(defmacro elib-node-set-data (node newdata)
;; Set the data of NODE to NEWDATA.
- (` (aset (, node) 2 (, newdata))))
+ `(aset ,node 2 ,newdata))
@@ -94,7 +94,7 @@
;;
;; NODE is the node, and BRANCH is the branch.
;; 0 for left pointer, 1 for right pointer and 2 for the data."
- (` (aref (, node) (, branch))))
+ `(aref ,node ,branch))
(defmacro elib-node-set-branch (node branch newval)
@@ -104,6 +104,6 @@
;; NODE is the node, and BRANCH is the branch.
;; 0 for left pointer, 1 for the right pointer and 2 for the data.
;; NEWVAL is new value of the branch."
- (` (aset (, node) (, branch) (, newval))))
+ `(aset ,node ,branch ,newval))
;;; elib-node.el ends here.
Only in elib-1.0: elib.info
diff -ub elib-1.0.orig/queue-m.el elib-1.0/queue-m.el
--- elib-1.0.orig/queue-m.el 1995-12-10 16:50:53.000000000 -0800
+++ elib-1.0/queue-m.el 2008-06-22 15:13:41.000000000 -0700
@@ -54,12 +54,12 @@
(defmacro queue-create ()
"Create an empty fifo queue."
- (` (cons 'QUEUE (cons nil nil))))
+ `(cons 'QUEUE (cons nil nil)))
(defmacro queue-p (queue)
"Return t if QUEUE is a queue, otherwise return nil."
- (` (eq (car-safe (, queue)) 'QUEUE)))
+ `(eq (car-safe ,queue) 'QUEUE))
(defun queue-enqueue (queue element)
@@ -91,13 +91,13 @@
(defmacro queue-empty (queue)
"Return t if QUEUE is empty, otherwise return nil."
- (` (null (car (cdr (, queue))))))
+ `(null (car (cdr ,queue))))
(defmacro queue-first (queue)
"Return the first element of QUEUE or nil if it is empty.
The element is not removed."
- (` (car-safe (car (cdr (, queue))))))
+ `(car-safe (car (cdr ,queue))))
(defmacro queue-nth (queue n)
@@ -106,18 +106,18 @@
If the length of the queue is less than N, return nil.
The oldest element (the first one) has number 0."
- (` (nth (, n) (car (cdr (, queue))))))
+ `(nth ,n (car (cdr ,queue))))
(defmacro queue-last (queue)
"Return the last element of QUEUE or nil if it is empty."
- (` (car-safe (cdr (cdr (, queue))))))
+ `(car-safe (cdr (cdr ,queue))))
(defmacro queue-all (queue)
"Return a list of all elements of QUEUE or nil if it is empty.
The oldest element in the queue is the first in the list."
- (` (car (cdr (, queue)))))
+ `(car (cdr ,queue)))
(defun queue-copy (queue)
@@ -131,11 +131,11 @@
(defmacro queue-length (queue)
"Return the number of elements in QUEUE."
- (` (length (car (cdr (, queue))))))
+ `(length (car (cdr ,queue))))
(defmacro queue-clear (queue)
"Remove all elements from QUEUE."
- (` (setcdr (, queue) (cons nil nil))))
+ `(setcdr ,queue (cons nil nil)))
;;; queue-m.el ends here
diff -ub elib-1.0.orig/read.el elib-1.0/read.el
--- elib-1.0.orig/read.el 1995-12-10 16:50:54.000000000 -0800
+++ elib-1.0/read.el 2008-06-22 15:40:38.000000000 -0700
@@ -61,7 +61,7 @@
numdefault)
(setq number numdefault))
((string-match "\\`[0-9]+\\'" numstr)
- (setq number (string-to-int numstr)))
+ (setq number (string-to-number numstr)))
(t (beep))))
number))
diff -ub elib-1.0.orig/stack-m.el elib-1.0/stack-m.el
--- elib-1.0.orig/stack-m.el 1995-12-10 16:50:52.000000000 -0800
+++ elib-1.0/stack-m.el 2008-06-22 15:10:48.000000000 -0700
@@ -51,36 +51,36 @@
(defmacro stack-create ()
"Create an empty lifo stack."
- (` (cons 'STACK nil)))
+ `(cons 'STACK nil))
(defmacro stack-p (stack)
"Return t if STACK is a stack, otherwise return nil."
- (` (eq (car-safe (, stack)) 'STACK)))
+ `(eq (car-safe ,stack) 'STACK))
(defmacro stack-push (stack element)
"Push an element onto the stack.
Args: STACK ELEMENT"
- (` (setcdr (, stack) (cons (, element) (cdr (, stack))))))
+ `(setcdr ,stack (cons ,element (cdr ,stack))))
(defmacro stack-pop (stack)
"Remove the topmost element from STACK and return it.
If the stack is empty, return nil."
- (` (prog1
- (car-safe (cdr (, stack)))
- (setcdr (, stack) (cdr-safe (cdr (, stack)))))))
+ `(prog1
+ (car-safe (cdr ,stack))
+ (setcdr ,stack (cdr-safe (cdr ,stack)))))
(defmacro stack-empty (stack)
"Return t if STACK is empty, otherwise return nil."
- (` (null (cdr (, stack)))))
+ `(null (cdr ,stack)))
(defmacro stack-top (stack)
"Return the topmost element of STACK or nil if it is empty."
- (` (car-safe (cdr (, stack)))))
+ `(car-safe (cdr ,stack)))
(defmacro stack-nth (stack n)
@@ -89,28 +89,28 @@
If the length of the stack is less than N, return nil.
The top stack element has number 0."
- (` (nth (, n) (cdr (, stack)))))
+ `(nth ,n (cdr ,stack)))
(defmacro stack-all (stack)
"Return a list of all entries in STACK.
The element last pushed is first in the list."
- (` (cdr (, stack))))
+ `(cdr ,stack))
(defmacro stack-copy (stack)
"Return a copy of STACK.
All entries in STACK are also copied."
- (` (cons 'STACK (copy-sequence (cdr (, stack))))))
+ `(cons 'STACK (copy-sequence (cdr ,stack))))
(defmacro stack-length (stack)
"Return the number of elements on STACK."
- (` (length (cdr (, stack)))))
+ `(length (cdr ,stack)))
(defmacro stack-clear (stack)
"Remove all elements from STACK."
- (` (setcdr (, stack) nil)))
+ `(setcdr ,stack nil))
;;; stack-m.el ends here
|