qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs qe.c qe.h qeconfig.h


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs qe.c qe.h qeconfig.h
Date: Sat, 31 Dec 2016 13:45:08 -0500 (EST)

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        16/12/31 13:45:08

Modified files:
        .              : qe.c qe.h qeconfig.h 

Log message:
        basic: improve config file handling
        - add `add-resource-path(string)` to add a new resource directory
        - bind `load-file-from-path` on C-c C-f

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.243&r2=1.244
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.h?cvsroot=qemacs&r1=1.233&r2=1.234
http://cvs.savannah.gnu.org/viewcvs/qemacs/qeconfig.h?cvsroot=qemacs&r1=1.61&r2=1.62

Patches:
Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.243
retrieving revision 1.244
diff -u -b -r1.243 -r1.244
--- qe.c        31 Dec 2016 11:28:41 -0000      1.243
+++ qe.c        31 Dec 2016 18:45:08 -0000      1.244
@@ -8105,6 +8105,13 @@
     return _optind;
 }
 
+void do_add_resource_path(EditState *s, const char *path)
+{
+    QEmacsState *qs = s->qe_state;
+    pstrcat(qs->res_path, sizeof(qs->res_path), ":");
+    pstrcat(qs->res_path, sizeof(qs->res_path), path);
+}
+
 void set_user_option(const char *user)
 {
     QEmacsState *qs = &qe_state;

Index: qe.h
===================================================================
RCS file: /sources/qemacs/qemacs/qe.h,v
retrieving revision 1.233
retrieving revision 1.234
diff -u -b -r1.233 -r1.234
--- qe.h        31 Dec 2016 11:25:25 -0000      1.233
+++ qe.h        31 Dec 2016 18:45:08 -0000      1.234
@@ -1831,6 +1831,7 @@
 /* config file support */
 void do_load_config_file(EditState *e, const char *file);
 void do_load_qerc(EditState *e, const char *file);
+void do_add_resource_path(EditState *s, const char *path);
 
 /* popup / low level window handling */
 EditState *show_popup(EditBuffer *b);

Index: qeconfig.h
===================================================================
RCS file: /sources/qemacs/qemacs/qeconfig.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- qeconfig.h  31 Dec 2016 11:25:25 -0000      1.61
+++ qeconfig.h  31 Dec 2016 18:45:08 -0000      1.62
@@ -428,7 +428,7 @@
           "ui{Fill column: }")
 
     /* other stuff */
-    CMD3( KEY_NONE, KEY_NONE,
+    CMD3( KEY_CTRLC(KEY_CTRL('f')), KEY_NONE,
           "load-file-from-path", do_load_file_from_path, ESsi, 0,
           "s{Load file from path: }|file|"
           "v")
@@ -438,6 +438,10 @@
     CMD2( KEY_NONE, KEY_NONE,
           "load-qerc", do_load_qerc, ESs,
           "s{path: }[file]|file|")
+    CMD2( KEY_NONE, KEY_NONE,
+          "add-resource-path", do_add_resource_path, ESs,
+          "s{resource path: }[file]|file|")
+
 
     CMD_DEF_END,
 };



reply via email to

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