[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] externals/caml 850c621 048/197: Made run-caml autoload in caml.
From: |
Stefan Monnier |
Subject: |
[nongnu] externals/caml 850c621 048/197: Made run-caml autoload in caml.el |
Date: |
Sat, 21 Nov 2020 01:19:35 -0500 (EST) |
branch: externals/caml
commit 850c621f342884e8648c163ecd233c57568216ba
Author: Didier Rémy <Didier.Remy@inria.fr>
Commit: Didier Rémy <Didier.Remy@inria.fr>
Made run-caml autoload in caml.el
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@4243
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
.cvsignore | 1 +
caml.el | 38 ++++++++++++++++++++++++++++++++++++++
inf-caml.el | 32 --------------------------------
3 files changed, 39 insertions(+), 32 deletions(-)
diff --git a/.cvsignore b/.cvsignore
index ea6381f..e7e261f 100644
--- a/.cvsignore
+++ b/.cvsignore
@@ -1 +1,2 @@
ocamltags
+
diff --git a/caml.el b/caml.el
index 9f6499e..7ed7348 100644
--- a/caml.el
+++ b/caml.el
@@ -474,6 +474,7 @@ have caml-electric-indent on, which see.")
(defun caml-eval-region (start end)
"Send the current region to the inferior Caml process."
(interactive"r")
+ (require 'inf-caml)
(inferior-caml-eval-region start end))
;; old version ---to be deleted later
@@ -500,6 +501,7 @@ This allows to jump other erroneous phrases.
Optional arguments min max defines a region within which the phrase
should lies."
(interactive "p")
+ (require 'inf-caml)
(inferior-caml-eval-phrase arg min max))
(defun caml-eval-buffer (arg)
@@ -516,6 +518,7 @@ the current point."
(defun caml-show-subshell ()
(interactive)
+ (require 'inf-caml)
(inferior-caml-show-subshell))
@@ -766,6 +769,7 @@ whole string."
(defun caml-goto-phrase-error ()
"Find the error location in current Caml phrase."
(interactive)
+ (require 'inf-caml)
(let ((bounds (save-excursion (caml-mark-phrase))))
(inferior-caml-goto-error (car bounds) (cdr bounds))))
@@ -1617,6 +1621,38 @@ by |, insert one."
; (let ((bounds (caml-mark-phrase)))
; (indent-region (car bounds) (cdr bounds) nil)))
+;;; Additional commands by Didier to report errors in toplevel mode
+
+(defun caml-skip-blank-forward ()
+ (if (looking-at "[ \t\n]*\\((\\*\\([^*]\\|[^(]\\*[^)]\\)*\\*)[ \t\n]*\\)*")
+ (goto-char (match-end 0))))
+
+;; to mark phrases, so that repeated calls will take several of them
+;; knows little about Ocaml appart literals and comments, so it should work
+;; with other dialects as long as ;; marks the end of phrase.
+
+(defun caml-find-phrase (&optional min-pos max-pos)
+ "Find the CAML phrase containing the point.
+Return the positin of the beginning of the phrase, and move point
+to the end.
+"
+ (interactive)
+ (while
+ (and (search-backward ";;" min-pos 'move)
+ (or (caml-in-literal-p)
+ (and caml-last-comment-start (caml-in-comment-p)))
+ ))
+ (if (looking-at ";;") (forward-char 2))
+ (caml-skip-blank-forward)
+ (let ((beg (point)))
+ (while
+ (and (search-forward ";;" max-pos 1)
+ (or (caml-in-literal-p)
+ (and caml-last-comment-start (caml-in-comment-p)))
+ ))
+ (if (eobp) (newline))
+ beg))
+
(defun caml-indent-phrase (arg)
"Indent current phrase
with prefix arg, indent that many phrases starting with the current phrase."
@@ -1770,6 +1806,8 @@ with prefix arg, indent that many phrases starting with
the current phrase."
(beginning-of-line 1)
(backward-char 4)))
+(autoload 'run-caml "inf-caml.el")
+
;;; caml.el ends here
(provide 'caml)
diff --git a/inf-caml.el b/inf-caml.el
index bbe084c..1a8f524 100644
--- a/inf-caml.el
+++ b/inf-caml.el
@@ -189,38 +189,6 @@ Input and output via buffer `*inferior-caml*'."
;;; orgininal inf-caml.el ended here
-;;; Additional commands by Didier to report errors in toplevel mode
-
-(defun caml-skip-blank-forward ()
- (if (looking-at "[ \t\n]*\\((\\*\\([^*]\\|[^(]\\*[^)]\\)*\\*)[ \t\n]*\\)*")
- (goto-char (match-end 0))))
-
-;; to mark phrases, so that repeated calls will take several of them
-;; knows little of Ocaml appar literals and comments, so it should work
-;; with other dialects as long as ;; marks the end of phrase.
-
-(defun caml-find-phrase (&optional min-pos max-pos)
- "Find the CAML phrase containing the point.
-Return the positin of the beginning of the phrase, and move point
-to the end.
-"
- (interactive)
- (while
- (and (search-backward ";;" min-pos 'move)
- (or (caml-in-literal-p)
- (and caml-last-comment-start (caml-in-comment-p)))
- ))
- (if (looking-at ";;") (forward-char 2))
- (caml-skip-blank-forward)
- (let ((beg (point)))
- (while
- (and (search-forward ";;" max-pos 1)
- (or (caml-in-literal-p)
- (and caml-last-comment-start (caml-in-comment-p)))
- ))
- (if (eobp) (newline))
- beg))
-
;; as eval-phrase, but ignores errors.
(defun inferior-caml-just-eval-phrase (arg &optional min max)
- [nongnu] externals/caml bf92fed 010/197: Creer EMACSDIR si non existant, (continued)
- [nongnu] externals/caml bf92fed 010/197: Creer EMACSDIR si non existant, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 8457cf2 019/197: Manque un quote, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 5a9f7c6 026/197: tabs -> spaces, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 8364471 027/197: changed label_pattern syntax, Stefan Monnier, 2020/11/21
- [nongnu] externals/caml 97c1bb7 037/197: highlight ignore, Stefan Monnier, 2020/11/21
- [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 <=
- [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, 2020/11/21
- [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