Bring some consistency to command line switches
[sxemacs] / lisp / startup.el
index ce95a33..f7b5aef 100644 (file)
@@ -199,9 +199,10 @@ after, and will not be true at any time before.")
 
 (defvar command-switch-alist
   '(("-help"   . command-line-do-help)
-    ("-version". command-line-do-version)
+    ("-h"       . command-line-do-help)
+    ("-version" . command-line-do-version)
     ("-V"      . command-line-do-version)
-    ("-funcall". command-line-do-funcall)
+    ("-funcall" . command-line-do-funcall)
     ("-f"      . command-line-do-funcall)
     ("-e"      . command-line-do-funcall-1)
     ("-eval"   . command-line-do-eval)
@@ -516,9 +517,11 @@ Internal variable, DO NOT USE.")
       (setq arg (pop args))
       (cond
        ((or (string= arg "-q")
-           (string= arg "-no-init-file"))
+           (string= arg "-no-init-file")
+           (string= arg "--no-init-file"))
        (setq load-user-init-file-p nil))
-       ((string= arg "-no-site-file")
+       ((or (string= arg "-no-site-file")
+           (string= arg "--no-site-file"))
        (setq site-start-file nil))
        ((or (string= arg "-no-early-packages")
            (string= arg "--no-early-packages"))
@@ -533,9 +536,11 @@ Internal variable, DO NOT USE.")
            (string= arg "--no-autoloads"))
        (setq load-user-init-file-p nil
              site-start-file nil))
-       ((string= arg "-user-init-file")
+       ((or (string= arg "-user-init-file")
+           (string= arg "--user-init-file"))
        (setq user-init-file (pop args)))
-       ((string= arg "-user-init-directory")
+       ((or (string= arg "-user-init-directory")
+           (string= arg "--user-init-directory"))
        (setq forced-user-init-directory t)
        (setq user-init-directory (file-name-as-directory (pop args)))
        (setq user-init-file (find-user-init-file user-init-directory))
@@ -553,7 +558,8 @@ Internal variable, DO NOT USE.")
               (paths-construct-path (list user-init-directory
                                           lisp-initd-basename)))))
        ((or (string= arg "-u")
-           (string= arg "-user"))
+           (string= arg "-user")
+           (string= arg "--user"))
        (let* ((user (pop args))
               (home-user (concat "~" user))
               (xdgdir (paths-construct-path
@@ -580,9 +586,11 @@ Internal variable, DO NOT USE.")
                (file-name-as-directory
                 (paths-construct-path (list user-init-directory
                                             lisp-initd-basename))))))
-       ((string= arg "-debug-init")
+       ((or (string= arg "-debug-init")
+           (string= arg "--debug-init"))
        (setq init-file-debug t))
-       ((string= arg "-unmapped")
+       ((or (string= arg "-unmapped")
+           (string= arg "--unmapped"))
        (setq initial-frame-unmapped-p t))
        ((or (string= arg "-debug-paths")
            (string= arg "--debug-paths"))
@@ -1155,7 +1163,8 @@ idempotent, so call this as often as you like!"
   ;; SXEmacs was started without any command line arg that would set
   ;; or change it.
   (let ((allargs command-line-args)
-       (initdargs '("-u" "-user" "-user-init-directory")))
+       (initdargs '("-u" "-user" "--user" "-user-init-directory"
+                    "--user-init-directory")))
     (unless
        (or (member t (mapfam #'string= initdargs allargs :mode 'comb))
            forced-user-init-directory)