From 407e92974282e02f50e65c249e232540f13b4b6e Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Tue, 25 Jan 1994 15:35:14 +0000
Subject: [PATCH] Restored the behavior of scribe-file to cd to the directory
 of the .mss file before running scribe.  This was accidentally removed in an
 attempt to clean up some compiler warnings.

---
 hemlock/unixcoms.lisp | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/hemlock/unixcoms.lisp b/hemlock/unixcoms.lisp
index 479ddc2e6..ab9fb165f 100644
--- a/hemlock/unixcoms.lisp
+++ b/hemlock/unixcoms.lisp
@@ -7,7 +7,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/unixcoms.lisp,v 1.8 1993/11/17 15:58:50 ram Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/unixcoms.lisp,v 1.9 1994/01/25 15:35:14 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -158,16 +158,20 @@
 	 (out-buffer (or (getstring "Scribe Warnings" *buffer-names*)
 			 (make-buffer "Scribe Warnings")))
 	 (out-point (buffer-end (buffer-point out-buffer)))
-	 (stream (make-hemlock-output-stream out-point :line)))
+	 (stream (make-hemlock-output-stream out-point :line))
+	 (orig-cwd (default-directory)))
     (buffer-end out-point)
     (insert-character out-point #\newline)
     (insert-character out-point #\newline)
-    (ext:run-program (namestring (value scribe-utility))
-		     (list* (namestring pathname)
-			    (value scribe-utility-switches))
-     :output stream :error stream
-     :wait nil)))
-
+    (unwind-protect
+	(progn
+	  (setf (default-directory) (directory-namestring pathname))
+	  (ext:run-program (namestring (value scribe-utility))
+			   (list* (namestring pathname)
+				  (value scribe-utility-switches))
+			   :output stream :error stream
+			   :wait nil))
+      (setf (default-directory) orig-cwd))))
 
 
 ;;;; UNIX Filter Region
-- 
GitLab