qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs TODO.org extras.c qe.h shell.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs TODO.org extras.c qe.h shell.c
Date: Sat, 18 Mar 2017 10:13:33 -0400 (EDT)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        17/03/18 10:13:33

Modified files:
        .              : TODO.org extras.c qe.h shell.c 

Log message:
        shell: handle C-t and M-t at shell prompt

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/TODO.org?cvsroot=qemacs&r1=1.26&r2=1.27
http://cvs.savannah.gnu.org/viewcvs/qemacs/extras.c?cvsroot=qemacs&r1=1.57&r2=1.58
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.238&r2=1.239
http://cvs.savannah.gnu.org/viewcvs/qemacs/shell.c?cvsroot=qemacs&r1=1.117&r2=1.118

Patches:
Index: TODO.org
===================================================================
RCS file: /sources/qemacs/qemacs/TODO.org,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -b -r1.26 -r1.27
--- TODO.org    17 Mar 2017 16:28:04 -0000      1.26
+++ TODO.org    18 Mar 2017 14:13:33 -0000      1.27
@@ -24,7 +24,6 @@
 ** shell: asynchronous input buffer
 ** shell: give commands a chance to execute for macros to behave correctly
 ** shell: A-y at process prompt
-** shell: C-t at process prompt
 ** shell: fix very long lines in shell buffer
 ** undo: saving the file kills the redo stack!
 ** undo: when undo resets the modified buffer flag, this prevents file save
@@ -78,6 +77,14 @@
 ** files: insert-file: load via separate buffer with charset conversion
 ** files: reload-file on C-x C-r
 ** files: qe_load_file should split screen evenly for LF_SPLIT_SCREEN flag
+** help: info-mode
+** help: qemacs-faq on C-h C-f
+** help: qemacs-manual on C-h C-f
+** help: add inline documentation for commands on C-h C-f
+** help: data-directory, data-path...
+** basic: frame-title-format and mode-line-format
+** basic: transient-mark-mode to highlight the current region
+** basic: delete-selection-mode to delete the highlighted region on DEL and 
typing text
 ** html: &#x200c; -> zero width causes missing chars at end of line
 ** html: mode_probe fails on junk/Books/881256329.epub/OEBPS/Attributes.xhtml 
when cycling
 ** html: preview mode does not work

Index: extras.c
===================================================================
RCS file: /sources/qemacs/qemacs/extras.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -b -r1.57 -r1.58
--- extras.c    16 Mar 2017 09:16:31 -0000      1.57
+++ extras.c    18 Mar 2017 14:13:33 -0000      1.58
@@ -649,13 +649,7 @@
     do_kill(s, start, s->offset, dir, 0);
 }
 
-enum {
-    CMD_TRANSPOSE_CHARS = 1,
-    CMD_TRANSPOSE_WORDS,
-    CMD_TRANSPOSE_LINES,
-};
-
-static void do_transpose(EditState *s, int cmd)
+void do_transpose(EditState *s, int cmd)
 {
     int offset0, offset1, offset2, offset3, end_offset;
     int size0, size1, size2;

Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.238
retrieving revision 1.239
diff -u -b -r1.238 -r1.239
--- qe.h        16 Mar 2017 09:16:31 -0000      1.238
+++ qe.h        18 Mar 2017 14:13:33 -0000      1.239
@@ -2096,6 +2096,13 @@
 void do_delete_horizontal_space(EditState *s);
 void do_show_date_and_time(EditState *s, int argval);
 
+enum {
+    CMD_TRANSPOSE_CHARS = 1,
+    CMD_TRANSPOSE_WORDS,
+    CMD_TRANSPOSE_LINES,
+};
+void do_transpose(EditState *s, int cmd);
+
 /* hex.c */
 
 extern ModeDef hex_mode;

Index: shell.c
===================================================================
RCS file: /sources/qemacs/qemacs/shell.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -u -b -r1.117 -r1.118
--- shell.c     17 Mar 2017 16:28:04 -0000      1.117
+++ shell.c     18 Mar 2017 14:13:33 -0000      1.118
@@ -2003,6 +2003,18 @@
     }
 }
 
+static void do_shell_transpose(EditState *e, int cmd)
+{
+    ShellState *s = shell_get_state(e, 1);
+
+    if (s && e->interactive) {
+        shell_write_char(e, cmd == CMD_TRANSPOSE_CHARS ?
+                         KEY_CTRL('T') : KEY_META('t'));
+    } else {
+        do_transpose(e, cmd);
+    }
+}
+
 static void do_shell_tabulate(EditState *e)
 {
     if (e->interactive) {
@@ -2378,6 +2390,10 @@
           "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")
+    CMD3( KEY_CTRL('t'), KEY_NONE,
+          "shell-transpose-chars", do_shell_transpose, ESi, 
CMD_TRANSPOSE_CHARS, "*v")
+    CMD3( KEY_META('t'), KEY_NONE,
+          "shell-transpose-words", do_shell_transpose, ESi, 
CMD_TRANSPOSE_WORDS, "*v")
     CMD_DEF_END,
 };
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]