summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2011-11-19 16:46:35 +0000
committerUlrich Müller <ulm@gentoo.org>2011-11-19 16:46:35 +0000
commit8619e9357529919284234a50212ce2a239d55aaf (patch)
tree5b7e3ae4313681cab37f36efb167318ad38ad08a /app-emacs
parentRevert r1706. (diff)
downloademacs-8619e9357529919284234a50212ce2a239d55aaf.tar.gz
emacs-8619e9357529919284234a50212ce2a239d55aaf.tar.bz2
emacs-8619e9357529919284234a50212ce2a239d55aaf.zip
Initial import. Ebuild contributed by me.
svn path=/emacs-overlay/; revision=1744
Diffstat (limited to 'app-emacs')
-rw-r--r--app-emacs/teco/ChangeLog11
-rw-r--r--app-emacs/teco/files/50teco-gentoo.el4
-rw-r--r--app-emacs/teco/files/teco-7-minibuffer-prompt.patch43
-rw-r--r--app-emacs/teco/metadata.xml5
-rw-r--r--app-emacs/teco/teco-7.ebuild28
5 files changed, 91 insertions, 0 deletions
diff --git a/app-emacs/teco/ChangeLog b/app-emacs/teco/ChangeLog
new file mode 100644
index 0000000..6ce3b90
--- /dev/null
+++ b/app-emacs/teco/ChangeLog
@@ -0,0 +1,11 @@
+# ChangeLog for app-emacs/teco
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*teco-7 (19 Nov 2011)
+
+ 19 Nov 2011; Ulrich Mueller <ulm@gentoo.org> +teco-7.ebuild,
+ +files/teco-7-minibuffer-prompt.patch, +files/50teco-gentoo.el,
+ +metadata.xml:
+ Initial import. 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 0000000..6992ef1
--- /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 0000000..44df255
--- /dev/null
+++ b/app-emacs/teco/files/teco-7-minibuffer-prompt.patch
@@ -0,0 +1,43 @@
+--- teco.el
++++ teco.el
+@@ -2276,7 +2276,7 @@
+ (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 ()
+@@ -2284,7 +2284,9 @@
+ ;; delete the characters
+ (kill-line 0)
+ ;; forget that they were ESCs
+- (while (and teco:command-escapes (<= (point) (car teco:command-escapes)))
++ (while (and teco:command-escapes
++ (<= (- (point) (minibuffer-prompt-end))
++ (car teco:command-escapes)))
+ (setq teco:command-escapes (cdr teco:command-escapes)))
+ ;; decide whether to shrink the window
+ (while (let ((a (insert ?\n))
+@@ -2298,7 +2300,9 @@
+ ;; delete the character
+ (backward-delete-char 1)
+ ;; forget that it was an ESC
+- (if (and teco:command-escapes (= (1- (point)) (car teco:command-escapes)))
++ (if (and teco:command-escapes
++ (= (- (point) (minibuffer-prompt-end))
++ (car teco:command-escapes)))
+ (setq teco:command-escapes (cdr teco:command-escapes)))
+ ;; decide whether to shrink the window
+ (insert ?\n)
+@@ -2363,7 +2367,8 @@
+ ;; 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)
++ (setq teco:command-escapes
++ (cons (- (point) (minibuffer-prompt-end)) teco:command-escapes)
+ c ?$))
+ (insert c)
+ (if (not (pos-visible-in-window-p))
diff --git a/app-emacs/teco/metadata.xml b/app-emacs/teco/metadata.xml
new file mode 100644
index 0000000..bc306fe
--- /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 0000000..3815d73
--- /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: $
+
+EAPI=4
+
+inherit elisp
+
+DESCRIPTION="TECO interpreter for GNU Emacs"
+HOMEPAGE="http://www.emacswiki.org/emacs/TecoInterpreterInElisp"
+# 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."
+}