[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemacs-commit] qemacs TODO.org qe.c qe.h qeconfig.h
From: |
Charlie Gordon |
Subject: |
[Qemacs-commit] qemacs TODO.org qe.c qe.h qeconfig.h |
Date: |
Sat, 15 Apr 2017 09:10:53 -0400 (EDT) |
CVSROOT: /sources/qemacs
Module name: qemacs
Changes by: Charlie Gordon <chqrlie> 17/04/15 09:10:53
Modified files:
. : TODO.org qe.c qe.h qeconfig.h
Log message:
files: add do_find_file_noselect command
- add LF_NOSELECT flag for qe_load_file()
- add find-file-noselect command: load a file into a buffer but do not
attach the buffer to the current window. Due to the current
implementation
of set_mode, the buffer is only attached to the file, the file will
only be
loaded when it is finally attached to a window.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/TODO.org?cvsroot=qemacs&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.265&r2=1.266
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.247&r2=1.248
http://cvs.savannah.gnu.org/viewcvs/qemacs/qeconfig.h?cvsroot=qemacs&r1=1.65&r2=1.66
Patches:
Index: TODO.org
===================================================================
RCS file: /sources/qemacs/qemacs/TODO.org,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- TODO.org 12 Apr 2017 07:33:20 -0000 1.34
+++ TODO.org 15 Apr 2017 13:10:53 -0000 1.35
@@ -14,7 +14,7 @@
** display: hex-mode and binary-mode should have an initial skip value to
align the display on any boundary
** display: optimize display for very large display-width in binary and hex
modes
** display: add screen dump command and format
-** files: save all modified buffers on C-x s
+** files: actually load file in find-file-noselect
** xml: select on "<plist "
** shell: support ':' as alternate escape sequence argument separator
** shell: use target window for man and similar commands
@@ -618,3 +618,15 @@
rust.c:249: style = RUST_STYLE_FUNCTION;
swift.c:284: style = C_STYLE_FUNCTION;
virgil.c:426: style = VIRGIL_STYLE_FUNCTION;
+
+** Missing commands:
+
+find-file-existing
+find-other-frame on C-x 5 f, C-x 5 C-f
+find-other-window on C-x 4 f, C-x 4 C-f
+find-other-read-only on C-x C-r
+find-file-read-only-other-frame on C-x 5 r
+find-file-read-only-other-window on C-x 4 r
+save-modified-buffers on C-x s
+show-matching-delimiters
+
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -b -r1.265 -r1.266
--- qe.c 14 Apr 2017 06:59:17 -0000 1.265
+++ qe.c 15 Apr 2017 13:10:53 -0000 1.266
@@ -5803,6 +5803,11 @@
// not necessarily full minibuffer contents
do_delete_selection(s);
+ /* XXX: if completion_popup_window already displayed, should page
+ * through the window, if at end, should remove focus from
+ * completion_popup_window or close it.
+ */
+
/* check completion window */
check_window(&completion_popup_window);
if (completion_popup_window
@@ -6864,7 +6869,12 @@
* test the resulting data_mode, loading the file if raw_mode
* selected.
*/
+ if (!(lflags & LF_NOSELECT)) {
+ /* XXX: bug: file loading will be delayed until buffer is
+ * attached to a window.
+ */
switch_to_buffer(s, b);
+ }
if (access(b->filename, W_OK)) {
b->flags |= BF_READONLY;
}
@@ -6944,6 +6954,11 @@
qe_load_file(s, filename, LF_KILL_BUFFER, bflags);
}
+void do_find_file_noselect(EditState *s, const char *filename, int bflags)
+{
+ qe_load_file(s, filename, LF_NOSELECT, bflags);
+}
+
void do_load_file_from_path(EditState *s, const char *filename, int bflags)
{
qe_load_file(s, filename, LF_LOAD_RESOURCE, bflags);
Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.247
retrieving revision 1.248
diff -u -b -r1.247 -r1.248
--- qe.h 12 Apr 2017 07:33:20 -0000 1.247
+++ qe.h 15 Apr 2017 13:10:53 -0000 1.248
@@ -1939,10 +1939,11 @@
#endif
/* file loading */
-#define LF_KILL_BUFFER 1
-#define LF_LOAD_RESOURCE 2
-#define LF_CWD_RELATIVE 4
-#define LF_SPLIT_WINDOW 8
+#define LF_KILL_BUFFER 0x01
+#define LF_LOAD_RESOURCE 0x02
+#define LF_CWD_RELATIVE 0x04
+#define LF_SPLIT_WINDOW 0x08
+#define LF_NOSELECT 0x10
int qe_load_file(EditState *s, const char *filename, int lflags, int bflags);
/* config file support */
@@ -2165,6 +2166,7 @@
void do_toggle_read_only(EditState *s);
void do_not_modified(EditState *s, int argval);
void do_find_alternate_file(EditState *s, const char *filename, int bflags);
+void do_find_file_noselect(EditState *s, const char *filename, int bflags);
void do_load_file_from_path(EditState *s, const char *filename, int bflags);
void do_set_visited_file_name(EditState *s, const char *filename,
const char *renamefile);
Index: qeconfig.h
===================================================================
RCS file: /sources/qemacs/qemacs/qeconfig.h,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -b -r1.65 -r1.66
--- qeconfig.h 25 Mar 2017 18:00:52 -0000 1.65
+++ qeconfig.h 15 Apr 2017 13:10:53 -0000 1.66
@@ -142,6 +142,10 @@
"find-alternate-file", do_find_alternate_file, ESsi, 0,
"s{Find alternate file: }[file]|file|"
"v") /* u? */
+ CMD3( KEY_NONE, KEY_NONE,
+ "find-file-noselect", do_find_file_noselect, ESsi, 0,
+ "s{Find file: }[file]|file|"
+ "v") /* u? */
CMD2( KEY_CTRLX('i'), KEY_NONE,
"insert-file", do_insert_file, ESs,
"*s{Insert file: }[file]|file|") /* u? */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemacs-commit] qemacs TODO.org qe.c qe.h qeconfig.h,
Charlie Gordon <=