From bc97caae0227c7cd2dc47c5cae2bf5f047991d3f Mon Sep 17 00:00:00 2001 From: Joseph Mingrone Date: Wed, 13 Jan 2021 22:23:10 +0000 Subject: [PATCH] New port, devel/transient: Emacs key and popup interface PR: 251146 Submitted by: Yasuhiro Kimura (maintainer) --- devel/Makefile | 1 + devel/transient/Makefile | 42 +++++++++++++++++++++++++++++++++++++++ devel/transient/distinfo | 3 +++ devel/transient/pkg-descr | 21 ++++++++++++++++++++ devel/transient/pkg-plist | 3 +++ 5 files changed, 70 insertions(+) create mode 100644 devel/transient/Makefile create mode 100644 devel/transient/distinfo create mode 100644 devel/transient/pkg-descr create mode 100644 devel/transient/pkg-plist diff --git a/devel/Makefile b/devel/Makefile index 000ec018c0d9..9c46d55cbebe 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -6855,6 +6855,7 @@ SUBDIR += tpasm SUBDIR += tradcpp SUBDIR += transwarp + SUBDIR += transient SUBDIR += treepy.el SUBDIR += trellis SUBDIR += trio diff --git a/devel/transient/Makefile b/devel/transient/Makefile new file mode 100644 index 000000000000..bcf3483d86a4 --- /dev/null +++ b/devel/transient/Makefile @@ -0,0 +1,42 @@ +# $FreeBSD$ + +PORTNAME= transient +DISTVERSIONPREFIX= v +DISTVERSION= 0.2.0-75 +DISTVERSIONSUFFIX= -g7811dcf +CATEGORIES= devel elisp +PKGNAMESUFFIX= ${EMACS_PKGNAMESUFFIX} + +MAINTAINER= yasu@utahime.org +COMMENT= Emacs key and popup interface for complex keybindings + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= emacs gmake makeinfo +USE_GITHUB= yes +GH_ACCOUNT= magit + +ALL_TARGET= lisp info + +NO_ARCH= yes + +INFO= transient + +PORTDOCS= CHANGELOG README.md + +OPTIONS_DEFINE= DOCS + +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR} + ${INSTALL_DATA} ${WRKSRC}/lisp/*.el* \ + ${STAGEDIR}${PREFIX}/${EMACS_VERSION_SITE_LISPDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/*.info \ + ${STAGEDIR}${PREFIX}/${INFO_PATH} + +do-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/docs/CHANGELOG ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} + +.include diff --git a/devel/transient/distinfo b/devel/transient/distinfo new file mode 100644 index 000000000000..2541bf31dbe3 --- /dev/null +++ b/devel/transient/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1610572736 +SHA256 (magit-transient-v0.2.0-75-g7811dcf_GH0.tar.gz) = 31a9974c062619762d9458cd92716e2ea9ca0fdc41e1d0c8aa19dad775f4fe5a +SIZE (magit-transient-v0.2.0-75-g7811dcf_GH0.tar.gz) = 98530 diff --git a/devel/transient/pkg-descr b/devel/transient/pkg-descr new file mode 100644 index 000000000000..5682c2b2d72d --- /dev/null +++ b/devel/transient/pkg-descr @@ -0,0 +1,21 @@ +Taking inspiration from prefix keys and prefix arguments, Transient +implements a similar abstraction involving a prefix command, infix +arguments and suffix commands. We could call this abstraction a +"transient command", but because it always involves at least two +commands (a prefix and a suffix) we prefer to call it just a +"transient". + +When the user calls a transient prefix command, then a transient +(temporary) keymap is activated, which binds the transient's infix +and suffix commands, and functions that control the transient state +are added to `pre-command-hook` and `post-command-hook`. The available +suffix and infix commands and their state are shown in a popup buffer +until the transient is exited by invoking a suffix command. + +Calling an infix command causes its value to be changed, possibly by +reading a new value in the minibuffer. + +Calling a suffix command usually causes the transient to be exited but +suffix commands can also be configured to not exit the transient. + +WWW: https://github.com/magit/transient diff --git a/devel/transient/pkg-plist b/devel/transient/pkg-plist new file mode 100644 index 000000000000..c90f16f93ad0 --- /dev/null +++ b/devel/transient/pkg-plist @@ -0,0 +1,3 @@ +%%EMACS_VERSION_SITE_LISPDIR%%/transient-autoloads.el +%%EMACS_VERSION_SITE_LISPDIR%%/transient.el +%%EMACS_VERSION_SITE_LISPDIR%%/transient.elc