1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05: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

16
eval.c
View File

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