aboutsummaryrefslogtreecommitdiff
path: root/src/lisp
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2009-04-14 11:53:58 +0000
committerdos-reis <gdr@axiomatics.org>2009-04-14 11:53:58 +0000
commitc4fc20005aceb3af8b79f33cc9f44179b1ce011a (patch)
tree741ea5bd77158aeb6a2e94430dfb8650e67d96a6 /src/lisp
parent543ec512ef989a2d5209a8eb37b7d60b38f3c4fb (diff)
downloadopen-axiom-c4fc20005aceb3af8b79f33cc9f44179b1ce011a.tar.gz
Fix SF/2760553
* lisp/core.lisp.in (associateRequestWithFileType): Remember FILE-TYPE as default value for REQUEST. (|processCommandLine|): Standard options have length at least 2. (|handleCommandLine|): Use default file type if non is present.
Diffstat (limited to 'src/lisp')
-rw-r--r--src/lisp/core.lisp.in12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index f66cc267..50fc80b9 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -107,6 +107,7 @@
"IMPORT-MODULE"
"BOOT-IMPORT"
"CONCAT"
+ "$EditorProgram"
))
(in-package "AxiomCore")
@@ -331,7 +332,7 @@
;; We don't allow overriding at the moment.
(let ((key (cons request file-type)))
(unless (|useFileType?| request)
- (setf (get request 'use-file-type) t))
+ (setf (get request 'use-file-type) file-type))
(|installDriver| key driver)))
@@ -382,7 +383,7 @@
;; a non-option form is encountered. OPTIONS-SO-FAR accumulates the
;; the list of processed options.
(defun |processCommandLine| (argv options-so-far)
- (if (and argv
+ (if (and argv (>= (length (car argv)) 2)
(equal "--" (subseq (car argv) 0 2)))
(let ((option (|parseOption| (car argv))))
(cond ((symbolp option)
@@ -663,7 +664,7 @@
(when (null driver)
(|fatalError| (format nil "invalid option `--~a'" (string request))))
(funcall driver prog-name options args)))
-
+
(defun |hasHandler?| (request)
(|getDriver| request))
@@ -683,8 +684,9 @@
(|coreError| "missing input files")
(return t))
(dolist (f args)
- (let* ((file-type (|getFileType| f))
- (opt-name (car opt))
+ (let* ((opt-name (car opt))
+ (file-type (or (|getFileType| f)
+ (|useFileType?| opt-name)))
(request (cons opt-name file-type)))
(unless (|handleRequest| prog-name request options f)
(return nil))))