Strip -unix suffix from file coding option. Kindof stinks but will do for now.
authorFrancois-Rene Rideau <tunes@google.com>
Wed, 25 Apr 2012 23:04:58 +0000 (19:04 -0400)
committerFrancois-Rene Rideau <tunes@google.com>
Wed, 25 Apr 2012 23:04:58 +0000 (19:04 -0400)
autodetect.lisp

index ab48e78..5205c08 100644 (file)
                 (when (= semi end) (return nil)))))))
       (flet ((try (x)
                (let ((o (cdr (assoc x options :test 'equalp))))
-                 (when o (intern (string-upcase o) :keyword)))))
+                 (when o
+                   ;; strip Emacs-style EOL spec.
+                   ;; TODO: find a way to integrate it in the external-format,
+                   ;; on implementations that support it.
+                   (when (asdf:ends-with o "-unix") 
+                     (setf o (subseq o 0 (- (length o) 5))))
+                   (intern (string-upcase o) :keyword)))))
         (or (try "external-format") (try "encoding") (try "coding"))))))
 
 ;;; Examine the file to determine the encoding.