Skip to content

Commit ea9e26f

Browse files
author
Damien Doligez
committed
compatibilite emacs 20 + fichiers read-only
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5802 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
1 parent 0503b7e commit ea9e26f

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

emacs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ SCRIPTDIR = $(BINDIR)
1919
# Command for byte-compiling the files
2020
COMPILECMD=(progn \
2121
(setq load-path (cons "." load-path)) \
22+
(byte-compile-file "caml-xemacs.el") \
23+
(byte-compile-file "caml-emacs.el") \
2224
(byte-compile-file "caml.el") \
2325
(byte-compile-file "inf-caml.el") \
2426
(byte-compile-file "caml-help.el") \
25-
(byte-compile-file "caml-types.el") \
26-
(byte-compile-file "caml-xemacs.el") \
2727
(byte-compile-file "camldebug.el"))
2828

2929
install:

emacs/caml-emacs.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@
1010
(defun caml-event-point-end (e) (posn-point (event-end e)))
1111
(defalias 'caml-track-mouse 'track-mouse)
1212
(defalias 'caml-read-event 'read-event)
13-
(defun caml-mouse-movement-p mouse-mouvement)
1413

1514
(provide 'caml-emacs)

emacs/caml-types.el

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,20 +176,27 @@ See `caml-types-location-re' for annotation file format.
176176
(and (= (car date1) (car date2))
177177
(< (nth 1 date1) (nth 1 date2)))))
178178

179+
180+
; we use an obarray for hash-consing the strings within each tree
181+
182+
(defun caml-types-make-hash-table ()
183+
(make-vector 255 0))
184+
185+
(defun caml-types-hcons (elem table)
186+
(symbol-name (intern elem table)))
187+
188+
179189
; tree of intervals
180190
; each node is a vector
181191
; [ pos-left pos-right type-info child child child... ]
182192
; type-info =
183193
; () if this node does not correspond to an annotated interval
184194
; (type-start . type-end) address of the annotation in the .annot file
185195

186-
(defun caml-types-hcons (elem table)
187-
(or (cl-gethash elem table) (cl-puthash elem elem table) elem))
188-
189196
(defun caml-types-build-tree (target-file)
190197
(let ((stack ())
191198
(accu ())
192-
(table (make-hash-table :test 'equal))
199+
(table (caml-types-make-hash-table))
193200
(type-info ()))
194201
(while (re-search-forward caml-types-location-re () t)
195202
(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."
389396
; (message "Drag the mouse to explore types")
390397
(unwind-protect
391398
(caml-track-mouse
392-
(setq region (caml-types-typed-region
393-
target-buf
394-
(caml-event-point-start event)))
399+
;(setq region (caml-types-typed-region
400+
; target-buf
401+
; (caml-event-point-start event)))
395402
(while (and event
396403
(integer-or-marker-p
397404
(setq cnum (caml-event-point-end event))))
@@ -430,8 +437,8 @@ and its type is displayed in the minibuffer, until the move is released."
430437
)
431438
)
432439
(delete-overlay caml-types-expr-ovl)
433-
(if unlocked (font-lock-mode 1)
434-
(remove-text-properties (car region) (cdr region) '(face)))
440+
;(if unlocked (font-lock-mode 1)
441+
; (remove-text-properties (car region) (cdr region) '(face)))
435442
)))
436443

437444
(defun caml-types-typed-region (target-buf pos)

0 commit comments

Comments
 (0)