Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Fengmin Zhu
RefinedC
Commits
e15f8db2
Commit
e15f8db2
authored
Nov 25, 2020
by
Michael Sammler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added emacs setup to readme
parent
b4c72e88
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletion
+25
-1
README.md
README.md
+25
-1
No files found.
README.md
View file @
e15f8db2
...
@@ -367,7 +367,10 @@ the `dune` environment one should not call `dune`.
...
@@ -367,7 +367,10 @@ the `dune` environment one should not call `dune`.
# !!!INVALID!!!
# !!!INVALID!!!
dune
exec
--
refinedc check examples/queue.c
dune
exec
--
refinedc check examples/queue.c
# Equivalent valid command sequence.
# Alternative
./build.sh examples/queue.c
# Equivalent to the following valid command sequence.
dune
exec
--
refinedc check
--no-build
examples/queue.c
dune
exec
--
refinedc check
--no-build
examples/queue.c
cd
examples/proofs/queue
cd
examples/proofs/queue
dune build
dune build
...
@@ -378,6 +381,27 @@ To generate the Coq code for all the examples of the repository you can run
...
@@ -378,6 +381,27 @@ To generate the Coq code for all the examples of the repository you can run
`make generate_all`
. You can also force the generation of all the generated
`make generate_all`
. You can also force the generation of all the generated
code using
`make -B generate_all`
.
code using
`make -B generate_all`
.
## Emacs setup
The following elisp function enables direct execution of the
`build.sh`
script in this repo from emacs.
It searches for a
`build.sh`
file in parent directories of the current file and executes it with the name
of the current file. A similar functionallity should be easy to add to other editors as well.
This script binds
`build`
to the keys
`C-c c`
. Use at your own risk!
```
elisp
(
setq
build-file-name
"build.sh"
)
(
defun
build
()
"Search in the current and parent directories for a file with the name of variable `build-file-name' and execute the first file it find."
(
interactive
)
(
save-some-buffers
t
)
; save all buffers
(
let
((
buildfile
(
locate-dominating-file
default-directory
build-file-name
)))
(
unless
buildfile
(
error
"No build file found!"
))
(
let
((
default-directory
buildfile
))
(
compile
(
concat
buildfile
build-file-name
" "
(
buffer-file-name
))))
(
select-window
(
get-buffer-window
"*compilation*"
))))
(
global-set-key
(
kbd
"C-c c"
)
'build
)
```
## Structure of the repository
## Structure of the repository
```
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment