diff options
| author | Juri Linkov | 2007-09-22 14:02:38 +0000 |
|---|---|---|
| committer | Juri Linkov | 2007-09-22 14:02:38 +0000 |
| commit | 1cff9ad1729dd14b9bd840614289694d57dafd47 (patch) | |
| tree | d38c8f622e07ac550e7f92a5eda341b1d649f0d5 | |
| parent | 78048085706b17933eaa1f7d2c0b2f0578b561bf (diff) | |
| download | emacs-1cff9ad1729dd14b9bd840614289694d57dafd47.tar.gz emacs-1cff9ad1729dd14b9bd840614289694d57dafd47.zip | |
(command-line): Rename `inhibit-startup-message' to
`inhibit-startup-screen'.
(fancy-about-text): Use shorter label for "Ordering Manuals".
(fancy-startup-tail): Add optional arg `concise'. When `concise'
is nil, display a line with "To start..." and 3 links to useful
tasks. Display the "Dismiss" button and "Don't show this message
again" only when concise is non-nil.
(fancy-startup-screen): Call `fancy-startup-tail' with optional
arg `concise'. If CONCISE is non-nil, display a concise version
of the splash screen in another window. Otherwise, switch to the
startup buffer in the same window.
(startup-echo-area-message): Change displayed binding from
C-h C-p (describe-project) to C-h C-a (about-emacs), and change
text "about the GNU system and GNU/Linux" to "about GNU Emacs and
the GNU system".
(display-startup-screen): Fix buffer name from "*About GNU Emacs*"
to "*GNU Emacs*".
(display-about-screen): Don't check the existence of the buffer
"*About GNU Emacs*".
(display-splash-screen): Make alias to `display-startup-screen'.
(command-line-1): Rename `inhibit-startup-message' to
`inhibit-startup-screen'. Inhibit startup screen when Emacs is
started with command line options "-f", "-funcall", "-e", "-eval",
"-execute", "-insert", "-find-file", "-file", "-visit".
Inhibit startup screen when Emacs is started with a file name only
on tty (i.e. don't inhibit it when started with a file name like
"emacs FILE..." on a window system).
(command-line-1): Simplify logic of displaying the startup screen:
if file-count > 0, then display the concise version in another
window, otherwise display full version in the same window.
| -rw-r--r-- | lisp/ChangeLog | 36 | ||||
| -rw-r--r-- | lisp/startup.el | 184 |
2 files changed, 135 insertions, 85 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ab111ceef84..eb8bbc94b5c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,39 @@ | |||
| 1 | 2007-09-22 Juri Linkov <juri@jurta.org> | ||
| 2 | |||
| 3 | * startup.el (command-line): Rename `inhibit-startup-message' to | ||
| 4 | `inhibit-startup-screen'. | ||
| 5 | (fancy-about-text): Use shorter label for "Ordering Manuals". | ||
| 6 | (fancy-startup-tail): Add optional arg `concise'. When `concise' | ||
| 7 | is nil, display a line with "To start..." and 3 links to useful | ||
| 8 | tasks. Display the "Dismiss" button and "Don't show this message | ||
| 9 | again" only when concise is non-nil. | ||
| 10 | (fancy-startup-screen): Call `fancy-startup-tail' with optional | ||
| 11 | arg `concise'. If CONCISE is non-nil, display a concise version | ||
| 12 | of the splash screen in another window. Otherwise, switch to the | ||
| 13 | startup buffer in the same window. | ||
| 14 | (startup-echo-area-message): Change displayed binding from | ||
| 15 | C-h C-p (describe-project) to C-h C-a (about-emacs), and change | ||
| 16 | text "about the GNU system and GNU/Linux" to "about GNU Emacs and | ||
| 17 | the GNU system". | ||
| 18 | (display-startup-screen): Fix buffer name from "*About GNU Emacs*" | ||
| 19 | to "*GNU Emacs*". | ||
| 20 | (display-about-screen): Don't check the existence of the buffer | ||
| 21 | "*About GNU Emacs*". | ||
| 22 | (display-splash-screen): Make alias to `display-startup-screen'. | ||
| 23 | (command-line-1): Rename `inhibit-startup-message' to | ||
| 24 | `inhibit-startup-screen'. Inhibit startup screen when Emacs is | ||
| 25 | started with command line options "-f", "-funcall", "-e", "-eval", | ||
| 26 | "-execute", "-insert", "-find-file", "-file", "-visit". | ||
| 27 | Inhibit startup screen when Emacs is started with a file name only | ||
| 28 | on tty (i.e. don't inhibit it when started with a file name like | ||
| 29 | "emacs FILE..." on a window system). | ||
| 30 | (command-line-1): Simplify logic of displaying the startup screen: | ||
| 31 | if file-count > 0, then display the concise version in another | ||
| 32 | window, otherwise display full version in the same window. | ||
| 33 | |||
| 34 | * help.el (help-map): Bind C-h C-a to about-emacs. | ||
| 35 | (help-for-help-internal): Add C-a description to C-h help text. | ||
| 36 | |||
| 1 | 2007-09-22 Dan Nicolaescu <dann@ics.uci.edu> | 37 | 2007-09-22 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 38 | ||
| 3 | * emacs-lisp/checkdoc.el (checkdoc-force-docstrings-flag) | 39 | * emacs-lisp/checkdoc.el (checkdoc-force-docstrings-flag) |
diff --git a/lisp/startup.el b/lisp/startup.el index af1d9c73152..e575a0aeb11 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -872,8 +872,8 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 872 | (load site-run-file t t)) | 872 | (load site-run-file t t)) |
| 873 | 873 | ||
| 874 | ;; Sites should not disable this. Only individuals should disable | 874 | ;; Sites should not disable this. Only individuals should disable |
| 875 | ;; the startup message. | 875 | ;; the startup screen. |
| 876 | (setq inhibit-startup-message nil) | 876 | (setq inhibit-startup-screen nil) |
| 877 | 877 | ||
| 878 | ;; Warn for invalid user name. | 878 | ;; Warn for invalid user name. |
| 879 | (when init-file-user | 879 | (when init-file-user |
| @@ -967,7 +967,7 @@ opening the first frame (e.g. open a connection to an X server).") | |||
| 967 | (setq user-init-file source)))) | 967 | (setq user-init-file source)))) |
| 968 | 968 | ||
| 969 | (unless inhibit-default-init | 969 | (unless inhibit-default-init |
| 970 | (let ((inhibit-startup-message nil)) | 970 | (let ((inhibit-startup-screen nil)) |
| 971 | ;; Users are supposed to be told their rights. | 971 | ;; Users are supposed to be told their rights. |
| 972 | ;; (Plus how to get help and how to undo.) | 972 | ;; (Plus how to get help and how to undo.) |
| 973 | ;; Don't you dare turn this off for anyone | 973 | ;; Don't you dare turn this off for anyone |
| @@ -1251,8 +1251,8 @@ Each element in the list should be a list of strings or pairs | |||
| 1251 | "\tConditions for redistributing and changing Emacs\n" | 1251 | "\tConditions for redistributing and changing Emacs\n" |
| 1252 | :link ("Getting New Versions" (lambda (button) (describe-distribution))) | 1252 | :link ("Getting New Versions" (lambda (button) (describe-distribution))) |
| 1253 | "\tHow to obtain the latest version of Emacs\n" | 1253 | "\tHow to obtain the latest version of Emacs\n" |
| 1254 | :link ("More Manuals / Ordering Manuals" (lambda (button) (view-order-manuals))) | 1254 | :link ("Ordering Manuals" (lambda (button) (view-order-manuals))) |
| 1255 | " Buying printed manuals from the FSF\n" | 1255 | "\tBuying printed manuals from the FSF\n" |
| 1256 | "\n" | 1256 | "\n" |
| 1257 | :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) | 1257 | :link ("Emacs Tutorial" (lambda (button) (help-with-tutorial))) |
| 1258 | "\tLearn basic Emacs keystroke commands" | 1258 | "\tLearn basic Emacs keystroke commands" |
| @@ -1376,10 +1376,23 @@ specification." | |||
| 1376 | 'follow-link t) | 1376 | 'follow-link t) |
| 1377 | (insert "\n\n"))))) | 1377 | (insert "\n\n"))))) |
| 1378 | 1378 | ||
| 1379 | (defun fancy-startup-tail () | 1379 | (defun fancy-startup-tail (&optional concise) |
| 1380 | "Insert the tail part of the splash screen into the current buffer." | 1380 | "Insert the tail part of the splash screen into the current buffer." |
| 1381 | (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark) | 1381 | (let ((fg (if (eq (frame-parameter nil 'background-mode) 'dark) |
| 1382 | "cyan" "darkblue"))) | 1382 | "cyan" "darkblue"))) |
| 1383 | (unless concise | ||
| 1384 | (fancy-splash-insert | ||
| 1385 | :face 'variable-pitch | ||
| 1386 | "\nTo start... " | ||
| 1387 | :link '("Open a File" | ||
| 1388 | (lambda (button) (call-interactively 'find-file))) | ||
| 1389 | " " | ||
| 1390 | :link '("Open Home Directory" | ||
| 1391 | (lambda (button) (dired "~"))) | ||
| 1392 | " " | ||
| 1393 | :link '("Customize Startup" | ||
| 1394 | (lambda (button) (customize-group 'initialization))) | ||
| 1395 | "\n")) | ||
| 1383 | (fancy-splash-insert :face `(variable-pitch :foreground ,fg) | 1396 | (fancy-splash-insert :face `(variable-pitch :foreground ,fg) |
| 1384 | "\nThis is " | 1397 | "\nThis is " |
| 1385 | (emacs-version) | 1398 | (emacs-version) |
| @@ -1409,72 +1422,76 @@ specification." | |||
| 1409 | "\nto recover" | 1422 | "\nto recover" |
| 1410 | " the files you were editing.")) | 1423 | " the files you were editing.")) |
| 1411 | 1424 | ||
| 1412 | (fancy-splash-insert | 1425 | (when concise |
| 1413 | :face 'variable-pitch "\n\n" | 1426 | (fancy-splash-insert |
| 1414 | :link '("Dismiss" (lambda (button) | 1427 | :face 'variable-pitch "\n\n" |
| 1415 | (when startup-screen-inhibit-startup-screen | 1428 | :link '("Dismiss" (lambda (button) |
| 1416 | (customize-set-variable 'inhibit-splash-screen t) | 1429 | (when startup-screen-inhibit-startup-screen |
| 1417 | (customize-mark-to-save 'inhibit-splash-screen) | 1430 | (customize-set-variable 'inhibit-startup-screen t) |
| 1418 | (custom-save-all)) | 1431 | (customize-mark-to-save 'inhibit-startup-screen) |
| 1419 | (let ((w (get-buffer-window "*GNU Emacs*"))) | 1432 | (custom-save-all)) |
| 1420 | (and w (not (one-window-p)) (delete-window w))) | 1433 | (let ((w (get-buffer-window "*GNU Emacs*"))) |
| 1421 | (kill-buffer "*GNU Emacs*"))) | 1434 | (and w (not (one-window-p)) (delete-window w))) |
| 1422 | " ") | 1435 | (kill-buffer "*GNU Emacs*"))) |
| 1423 | (when (or user-init-file custom-file) | 1436 | " ") |
| 1424 | (let ((checked (create-image "\300\300\141\143\067\076\034\030" | 1437 | (when (or user-init-file custom-file) |
| 1425 | 'xbm t :width 8 :height 8 :background "grey75" | 1438 | (let ((checked (create-image "\300\300\141\143\067\076\034\030" |
| 1426 | :foreground "black" :relief -2 :ascent 'center)) | ||
| 1427 | (unchecked (create-image (make-string 8 0) | ||
| 1428 | 'xbm t :width 8 :height 8 :background "grey75" | 1439 | 'xbm t :width 8 :height 8 :background "grey75" |
| 1429 | :foreground "black" :relief -2 :ascent 'center))) | 1440 | :foreground "black" :relief -2 :ascent 'center)) |
| 1430 | (insert-button | 1441 | (unchecked (create-image (make-string 8 0) |
| 1431 | " " :on-glyph checked :off-glyph unchecked 'checked nil | 1442 | 'xbm t :width 8 :height 8 :background "grey75" |
| 1432 | 'display unchecked 'follow-link t | 1443 | :foreground "black" :relief -2 :ascent 'center))) |
| 1433 | 'action (lambda (button) | 1444 | (insert-button |
| 1434 | (if (overlay-get button 'checked) | 1445 | " " :on-glyph checked :off-glyph unchecked 'checked nil |
| 1435 | (progn (overlay-put button 'checked nil) | 1446 | 'display unchecked 'follow-link t |
| 1436 | (overlay-put button 'display (overlay-get button :off-glyph)) | 1447 | 'action (lambda (button) |
| 1437 | (setq startup-screen-inhibit-startup-screen nil)) | 1448 | (if (overlay-get button 'checked) |
| 1438 | (overlay-put button 'checked t) | 1449 | (progn (overlay-put button 'checked nil) |
| 1439 | (overlay-put button 'display (overlay-get button :on-glyph)) | 1450 | (overlay-put button 'display (overlay-get button :off-glyph)) |
| 1440 | (setq startup-screen-inhibit-startup-screen t))))) | 1451 | (setq startup-screen-inhibit-startup-screen nil)) |
| 1441 | (fancy-splash-insert :face '(variable-pitch :height 0.9) | 1452 | (overlay-put button 'checked t) |
| 1442 | " Don't show this message again.")))) | 1453 | (overlay-put button 'display (overlay-get button :on-glyph)) |
| 1454 | (setq startup-screen-inhibit-startup-screen t))))) | ||
| 1455 | (fancy-splash-insert :face '(variable-pitch :height 0.9) | ||
| 1456 | " Don't show this message again."))))) | ||
| 1443 | 1457 | ||
| 1444 | (defun exit-splash-screen () | 1458 | (defun exit-splash-screen () |
| 1445 | "Stop displaying the splash screen buffer." | 1459 | "Stop displaying the splash screen buffer." |
| 1446 | (interactive) | 1460 | (interactive) |
| 1447 | (quit-window t)) | 1461 | (quit-window t)) |
| 1448 | 1462 | ||
| 1449 | (defun fancy-startup-screen (concise) | 1463 | (defun fancy-startup-screen (&optional concise) |
| 1450 | "Display fancy startup screen. | 1464 | "Display fancy startup screen. |
| 1451 | If CONCISE is non-nil, display a concise version of the splash | 1465 | If CONCISE is non-nil, display a concise version of the |
| 1452 | screen." | 1466 | splash screen in another window." |
| 1467 | (with-current-buffer (get-buffer-create "*GNU Emacs*") | ||
| 1468 | (let ((inhibit-read-only t)) | ||
| 1469 | (erase-buffer) | ||
| 1470 | (make-local-variable 'startup-screen-inhibit-startup-screen) | ||
| 1471 | (if pure-space-overflow | ||
| 1472 | (insert pure-space-overflow-message)) | ||
| 1473 | (unless concise | ||
| 1474 | (fancy-splash-head)) | ||
| 1475 | (dolist (text fancy-startup-text) | ||
| 1476 | (apply #'fancy-splash-insert text) | ||
| 1477 | (insert "\n")) | ||
| 1478 | (skip-chars-backward "\n") | ||
| 1479 | (delete-region (point) (point-max)) | ||
| 1480 | (insert "\n") | ||
| 1481 | (fancy-startup-tail concise)) | ||
| 1482 | (use-local-map splash-screen-keymap) | ||
| 1483 | (setq tab-width 22) | ||
| 1484 | (set-buffer-modified-p nil) | ||
| 1485 | (setq buffer-read-only t) | ||
| 1486 | (if (and view-read-only (not view-mode)) | ||
| 1487 | (view-mode-enter nil 'kill-buffer)) | ||
| 1488 | (goto-char (point-min))) | ||
| 1453 | (if (or (window-minibuffer-p) | 1489 | (if (or (window-minibuffer-p) |
| 1454 | (window-dedicated-p (selected-window))) | 1490 | (window-dedicated-p (selected-window))) |
| 1455 | (pop-to-buffer (current-buffer)) | 1491 | (pop-to-buffer (current-buffer))) |
| 1456 | (switch-to-buffer "*GNU Emacs*")) | 1492 | (if concise |
| 1457 | (let ((inhibit-read-only t)) | 1493 | (display-buffer (get-buffer "*GNU Emacs*")) |
| 1458 | (erase-buffer) | 1494 | (switch-to-buffer "*GNU Emacs*"))) |
| 1459 | (make-local-variable 'startup-screen-inhibit-startup-screen) | ||
| 1460 | (if pure-space-overflow | ||
| 1461 | (insert pure-space-overflow-message)) | ||
| 1462 | (unless concise | ||
| 1463 | (fancy-splash-head)) | ||
| 1464 | (dolist (text fancy-startup-text) | ||
| 1465 | (apply #'fancy-splash-insert text) | ||
| 1466 | (insert "\n")) | ||
| 1467 | (skip-chars-backward "\n") | ||
| 1468 | (delete-region (point) (point-max)) | ||
| 1469 | (insert "\n") | ||
| 1470 | (fancy-startup-tail)) | ||
| 1471 | (use-local-map splash-screen-keymap) | ||
| 1472 | (setq tab-width 22) | ||
| 1473 | (set-buffer-modified-p nil) | ||
| 1474 | (setq buffer-read-only t) | ||
| 1475 | (if (and view-read-only (not view-mode)) | ||
| 1476 | (view-mode-enter nil 'kill-buffer)) | ||
| 1477 | (goto-char (point-min))) | ||
| 1478 | 1495 | ||
| 1479 | (defun fancy-about-screen () | 1496 | (defun fancy-about-screen () |
| 1480 | "Display fancy About screen." | 1497 | "Display fancy About screen." |
| @@ -1842,10 +1859,10 @@ Type \\[describe-distribution] for information on ")) | |||
| 1842 | 1859 | ||
| 1843 | (defun startup-echo-area-message () | 1860 | (defun startup-echo-area-message () |
| 1844 | (if (eq (key-binding "\C-h\C-p") 'describe-project) | 1861 | (if (eq (key-binding "\C-h\C-p") 'describe-project) |
| 1845 | "For information about the GNU system and GNU/Linux, type C-h C-p." | 1862 | "For information about GNU Emacs and the GNU system, type C-h C-a." |
| 1846 | (substitute-command-keys | 1863 | (substitute-command-keys |
| 1847 | "For information about the GNU system and GNU/Linux, type \ | 1864 | "For information about GNU Emacs and the GNU system, type \ |
| 1848 | \\[describe-project]."))) | 1865 | \\[about-emacs]."))) |
| 1849 | 1866 | ||
| 1850 | 1867 | ||
| 1851 | (defun display-startup-echo-area-message () | 1868 | (defun display-startup-echo-area-message () |
| @@ -1881,14 +1898,14 @@ Type \\[describe-distribution] for information on ")) | |||
| 1881 | (kill-buffer buffer))))) | 1898 | (kill-buffer buffer))))) |
| 1882 | (message "%s" (startup-echo-area-message))))) | 1899 | (message "%s" (startup-echo-area-message))))) |
| 1883 | 1900 | ||
| 1884 | (defun display-startup-screen (concise) | 1901 | (defun display-startup-screen (&optional concise) |
| 1885 | "Display startup screen according to display. | 1902 | "Display startup screen according to display. |
| 1886 | A fancy display is used on graphic displays, normal otherwise. | 1903 | A fancy display is used on graphic displays, normal otherwise. |
| 1887 | 1904 | ||
| 1888 | If CONCISE is non-nil, display a concise version of the startup | 1905 | If CONCISE is non-nil, display a concise version of the startup |
| 1889 | screen." | 1906 | screen." |
| 1890 | ;; Prevent recursive calls from server-process-filter. | 1907 | ;; Prevent recursive calls from server-process-filter. |
| 1891 | (if (not (get-buffer "*About GNU Emacs*")) | 1908 | (if (not (get-buffer "*GNU Emacs*")) |
| 1892 | (if (use-fancy-splash-screens-p) | 1909 | (if (use-fancy-splash-screens-p) |
| 1893 | (fancy-startup-screen concise) | 1910 | (fancy-startup-screen concise) |
| 1894 | (normal-splash-screen t)))) | 1911 | (normal-splash-screen t)))) |
| @@ -1897,13 +1914,12 @@ screen." | |||
| 1897 | "Display the *About GNU Emacs* buffer. | 1914 | "Display the *About GNU Emacs* buffer. |
| 1898 | A fancy display is used on graphic displays, normal otherwise." | 1915 | A fancy display is used on graphic displays, normal otherwise." |
| 1899 | (interactive) | 1916 | (interactive) |
| 1900 | (if (not (get-buffer "*About GNU Emacs*")) | 1917 | (if (use-fancy-splash-screens-p) |
| 1901 | (if (use-fancy-splash-screens-p) | 1918 | (fancy-about-screen) |
| 1902 | (fancy-about-screen) | 1919 | (normal-splash-screen nil))) |
| 1903 | (normal-splash-screen nil)))) | ||
| 1904 | 1920 | ||
| 1905 | (defalias 'about-emacs 'display-about-screen) | 1921 | (defalias 'about-emacs 'display-about-screen) |
| 1906 | (defalias 'display-splash 'display-about-screen) | 1922 | (defalias 'display-splash-screen 'display-startup-screen) |
| 1907 | 1923 | ||
| 1908 | (defun command-line-1 (command-line-args-left) | 1924 | (defun command-line-1 (command-line-args-left) |
| 1909 | (display-startup-echo-area-message) | 1925 | (display-startup-echo-area-message) |
| @@ -1995,17 +2011,19 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 1995 | (funcall (cdr tem) argi))) | 2011 | (funcall (cdr tem) argi))) |
| 1996 | 2012 | ||
| 1997 | ((equal argi "-no-splash") | 2013 | ((equal argi "-no-splash") |
| 1998 | (setq inhibit-startup-message t)) | 2014 | (setq inhibit-startup-screen t)) |
| 1999 | 2015 | ||
| 2000 | ((member argi '("-f" ; what the manual claims | 2016 | ((member argi '("-f" ; what the manual claims |
| 2001 | "-funcall" | 2017 | "-funcall" |
| 2002 | "-e")) ; what the source used to say | 2018 | "-e")) ; what the source used to say |
| 2019 | (setq inhibit-startup-screen t) | ||
| 2003 | (setq tem (intern (or argval (pop command-line-args-left)))) | 2020 | (setq tem (intern (or argval (pop command-line-args-left)))) |
| 2004 | (if (commandp tem) | 2021 | (if (commandp tem) |
| 2005 | (command-execute tem) | 2022 | (command-execute tem) |
| 2006 | (funcall tem))) | 2023 | (funcall tem))) |
| 2007 | 2024 | ||
| 2008 | ((member argi '("-eval" "-execute")) | 2025 | ((member argi '("-eval" "-execute")) |
| 2026 | (setq inhibit-startup-screen t) | ||
| 2009 | (eval (read (or argval (pop command-line-args-left))))) | 2027 | (eval (read (or argval (pop command-line-args-left))))) |
| 2010 | 2028 | ||
| 2011 | ((member argi '("-L" "-directory")) | 2029 | ((member argi '("-L" "-directory")) |
| @@ -2037,6 +2055,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2037 | (load file-ex nil t t))) | 2055 | (load file-ex nil t t))) |
| 2038 | 2056 | ||
| 2039 | ((equal argi "-insert") | 2057 | ((equal argi "-insert") |
| 2058 | (setq inhibit-startup-screen t) | ||
| 2040 | (setq tem (or argval (pop command-line-args-left))) | 2059 | (setq tem (or argval (pop command-line-args-left))) |
| 2041 | (or (stringp tem) | 2060 | (or (stringp tem) |
| 2042 | (error "File name omitted from `-insert' option")) | 2061 | (error "File name omitted from `-insert' option")) |
| @@ -2065,6 +2084,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2065 | (nthcdr (nth 1 tem) command-line-args-left))) | 2084 | (nthcdr (nth 1 tem) command-line-args-left))) |
| 2066 | 2085 | ||
| 2067 | ((member argi '("-find-file" "-file" "-visit")) | 2086 | ((member argi '("-find-file" "-file" "-visit")) |
| 2087 | (setq inhibit-startup-screen t) | ||
| 2068 | ;; An explicit option to specify visiting a file. | 2088 | ;; An explicit option to specify visiting a file. |
| 2069 | (setq tem (or argval (pop command-line-args-left))) | 2089 | (setq tem (or argval (pop command-line-args-left))) |
| 2070 | (unless (stringp tem) | 2090 | (unless (stringp tem) |
| @@ -2097,6 +2117,8 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2097 | (progn | 2117 | (progn |
| 2098 | (if (string-match "\\`-" argi) | 2118 | (if (string-match "\\`-" argi) |
| 2099 | (error "Unknown option `%s'" argi)) | 2119 | (error "Unknown option `%s'" argi)) |
| 2120 | (unless initial-window-system | ||
| 2121 | (setq inhibit-startup-screen t)) | ||
| 2100 | (setq file-count (1+ file-count)) | 2122 | (setq file-count (1+ file-count)) |
| 2101 | (let ((file | 2123 | (let ((file |
| 2102 | (expand-file-name | 2124 | (expand-file-name |
| @@ -2123,7 +2145,7 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2123 | ((stringp initial-buffer-choice) | 2145 | ((stringp initial-buffer-choice) |
| 2124 | (find-file initial-buffer-choice)))) | 2146 | (find-file initial-buffer-choice)))) |
| 2125 | 2147 | ||
| 2126 | (if (or inhibit-splash-screen | 2148 | (if (or inhibit-startup-screen |
| 2127 | initial-buffer-choice | 2149 | initial-buffer-choice |
| 2128 | noninteractive | 2150 | noninteractive |
| 2129 | emacs-quick-startup) | 2151 | emacs-quick-startup) |
| @@ -2176,17 +2198,9 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2176 | (insert initial-scratch-message) | 2198 | (insert initial-scratch-message) |
| 2177 | (set-buffer-modified-p nil)))) | 2199 | (set-buffer-modified-p nil)))) |
| 2178 | 2200 | ||
| 2179 | (cond ((= file-count 0) | 2201 | (if (> file-count 0) |
| 2180 | (display-startup-screen nil)) | 2202 | (display-startup-screen t) |
| 2181 | ((or (= file-count 1) inhibit-startup-buffer-menu) | 2203 | (display-startup-screen nil))))) |
| 2182 | (let ((buf (current-buffer)) | ||
| 2183 | (first-window (get-buffer-window first-file-buffer))) | ||
| 2184 | (if first-window (select-window first-window)) | ||
| 2185 | (display-startup-screen t) | ||
| 2186 | (display-buffer buf))) | ||
| 2187 | (t | ||
| 2188 | (display-startup-screen t) | ||
| 2189 | (display-buffer (list-buffers-noselect))))))) | ||
| 2190 | 2204 | ||
| 2191 | (defun command-line-normalize-file-name (file) | 2205 | (defun command-line-normalize-file-name (file) |
| 2192 | "Collapse multiple slashes to one, to handle non-Emacs file names." | 2206 | "Collapse multiple slashes to one, to handle non-Emacs file names." |