diff options
| author | Chong Yidong | 2007-10-12 18:56:00 +0000 |
|---|---|---|
| committer | Chong Yidong | 2007-10-12 18:56:00 +0000 |
| commit | 3d9d55e6fdf409d4d8c57f45edfda4ed82dc5dc8 (patch) | |
| tree | 0c1bb20c404da3c2e3c8caeae2aa4be6d54c2b31 | |
| parent | 34c10a587468baf784397ff790bc19baa4cbc7dc (diff) | |
| download | emacs-3d9d55e6fdf409d4d8c57f45edfda4ed82dc5dc8.tar.gz emacs-3d9d55e6fdf409d4d8c57f45edfda4ed82dc5dc8.zip | |
(fancy-startup-screen): Remove an unnecessary newline and some
leftover logic regarding dedicated frames. If showing concise startup
screen, fit window to buffer.
(command-line-1): If we will be using the splash screen, use find-file
instead of find-file-other-window to find additional files.
| -rw-r--r-- | lisp/startup.el | 71 |
1 files changed, 39 insertions, 32 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 51b12119956..35f2b7243da 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1450,7 +1450,7 @@ a face or button specification." | |||
| 1450 | 1450 | ||
| 1451 | (when concise | 1451 | (when concise |
| 1452 | (fancy-splash-insert | 1452 | (fancy-splash-insert |
| 1453 | :face 'variable-pitch "\n\n" | 1453 | :face 'variable-pitch "\n" |
| 1454 | :link '("Dismiss" (lambda (button) | 1454 | :link '("Dismiss" (lambda (button) |
| 1455 | (when startup-screen-inhibit-startup-screen | 1455 | (when startup-screen-inhibit-startup-screen |
| 1456 | (customize-set-variable 'inhibit-startup-screen t) | 1456 | (customize-set-variable 'inhibit-startup-screen t) |
| @@ -1490,34 +1490,39 @@ a face or button specification." | |||
| 1490 | "Display fancy startup screen. | 1490 | "Display fancy startup screen. |
| 1491 | If CONCISE is non-nil, display a concise version of the | 1491 | If CONCISE is non-nil, display a concise version of the |
| 1492 | splash screen in another window." | 1492 | splash screen in another window." |
| 1493 | (with-current-buffer (get-buffer-create "*GNU Emacs*") | 1493 | (let ((splash-buffer (get-buffer-create "*GNU Emacs*"))) |
| 1494 | (let ((inhibit-read-only t)) | 1494 | (with-current-buffer splash-buffer |
| 1495 | (erase-buffer) | 1495 | (let ((inhibit-read-only t)) |
| 1496 | (make-local-variable 'startup-screen-inhibit-startup-screen) | 1496 | (erase-buffer) |
| 1497 | (if pure-space-overflow | 1497 | (make-local-variable 'startup-screen-inhibit-startup-screen) |
| 1498 | (insert pure-space-overflow-message)) | 1498 | (if pure-space-overflow |
| 1499 | (unless concise | 1499 | (insert pure-space-overflow-message)) |
| 1500 | (fancy-splash-head)) | 1500 | (unless concise |
| 1501 | (dolist (text fancy-startup-text) | 1501 | (fancy-splash-head)) |
| 1502 | (apply #'fancy-splash-insert text) | 1502 | (dolist (text fancy-startup-text) |
| 1503 | (insert "\n")) | 1503 | (apply #'fancy-splash-insert text) |
| 1504 | (skip-chars-backward "\n") | 1504 | (insert "\n")) |
| 1505 | (delete-region (point) (point-max)) | 1505 | (skip-chars-backward "\n") |
| 1506 | (insert "\n") | 1506 | (delete-region (point) (point-max)) |
| 1507 | (fancy-startup-tail concise)) | 1507 | (insert "\n") |
| 1508 | (use-local-map splash-screen-keymap) | 1508 | (fancy-startup-tail concise)) |
| 1509 | (setq tab-width 22) | 1509 | (use-local-map splash-screen-keymap) |
| 1510 | (set-buffer-modified-p nil) | 1510 | (setq tab-width 22 |
| 1511 | (setq buffer-read-only t) | 1511 | buffer-read-only t) |
| 1512 | (if (and view-read-only (not view-mode)) | 1512 | (set-buffer-modified-p nil) |
| 1513 | (view-mode-enter nil 'kill-buffer)) | 1513 | (if (and view-read-only (not view-mode)) |
| 1514 | (goto-char (point-min))) | 1514 | (view-mode-enter nil 'kill-buffer)) |
| 1515 | (if (or (window-minibuffer-p) | 1515 | (goto-char (point-max))) |
| 1516 | (window-dedicated-p (selected-window))) | 1516 | (if concise |
| 1517 | (pop-to-buffer (current-buffer))) | 1517 | (progn |
| 1518 | (if concise | 1518 | (display-buffer splash-buffer) |
| 1519 | (display-buffer (get-buffer "*GNU Emacs*")) | 1519 | ;; If the splash screen is in a split window, fit it. |
| 1520 | (switch-to-buffer "*GNU Emacs*"))) | 1520 | (let ((window (get-buffer-window splash-buffer t))) |
| 1521 | (or (null window) | ||
| 1522 | (eq window (selected-window)) | ||
| 1523 | (eq window (next-window window)) | ||
| 1524 | (fit-window-to-buffer window)))) | ||
| 1525 | (switch-to-buffer splash-buffer)))) | ||
| 1521 | 1526 | ||
| 1522 | (defun fancy-about-screen () | 1527 | (defun fancy-about-screen () |
| 1523 | "Display fancy About screen." | 1528 | "Display fancy About screen." |
| @@ -2150,9 +2155,11 @@ A fancy display is used on graphic displays, normal otherwise." | |||
| 2150 | (expand-file-name | 2155 | (expand-file-name |
| 2151 | (command-line-normalize-file-name orig-argi) | 2156 | (command-line-normalize-file-name orig-argi) |
| 2152 | dir))) | 2157 | dir))) |
| 2153 | (if (= file-count 1) | 2158 | (cond ((= file-count 1) |
| 2154 | (setq first-file-buffer (find-file file)) | 2159 | (setq first-file-buffer (find-file file))) |
| 2155 | (find-file-other-window file))) | 2160 | (inhibit-startup-screen |
| 2161 | (find-file-other-window file)) | ||
| 2162 | (t (find-file file)))) | ||
| 2156 | (or (zerop line) | 2163 | (or (zerop line) |
| 2157 | (goto-line line)) | 2164 | (goto-line line)) |
| 2158 | (setq line 0) | 2165 | (setq line 0) |