1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-06-18 00:35:22 +00:00

In order to support # as comment indicator, buffer content prefix is changed to '='. #buffername becomes =buffername.

This commit is contained in:
Renaud 2015-08-19 15:46:40 +08:00
parent 6b3061cedb
commit 1ab601071e

18
eval.c
View File

@ -1117,15 +1117,9 @@ static int gettyp( char *token) {
/* grab the first char (this is all we need) */ /* grab the first char (this is all we need) */
c = *token; c = *token;
/* no blanks!!! */
if (c == 0)
return TKNUL;
/* a numeric literal? */
if( (c >= '0' && c <= '9') || c == '-')
return TKLIT;
switch (c) { switch (c) {
case 0: /* no blanks!!! */
return TKNUL ;
case '"': case '"':
return TKSTR; return TKSTR;
@ -1133,7 +1127,7 @@ static int gettyp( char *token) {
return TKDIR; return TKDIR;
case '@': case '@':
return TKARG; return TKARG;
case '#': case '=':
return TKBUF; return TKBUF;
case '$': case '$':
return TKENV; return TKENV;
@ -1145,7 +1139,11 @@ static int gettyp( char *token) {
return TKLBL; return TKLBL;
default: default:
return TKCMD; /* a numeric literal? */
if( (c >= '0' && c <= '9') || c == '-')
return TKLIT;
else
return TKCMD;
} }
} }