nixpkgs/pkgs/applications/editors/emacs-modes/jdee/elib-avltree.patch
Ludovic Courtès a56fecb102 JDEE: Update.
svn path=/nixpkgs/trunk/; revision=16797
2009-08-21 08:43:07 +00:00

105 lines
3.7 KiB
Diff

JDEE refers to the `avltree' module from GNU Elib, but GNU Elib
no longer exists (see http://www.gnu.org/software/elib/). This
patch updates the module names to what's current in Emacs.
--- jde/config/build.el
+++ jde/config/build.el
@@ -33,11 +33,10 @@ compile.
CEDET-DIR is the cedet lisp code base directory (see PATHS).
PATHS are sub directories under CEDET-DIR we use to compile."
- (dolist (path (list dir lisp-src-dir elib-dir cedet-dir))
+ (dolist (path (list dir lisp-src-dir cedet-dir))
(if (not (file-directory-p path))
(error "Doesn't exist or not a directory: %s" path)))
(let ((autoload-buf (jde-make-autoloads dir autoload-libname)))
- (add-to-list 'load-path elib-dir t)
(dolist (path paths)
(add-to-list 'load-path (expand-file-name path cedet-dir) t))
(add-to-list 'load-path lisp-src-dir t)
--- jde/lisp/jde-parse.el (revision 90)
+++ jde/lisp/jde-parse.el (working copy)
@@ -24,7 +24,7 @@
(require 'semantic-sb)
(require 'semantic-ctxt)
-(require 'avltree)
+(require 'avl-tree)
(require 'thingatpt)
(require 'eieio)
(require 'jde-imenu) ; All the imenu stuff is here now!
@@ -869,7 +869,8 @@ in a method; otherwise, nil."
(defclass jde-avl-tree ()
((tree :initarg tree
- :type list
+ ;; FIXME: Emacs 23 `avl-tree' objects are not lists.
+ ;;:type list
:documentation
"The tree")
(compare-fcn :initarg compare-fcn
@@ -887,51 +887,51 @@ in a method; otherwise, nil."
(assert (typep (oref this compare-fcn) 'function))
- (oset this tree (avltree-create (oref this compare-fcn))))
+ (oset this tree (avl-tree-create (oref this compare-fcn))))
(defmethod jde-avl-tree-add ((this jde-avl-tree) item)
"Inserts ITEM in this tree."
- (avltree-enter (oref this tree) item))
+ (avl-tree-enter (oref this tree) item))
(defmethod jde-avl-tree-delete ((this jde-avl-tree) item)
"Deletes ITEM from THIS tree."
- (avltree-delete (oref this tree) item))
+ (avl-tree-delete (oref this tree) item))
(defmethod jde-avl-tree-is-empty ((this jde-avl-tree))
"Return t if THIS tree is empty, otherwise return nil."
- (avltree-empty (oref this tree)))
+ (avl-tree-empty (oref this tree)))
(defmethod jde-avl-tree-find ((this jde-avl-tree) item)
"Return the element in THIS tree that matches item."
- (avltree-member (oref this tree) item))
+ (avl-tree-member (oref this tree) item))
(defmethod jde-avl-tree-map ((this jde-avl-tree) map-function)
"Applies MAP-FUNCTION to all elements of THIS tree."
- (avltree-map map-function (oref this tree)))
+ (avl-tree-map map-function (oref this tree)))
(defmethod jde-avl-tree-first ((this jde-avl-tree))
"Return the first item in THIS tree."
- (avltree-first (oref this tree)))
+ (avl-tree-first (oref this tree)))
(defmethod jde-avl-tree-last ((this jde-avl-tree))
"Return the last item in THIS tree."
- (avltree-last (oref this tree)))
+ (avl-tree-last (oref this tree)))
(defmethod jde-avl-tree-copy ((this jde-avl-tree))
"Return a copy of THIS tree."
- (avltree-copy (oref this tree)))
+ (avl-tree-copy (oref this tree)))
(defmethod jde-avl-tree-flatten ((this jde-avl-tree))
"Return a sorted list containing all elements of THIS tree."
- (avltree-flatten (oref this tree)))
+ (avl-tree-flatten (oref this tree)))
(defmethod jde-avl-tree-size ((this jde-avl-tree))
"Return the number of elements in THIS tree."
- (avltree-size (oref this tree)))
+ (avl-tree-size (oref this tree)))
(defmethod jde-avl-tree-clear ((this jde-avl-tree))
"Delete all elements of THIS tree."
- (avltree-clear (oref this tree)))
+ (avl-tree-clear (oref this tree)))
(defclass jde-parse-method-map (jde-avl-tree)
()