aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Corallo2020-09-15 12:13:25 +0200
committerAndrea Corallo2020-09-15 16:21:11 +0200
commit72e2c1e6e694cec3846524eeafc2751d4ce15964 (patch)
treee12f5661b1395e7b263a70fdae60a6bcbc10bbd1
parent66a5fa931cd437078d3fdd94fdbd78daf66f485f (diff)
downloademacs-scratch/modern-mode.tar.gz
emacs-scratch/modern-mode.zip
Add 'modern-mode' command line optionscratch/modern-mode
* src/emacs.c (standard_args): Add: '-m' '-modern' '--modern' cmd line option. * lisp/startup.el (command-line-1): Handle modern-mode cmd line option.
-rw-r--r--lisp/startup.el6
-rw-r--r--src/emacs.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index 48274830763..099d3a01e3d 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -2363,7 +2363,8 @@ A fancy display is used on graphic displays, normal otherwise."
2363 (longopts 2363 (longopts
2364 (append '("--funcall" "--load" "--insert" "--kill" 2364 (append '("--funcall" "--load" "--insert" "--kill"
2365 "--directory" "--eval" "--execute" "--no-splash" 2365 "--directory" "--eval" "--execute" "--no-splash"
2366 "--find-file" "--visit" "--file" "--no-desktop") 2366 "--find-file" "--visit" "--file" "--no-desktop"
2367 "--modern")
2367 (mapcar (lambda (elt) (concat "-" (car elt))) 2368 (mapcar (lambda (elt) (concat "-" (car elt)))
2368 command-switch-alist))) 2369 command-switch-alist)))
2369 (line 0) 2370 (line 0)
@@ -2514,6 +2515,9 @@ nil default-directory" name)
2514 (error "File name omitted from `-insert' option")) 2515 (error "File name omitted from `-insert' option"))
2515 (insert-file-contents (command-line-normalize-file-name tem))) 2516 (insert-file-contents (command-line-normalize-file-name tem)))
2516 2517
2518 ((member argi '("-m" "-modern"))
2519 (modern-mode 1))
2520
2517 ((equal argi "-kill") 2521 ((equal argi "-kill")
2518 (kill-emacs t)) 2522 (kill-emacs t))
2519 2523
diff --git a/src/emacs.c b/src/emacs.c
index 059e1c6d8f0..bde2a9229a9 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2130,6 +2130,8 @@ static const struct standard_args standard_args[] =
2130 { "-color", "--color", 5, 0}, 2130 { "-color", "--color", 5, 0},
2131 { "-no-splash", "--no-splash", 3, 0 }, 2131 { "-no-splash", "--no-splash", 3, 0 },
2132 { "-no-desktop", "--no-desktop", 3, 0 }, 2132 { "-no-desktop", "--no-desktop", 3, 0 },
2133 { "-m", "--modern", 0, 0 },
2134 { "-modern", 0, 0, 0 },
2133 /* The following two must be just above the file-name args, to get 2135 /* The following two must be just above the file-name args, to get
2134 them out of our way, but without mixing them with file names. */ 2136 them out of our way, but without mixing them with file names. */
2135 { "-temacs", "--temacs", 1, 1 }, 2137 { "-temacs", "--temacs", 1, 1 },