[climacs-cvs] CVS climacs

thenriksen thenriksen at common-lisp.net
Fri Aug 24 13:13:00 UTC 2007


Update of /project/climacs/cvsroot/climacs
In directory clnet:/tmp/cvs-serv4584

Modified Files:
	core.lisp 
Log Message:
Handle syntax for filenames ending with a dot.


--- /project/climacs/cvsroot/climacs/core.lisp	2006/11/12 16:06:06	1.11
+++ /project/climacs/cvsroot/climacs/core.lisp	2007/08/24 13:13:00	1.12
@@ -136,14 +136,17 @@
 		   "." (pathname-type pathname))))
 
 (defun syntax-class-name-for-filepath (filepath)
-  (or (drei-syntax::syntax-description-class-name
-       (find (or (pathname-type filepath)
-		 (pathname-name filepath))
-	     drei-syntax::*syntaxes*
-	     :test (lambda (x y)
-		     (member x y :test #'string-equal))
-	     :key #'drei-syntax::syntax-description-pathname-types))
-      *default-syntax*))
+  (let ((syntax-description
+         (find (or (pathname-type filepath)
+                   (pathname-name filepath))
+               drei-syntax::*syntaxes*
+               :test (lambda (x y)
+                       (member x y :test #'string-equal))
+               :key #'drei-syntax::syntax-description-pathname-types)))
+    (if syntax-description
+        (drei-syntax::syntax-description-class-name
+         syntax-description)
+        *default-syntax*)))
 
 (defun evaluate-attributes (buffer options)
   "Evaluate the attributes `options' and modify `buffer' as




More information about the Climacs-cvs mailing list