summaryrefslogtreecommitdiff
path: root/app-emacs/teco
diff options
context:
space:
mode:
Diffstat (limited to 'app-emacs/teco')
-rw-r--r--app-emacs/teco/Manifest6
-rw-r--r--app-emacs/teco/files/50teco-gentoo.el4
-rw-r--r--app-emacs/teco/files/teco-7-emacs-24.patch47
-rw-r--r--app-emacs/teco/files/teco-7-minibuffer-prompt.patch76
-rw-r--r--app-emacs/teco/metadata.xml9
-rw-r--r--app-emacs/teco/teco-7-r1.ebuild23
6 files changed, 165 insertions, 0 deletions
diff --git a/app-emacs/teco/Manifest b/app-emacs/teco/Manifest
new file mode 100644
index 000000000000..49ba271d8936
--- /dev/null
+++ b/app-emacs/teco/Manifest
@@ -0,0 +1,6 @@
+AUX 50teco-gentoo.el 257 BLAKE2B 4abde23767cfa240b27e735158997eee8f91ea71893d398eacebacea28529c10bb6a61f66e602c362858878a54ecdafa3e071d232ac76c3edb61ef3ed9f31e19 SHA512 ab17c9541474290b9ea85d6788b54e5615b4ca93cb8194986950d285f744f614f8e598e6d5bf6441069f8274c7f012f9266178a104789488f88934ce1e2b0759
+AUX teco-7-emacs-24.patch 1350 BLAKE2B b5dd024ce4bfa4db7f7108756772ac3d7faf074260749af2254bff429cd4ac82c18b840f70e41f28e4ba0a2f342831374372695d4ea6c0f0030663e6aa6546f0 SHA512 71afdf37ab38e76181e1a7ce90a73ad31a625039d784b9334f79a8642a45c7922022f74231e8cf70cb6bcad023012412262d6ef840ac611a182e3eb48ee0f4e5
+AUX teco-7-minibuffer-prompt.patch 2574 BLAKE2B 93f031a0d59b7887251b5642d031a83ecf7f94a481e55804530fec5c2f6b8a80c16fecb53a3b1560c38c1f2c8de583c11cac3a721d3d84d04a083f1a1fd859eb SHA512 df67994df08353757cf7be3d8ebf0c0d6c048d8e195360d9f7afaa29ca44cd3ccbe95885d9c790a29c1965c3d291136e195fa076bf9a0a42304c46267ebb1446
+DIST teco-7.el.bz2 16372 BLAKE2B c5608c1546262b9dcb52e0c5f1e41c87e94f142a96e8ce1262201b00672d810c925c20090c36edc596e0fb362265e72861f4bc214cb13ed94fa71b586bc4f45d SHA512 7fb050d2d12aadeccc18d852b4191493be301c90ac5426ee4f985a89eba62f9b57d263a2156d5252e88d06bbe68508aca2bebeca65402ff9e8f00937f5189feb
+EBUILD teco-7-r1.ebuild 701 BLAKE2B 4a5416ad5446deb45609d0a530cee937b3ad480dd4e06b7f9b2085b68c7acfdedcf0aab5ef8806947a43298a904da3830deb02df70d6e19856be6442f0af4804 SHA512 c19c94c05c2e10d145e7a43ae2a900849950ec6a001fb09f2d1bb46a6b097e9c3212869a63e2ce614747ab6ed9a2f4b12058cf8a2c92b0352f3c453b7bd587a2
+MISC metadata.xml 282 BLAKE2B 432e60a3b04def9f566fde3852011e006c0d578c72c42115734d1af5c128440fcee68134c8f891baad437e64a8d61fbbac49e70a35ed4f6f85641e888d3a2547 SHA512 1838e22e1f5b849b816a05d1b25bd81333c8cf67ceb996177e05ba7a555b8e0e307e62cb53e6f1217f4216823e2fecf050e85437678503d60e10c6b2d5303072
diff --git a/app-emacs/teco/files/50teco-gentoo.el b/app-emacs/teco/files/50teco-gentoo.el
new file mode 100644
index 000000000000..6992ef1e5735
--- /dev/null
+++ b/app-emacs/teco/files/50teco-gentoo.el
@@ -0,0 +1,4 @@
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'teco:command "teco" "Read and execute a Teco command string." t)
+(autoload 'teco "teco" "Read and execute a Teco command string." t)
+(autoload 'teco:copy-to-q-reg "teco" "Copy region into Teco q-reg REG." t)
diff --git a/app-emacs/teco/files/teco-7-emacs-24.patch b/app-emacs/teco/files/teco-7-emacs-24.patch
new file mode 100644
index 000000000000..0b3251919ddb
--- /dev/null
+++ b/app-emacs/teco/files/teco-7-emacs-24.patch
@@ -0,0 +1,47 @@
+--- teco.el
++++ teco.el
+@@ -312,7 +312,7 @@
+ "Return string describing the version of Teco. When called interactively,
+ displays the version."
+ (interactive)
+- (if (interactive-p)
++ (if (called-interactively-p 'interactive)
+ (message "Teco version %s" (teco-version))
+ teco-version))
+
+@@ -2254,7 +2254,7 @@
+
+ (defun teco:command-self-insert ()
+ (interactive)
+- (teco:command-insert-character last-command-char))
++ (teco:command-insert-character last-command-event))
+
+ (defun teco:command-quit ()
+ (interactive)
+@@ -2267,7 +2267,7 @@
+
+ (defun teco:command-return ()
+ (interactive)
+- (setq last-command-char ?\n)
++ (setq last-command-event ?\n)
+ (teco:command-self-insert))
+
+ (defun teco:command-escape ()
+@@ -2275,7 +2275,7 @@
+ ;; Two ESCs in a row terminate the command string
+ (if (eq last-command 'teco:command-escape)
+ (throw 'teco:command-quit (minibuffer-contents-no-properties)))
+- (teco:command-insert-character last-command-char))
++ (teco:command-insert-character last-command-event))
+
+ (defun teco:command-ctrl-u ()
+ (interactive)
+@@ -2334,7 +2334,7 @@
+ ;; q-register
+ (progn
+ ;; insert the * into the buffer
+- (teco:command-insert-character last-command-char)
++ (teco:command-insert-character last-command-event)
+ ;; read the next character
+ (let ((c (read-char))
+ c1)
diff --git a/app-emacs/teco/files/teco-7-minibuffer-prompt.patch b/app-emacs/teco/files/teco-7-minibuffer-prompt.patch
new file mode 100644
index 000000000000..f46fadc98a39
--- /dev/null
+++ b/app-emacs/teco/files/teco-7-minibuffer-prompt.patch
@@ -0,0 +1,76 @@
+--- teco.el
++++ teco.el
+@@ -2213,9 +2213,11 @@
+ (define-key teco:command-keymap "/" 'teco:command-slash)
+ (define-key teco:command-keymap "*" 'teco:command-star)
+
+-(defvar teco:command-escapes nil
+- "Records where ESCs are, since they are represented in the command buffer
+-by $.")
++(defvar teco:command-display-table
++ (let ((table (make-display-table)))
++ (aset table ?\e [?$])
++ table)
++ "Display table used while reading teco commands.")
+
+ (defun teco:copy-to-q-reg (char start end)
+ "Copy region into Teco q-reg REG.
+@@ -2244,15 +2246,11 @@
+
+ (defun teco:read-command ()
+ "Read a teco command string from the user."
+- (let* ((teco:command-escapes nil)
+- (command (catch 'teco:command-quit
+- (read-from-minibuffer teco:prompt nil
+- teco:command-keymap))))
+- (if command
+- (while teco:command-escapes
+- (aset command (car teco:command-escapes) ?\e)
+- (setq teco:command-escapes (cdr teco:command-escapes))))
+- command))
++ (minibuffer-with-setup-hook
++ (lambda ()
++ (setq buffer-display-table teco:command-display-table))
++ (catch 'teco:command-quit
++ (read-from-minibuffer teco:prompt nil teco:command-keymap))))
+
+ (defun teco:command-self-insert ()
+ (interactive)
+@@ -2276,16 +2274,13 @@
+ (interactive)
+ ;; Two ESCs in a row terminate the command string
+ (if (eq last-command 'teco:command-escape)
+- (throw 'teco:command-quit (buffer-string)))
++ (throw 'teco:command-quit (minibuffer-contents-no-properties)))
+ (teco:command-insert-character last-command-char))
+
+ (defun teco:command-ctrl-u ()
+ (interactive)
+ ;; delete the characters
+ (kill-line 0)
+- ;; forget that they were ESCs
+- (while (and teco:command-escapes (<= (point) (car teco:command-escapes)))
+- (setq teco:command-escapes (cdr teco:command-escapes)))
+ ;; decide whether to shrink the window
+ (while (let ((a (insert ?\n))
+ (b (pos-visible-in-window-p))
+@@ -2297,9 +2292,6 @@
+ (interactive)
+ ;; delete the character
+ (backward-delete-char 1)
+- ;; forget that it was an ESC
+- (if (and teco:command-escapes (= (1- (point)) (car teco:command-escapes)))
+- (setq teco:command-escapes (cdr teco:command-escapes)))
+ ;; decide whether to shrink the window
+ (insert ?\n)
+ (if (prog1 (pos-visible-in-window-p)
+@@ -2362,9 +2354,6 @@
+
+ ;; Insert a single command character
+ (defun teco:command-insert-character (c)
+- (if (eq c ?\e)
+- (setq teco:command-escapes (cons (1- (point)) teco:command-escapes)
+- c ?$))
+ (insert c)
+ (if (not (pos-visible-in-window-p))
+ (enlarge-window 1)))
diff --git a/app-emacs/teco/metadata.xml b/app-emacs/teco/metadata.xml
new file mode 100644
index 000000000000..c918cdef9591
--- /dev/null
+++ b/app-emacs/teco/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>gnu-emacs@gentoo.org</email>
+ <name>Gentoo GNU Emacs project</name>
+</maintainer>
+<stabilize-allarches/>
+</pkgmetadata>
diff --git a/app-emacs/teco/teco-7-r1.ebuild b/app-emacs/teco/teco-7-r1.ebuild
new file mode 100644
index 000000000000..ef2a0ac6508f
--- /dev/null
+++ b/app-emacs/teco/teco-7-r1.ebuild
@@ -0,0 +1,23 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit readme.gentoo elisp
+
+DESCRIPTION="TECO interpreter for GNU Emacs"
+HOMEPAGE="https://www.emacswiki.org/emacs/TECO"
+# taken from: http://www.emacswiki.org/emacs/teco.el
+SRC_URI="mirror://gentoo/${P}.el.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+ELISP_PATCHES="${P}-minibuffer-prompt.patch
+ ${P}-emacs-24.patch"
+SITEFILE="50${PN}-gentoo.el"
+DOC_CONTENTS="To be able to invoke Teco directly, define a keybinding
+ for teco:command in your ~/.emacs file, e.g.:
+ \\n\\t(global-set-key \"\\C-z\" 'teco:command)
+ \\nSee ${SITELISP}/${PN}/teco.el for documentation."