Mercurial > emacs
comparison lisp/startup.el @ 37166:aa543a0e2c40
(fancy-splash-head): Use splash8.xpm for color
depth 8.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 03 Apr 2001 13:51:41 +0000 |
parents | 7159a50e6ef7 |
children | 58527e038324 |
comparison
equal
deleted
inserted
replaced
37165:32679fe3e196 | 37166:aa543a0e2c40 |
---|---|
1072 (setq args (cdr args))))) | 1072 (setq args (cdr args))))) |
1073 | 1073 |
1074 | 1074 |
1075 (defun fancy-splash-head () | 1075 (defun fancy-splash-head () |
1076 "Insert the head part of the splash screen into the current buffer." | 1076 "Insert the head part of the splash screen into the current buffer." |
1077 (let* ((img (create-image (or fancy-splash-image | 1077 (let* ((image-file (cond ((stringp fancy-splash-image) |
1078 (if (and (display-color-p) | 1078 fancy-splash-image) |
1079 (image-type-available-p 'xpm)) | 1079 ((and (display-color-p) |
1080 "splash.xpm" "splash.pbm")))) | 1080 (image-type-available-p 'xpm)) |
1081 (if (and (fboundp 'x-display-planes) | |
1082 (= (funcall 'x-display-planes) 8)) | |
1083 "splash8.xpm" | |
1084 "splash.xpm")) | |
1085 (t "splash.pbm"))) | |
1086 (img (create-image image-file)) | |
1081 (image-width (and img (car (image-size img)))) | 1087 (image-width (and img (car (image-size img)))) |
1082 (window-width (window-width (selected-window)))) | 1088 (window-width (window-width (selected-window)))) |
1083 (when img | 1089 (when img |
1084 (when (> window-width image-width) | 1090 (when (> window-width image-width) |
1085 ;; Center the image in the window. | 1091 ;; Center the image in the window. |
1142 | 1148 |
1143 | 1149 |
1144 (defun fancy-splash-default-action () | 1150 (defun fancy-splash-default-action () |
1145 "Default action for events in the splash screen buffer." | 1151 "Default action for events in the splash screen buffer." |
1146 (interactive) | 1152 (interactive) |
1147 (setq hansi last-nonmenu-event) | |
1148 (push last-command-event unread-command-events) | 1153 (push last-command-event unread-command-events) |
1149 (setq unread (copy-sequence unread-command-events)) | |
1150 (throw 'exit nil)) | 1154 (throw 'exit nil)) |
1151 | 1155 |
1152 | 1156 |
1153 (defun fancy-splash-screens () | 1157 (defun fancy-splash-screens () |
1154 "Display fancy splash screens when Emacs starts." | 1158 "Display fancy splash screens when Emacs starts." |
1175 #'fancy-splash-screens-1 | 1179 #'fancy-splash-screens-1 |
1176 splash-buffer)) | 1180 splash-buffer)) |
1177 (recursive-edit)) | 1181 (recursive-edit)) |
1178 (cancel-timer timer) | 1182 (cancel-timer timer) |
1179 (setq display-hourglass old-hourglass) | 1183 (setq display-hourglass old-hourglass) |
1180 (kill-buffer splash-buffer) | 1184 (kill-buffer splash-buffer))))) |
1181 (setq hansi2 last-nonmenu-event) | |
1182 )))) | |
1183 | 1185 |
1184 | 1186 |
1185 (defun use-fancy-splash-screens-p () | 1187 (defun use-fancy-splash-screens-p () |
1186 "Return t if fancy splash screens should be used." | 1188 "Return t if fancy splash screens should be used." |
1187 (when (or (and (display-color-p) | 1189 (when (or (and (display-color-p) |