forked from Deducteam/lambdapi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into fix/parsing
- Loading branch information
Showing
31 changed files
with
176 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
*.elc | ||
dist/ | ||
.cask/ | ||
*.tar |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,49 @@ | ||
VERSION = 1.0 | ||
|
||
CASK = | ||
EMACS = emacs | ||
INSTALL = install | ||
|
||
INSTALL_DIR = $(shell opam config var share)/emacs/site-lisp | ||
CURDIR = $(shell pwd) | ||
|
||
SRC = $(wildcard *.el) | ||
BUILD_FILES = | ||
|
||
# If not using Cask, build only the site file | ||
ifndef CASK | ||
BUILD_FILES += lambdapi-site-file.elc | ||
endif | ||
|
||
.PHONY: build | ||
build: $(SRC) | ||
ifdef CASK | ||
$(CASK) build | ||
else | ||
$(MAKE) $(BUILD_FILES) | ||
endif | ||
|
||
.SUFFIXES = .elc .el | ||
.el.elc: | ||
$(EMACS) --batch --eval "(add-to-list 'load-path \"$(CURDIR)\")" \ | ||
--eval '(byte-compile-file "$<")' | ||
.POSIX: | ||
|
||
VERSION = 1.1.0 | ||
NAME = lambdapi-mode | ||
# The path to lambdapi built by dune | ||
LAMBDAPI = ../../_build/install/default/bin/lambdapi | ||
|
||
EMACS = emacs | ||
|
||
SRC = | ||
SRC += lambdapi-abbrev.el | ||
SRC += lambdapi-capf.el | ||
SRC += lambdapi-input.el | ||
SRC += lambdapi-layout.el | ||
SRC += lambdapi-mode.el | ||
SRC += lambdapi-mode-pkg.el | ||
SRC += lambdapi-proofs.el | ||
SRC += lambdapi-smie.el | ||
SRC += lambdapi-vars.el | ||
|
||
$(NAME)-$(VERSION).tar: $(SRC) | ||
mkdir -p "$(NAME)-$(VERSION)" | ||
cp *.el "$(NAME)-$(VERSION)" | ||
tar -cf "$(NAME)-$(VERSION)".tar "$(NAME)-$(VERSION)" | ||
|
||
.PHONY: install | ||
install: $(SRC) lambdapi-site-file.elc | ||
$(INSTALL) -m 644 -t $(INSTALL_DIR) $^ | ||
$(MAKE) clean | ||
install: | ||
@echo "See https://lambdapi.readthedocs.io/en/latest/emacs.html \ | ||
for instructions on how to install the lambdapi mode for Emacs. \ | ||
If you know what you're doing, you can install the development version with" \ | ||
| fmt | ||
@echo "$$ make dist" | ||
@echo "and in emacs" | ||
@echo "M-x package-install-file RET $(NAME)-$(VERSION).tar RET" | ||
|
||
.PHONY: dist | ||
dist: | ||
ifdef CASK | ||
$(CASK) package | ||
endif | ||
dist: $(NAME)-$(VERSION).tar | ||
|
||
.PHONY: test | ||
tests: dist | ||
./test.sh $(VERSION) | ||
.PHONY: check | ||
check: dist | ||
# This rule depends on the layout of dune. It builds the lambdapi | ||
# binary so that the "sandboxed" emacs can access it. | ||
cd ../.. && $(MAKE) lambdapi | ||
./test.sh "$(NAME)" "$(VERSION)" "$(LAMBDAPI)" | ||
|
||
.PHONY: clean | ||
clean: | ||
ifdef CASK | ||
$(CASK) clean-elc | ||
else | ||
find . -name '*.elc' -exec rm -f {} \; | ||
endif | ||
rm -f "$(NAME)-$(VERSION)".tar | ||
rm -rf "$(NAME)-$(VERSION)" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
(define-package "lambdapi-mode" "1.1.0" | ||
"A major mode to edit Lambdapi files." | ||
'((eglot "1.6") | ||
(math-symbol-lists "1.2.1") | ||
(highlight "20190710.1527"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
;;; lambdapi-mode.el --- A major mode for editing Lambdapi source code -*- lexical-binding: t; -*- | ||
|
||
;; Copyright (C) 2020 Deducteam | ||
;; Copyright (C) 2020-2024 Deducteam | ||
|
||
;; Authors: Ashish Barnawal, Diego Riviero, Gabriel Hondet, Rodolphe Lepigre | ||
;; Maintainer: Deducteam <[email protected]> | ||
;; Version: 1.0 | ||
;; Version: 1.1.0 | ||
;; SPDX-License-Identifier: CECILL-2.1 | ||
;; Homepage: https://github.com/Deducteam/lambdapi | ||
;; Keywords: languages | ||
;; Compatibility: GNU Emacs 26.1 | ||
;; Package-Requires: ((emacs "26.1") (eglot "1.5") (math-symbol-lists "1.2.1") (highlight "20190710.1527")) | ||
;; Compatibility: GNU Emacs 28.1 | ||
;; Package-Requires: ((emacs "28.1") (eglot "1.6") (math-symbol-lists "1.2.1") (highlight "20190710.1527")) | ||
|
||
;;; Commentary: | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,31 @@ | ||
#!/bin/sh | ||
## Test the lambdapi-mode built from '*.el' files. | ||
## The script downloads a fresh and basic configuration, creates a temporary | ||
## directory and launches emacs in it. You can create a new 'foo.lp' to try the | ||
## mode. | ||
## | ||
## Takes the version of the mode as first argument | ||
# Test the lambdapi-mode. | ||
# The script | ||
# - downloads a fresh and basic configuration, | ||
# - creates a temporary directory | ||
# - copies the lambdapi binary in the directory | ||
# - and launches emacs in it. | ||
# You can create a new 'foo.lp' to try the mode. | ||
|
||
# Usage: tests.sh NAME VERSION LAMBDAPI | ||
|
||
set -eu | ||
NAME="$1" | ||
VERSION="$2" | ||
BIN="$3" | ||
tmp="$(mktemp -d)" | ||
cp "dist/lambdapi-mode-$1.tar" "${tmp}" | ||
make dist | ||
cp "${NAME}-${VERSION}.tar" "${tmp}" | ||
mkdir -p "${tmp}"/bin | ||
cp ${BIN} "${tmp}"/bin/lambdapi | ||
(cd "${tmp}" || exit 1 | ||
curl https://sanemacs.com/sanemacs.el > sanemacs.el | ||
{ | ||
echo '(setq package-check-signature nil)'; | ||
echo '(use-package eglot)'; | ||
echo '(use-package math-symbol-lists)'; | ||
echo '(use-package highlight)'; | ||
} >> sanemacs.el | ||
emacs --quick -l sanemacs.el \ | ||
--eval "(package-install-file \"lambdapi-mode-$1.tar\")") | ||
PATH="bin:$PATH" emacs --quick -l sanemacs.el \ | ||
--eval "(package-install-file \"${NAME}-${VERSION}.tar\")") | ||
rm -rf "${tmp}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.