mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
app-emacs/gap-mode: new package, add 2.2.2
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
1
app-emacs/gap-mode/Manifest
Normal file
1
app-emacs/gap-mode/Manifest
Normal file
@@ -0,0 +1 @@
|
||||
DIST gap-mode-8439c3622e1f9e2ec1a8ef21020eb55e917f4416.tar.bz2 28804 BLAKE2B e8f9bbeaea5903f25e2101b874a397f556a9cf039077e5bb2afb9dfadaef339ac7258065fc9ae943a09a26165bbff34667d5e8045a615584ad22e3c1b004464b SHA512 1c1409d0a00e2e36c271a6e8d390d01fa02e60a6431cfbc7c8a592abf2276cc37e2b7f4cb7b7c31f640b3a38bde2907c85148c2a512a897457ce9db7735bdc75
|
||||
7
app-emacs/gap-mode/files/50gap-mode-gentoo.el
Normal file
7
app-emacs/gap-mode/files/50gap-mode-gentoo.el
Normal file
@@ -0,0 +1,7 @@
|
||||
(add-to-list 'load-path "@SITELISP@")
|
||||
(autoload 'gap-mode "gap-mode" "GAP editing mode" t)
|
||||
(autoload 'gap "gap-process" "Run GAP in emacs buffer" t)
|
||||
(add-to-list 'auto-mode-alist '("\\.g\\'" . gap-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.gap\\'" . gap-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.gd\\'" . gap-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.gi\\'" . gap-mode))
|
||||
119
app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch
Normal file
119
app-emacs/gap-mode/files/gap-mode-2.2.2-warnings.patch
Normal file
@@ -0,0 +1,119 @@
|
||||
From 8238a8eaa6a11e9e0d8e10bb84ae87021b78ea2a Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Andrus <iandrus@adobe.com>
|
||||
Date: Wed, 13 Mar 2024 10:12:10 -0600
|
||||
Subject: [PATCH] Fix unknown definitions warning
|
||||
|
||||
---
|
||||
gap-mode.el | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gap-mode.el b/gap-mode.el
|
||||
index 148664c..655519a 100644
|
||||
--- a/gap-mode.el
|
||||
+++ b/gap-mode.el
|
||||
@@ -590,6 +590,7 @@ end;"
|
||||
(when gap-using-smie
|
||||
(defvar gap-smie-grammar)
|
||||
(declare-function gap-smie-rules "gap-smie")
|
||||
+ (declare-function smie-setup "smie")
|
||||
(smie-setup gap-smie-grammar #'gap-smie-rules)))
|
||||
|
||||
;;}}}
|
||||
--
|
||||
GitLab
|
||||
|
||||
From f8c95d793b1e90e65ca758d10b780592fc9ee2dd Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Andrus <iandrus@adobe.com>
|
||||
Date: Mon, 29 Apr 2024 19:57:02 -0600
|
||||
Subject: [PATCH] Fix unknown definitions warnings
|
||||
|
||||
---
|
||||
gap-process.el | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/gap-process.el b/gap-process.el
|
||||
index 8fa3062..1161161 100644
|
||||
--- a/gap-process.el
|
||||
+++ b/gap-process.el
|
||||
@@ -260,6 +260,8 @@ which is much like GAP's C-l (\\[recenter] can be used to recenter)."
|
||||
(set (make-local-variable 'paragraph-separate) "\\'")
|
||||
(set (make-local-variable 'paragraph-start) comint-prompt-regexp)
|
||||
(require 'gap-mode) ;; for gap-syntax-table and gap-font-lock-keywords
|
||||
+ (eval-when-compile
|
||||
+ (defvar gap-syntax-table))
|
||||
(set-syntax-table gap-syntax-table)
|
||||
(set (make-local-variable 'font-lock-defaults) '(gap-font-lock-keywords))
|
||||
(use-local-map gap-process-map)
|
||||
@@ -548,6 +550,7 @@ With FULL, send two TABs to GAP to get a full list of completions."
|
||||
(if (not (looking-at "\\_>"))
|
||||
(if (not (re-search-forward "\\_>" nil t))
|
||||
(error "Complete what?")))
|
||||
+ (declare-function gap-ident-around-point "gap-mode")
|
||||
(setq gap-completion-ident (gap-ident-around-point))
|
||||
(if (not full)
|
||||
(progn
|
||||
@@ -613,6 +616,7 @@ With FULL, send two TABs to GAP to get a full list of completions."
|
||||
(setq gap-send-state 'normal))))
|
||||
|
||||
(defun gap-completion-at-point-function ()
|
||||
+ (declare-function gap-ident-around-point-pos "gap-mode")
|
||||
(let ((region (gap-ident-around-point-pos)))
|
||||
(when region
|
||||
(list (car region)
|
||||
--
|
||||
GitLab
|
||||
|
||||
From 9722c596b7cb8fe003bac0332bac23c1d98bbe67 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Andrus <iandrus@adobe.com>
|
||||
Date: Mon, 29 Apr 2024 18:55:15 -0600
|
||||
Subject: [PATCH] Fix reference to free variable warning
|
||||
|
||||
---
|
||||
gap-smie.el | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/gap-smie.el b/gap-smie.el
|
||||
index 0bc444a..05e64e7 100644
|
||||
--- a/gap-smie.el
|
||||
+++ b/gap-smie.el
|
||||
@@ -76,6 +76,12 @@
|
||||
(defun gap-smie-rules (kind token)
|
||||
"SMIE indentation rules for the GAP language.
|
||||
See `smie-rules-function' for meaning of KIND and TOKEN."
|
||||
+ (require 'gap-mode)
|
||||
+ (eval-when-compile
|
||||
+ ;; These are defined in gap-mode which depends on this file
|
||||
+ (defvar gap-debug-indent)
|
||||
+ (defvar gap-indent-list)
|
||||
+ (defvar gap-indent-step))
|
||||
(when (and gap-debug-indent
|
||||
(not (use-region-p)))
|
||||
(message "%s %s" kind token))
|
||||
--
|
||||
GitLab
|
||||
|
||||
From 09b4082b6e28141537696bb832c8ecc975ec57d8 Mon Sep 17 00:00:00 2001
|
||||
From: Ivan Andrus <iandrus@adobe.com>
|
||||
Date: Mon, 29 Apr 2024 19:11:34 -0600
|
||||
Subject: [PATCH] Fix unused lexical variable warning
|
||||
|
||||
---
|
||||
gap-company.el | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/gap-company.el b/gap-company.el
|
||||
index abdcd98..725ef15 100644
|
||||
--- a/gap-company.el
|
||||
+++ b/gap-company.el
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
(defun company-gap-backend (command &optional arg &rest ignored)
|
||||
(interactive (list 'interactive))
|
||||
-
|
||||
+ (ignore ignored)
|
||||
(cl-case command
|
||||
(interactive (company-begin-backend 'company-gap-backend))
|
||||
|
||||
--
|
||||
GitLab
|
||||
|
||||
60
app-emacs/gap-mode/gap-mode-2.2.2.ebuild
Normal file
60
app-emacs/gap-mode/gap-mode-2.2.2.ebuild
Normal file
@@ -0,0 +1,60 @@
|
||||
# Copyright 1999-2024 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
inherit elisp
|
||||
|
||||
# There are no proper releases, so we have to track down the commit
|
||||
# that last bumped the version.
|
||||
COMMIT=8439c3622e1f9e2ec1a8ef21020eb55e917f4416
|
||||
|
||||
DESCRIPTION="Major mode for editing and running GAP programs"
|
||||
HOMEPAGE="https://gitlab.com/gvol/gap-mode"
|
||||
SRC_URI="https://gitlab.com/gvol/${PN}/-/archive/${COMMIT}/${PN}-${COMMIT}.tar.bz2"
|
||||
|
||||
S="${WORKDIR}/${PN}-${COMMIT}"
|
||||
|
||||
LICENSE="MIT"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="completion lint"
|
||||
|
||||
# Both company-mode and flycheck are needed to byte-compile the source.
|
||||
BDEPEND="
|
||||
completion? ( app-emacs/company-mode )
|
||||
lint? ( app-emacs/flycheck )
|
||||
"
|
||||
|
||||
# You could argue that company-mode and flycheck are not hard runtime
|
||||
# dependencies because gap-company.el and gap-flycheck.el will typically
|
||||
# only be loaded in company-mode or flycheck-mode, but if we want to
|
||||
# support (say) `M-x load-library gap-company.el` without being crashy,
|
||||
# then we'll need the corresponding company.el installed.
|
||||
RDEPEND="
|
||||
${BDEPEND}
|
||||
lint? ( dev-gap/gaplint )
|
||||
"
|
||||
|
||||
PATCHES=( "${FILESDIR}/${P}-warnings.patch" )
|
||||
|
||||
SITEFILE="50${PN}-gentoo.el"
|
||||
|
||||
DOCS=( README.md emacs.gaprc )
|
||||
|
||||
src_prepare(){
|
||||
default
|
||||
|
||||
if ! use completion; then
|
||||
rm gap-company.el || die
|
||||
fi
|
||||
|
||||
if ! use lint; then
|
||||
rm gap-flycheck.el || die
|
||||
fi
|
||||
|
||||
# This defaults to a /usr/local path and expects
|
||||
# the user to configure it.
|
||||
sed -e 's~/usr/local/algebra/bin/gap~gap~' \
|
||||
-i gap-process.el || die
|
||||
}
|
||||
32
app-emacs/gap-mode/metadata.xml
Normal file
32
app-emacs/gap-mode/metadata.xml
Normal file
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
|
||||
<maintainer type="person">
|
||||
<email>mjo@gentoo.org</email>
|
||||
</maintainer>
|
||||
|
||||
<maintainer type="project">
|
||||
<email>gnu-emacs@gentoo.org</email>
|
||||
<name>Gentoo GNU Emacs project</name>
|
||||
</maintainer>
|
||||
|
||||
<stabilize-allarches/>
|
||||
|
||||
<use>
|
||||
<flag name="completion">
|
||||
Install GAP backend for <pkg>app-emacs/company-mode</pkg> to
|
||||
"complete anything."
|
||||
</flag>
|
||||
|
||||
<flag name="lint">
|
||||
Support automatically linting GAP code via
|
||||
<pkg>app-emacs/flycheck</pkg> and <pkg>dev-gap/gaplint</pkg>.
|
||||
</flag>
|
||||
</use>
|
||||
|
||||
<upstream>
|
||||
<remote-id type="gitlab">gvol/gap-mode</remote-id>
|
||||
</upstream>
|
||||
|
||||
</pkgmetadata>
|
||||
Reference in New Issue
Block a user