Skip to content

Commit b3b4266

Browse files
committed
added buffer menu as per big emacs - bound to ^X^B
moved list buffers to ^XB
1 parent 7ad6234 commit b3b4266

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ HFILES= estruct.h edef.h efunc.h ebind.h
2525
CFILES= basic.c buffer.c display.c file.c fileio.c line.c main.c \
2626
random.c region.c strlcpy.c search.c tcap.c termio.c window.c complete.c
2727

28-
OFILES= basic.o buffer.o display.o file.o fileio.o line.o main.o \
28+
OFILES= basic.o buffer.o bufmenu.o display.o file.o fileio.o line.o main.o \
2929
random.o region.o strlcpy.c search.o tcap.o termio.o window.o complete.o
3030

3131
all: $(OFILES)
@@ -42,6 +42,7 @@ clean:
4242

4343
basic.o: basic.c estruct.h edef.h
4444
buffer.o: buffer.c estruct.h edef.h
45+
bufmenu.o: bufmenu.c estruct.h edef.h
4546
display.o: display.c estruct.h edef.h
4647
file.o: file.c estruct.h edef.h
4748
fileio.o: fileio.c estruct.h

ebind.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ KEYTAB keytab[] = {
3131
{CTLX | '1', onlywind, 0},
3232
{CTLX | '2', splitwind, 0},
3333
{CTLX | '=', showcpos, 0},
34+
{CTLX | 'B', listbuffers, 0},
3435
{CTLX | 'E', ctlxe, 0},
3536
{CTLX | 'K', killbuffer, 0},
3637
{CTLX | 'N', nextbuffer, 0},
3738
{CTLX | 'O', nextwind, 0},
3839
{CTLX | 'X', nextbuffer, 0},
39-
{CTLX | CTRL | 'B', listbuffers, 0},
40+
{CTLX | CTRL | 'B', buffermenu, 0},
4041
{CTLX | CTRL | 'C', quit, 0},
4142
{CTLX | CTRL | 'F', filefind, 0},
4243
{CTLX | CTRL | 'S', filesave, 0},

efunc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ extern int prevwind (); /* Move to the previous window */
3737
extern int onlywind (); /* Make current window only one */
3838
extern int splitwind (); /* Split current window */
3939
extern int listbuffers (); /* Display list of buffers */
40+
extern int buffermenu (); /* Buffer Menu */
4041
extern int killbuffer (); /* Make a buffer go away */
4142
extern int refresh (); /* Refresh the screen */
4243
extern int tab (); /* Insert tab */

estruct.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,11 @@
4141
#define CTRL_H 8
4242
#define CTRL_I 9
4343
#define CTRL_M 13
44-
#define CTRL_S 19
45-
#define CTRL_R 18
44+
#define CTRL_N 14
45+
#define CTRL_P 16
4646
#define CTRL_Q 17
47+
#define CTRL_R 18
48+
#define CTRL_S 19
4749
#define BACKSPACE 127
4850

4951
#define NSRCH 128 /* Undoable search commands. */

main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include "edef.h" /* global definitions */
1616
#include "ebind.h"
1717

18-
const char version[] = "pEmacs 1.03";
18+
const char version[] = "pEmacs 1.04";
1919

2020
extern void getwinsize();
2121
extern void vtinit ();

0 commit comments

Comments
 (0)