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

[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)



reply via email to

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