mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-19 07:46:24 -05:00
apropos based on newmlarg (replacement of mlreply).
This commit is contained in:
parent
9682cdb2d2
commit
575659b1c1
28
bind.c
28
bind.c
@ -274,23 +274,24 @@ static int unbindchar( unsigned c) {
|
||||
* bring up a fake buffer and list the key bindings
|
||||
* into it with view mode
|
||||
*/
|
||||
int desbind(int f, int n)
|
||||
int desbind( int f, int n) {
|
||||
#if APROP
|
||||
{
|
||||
buildlist( "") ;
|
||||
return TRUE;
|
||||
return buildlist( "") ;
|
||||
}
|
||||
|
||||
int apro(int f, int n)
|
||||
{ /* Apropos (List functions that match a substring) */
|
||||
char mstring[NSTRING]; /* string to match cmd names to */
|
||||
int status; /* status return */
|
||||
/* Apropos (List functions that match a substring) */
|
||||
int apro( int f, int n) {
|
||||
char *mstring ; /* string to match cmd names to */
|
||||
int status ; /* status return */
|
||||
|
||||
status = mlreply("Apropos string: ", mstring, NSTRING - 1);
|
||||
if (status == ABORT)
|
||||
return status;
|
||||
status = newmlarg( &mstring, "Apropos string: ", 0) ;
|
||||
if( status == TRUE) {
|
||||
status = buildlist( mstring) ;
|
||||
free( mstring) ;
|
||||
} else if( status == FALSE)
|
||||
status = buildlist( "") ; /* build list of all commands */
|
||||
|
||||
return buildlist( mstring) ;
|
||||
return status ;
|
||||
}
|
||||
|
||||
/*
|
||||
@ -298,9 +299,8 @@ int apro(int f, int n)
|
||||
*
|
||||
* char *mstring; match string if a partial list, "" matches all
|
||||
*/
|
||||
static int buildlist( char *mstring)
|
||||
static int buildlist( char *mstring) {
|
||||
#endif
|
||||
{
|
||||
struct window *wp; /* scanning pointer to windows */
|
||||
struct key_tab *ktp; /* pointer into the command table */
|
||||
struct name_bind *nptr; /* pointer into the name binding table */
|
||||
|
Loading…
Reference in New Issue
Block a user