summaryrefslogtreecommitdiff
path: root/app-emacs/teco
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-emacs/teco
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-emacs/teco')
-rw-r--r--app-emacs/teco/Manifest1
-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.xml5
-rw-r--r--app-emacs/teco/teco-7-r1.ebuild24
6 files changed, 157 insertions, 0 deletions
diff --git a/app-emacs/teco/Manifest b/app-emacs/teco/Manifest
new file mode 100644
index 00000000000..7d6e9564ab6
--- /dev/null
+++ b/app-emacs/teco/Manifest
@@ -0,0 +1 @@
+DIST teco-7.el.bz2 16372 SHA256 28c04c00f36bc04ffd31291fa2718538a549a5d86dc372a427fba60b40801570 SHA512 7fb050d2d12aadeccc18d852b4191493be301c90ac5426ee4f985a89eba62f9b57d263a2156d5252e88d06bbe68508aca2bebeca65402ff9e8f00937f5189feb WHIRLPOOL 97aea17fe808c44a42cf24485a5f738103e46ee6fc3da86fadde40134f93894639068092a5298d2266a2ca184a11c890f64ef98d282fcfc5a163e88c8bd4c19b
diff --git a/app-emacs/teco/files/50teco-gentoo.el b/app-emacs/teco/files/50teco-gentoo.el
new file mode 100644
index 00000000000..6992ef1e573
--- /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 00000000000..0b3251919dd
--- /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 00000000000..f46fadc98a3
--- /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 00000000000..bc306fe5822
--- /dev/null
+++ b/app-emacs/teco/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>emacs</herd>
+</pkgmetadata>
diff --git a/app-emacs/teco/teco-7-r1.ebuild b/app-emacs/teco/teco-7-r1.ebuild
new file mode 100644
index 00000000000..fbc0b253893
--- /dev/null
+++ b/app-emacs/teco/teco-7-r1.ebuild
@@ -0,0 +1,24 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit readme.gentoo elisp
+
+DESCRIPTION="TECO interpreter for GNU Emacs"
+HOMEPAGE="http://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."