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