summaryrefslogtreecommitdiff
path: root/app-emacs/teco/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-emacs/teco/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-emacs/teco/files')
-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
3 files changed, 127 insertions, 0 deletions
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)))