From f4d1e1ff7ffde79e28aae7f3f8bbff3b6c9e8895 Mon Sep 17 00:00:00 2001
From: wlott <wlott>
Date: Tue, 10 Mar 1992 15:06:59 +0000
Subject: [PATCH] Added SEARCH-LIST-DEFINED-P, a predicate that tells if the
 search list is currently defined.

---
 code/pathname.lisp | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/code/pathname.lisp b/code/pathname.lisp
index a34fe6794..ce8f9a20f 100644
--- a/code/pathname.lisp
+++ b/code/pathname.lisp
@@ -6,7 +6,7 @@
 ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
 ;;;
 (ext:file-comment
-  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.8 1992/02/24 00:52:13 wlott Exp $")
+  "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/pathname.lisp,v 1.9 1992/03/10 15:06:59 wlott Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -29,7 +29,8 @@
 	  load-logical-pathname-translations *default-pathname-defaults*))
 
 (in-package "EXTENSIONS")
-(export '(search-list clear-search-list enumerate-search-list))
+(export '(search-list search-list-defined-p clear-search-list
+		      enumerate-search-list))
 
 (in-package "LISP")
 
@@ -940,6 +941,15 @@
 		  (search-list-expansions search-list))
 	  (error "Search list ~S has not been defined yet." pathname)))))
 
+;;; SEARCH-LIST-DEFINED-P -- public.
+;;; 
+(defun search-list-defined-p (pathname)
+  "Returns T if the search-list starting PATHNAME is currently defined, and
+   NIL otherwise.  An error is signaled if PATHNAME does not start with a
+   search-list."
+  (with-pathname (pathname pathname)
+    (search-list-defined (extract-search-list pathname t))))
+
 ;;; %SET-SEARCH-LIST -- public setf method
 ;;;
 ;;; Set the expansion for the search-list in PATHNAME.  If this would result
-- 
GitLab