summaryrefslogtreecommitdiff
path: root/nt
diff options
context:
space:
mode:
authorGeoff Voelker <voelker@cs.washington.edu>1995-05-26 05:09:40 +0000
committerGeoff Voelker <voelker@cs.washington.edu>1995-05-26 05:09:40 +0000
commit7d0b2581e39d98f52f91767c2b02859846ca870d (patch)
tree825a8aacdcaa8caadc95953c654222b7071dbaf8 /nt
parent540ea610e971c3de0930f66353c1c306dac374a4 (diff)
downloademacs-7d0b2581e39d98f52f91767c2b02859846ca870d.tar.gz
(SHELL): Conditionally defined.
(HOME): Conditionally defined. (emacs_path,HOME): Update comments. Turn off all echo.
Diffstat (limited to 'nt')
-rwxr-xr-xnt/emacs.bat36
1 files changed, 31 insertions, 5 deletions
diff --git a/nt/emacs.bat b/nt/emacs.bat
index 36c31ee83f6..5c67fbca521 100755
--- a/nt/emacs.bat
+++ b/nt/emacs.bat
@@ -1,10 +1,26 @@
+@echo off
-set emacs_path=\emacs
+REM Change this to the directory into which you installed Emacs:
+set emacs_path=C:\emacs
-@echo off
+REM
+REM You shouldn't have to change any of the below.
+REM
-set EMACSLOADPATH=%emacs_path%\lisp
+REM Set OS specific values.
+set ARCH_SAVE=%PROCESSOR_ARCHITECTURE%
+set PROCESSOR_ARCHITECTURE=
+if "%ARCH_SAVE%" == "%PROCESSOR_ARCHITECTURE%" goto win95
+set PROCESSOR_ARCHITECTURE=%ARCH_SAVE%
set SHELL=cmd
+goto next
+
+:win95
+set SHELL=command
+
+:next
+
+set EMACSLOADPATH=%emacs_path%\lisp
set EMACSDATA=%emacs_path%\etc
set EMACSPATH=%emacs_path%\bin
set EMACSLOCKDIR=%emacs_path%\lock
@@ -12,7 +28,17 @@ set INFOPATH=%emacs_path%\info
set EMACSDOC=%emacs_path%\etc
set TERM=CMD
-rem To find the ~\_emacs file
-set HOME=%emacs_path%\nt
+REM The variable HOME is used to find the startup file, ~\_emacs. Ideally,
+REM this will not be set in this file but should already be set before
+REM this file is invoked. If HOME is not set, use some generic default.
+
+set HOME_SAVE=%HOME%
+set HOME_EXISTS=yes
+set HOME_DEFAULT=C:\
+set HOME=
+if "%HOME%" == "%HOME_SAVE%" set HOME_EXISTS=no
+if "%HOME_EXISTS%" == "yes" set HOME=%HOME_SAVE%
+if "%HOME_EXISTS%" == "no" set HOME=%HOME_DEFAULT%
+if "%HOME_EXISTS%" == "no" echo HOME is not set! Using %HOME% as a default...
%emacs_path%\bin\emacs.exe %1 %2 %3 %4 %5 %6 %7 %8 %9