mirror of
https://github.com/rfivet/uemacs.git
synced 2024-12-30 04:56:23 -05:00
Allow -x cmdfile as an alternative to @cmdfile options.
This commit is contained in:
parent
84bf4de212
commit
02d12c5d84
17
main.c
17
main.c
@ -124,7 +124,7 @@ static void usage( void) {
|
|||||||
" +<n> start at line <n>\n"
|
" +<n> start at line <n>\n"
|
||||||
" --help display this help and exit\n"
|
" --help display this help and exit\n"
|
||||||
" --version output version information and exit\n"
|
" --version output version information and exit\n"
|
||||||
" @cmdfile execute command file\n"
|
" @cmdfile execute startup file\n"
|
||||||
" -a|A process error file\n"
|
" -a|A process error file\n"
|
||||||
" -e|E edit file\n"
|
" -e|E edit file\n"
|
||||||
" -g|G<n> go to line <n>\n"
|
" -g|G<n> go to line <n>\n"
|
||||||
@ -134,6 +134,8 @@ static void usage( void) {
|
|||||||
" -r|R restrictive use\n"
|
" -r|R restrictive use\n"
|
||||||
" -s|S<string> search string\n"
|
" -s|S<string> search string\n"
|
||||||
" -v|V view file\n"
|
" -v|V view file\n"
|
||||||
|
" -x|Xcmdfile\n"
|
||||||
|
" -x|X cmdfile execute command file\n"
|
||||||
, stdout) ;
|
, stdout) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,6 +256,19 @@ int main(int argc, char **argv)
|
|||||||
case 'V':
|
case 'V':
|
||||||
viewflag = TRUE;
|
viewflag = TRUE;
|
||||||
break;
|
break;
|
||||||
|
case 'x':
|
||||||
|
case 'X':
|
||||||
|
if( argv[ carg][ 2]) { /* -Xfilename */
|
||||||
|
if( startup( &argv[ carg][ 2]) == TRUE)
|
||||||
|
startflag = TRUE ; /* don't execute emacs.rc */
|
||||||
|
} else if( argv[ carg + 1]) { /* -X filename */
|
||||||
|
if( startup( &argv[ carg + 1][ 0]) == TRUE)
|
||||||
|
startflag = TRUE ; /* don't execute emacs.rc */
|
||||||
|
|
||||||
|
carg += 1 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
break ;
|
||||||
default: /* unknown switch */
|
default: /* unknown switch */
|
||||||
/* ignore this for now */
|
/* ignore this for now */
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user