clark@b14.UUCP (Clark Williams) (04/15/88)
These are some fixes that I've done to GNU emacs 18.50. They are for those
unfortunate few (like me) that are forced to work in the VMS environment.
These fixes were tested under VMS 4.5 so I don't know how well they work
under higher version numbers (or lower version numbers for that matter).
Luckily I get to work in Unix now and then so I can keep a (shakey) grip
on my sanity ;-).
------------------------------------------------------------------------------
This patch was to allow dired to compile.
*** src/dired.old Thu Apr 14 13:13:12 1988
--- src/dired.c Thu Apr 14 13:13:32 1988
***************
*** 220,226 ****
int len;
#ifdef VMS
! dp = readfunc (d);
#else
dp = readdir (d);
#endif
--- 220,226 ----
int len;
#ifdef VMS
! dp = (*readfunc) (d);
#else
dp = readdir (d);
#endif
-------------------------------------------------------------------------------
the next two patches are because the run time library function 'access()'
wants a full file specification and not just a directory specification.
You could do logical name translation on each string and resolve it down
to a full file specification, then parse out the last directory spec and
create the file specification for each directory, then do an access on that.
I just punted.
*** src/lread.old Tue Apr 12 16:02:26 1988
--- src/lread.c Thu Apr 14 16:20:52 1988
***************
*** 1235,1245 ****
--- 1235,1248 ----
Lisp_Object normal_path;
/* Warn if dirs in the *standard* path don't exist. */
+
+ #ifndef VMS
normal_path = decode_env_path ("", normal);
for (; !NULL (normal_path); normal_path = XCONS (normal_path)->cdr)
if (access (XSTRING (Fcar (normal_path))->data, 0) < 0)
printf ("Warning: lisp library (%s) does not exist.\n",
XSTRING (Fcar (normal_path))->data);
+ #endif
Vvalues = Qnil;
*** src/callproc.old Tue Apr 12 16:01:50 1988
--- src/callproc.c Thu Apr 14 16:34:18 1988
***************
*** 401,412 ****
--- 401,414 ----
Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
+ #ifndef VMS
if (access (XSTRING (Vexec_directory)->data, 0) < 0)
{
printf ("Warning: executable/documentation dir (%s) does not exist.\n",
XSTRING (Vexec_directory)->data);
sleep (2);
}
+ #endif
sh = (char *) egetenv ("SHELL");
Vshell_file_name = build_string (sh ? sh : "/bin/sh");
-----------------------------------------------------------------------------
This final patch is if you want to be able to pass a file name to an already
running emacs. In addition to patching kepteditor.com you must add the
following to your .emacs (or an equivelent function if you don't like my
style ;-)
;;;
;;; check for a new file on suspend-resume
;;;
(defun check-for-file ()
(let ((file (getenv "EMACSARG")))
(and (stringp file)
(not (string-equal file ""))
(find-file file))))
(setq suspend-resume-hook 'check-for-file)
*** kepteditor.old Thu Apr 14 13:15:07 1988
--- kepteditor.com Wed Apr 13 08:57:54 1988
***************
*** 55,65 ****
--- 55,69 ----
$ goto quit
$ attach:
$ priv_list = f$setprv ( priv_list )
+ $ if "''p2'" .nes. "" then -
+ define/job/nolog emacsarg -
+ "''F$TRNLNM("SYS$DISK")'''F$DIRECTORY()'''p2'"
$ write sys$error -
"[Attaching to process ''NAME']"
$ define/user sys$input sys$command
$ attach "''NAME'"
$ quit:
+ $ if "''F$TRNLNM("EMACSARG")'" .nes. "" then deassign/job emacsarg
$ write sys$error -
"[Attached to DCL in directory ''F$TRNLNM("SYS$DISK")'''F$DIRECTORY()']"
$ if verify then -
--
_ /| | Clark Williams
Ack Thippfft! \'o.O` | Intergraph Corp.
=(___)= | {uunet|ihnp4}!ingr!b14!clark
U | (205) 772-6881