qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs bufed.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs bufed.c
Date: Thu, 27 Dec 2007 10:01:32 +0000

CVSROOT:        /cvsroot/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        07/12/27 10:01:32

Modified files:
        .              : bufed.c 

Log message:
        pass argval to list-buffers command, making all buffers visible

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/bufed.c?cvsroot=qemacs&r1=1.9&r2=1.10

Patches:
Index: bufed.c
===================================================================
RCS file: /cvsroot/qemacs/qemacs/bufed.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- bufed.c     21 Dec 2007 12:20:17 -0000      1.9
+++ bufed.c     27 Dec 2007 10:01:32 -0000      1.10
@@ -156,7 +156,7 @@
 }
 
 /* show a list of buffers */
-static void do_list_buffers(EditState *s)
+static void do_list_buffers(EditState *s, int argval)
 {
     QEmacsState *qs = s->qe_state;
     BufedState *bs;
@@ -178,12 +178,16 @@
     e = insert_window_left(b, width, WF_MODELINE);
     do_set_mode(e, &bufed_mode, NULL);
 
+    bs = e->mode_data;
+    if (argval != NO_ARG) {
+        bs->flags |= BUFED_ALL_VISIBLE;
+        build_bufed_list(e);
+    }
+
     e1 = find_window(e, KEY_RIGHT);
     if (e1)
         b0 = e1->b;
 
-    bs = e->mode_data;
-
     /* if active buffer is found, go directly on it */
     for (i = 0; i < bs->items.nb_items; i++) {
         if (!strcmp(bs->items.items[i]->str, b0->name)) {
@@ -276,7 +280,8 @@
 };
 
 static CmdDef bufed_global_commands[] = {
-    CMD0( KEY_CTRLX(KEY_CTRL('b')), KEY_NONE, "list-buffers", do_list_buffers)
+    CMD_( KEY_CTRLX(KEY_CTRL('b')), KEY_NONE,
+          "list-buffers", do_list_buffers, ESi, "ui")
     CMD_DEF_END,
 };
 




reply via email to

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