1
0
mirror of https://github.com/rfivet/uemacs.git synced 2025-11-23 11:41:15 -05:00

Fix regression: checking abort when prompting for command name.

This commit is contained in:
2021-07-21 08:16:11 +08:00
parent c093b7064b
commit 6f7d89b1ac
2 changed files with 11 additions and 4 deletions

8
bind.c
View File

@@ -106,7 +106,7 @@ int deskey( int f, int n) {
*
* 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 */
char outseq[ 80] ; /* output buffer for keystroke sequence */
@@ -114,7 +114,11 @@ int bindtokey(int f, int n) {
mlwrite(": bind-to-key ");
/* 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) {
mlwrite( "(No such function)") ;
return FALSE ;