emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

scratch/modern-mode 72e2c1e 3/3: Add 'modern-mode' command line option


From: Andrea Corallo
Subject: scratch/modern-mode 72e2c1e 3/3: Add 'modern-mode' command line option
Date: Tue, 15 Sep 2020 10:37:40 -0400 (EDT)

branch: scratch/modern-mode
commit 72e2c1e6e694cec3846524eeafc2751d4ce15964
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Add 'modern-mode' command line option
    
        * src/emacs.c (standard_args): Add: '-m' '-modern' '--modern'
        cmd line option.
    
        * lisp/startup.el (command-line-1): Handle modern-mode cmd line
        option.
---
 lisp/startup.el | 6 +++++-
 src/emacs.c     | 2 ++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/startup.el b/lisp/startup.el
index 4827483..099d3a0 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -2363,7 +2363,8 @@ A fancy display is used on graphic displays, normal 
otherwise."
                (longopts
                 (append '("--funcall" "--load" "--insert" "--kill"
                           "--directory" "--eval" "--execute" "--no-splash"
-                          "--find-file" "--visit" "--file" "--no-desktop")
+                          "--find-file" "--visit" "--file" "--no-desktop"
+                          "--modern")
                         (mapcar (lambda (elt) (concat "-" (car elt)))
                                 command-switch-alist)))
                (line 0)
@@ -2514,6 +2515,9 @@ nil default-directory" name)
                          (error "File name omitted from `-insert' option"))
                      (insert-file-contents (command-line-normalize-file-name 
tem)))
 
+                    ((member argi '("-m" "-modern"))
+                     (modern-mode 1))
+
                     ((equal argi "-kill")
                      (kill-emacs t))
 
diff --git a/src/emacs.c b/src/emacs.c
index 059e1c6..bde2a92 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2130,6 +2130,8 @@ static const struct standard_args standard_args[] =
   { "-color", "--color", 5, 0},
   { "-no-splash", "--no-splash", 3, 0 },
   { "-no-desktop", "--no-desktop", 3, 0 },
+  { "-m", "--modern", 0, 0 },
+  { "-modern", 0, 0, 0 },
   /* The following two must be just above the file-name args, to get
      them out of our way, but without mixing them with file names.  */
   { "-temacs", "--temacs", 1, 1 },



reply via email to

[Prev in Thread] Current Thread [Next in Thread]