diff options
Diffstat (limited to 'pcr/emacs-elib/elib-deprecation.patch')
-rw-r--r-- | pcr/emacs-elib/elib-deprecation.patch | 461 |
1 files changed, 461 insertions, 0 deletions
diff --git a/pcr/emacs-elib/elib-deprecation.patch b/pcr/emacs-elib/elib-deprecation.patch new file mode 100644 index 000000000..ce8aedb6f --- /dev/null +++ b/pcr/emacs-elib/elib-deprecation.patch @@ -0,0 +1,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 |