[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs TODO.org shell.c
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs TODO.org shell.c |
Date: |
Fri, 17 Mar 2017 12:28:04 -0400 (EDT) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/03/17 12:28:04
Modified files:
. : TODO.org shell.c
Log message:
shell: add support for word case changing commands
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/TODO.org?cvsroot=qemacs&r1=1.25&r2=1.26
http://cvs.savannah.gnu.org/viewcvs/qemacs/shell.c?cvsroot=qemacs&r1=1.116&r2=1.117
Patches:
Index: TODO.org
===================================================================
RCS file: /sources/qemacs/qemacs/TODO.org,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -b -r1.25 -r1.26
--- TODO.org 16 Mar 2017 09:35:28 -0000 1.25
+++ TODO.org 17 Mar 2017 16:28:04 -0000 1.26
@@ -114,7 +114,7 @@
** shell: fix crash bug when invoking qemacs recursively in the terminal
** shell: set current directory of new shell buffer to that of current window
** shell: use auxiliary buffer to make process input asynchronous
-** shell: M-l, M-u, M-c and other buffer modifications in shell input region
+** shell: other buffer modification functions in shell input region
** syntax: fix overlong line coloring
** syntax: support ReStructuredText (RST)
** tiny: remove extra features
@@ -170,7 +170,7 @@
** script: expression evaluator
** search: count-words, wc
** search: stats command for word count and mode specific stats
-** undo: limit size of undo buffers
+** undo: limit size of undo buffers (undo-outer-limit, default 3000000)
** undo: add undo records for styles, modes...
** undo: disable undo for archive parse and uncompress phases
** undo: compress logs and limit size
Index: shell.c
===================================================================
RCS file: /sources/qemacs/qemacs/shell.c,v
retrieving revision 1.116
retrieving revision 1.117
diff -u -b -r1.116 -r1.117
--- shell.c 25 Feb 2017 19:37:18 -0000 1.116
+++ shell.c 17 Mar 2017 16:28:04 -0000 1.117
@@ -1989,6 +1989,20 @@
}
}
+static void do_shell_changecase_word(EditState *e, int dir)
+{
+ ShellState *s = shell_get_state(e, 1);
+
+ if (s && e->interactive) {
+ // XXX: word pattern consistency issue
+ shell_write_char(e, dir == 2 ? KEY_META('c')
+ : dir < 0 ? KEY_META('l')
+ : KEY_META('u'));
+ } else {
+ do_changecase_word(e, dir);
+ }
+}
+
static void do_shell_tabulate(EditState *e)
{
if (e->interactive) {
@@ -2358,6 +2372,12 @@
"shell-kill-beginning-of-line", do_shell_kill_beginning_of_line,
ESi, "ui")
CMD2( KEY_CTRL('y'), KEY_NONE,
"shell-yank", do_shell_yank, ES, "*")
+ CMD3( KEY_META('c'), KEY_NONE,
+ "shell-capitalize-word", do_shell_changecase_word, ESi, 2, "*v")
+ CMD3( KEY_META('l'), KEY_NONE,
+ "shell-downcase-word", do_shell_changecase_word, ESi, -1, "*v")
+ CMD3( KEY_META('u'), KEY_NONE,
+ "shell-upcase-word", do_shell_changecase_word, ESi, 1, "*v")
CMD_DEF_END,
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs TODO.org shell.c,
Charlie Gordon <=