branch: externals/caml
commit 0ca1e9776605204b8a18cf6814031e2e6f510735
Author: Damien Doligez <damien.doligez-inria.fr>
Commit: Damien Doligez <damien.doligez-inria.fr>
Merge branch 4.01 from branching point to 4.01.0+rc1
Command line used:
svn merge --accept postpone -r 13776:14055 $REPO/version/4.01 .
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14060
f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
---
.ignore | 1 +
caml.el | 63 ++++++++++++++++++++++++++++++++++-----------------------------
2 files changed, 35 insertions(+), 29 deletions(-)
diff --git a/.ignore b/.ignore
index ea6381f..ba5f96c 100644
--- a/.ignore
+++ b/.ignore
@@ -1 +1,2 @@
ocamltags
+*.elc
diff --git a/caml.el b/caml.el
index 76ea852..6ad464a 100644
--- a/caml.el
+++ b/caml.el
@@ -542,36 +542,41 @@ have caml-electric-indent on, which see.")
(caml-show-imenu)))
(run-hooks 'caml-mode-hook))
-(defun caml-set-compile-command ()
- "Hook to set compile-command locally, unless there is a Makefile or
- a _build directory or a _tags file in the current directory."
- (interactive)
- (unless (or (null buffer-file-name)
- (file-exists-p "makefile")
- (file-exists-p "Makefile")
- (file-exists-p "_build")
- (file-exists-p "_tags"))
- (let* ((filename (file-name-nondirectory buffer-file-name))
- (basename (file-name-sans-extension filename))
- (command nil))
- (cond
- ((string-match ".*\\.mli\$" filename)
- (setq command "ocamlc -c"))
- ((string-match ".*\\.ml\$" filename)
- (setq command "ocamlc -c") ; (concat "ocamlc -o " basename)
- )
- ((string-match ".*\\.mll\$" filename)
- (setq command "ocamllex"))
- ((string-match ".*\\.mll\$" filename)
- (setq command "ocamlyacc"))
- )
- (if command
- (progn
- (make-local-variable 'compile-command)
- (setq compile-command (concat command " " filename))))
- )))
-(add-hook 'caml-mode-hook 'caml-set-compile-command)
+;; Disabled because it assumes make and does not play well with ocamlbuild.
+;; See PR#4469 for details.
+
+;; (defun caml-set-compile-command ()
+;; "Hook to set compile-command locally, unless there is a Makefile or
+;; a _build directory or a _tags file in the current directory."
+;; (interactive)
+;; (unless (or (null buffer-file-name)
+;; (file-exists-p "makefile")
+;; (file-exists-p "Makefile")
+;; (file-exists-p "_build")
+;; (file-exists-p "_tags"))
+;; (let* ((filename (file-name-nondirectory buffer-file-name))
+;; (basename (file-name-sans-extension filename))
+;; (command nil))
+;; (cond
+;; ((string-match ".*\\.mli\$" filename)
+;; (setq command "ocamlc -c"))
+;; ((string-match ".*\\.ml\$" filename)
+;; (setq command "ocamlc -c") ; (concat "ocamlc -o " basename)
+;; )
+;; ((string-match ".*\\.mll\$" filename)
+;; (setq command "ocamllex"))
+;; ((string-match ".*\\.mll\$" filename)
+;; (setq command "ocamlyacc"))
+;; )
+;; (if command
+;; (progn
+;; (make-local-variable 'compile-command)
+;; (setq compile-command (concat command " " filename))))
+;; )))
+
+;; (add-hook 'caml-mode-hook 'caml-set-compile-command)
+
;;; Auxiliary function. Garrigue 96-11-01.