diff options
| author | Karoly Lorentey | 2006-03-21 22:32:30 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2006-03-21 22:32:30 +0000 |
| commit | f1be5774242454844bf21fbf32e0f6541e2add34 (patch) | |
| tree | d72a1267464d97e61fe2511c4e525b9ce26ce926 | |
| parent | b336ee388ed5300440e7bab24bf9eec9f250911a (diff) | |
| download | emacs-f1be5774242454844bf21fbf32e0f6541e2add34.tar.gz emacs-f1be5774242454844bf21fbf32e0f6541e2add34.zip | |
Let the Emacs server recognize `inhibit-startup-echo-area-message'. (Reported by Han Boetes.)
* lisp/startup.el (display-startup-echo-area-message):
Handle `inhibit-startup-echo-area-message' here.
(command-line-1): Moved from here.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-533
| -rw-r--r-- | lisp/startup.el | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index a3bf7e9f0e7..1e7032efe44 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1549,7 +1549,45 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1549 | 1549 | ||
| 1550 | (defun display-startup-echo-area-message () | 1550 | (defun display-startup-echo-area-message () |
| 1551 | (let ((resize-mini-windows t)) | 1551 | (let ((resize-mini-windows t)) |
| 1552 | (message "%s" (startup-echo-area-message)))) | 1552 | (or noninteractive ;(input-pending-p) init-file-had-error |
| 1553 | ;; t if the init file says to inhibit the echo area startup message. | ||
| 1554 | (and inhibit-startup-echo-area-message | ||
| 1555 | user-init-file | ||
| 1556 | (or (and (get 'inhibit-startup-echo-area-message 'saved-value) | ||
| 1557 | (equal inhibit-startup-echo-area-message | ||
| 1558 | (if (equal init-file-user "") | ||
| 1559 | (user-login-name) | ||
| 1560 | init-file-user))) | ||
| 1561 | ;; Wasn't set with custom; see if .emacs has a setq. | ||
| 1562 | (let ((buffer (get-buffer-create " *temp*"))) | ||
| 1563 | (prog1 | ||
| 1564 | (condition-case nil | ||
| 1565 | (save-excursion | ||
| 1566 | (set-buffer buffer) | ||
| 1567 | (insert-file-contents user-init-file) | ||
| 1568 | (re-search-forward | ||
| 1569 | (concat | ||
| 1570 | "([ \t\n]*setq[ \t\n]+" | ||
| 1571 | "inhibit-startup-echo-area-message[ \t\n]+" | ||
| 1572 | (regexp-quote | ||
| 1573 | (prin1-to-string | ||
| 1574 | (if (equal init-file-user "") | ||
| 1575 | (user-login-name) | ||
| 1576 | init-file-user))) | ||
| 1577 | "[ \t\n]*)") | ||
| 1578 | nil t)) | ||
| 1579 | (error nil)) | ||
| 1580 | (kill-buffer buffer))))) | ||
| 1581 | ;; display-splash-screen at the end of command-line-1 calls | ||
| 1582 | ;; use-fancy-splash-screens-p. This can cause image.el to be | ||
| 1583 | ;; loaded, putting "Loading image... done" in the echo area. | ||
| 1584 | ;; This hides startup-echo-area-message. So | ||
| 1585 | ;; use-fancy-splash-screens-p is called here simply to get the | ||
| 1586 | ;; loading of image.el (if needed) out of the way before | ||
| 1587 | ;; display-startup-echo-area-message runs. | ||
| 1588 | (progn | ||
| 1589 | (use-fancy-splash-screens-p) | ||
| 1590 | (message "%s" (startup-echo-area-message)))))) | ||
| 1553 | 1591 | ||
| 1554 | 1592 | ||
| 1555 | (defun display-splash-screen () | 1593 | (defun display-splash-screen () |
| @@ -1564,45 +1602,7 @@ normal otherwise." | |||
| 1564 | (normal-splash-screen)))) | 1602 | (normal-splash-screen)))) |
| 1565 | 1603 | ||
| 1566 | (defun command-line-1 (command-line-args-left) | 1604 | (defun command-line-1 (command-line-args-left) |
| 1567 | (or noninteractive (input-pending-p) init-file-had-error | 1605 | (display-startup-echo-area-message) |
| 1568 | ;; t if the init file says to inhibit the echo area startup message. | ||
| 1569 | (and inhibit-startup-echo-area-message | ||
| 1570 | user-init-file | ||
| 1571 | (or (and (get 'inhibit-startup-echo-area-message 'saved-value) | ||
| 1572 | (equal inhibit-startup-echo-area-message | ||
| 1573 | (if (equal init-file-user "") | ||
| 1574 | (user-login-name) | ||
| 1575 | init-file-user))) | ||
| 1576 | ;; Wasn't set with custom; see if .emacs has a setq. | ||
| 1577 | (let ((buffer (get-buffer-create " *temp*"))) | ||
| 1578 | (prog1 | ||
| 1579 | (condition-case nil | ||
| 1580 | (save-excursion | ||
| 1581 | (set-buffer buffer) | ||
| 1582 | (insert-file-contents user-init-file) | ||
| 1583 | (re-search-forward | ||
| 1584 | (concat | ||
| 1585 | "([ \t\n]*setq[ \t\n]+" | ||
| 1586 | "inhibit-startup-echo-area-message[ \t\n]+" | ||
| 1587 | (regexp-quote | ||
| 1588 | (prin1-to-string | ||
| 1589 | (if (equal init-file-user "") | ||
| 1590 | (user-login-name) | ||
| 1591 | init-file-user))) | ||
| 1592 | "[ \t\n]*)") | ||
| 1593 | nil t)) | ||
| 1594 | (error nil)) | ||
| 1595 | (kill-buffer buffer))))) | ||
| 1596 | ;; display-splash-screen at the end of command-line-1 calls | ||
| 1597 | ;; use-fancy-splash-screens-p. This can cause image.el to be | ||
| 1598 | ;; loaded, putting "Loading image... done" in the echo area. | ||
| 1599 | ;; This hides startup-echo-area-message. So | ||
| 1600 | ;; use-fancy-splash-screens-p is called here simply to get the | ||
| 1601 | ;; loading of image.el (if needed) out of the way before | ||
| 1602 | ;; display-startup-echo-area-message runs. | ||
| 1603 | (progn | ||
| 1604 | (use-fancy-splash-screens-p) | ||
| 1605 | (display-startup-echo-area-message))) | ||
| 1606 | 1606 | ||
| 1607 | ;; Delay 2 seconds after an init file error message | 1607 | ;; Delay 2 seconds after an init file error message |
| 1608 | ;; was displayed, so user can read it. | 1608 | ;; was displayed, so user can read it. |