diff options
| author | Gerd Moellmann | 2000-09-20 10:56:02 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2000-09-20 10:56:02 +0000 |
| commit | 499393791f8b47e873e8f9568b220a6ab151de79 (patch) | |
| tree | d57607984acbee1b56bfafdbd507b73bbc356a07 | |
| parent | 3a1355e5adb2b5708eb6137307d3f02b396b5d57 (diff) | |
| download | emacs-499393791f8b47e873e8f9568b220a6ab151de79.tar.gz emacs-499393791f8b47e873e8f9568b220a6ab151de79.zip | |
(fancy-splash-head): If frame's background mode
is `dark', change the black background of the image to gray.
(fancy-splash-screens): Display startup echo area message.
(display-startup-echo-area-message): New function.
(command-line-1): Use it.
| -rw-r--r-- | lisp/ChangeLog | 7 | ||||
| -rw-r--r-- | lisp/startup.el | 83 |
2 files changed, 52 insertions, 38 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3193204c32f..26b141c4e14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2000-09-20 Gerd Moellmann <gerd@gnu.org> | ||
| 2 | |||
| 3 | * startup.el (fancy-splash-head): If frame's background mode | ||
| 4 | is `dark', change the black background of the image to gray. | ||
| 5 | (fancy-splash-screens): Display startup echo area message. | ||
| 6 | (display-startup-echo-area-message): New function. | ||
| 7 | |||
| 1 | 2000-09-20 Miles Bader <miles@lsi.nec.co.jp> | 8 | 2000-09-20 Miles Bader <miles@lsi.nec.co.jp> |
| 2 | 9 | ||
| 3 | * faces.el (mode-line, tool-bar): Merge entries for `x' and `w32'. | 10 | * faces.el (mode-line, tool-bar): Merge entries for `x' and `w32'. |
diff --git a/lisp/startup.el b/lisp/startup.el index cacde7396d7..717409a7e6a 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -880,13 +880,13 @@ Each element in the list should be a list of strings or pairs | |||
| 880 | 880 | ||
| 881 | 881 | ||
| 882 | (defcustom fancy-splash-delay 5 | 882 | (defcustom fancy-splash-delay 5 |
| 883 | "Delay in seconds between splash screens." | 883 | "*Delay in seconds between splash screens." |
| 884 | :group 'fancy-splash-screen | 884 | :group 'fancy-splash-screen |
| 885 | :type 'integer) | 885 | :type 'integer) |
| 886 | 886 | ||
| 887 | 887 | ||
| 888 | (defcustom fancy-splash-image "splash.xpm" | 888 | (defcustom fancy-splash-image "splash.xpm" |
| 889 | "The image to show in the splash screens." | 889 | "*The image to show in the splash screens." |
| 890 | :group 'fancy-splash-screen | 890 | :group 'fancy-splash-screen |
| 891 | :type 'file) | 891 | :type 'file) |
| 892 | 892 | ||
| @@ -913,6 +913,8 @@ where FACE is a valid face specification, as it can be used with | |||
| 913 | (when (> window-width image-width) | 913 | (when (> window-width image-width) |
| 914 | (let ((pos (/ (- window-width image-width) 2))) | 914 | (let ((pos (/ (- window-width image-width) 2))) |
| 915 | (insert (propertize " " 'display `(space :align-to ,pos)))) | 915 | (insert (propertize " " 'display `(space :align-to ,pos)))) |
| 916 | (when (eq (frame-parameter nil 'background-mode) 'dark) | ||
| 917 | (setq img (append img '(:color-symbols (("#000000" . "gray")))))) | ||
| 916 | (insert-image img) | 918 | (insert-image img) |
| 917 | (insert "\n")))) | 919 | (insert "\n")))) |
| 918 | (when (eq system-type 'gnu/linux) | 920 | (when (eq system-type 'gnu/linux) |
| @@ -946,6 +948,7 @@ where FACE is a valid face specification, as it can be used with | |||
| 946 | (fancy-splash-head) | 948 | (fancy-splash-head) |
| 947 | (apply #'fancy-splash-insert (car texts)) | 949 | (apply #'fancy-splash-insert (car texts)) |
| 948 | (fancy-splash-tail) | 950 | (fancy-splash-tail) |
| 951 | (display-startup-echo-area-message) | ||
| 949 | (goto-char (point-min)) | 952 | (goto-char (point-min)) |
| 950 | (set-buffer-modified-p nil) | 953 | (set-buffer-modified-p nil) |
| 951 | (force-mode-line-update) | 954 | (force-mode-line-update) |
| @@ -955,39 +958,42 @@ where FACE is a valid face specification, as it can be used with | |||
| 955 | (erase-buffer))) | 958 | (erase-buffer))) |
| 956 | 959 | ||
| 957 | 960 | ||
| 961 | (defun display-startup-echo-area-message () | ||
| 962 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) | ||
| 963 | "For information about the GNU Project and its goals, type C-h C-p." | ||
| 964 | (substitute-command-keys | ||
| 965 | "For information about the GNU Project and its goals, type \\[describe-project].")))) | ||
| 966 | |||
| 958 | (defun command-line-1 (command-line-args-left) | 967 | (defun command-line-1 (command-line-args-left) |
| 959 | (or noninteractive (input-pending-p) init-file-had-error | 968 | (or noninteractive (input-pending-p) init-file-had-error |
| 960 | (and inhibit-startup-echo-area-message | 969 | (and inhibit-startup-echo-area-message |
| 961 | user-init-file | 970 | user-init-file |
| 962 | (or (and (get 'inhibit-startup-echo-area-message 'saved-value) | 971 | (or (and (get 'inhibit-startup-echo-area-message 'saved-value) |
| 963 | (equal inhibit-startup-echo-area-message | 972 | (equal inhibit-startup-echo-area-message |
| 964 | (if (string= init-file-user "") | 973 | (if (string= init-file-user "") |
| 965 | (user-login-name) | 974 | (user-login-name) |
| 966 | init-file-user))) | 975 | init-file-user))) |
| 967 | ;; Wasn't set with custom; see if .emacs has a setq. | 976 | ;; Wasn't set with custom; see if .emacs has a setq. |
| 968 | (let ((buffer (get-buffer-create " *temp*"))) | 977 | (let ((buffer (get-buffer-create " *temp*"))) |
| 969 | (prog1 | 978 | (prog1 |
| 970 | (condition-case nil | 979 | (condition-case nil |
| 971 | (save-excursion | 980 | (save-excursion |
| 972 | (set-buffer buffer) | 981 | (set-buffer buffer) |
| 973 | (insert-file-contents user-init-file) | 982 | (insert-file-contents user-init-file) |
| 974 | (re-search-forward | 983 | (re-search-forward |
| 975 | (concat | 984 | (concat |
| 976 | "([ \t\n]*setq[ \t\n]+" | 985 | "([ \t\n]*setq[ \t\n]+" |
| 977 | "inhibit-startup-echo-area-message[ \t\n]+" | 986 | "inhibit-startup-echo-area-message[ \t\n]+" |
| 978 | (regexp-quote | 987 | (regexp-quote |
| 979 | (prin1-to-string | 988 | (prin1-to-string |
| 980 | (if (string= init-file-user "") | 989 | (if (string= init-file-user "") |
| 981 | (user-login-name) | 990 | (user-login-name) |
| 982 | init-file-user))) | 991 | init-file-user))) |
| 983 | "[ \t\n]*)") | 992 | "[ \t\n]*)") |
| 984 | nil t)) | 993 | nil t)) |
| 985 | (error nil)) | 994 | (error nil)) |
| 986 | (kill-buffer buffer))))) | 995 | (kill-buffer buffer))))) |
| 987 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) | 996 | (display-startup-echo-area-message)) |
| 988 | "For information about the GNU Project and its goals, type C-h C-p." | ||
| 989 | (substitute-command-keys | ||
| 990 | "For information about the GNU Project and its goals, type \\[describe-project].")))) | ||
| 991 | (if (null command-line-args-left) | 997 | (if (null command-line-args-left) |
| 992 | (cond ((and (not inhibit-startup-message) (not noninteractive) | 998 | (cond ((and (not inhibit-startup-message) (not noninteractive) |
| 993 | ;; Don't clobber a non-scratch buffer if init file | 999 | ;; Don't clobber a non-scratch buffer if init file |
| @@ -1048,7 +1054,7 @@ Copying Conditions Conditions for redistributing and changing Emacs. | |||
| 1048 | Getting New Versions How to obtain the latest version of Emacs. | 1054 | Getting New Versions How to obtain the latest version of Emacs. |
| 1049 | ") | 1055 | ") |
| 1050 | (insert "\n\n" (emacs-version) | 1056 | (insert "\n\n" (emacs-version) |
| 1051 | " | 1057 | " |
| 1052 | Copyright (C) 2000 Free Software Foundation, Inc."))) | 1058 | Copyright (C) 2000 Free Software Foundation, Inc."))) |
| 1053 | ;; If keys have their default meanings, | 1059 | ;; If keys have their default meanings, |
| 1054 | ;; use precomputed string to save lots of time. | 1060 | ;; use precomputed string to save lots of time. |
| @@ -1083,8 +1089,8 @@ Activate menubar F10 or ESC ` or M-`") | |||
| 1083 | (insert (substitute-command-keys " | 1089 | (insert (substitute-command-keys " |
| 1084 | Activate menubar \\[tmm-menubar]"))) | 1090 | Activate menubar \\[tmm-menubar]"))) |
| 1085 | 1091 | ||
| 1086 | ;; Windows and MSDOS (currently) do not count as | 1092 | ;; Windows and MSDOS (currently) do not count as |
| 1087 | ;; window systems, but do have mouse support. | 1093 | ;; window systems, but do have mouse support. |
| 1088 | (if window-system | 1094 | (if window-system |
| 1089 | (insert " | 1095 | (insert " |
| 1090 | Mode-specific menu C-mouse-3 (third button, with CTRL)")) | 1096 | Mode-specific menu C-mouse-3 (third button, with CTRL)")) |
| @@ -1144,7 +1150,7 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1144 | (file-count 0) | 1150 | (file-count 0) |
| 1145 | first-file-buffer | 1151 | first-file-buffer |
| 1146 | tem | 1152 | tem |
| 1147 | just-files ;; t if this follows the magic -- option. | 1153 | just-files;; t if this follows the magic -- option. |
| 1148 | ;; This includes our standard options' long versions | 1154 | ;; This includes our standard options' long versions |
| 1149 | ;; and long versions of what's on command-switch-alist. | 1155 | ;; and long versions of what's on command-switch-alist. |
| 1150 | (longopts | 1156 | (longopts |
| @@ -1203,7 +1209,7 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1203 | (funcall (cdr tem) argi)) | 1209 | (funcall (cdr tem) argi)) |
| 1204 | (funcall (cdr tem) argi))) | 1210 | (funcall (cdr tem) argi))) |
| 1205 | 1211 | ||
| 1206 | ((or (string-equal argi "-f") ;what the manual claims | 1212 | ((or (string-equal argi "-f") ;what the manual claims |
| 1207 | (string-equal argi "-funcall") | 1213 | (string-equal argi "-funcall") |
| 1208 | (string-equal argi "-e")) ; what the source used to say | 1214 | (string-equal argi "-e")) ; what the source used to say |
| 1209 | (if argval | 1215 | (if argval |
| @@ -1322,6 +1328,7 @@ Type \\[describe-distribution] for information on getting the latest version.")) | |||
| 1322 | (progn (other-window 1) | 1328 | (progn (other-window 1) |
| 1323 | (buffer-menu))))))) | 1329 | (buffer-menu))))))) |
| 1324 | 1330 | ||
| 1331 | |||
| 1325 | (defun command-line-normalize-file-name (file) | 1332 | (defun command-line-normalize-file-name (file) |
| 1326 | "Collapse multiple slashes to one, to handle non-Emacs file names." | 1333 | "Collapse multiple slashes to one, to handle non-Emacs file names." |
| 1327 | (save-match-data | 1334 | (save-match-data |