summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--emacs/Makefile4
-rw-r--r--emacs/caml-emacs.el1
-rw-r--r--emacs/caml-types.el25
3 files changed, 18 insertions, 12 deletions
diff --git a/emacs/Makefile b/emacs/Makefile
index a91a8a02e..8e97b6aeb 100644
--- a/emacs/Makefile
+++ b/emacs/Makefile
@@ -19,11 +19,11 @@ SCRIPTDIR = $(BINDIR)
# Command for byte-compiling the files
COMPILECMD=(progn \
(setq load-path (cons "." load-path)) \
+ (byte-compile-file "caml-xemacs.el") \
+ (byte-compile-file "caml-emacs.el") \
(byte-compile-file "caml.el") \
(byte-compile-file "inf-caml.el") \
(byte-compile-file "caml-help.el") \
- (byte-compile-file "caml-types.el") \
- (byte-compile-file "caml-xemacs.el") \
(byte-compile-file "camldebug.el"))
install:
diff --git a/emacs/caml-emacs.el b/emacs/caml-emacs.el
index 571dd784c..25132eea5 100644
--- a/emacs/caml-emacs.el
+++ b/emacs/caml-emacs.el
@@ -10,6 +10,5 @@
(defun caml-event-point-end (e) (posn-point (event-end e)))
(defalias 'caml-track-mouse 'track-mouse)
(defalias 'caml-read-event 'read-event)
-(defun caml-mouse-movement-p mouse-mouvement)
(provide 'caml-emacs)
diff --git a/emacs/caml-types.el b/emacs/caml-types.el
index 77612eb77..213011d1a 100644
--- a/emacs/caml-types.el
+++ b/emacs/caml-types.el
@@ -176,6 +176,16 @@ See `caml-types-location-re' for annotation file format.
(and (= (car date1) (car date2))
(< (nth 1 date1) (nth 1 date2)))))
+
+; we use an obarray for hash-consing the strings within each tree
+
+(defun caml-types-make-hash-table ()
+ (make-vector 255 0))
+
+(defun caml-types-hcons (elem table)
+ (symbol-name (intern elem table)))
+
+
; tree of intervals
; each node is a vector
; [ pos-left pos-right type-info child child child... ]
@@ -183,13 +193,10 @@ See `caml-types-location-re' for annotation file format.
; () if this node does not correspond to an annotated interval
; (type-start . type-end) address of the annotation in the .annot file
-(defun caml-types-hcons (elem table)
- (or (cl-gethash elem table) (cl-puthash elem elem table) elem))
-
(defun caml-types-build-tree (target-file)
(let ((stack ())
(accu ())
- (table (make-hash-table :test 'equal))
+ (table (caml-types-make-hash-table))
(type-info ()))
(while (re-search-forward caml-types-location-re () t)
(let ((l-file (file-name-nondirectory (match-string 1)))
@@ -389,9 +396,9 @@ and its type is displayed in the minibuffer, until the move is released."
; (message "Drag the mouse to explore types")
(unwind-protect
(caml-track-mouse
- (setq region (caml-types-typed-region
- target-buf
- (caml-event-point-start event)))
+ ;(setq region (caml-types-typed-region
+ ; target-buf
+ ; (caml-event-point-start event)))
(while (and event
(integer-or-marker-p
(setq cnum (caml-event-point-end event))))
@@ -430,8 +437,8 @@ and its type is displayed in the minibuffer, until the move is released."
)
)
(delete-overlay caml-types-expr-ovl)
- (if unlocked (font-lock-mode 1)
- (remove-text-properties (car region) (cdr region) '(face)))
+ ;(if unlocked (font-lock-mode 1)
+ ; (remove-text-properties (car region) (cdr region) '(face)))
)))
(defun caml-types-typed-region (target-buf pos)