]> git.neil.brown.name Git - edlib.git/commitdiff
Discard concept of persistent key modifiers.
authorNeilBrown <neil@brown.name>
Thu, 3 Dec 2015 21:56:20 +0000 (08:56 +1100)
committerNeilBrown <neil@brown.name>
Wed, 9 Dec 2015 09:02:59 +0000 (20:02 +1100)
I'm not using them and I no longer think they make sense.
The goal they were meant to serve is better served by
setting a new "global-set-keymap".

Signed-off-by: NeilBrown <neil@brown.name>
core-keymap.c
core-pane.c
core.h
mode-emacs.c

index d5346d47e8d2427b002b9aa9626dda57a7e527bd..1a6d3d559c25d20428e51ee615790d2560684888 100644 (file)
@@ -231,7 +231,6 @@ void key_del(struct map *map, wint_t k)
 
 struct modmap {
        char    *name;
-       bool    transient;
        struct command comm;
 };
 
@@ -239,7 +238,7 @@ static int key_prefix(struct cmd_info *ci)
 {
        struct modmap *m = container_of(ci->comm, struct modmap, comm);
 
-       pane_set_mode(ci->home, m->name, m->transient);
+       pane_set_mode(ci->home, m->name);
        return 1;
 }
 
@@ -248,7 +247,6 @@ struct command *key_register_prefix(char *name)
        struct modmap *mm = malloc(sizeof(*mm));
 
        mm->name = strdup(name);
-       mm->transient = 1;
        mm->comm.func = key_prefix;
        return &mm->comm;
 }
index 3b61898c8e2739b1e5f4691a631aadf8e573d359..27c5a85d99fa1b02eb8f309f8883774959aaf66a 100644 (file)
@@ -405,9 +405,9 @@ struct pane *render_attach(char *name, struct pane *parent)
 }
 
 
-void pane_set_mode(struct pane *p, char *mode, int transient)
+void pane_set_mode(struct pane *p, char *mode)
 {
-       call5("Mode:set-mode", p, 0, NULL, mode, !transient);
+       call5("Mode:set-mode", p, 0, NULL, mode, 0);
 }
 
 void pane_set_numeric(struct pane *p, int numeric)
diff --git a/core.h b/core.h
index c5b10d9a743b22ae5b8a46c273c3fc9872218ad8..0c06a99eda9864831826642358b12d5bb63b0242 100644 (file)
--- a/core.h
+++ b/core.h
@@ -321,7 +321,7 @@ struct pane *pane_to_root(struct pane *p, int *x, int *y, int *z,
                          int *w, int *h);
 int pane_masked(struct pane *p, int x, int y, int z, int *w, int *h);
 struct editor *pane2ed(struct pane *p);
-void pane_set_mode(struct pane *p, char *mode, int transient);
+void pane_set_mode(struct pane *p, char *mode);
 void pane_set_numeric(struct pane *p, int numeric);
 void pane_set_extra(struct pane *p, int extra);
 struct pane *pane_attach(struct pane *p, char *type, struct pane *dp, char *arg);
index aa307df086a81df08336e9fca04fc12d48b3afe3..0c051cfea2cce03c85203ad5f7d2e490d507b950 100644 (file)
@@ -489,7 +489,7 @@ DEF_CMD(emacs_viewdocs)
 
 DEF_CMD(emacs_meta)
 {
-       pane_set_mode(ci->home, "M-", 1);
+       pane_set_mode(ci->home, "M-");
        pane_set_numeric(ci->home, ci->numeric);
        pane_set_extra(ci->home, ci->extra);
        return 1;