[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml e1a8649 084/197: - added file caml-xemacs.el for
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml e1a8649 084/197: - added file caml-xemacs.el for XEmacs compatibility. |
Date: |
Sat, 21 Nov 2020 01:19:43 -0500 (EST) |
branch: externals/caml
commit e1a86495ca97779ad5023d006d9c936dec978dbe
Author: Didier Rémy <Didier.Remy@inria.fr>
Commit: Didier Rémy <Didier.Remy@inria.fr>
- added file caml-xemacs.el for XEmacs compatibility.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5751
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
caml-help.el | 16 +++++++++-------
caml-types.el | 12 ++++++++++--
caml.el | 4 ++--
3 files changed, 21 insertions(+), 11 deletions(-)
diff --git a/caml-help.el b/caml-help.el
index 5902abf..f67ed1a 100644
--- a/caml-help.el
+++ b/caml-help.el
@@ -27,6 +27,9 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(if (and (boundp 'running-xemacs) running-xemacs)
+ (require 'caml-xemacs))
+
;; Loading or building databases.
;;
@@ -217,7 +220,7 @@
When call interactively, make completion over known modules."
(interactive "P")
(if (not (stringp arg))
- (let ((modules (ocaml-module-alist)) module)
+ (let ((modules (ocaml-module-alist)))
(setq arg
(completing-read "Open module: " modules))))
(if (and (stringp arg) (not (equal arg "")))
@@ -236,7 +239,7 @@ Otherwise if ARG is true, close all modules and reset to
default. "
(interactive "P")
(if (= (prefix-numeric-value arg) 4)
(setq ocaml-visible-modules 'lazy)
- (let* ((modules (ocaml-visible-modules)) default)
+ (let* ((modules (ocaml-visible-modules)))
(if (null modules) (error "No visible module to close"))
(unless (stringp arg)
(setq arg
@@ -325,9 +328,8 @@ If Module is undefined, it does completion in visible
modules.
Then, if completion fails, it does completion among all modules
where identifier is defined."
(interactive "p")
- (let* ((module-entry (ocaml-qualified-identifier))
+ (let* ((module-entry (ocaml-qualified-identifier)) (entry)
(module)
- (entry (cdr module-entry))
(beg) (end) (pattern))
(if (car module-entry)
(progn
@@ -360,8 +362,7 @@ where identifier is defined."
(error "Did not find anything to complete around point")
(setq pattern (buffer-substring beg end))
- (let* ((table 'ocaml-completion)
- (all-completions (ocaml-completion pattern module))
+ (let* ((all-completions (ocaml-completion pattern module))
(completion
(try-completion pattern (mapcar 'list all-completions))))
(cond ((eq completion t))
@@ -382,7 +383,7 @@ where identifier is defined."
(t
(setq hist (mapcar 'car modules))
(completing-read "Module: " modules nil t
- "" (cons 'hist 0)))
+ "" (cons hist 0)))
)))
(if (null module)
(error "Can't find completion for \"%s\"" pattern)
@@ -556,6 +557,7 @@ command. An entry may be an info module or a complete file
name."
;; Help function.
+
(defun ocaml-goto-help (&optional module entry)
"Searches info manual for MODULE and ENTRY in MODULE.
If unspecified, MODULE and ENTRY are inferred from the position in the
diff --git a/caml-types.el b/caml-types.el
index 3bb8e0f..9cf3490 100644
--- a/caml-types.el
+++ b/caml-types.el
@@ -14,6 +14,10 @@
; An emacs-lisp complement to the "-dtypes" option of ocamlc and ocamlopt.
+;; XEmacs compatibility
+(if (and (boundp 'running-xemacs) running-xemacs)
+ (require 'caml-xemacs))
+
(defvar caml-types-location-re nil "Regexp to parse *.annot files.
@@ -95,6 +99,9 @@ For the moment, the only possible keyword is \"type\"."
. Even if type checking fails, you can still look at the types
in the file, up to where the type checker failed.
+Types are also diplayed in the buffer *caml-types*, which buffer is
+display when the commande is called with Prefix argument 4.
+
See also `caml-types-explore' for exploration by mouse dragging.
See `caml-types-location-re' for annotation file format.
"
@@ -169,7 +176,6 @@ See `caml-types-location-re' for annotation file format.
(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 ())
@@ -349,6 +355,7 @@ See `caml-types-location-re' for annotation file format.
)
buf))
+
(defun caml-types-explore (event)
"Explore type annotations by mouse dragging.
@@ -377,7 +384,8 @@ and its type is displayed in the minibuffer, until the move
is released."
(if (and limits (>= cnum (car limits)) (< cnum (cdr limits)))
(message mes)
(setq target-bol
- (save-excursion (goto-char cnum)
(line-beginning-position)))
+ (save-excursion (goto-char cnum)
+ (line-beginning-position)))
(setq target-line
(1+ (count-lines (point-min) target-bol)))
(setq target-pos (vector target-file target-line target-bol
cnum))
diff --git a/caml.el b/caml.el
index d6791b6..68b4ee4 100644
--- a/caml.el
+++ b/caml.el
@@ -259,8 +259,8 @@ have caml-electric-indent on, which see.")
(defvar caml-shell-active nil
"Non nil when a subshell is running.")
-(defvar running-xemacs nil
- "Non nil when using xemacs.")
+(defvar running-xemacs (string-match "XEmacs" emacs-version)
+ "Non-nil if we are running in the XEmacs environment.")
(defvar caml-mode-map nil
"Keymap used in Caml mode.")
- [nongnu] externals/caml 32f0f75 056/197: Updated caml-help.el, (continued)
- [nongnu] externals/caml 32f0f75 056/197: Updated caml-help.el, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 1a97395 057/197: detabisation, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 758702f 060/197: Several bug fixes and improvements in caml-help., Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bb899a1 069/197: amelioration des locations, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml e149514 072/197: PR#1704, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 850c621 048/197: Made run-caml autoload in caml.el, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 778e3cf 079/197: utilisation d'un arbre, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 38c4de4 082/197: bricoles, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 432e972 081/197: duh, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 285775f 080/197: plus rapide, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml e1a8649 084/197: - added file caml-xemacs.el for XEmacs compatibility.,
Stefan Monnier <=
- [nongnu] externals/caml a94bd19 083/197: hash-table des annotations, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml d7bde19 088/197: Modified `caml-types-explore' so that all well-typed subexpressions of the, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 570c595 089/197: installer caml-emacs.el, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml ab2d4cc 107/197: fusion des modifs de 3.08.4, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 347ceba 108/197: PR#3767 features 1 and 2: display full location of events instead of one position, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 4238e85 110/197: fusion des changements 3.09.3 -> release309_merge310, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 074d219 106/197: fusion des changements jusqu'a 3.08.3, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 8fc9a47 117/197: amelioration des annotations, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml bcceb79 122/197: fixes bug 0005016, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 55b8c79 124/197: fixes bug 0004997, Stefan Monnier, 2020/11/21