emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] externals/caml e913a93 090/197: compatibilite emacs 20 + fichie


From: Stefan Monnier
Subject: [nongnu] externals/caml e913a93 090/197: compatibilite emacs 20 + fichiers read-only
Date: Sat, 21 Nov 2020 01:19:44 -0500 (EST)

branch: externals/caml
commit e913a93c9524e109d4e78031af79f3a0742af618
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>

    compatibilite emacs 20 + fichiers read-only
    
    
    git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5802 
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
 Makefile      |  4 ++--
 caml-emacs.el |  1 -
 caml-types.el | 25 ++++++++++++++++---------
 3 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/Makefile b/Makefile
index a91a8a0..8e97b6a 100644
--- a/Makefile
+++ b/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/caml-emacs.el b/caml-emacs.el
index 571dd78..25132ee 100644
--- a/caml-emacs.el
+++ b/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/caml-types.el b/caml-types.el
index 77612eb..213011d 100644
--- a/caml-types.el
+++ b/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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]