mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-18 07:16:23 -05:00
Fix regression: checking abort when prompting for command name.
This commit is contained in:
parent
c093b7064b
commit
6f7d89b1ac
8
bind.c
8
bind.c
@ -106,7 +106,7 @@ int deskey( int f, int n) {
|
|||||||
*
|
*
|
||||||
* int f, n; command arguments [IGNORED]
|
* int f, n; command arguments [IGNORED]
|
||||||
*/
|
*/
|
||||||
int bindtokey(int f, int n) {
|
int bindtokey( int f, int n) {
|
||||||
key_tab *ktp ; /* pointer into the command table */
|
key_tab *ktp ; /* pointer into the command table */
|
||||||
char outseq[ 80] ; /* output buffer for keystroke sequence */
|
char outseq[ 80] ; /* output buffer for keystroke sequence */
|
||||||
|
|
||||||
@ -114,7 +114,11 @@ int bindtokey(int f, int n) {
|
|||||||
mlwrite(": bind-to-key ");
|
mlwrite(": bind-to-key ");
|
||||||
|
|
||||||
/* get the function name to bind it to */
|
/* get the function name to bind it to */
|
||||||
fnp_t kfunc = getname()->n_func ;
|
const name_bind *nbp = getname() ;
|
||||||
|
if( nbp == NULL) /* abort */
|
||||||
|
return FALSE ;
|
||||||
|
|
||||||
|
fnp_t kfunc = nbp->n_func ;
|
||||||
if( kfunc == NULL) {
|
if( kfunc == NULL) {
|
||||||
mlwrite( "(No such function)") ;
|
mlwrite( "(No such function)") ;
|
||||||
return FALSE ;
|
return FALSE ;
|
||||||
|
7
exec.c
7
exec.c
@ -87,10 +87,13 @@ static int macarg( char *tok, int toksz) ;
|
|||||||
*/
|
*/
|
||||||
int namedcmd( int f, int n) {
|
int namedcmd( int f, int n) {
|
||||||
/* prompt the user to type a named command */
|
/* prompt the user to type a named command */
|
||||||
mlwrite(": ");
|
mlwrite(": execute-named-cmd ");
|
||||||
|
|
||||||
/* and now get the function name to execute */
|
/* and now get the function name to execute */
|
||||||
const name_bind *nbp = getname() ;
|
const name_bind *nbp = getname() ;
|
||||||
|
if( nbp == NULL) /* abort */
|
||||||
|
return FALSE ;
|
||||||
|
|
||||||
fnp_t kfunc = nbp->n_func ;
|
fnp_t kfunc = nbp->n_func ;
|
||||||
if (kfunc == NULL) {
|
if (kfunc == NULL) {
|
||||||
mlwrite("(No such function)");
|
mlwrite("(No such function)");
|
||||||
@ -118,7 +121,7 @@ int execcmd( int f, int n) {
|
|||||||
char *cmdstr ; /* string holding command to execute */
|
char *cmdstr ; /* string holding command to execute */
|
||||||
|
|
||||||
/* get the line wanted */
|
/* get the line wanted */
|
||||||
status = newmlarg( &cmdstr, ": ", 0) ;
|
status = newmlarg( &cmdstr, ": execute-command-line ", 0) ;
|
||||||
if( status != TRUE)
|
if( status != TRUE)
|
||||||
return status ;
|
return status ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user