diff options
author | Ulrich Müller <ulm@gentoo.org> | 2011-11-24 17:54:57 +0000 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2011-11-24 17:54:57 +0000 |
commit | affb162326c5bd3bb18b2f29a9f4764f59f59cb0 (patch) | |
tree | 80e834eab8f12d9bd75cf4535f58252ee95010e8 /app-emacs/teco | |
parent | Added myself as maintainer (diff) | |
download | gentoo-2-affb162326c5bd3bb18b2f29a9f4764f59f59cb0.tar.gz gentoo-2-affb162326c5bd3bb18b2f29a9f4764f59f59cb0.tar.bz2 gentoo-2-affb162326c5bd3bb18b2f29a9f4764f59f59cb0.zip |
Initial import, from Emacs overlay. Ebuild contributed by me.
(Portage version: 2.1.10.37/cvs/Linux x86_64)
Diffstat (limited to 'app-emacs/teco')
-rw-r--r-- | app-emacs/teco/ChangeLog | 10 | ||||
-rw-r--r-- | app-emacs/teco/files/50teco-gentoo.el | 4 | ||||
-rw-r--r-- | app-emacs/teco/files/teco-7-minibuffer-prompt.patch | 76 | ||||
-rw-r--r-- | app-emacs/teco/metadata.xml | 5 | ||||
-rw-r--r-- | app-emacs/teco/teco-7.ebuild | 28 |
5 files changed, 123 insertions, 0 deletions
diff --git a/app-emacs/teco/ChangeLog b/app-emacs/teco/ChangeLog new file mode 100644 index 000000000000..b72d5d398556 --- /dev/null +++ b/app-emacs/teco/ChangeLog @@ -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/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-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..bc306fe58224 --- /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.ebuild b/app-emacs/teco/teco-7.ebuild new file mode 100644 index 000000000000..67af51240c31 --- /dev/null +++ b/app-emacs/teco/teco-7.ebuild @@ -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." +} |