Initial import, from Emacs overlay. Ebuild contributed by me.
authorUlrich Müller <ulm@gentoo.org>
Thu, 24 Nov 2011 17:54:57 +0000 (17:54 +0000)
committerUlrich Müller <ulm@gentoo.org>
Thu, 24 Nov 2011 17:54:57 +0000 (17:54 +0000)
Package-Manager: portage-2.1.10.37/cvs/Linux x86_64

app-emacs/teco/ChangeLog [new file with mode: 0644]
app-emacs/teco/Manifest [new file with mode: 0644]
app-emacs/teco/files/50teco-gentoo.el [new file with mode: 0644]
app-emacs/teco/files/teco-7-minibuffer-prompt.patch [new file with mode: 0644]
app-emacs/teco/metadata.xml [new file with mode: 0644]
app-emacs/teco/teco-7.ebuild [new file with mode: 0644]

diff --git a/app-emacs/teco/ChangeLog b/app-emacs/teco/ChangeLog
new file mode 100644 (file)
index 0000000..b72d5d3
--- /dev/null
@@ -0,0 +1,10 @@
+# ChangeLog for app-emacs/teco
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-emacs/teco/ChangeLog,v 1.1 2011/11/24 17:54:57 ulm Exp $
+
+*teco-7 (24 Nov 2011)
+
+  24 Nov 2011; Ulrich Mueller <ulm@gentoo.org> +files/50teco-gentoo.el,
+  +teco-7.ebuild, +files/teco-7-minibuffer-prompt.patch, +metadata.xml:
+  Initial import, from Emacs overlay. Ebuild contributed by me.
+
diff --git a/app-emacs/teco/Manifest b/app-emacs/teco/Manifest
new file mode 100644 (file)
index 0000000..2c7e595
--- /dev/null
@@ -0,0 +1,16 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+AUX 50teco-gentoo.el 257 RMD160 9e07ed5ff32e761178685b7341f20c9b1b792726 SHA1 82ca1a321853d6a66bcf160938b50bd578d22257 SHA256 0f5462dbf8632c898192ab09a9874a4adabbc2a2a96861a19e4dda3e61708dad
+AUX teco-7-minibuffer-prompt.patch 2574 RMD160 71329ec1cfc12ef0482f4df3452561aa2288f152 SHA1 8f3378e8bf89512794b116f0ddd33ca3ef2ae319 SHA256 e26d54b1100d63aa2ccfc6c86925b0826b2c93612dfb1b37d6108a920fd030e2
+DIST teco-7.el.bz2 16372 RMD160 73ca72286844171548303979b274843a550335bc SHA1 98707cf208484e01d082c2313dde4f880a2a7eb5 SHA256 28c04c00f36bc04ffd31291fa2718538a549a5d86dc372a427fba60b40801570
+EBUILD teco-7.ebuild 840 RMD160 f29a21549cf58830fc942776800168050379a5d5 SHA1 2b3843e33d0db217239ebd78684c9a9374f461c6 SHA256 6627fa22cdf5384ce40d49b4206b309d24fc49ea6332bdd7e890c53c83d9a7a3
+MISC ChangeLog 430 RMD160 59cf620f657108e59b6b70092ae6038a7d2e4552 SHA1 b699cf5e528a1bfed59ade03ee3f3e4d36742a59 SHA256 c347e971bcc0d2190d42193ac57ff0d76d86828d0a2f83a323ab3d6c2bee1e5e
+MISC metadata.xml 158 RMD160 415d172437ca754d24fc5ab186ba8e77934d96e4 SHA1 61f6eff9729cd87a725c2a70c81aca4270a17fc4 SHA256 1393bdef3a74343fdb40a112c7096a1af16f67e7a43413250de28dfe73810eab
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iEYEARECAAYFAk7Ohy0ACgkQOeoy/oIi7uwC5gCgsM33H1SpTieZGfVFNlmeezBi
+kyYAoLKXSEmbVF0E72u84Lwjwn1dUblQ
+=/pFd
+-----END PGP SIGNATURE-----
diff --git a/app-emacs/teco/files/50teco-gentoo.el b/app-emacs/teco/files/50teco-gentoo.el
new file mode 100644 (file)
index 0000000..6992ef1
--- /dev/null
@@ -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-minibuffer-prompt.patch b/app-emacs/teco/files/teco-7-minibuffer-prompt.patch
new file mode 100644 (file)
index 0000000..f46fadc
--- /dev/null
@@ -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 (file)
index 0000000..bc306fe
--- /dev/null
@@ -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.ebuild b/app-emacs/teco/teco-7.ebuild
new file mode 100644 (file)
index 0000000..67af512
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-emacs/teco/teco-7.ebuild,v 1.1 2011/11/24 17:54:57 ulm Exp $
+
+EAPI=4
+
+inherit 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="http://dev.gentoo.org/~ulm/distfiles/${P}.el.bz2"
+
+LICENSE="public-domain"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+ELISP_PATCHES="${P}-minibuffer-prompt.patch"
+SITEFILE="50${PN}-gentoo.el"
+
+pkg_postinst() {
+       elisp-site-regen
+       elog "To be able to invoke Teco directly, define a key binding"
+       elog "for teco:command in your ~/.emacs file, e.g.:"
+       elog "  (global-set-key \"\\C-z\" 'teco:command)"
+       elog "See ${SITELISP}/${PN}/teco.el for documentation."
+}