diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2007-01-01 17:38:32 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2007-01-01 17:38:32 +0000 |
commit | 65e86587ab836aaa86b12ce30b219bcb4fcbaa06 (patch) | |
tree | 7e13feee7387635f52df3613cf1bba4414781aab /lisp/startup.el | |
parent | 8c778e28bcf16b4baef6400a124ec2403941e940 (diff) | |
parent | 1fc8c92b50100da709c94a0faa47deed5603634f (diff) | |
download | emacs-65e86587ab836aaa86b12ce30b219bcb4fcbaa06.tar.gz |
Merged from emacs@sv.gnu.org.
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-536
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-537
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-538
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-539
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-540
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-541
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-542
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-543
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-544
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-545
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-546
Update from erc--emacs--22
* emacs@sv.gnu.org/emacs--devo--0--patch-547
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-548
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-549
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-550
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-551
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-552
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-553
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-554
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-555
erc-iswitchb: Temporarily enable iswitchb mode
* emacs@sv.gnu.org/emacs--devo--0--patch-556
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-557
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-558
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-559
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-560
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-561
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-562
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-563
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-564
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-565
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-566
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-567
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-568
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-569
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-570
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-571
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-572
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-573
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-574
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-575
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-576
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-577
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-578
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-579
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-580
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-581
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-582
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-583
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-584
Fix admin/quick-install-emacs to work with recent versions of autoconf
* emacs@sv.gnu.org/gnus--rel--5.10--patch-171
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-172
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-173
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-174
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-175
Update from CVS: lisp/legacy-gnus-agent.el: Add Copyright notice.
* emacs@sv.gnu.org/gnus--rel--5.10--patch-176
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-177
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-178
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-179
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-180
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-181
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-182
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-183
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-184
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-185
Merge from emacs--devo--0
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-590
Diffstat (limited to 'lisp/startup.el')
-rw-r--r-- | lisp/startup.el | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index 724329a7855..30d25900ad4 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1189,6 +1189,7 @@ Values less than twice `fancy-splash-delay' are ignored." (defvar fancy-splash-help-echo nil) (defvar fancy-splash-stop-time nil) (defvar fancy-splash-outer-buffer nil) +(defvar fancy-splash-last-input-event nil) (defun fancy-splash-insert (&rest args) "Insert text into the current buffer, with faces. @@ -1362,6 +1363,7 @@ mouse." splash-buffer (old-minor-mode-map-alist minor-mode-map-alist) (old-emulation-mode-map-alists emulation-mode-map-alists) + (old-special-event-map special-event-map) (frame (fancy-splash-frame)) timer) (save-selected-window @@ -1382,6 +1384,20 @@ mouse." (define-key map [mouse-movement] 'ignore) (define-key map [mode-line t] 'ignore) (define-key map [select-window] 'ignore) + ;; Temporarily bind special events to + ;; fancy-splash-special-event-action so as to stop + ;; displaying splash screens with such events. + ;; Otherwise, drag-n-drop into splash screens may + ;; leave us in recursive editing with invisible + ;; cursors for a while. + (setq special-event-map (make-sparse-keymap)) + (map-keymap + (lambda (key def) + (define-key special-event-map (vector key) + (if (eq def 'ignore) + 'ignore + 'fancy-splash-special-event-action))) + old-special-event-map) (setq display-hourglass nil minor-mode-map-alist nil emulation-mode-map-alists nil @@ -1398,11 +1414,18 @@ mouse." (cancel-timer timer) (setq display-hourglass old-hourglass minor-mode-map-alist old-minor-mode-map-alist - emulation-mode-map-alists old-emulation-mode-map-alists) + emulation-mode-map-alists old-emulation-mode-map-alists + special-event-map old-special-event-map) (kill-buffer splash-buffer) (when (frame-live-p frame) (select-frame frame) - (switch-to-buffer fancy-splash-outer-buffer)))))) + (switch-to-buffer fancy-splash-outer-buffer)) + (when fancy-splash-last-input-event + (setq last-input-event fancy-splash-last-input-event + fancy-splash-last-input-event nil) + (command-execute (lookup-key special-event-map + (vector last-input-event)) + nil (vector last-input-event) t)))))) ;; If hide-on-input is nil, don't hide the buffer on input. (if (or (window-minibuffer-p) (window-dedicated-p (selected-window))) @@ -1429,6 +1452,14 @@ Warning Warning!!! Pure space overflow !!!Warning Warning (view-mode-enter nil 'kill-buffer)) (goto-char (point-min))))) +(defun fancy-splash-special-event-action () + "Save the last event and stop displaying the splash screen buffer. +This is an internal function used to turn off the splash screen after +the user caused an input event that is bound in `special-event-map'" + (interactive) + (setq fancy-splash-last-input-event last-input-event) + (throw 'exit nil)) + (defun fancy-splash-frame () "Return the frame to use for the fancy splash screen. @@ -1454,9 +1485,12 @@ we put it on this frame." (if (and (display-color-p) (image-type-available-p 'xpm)) "splash.xpm" "splash.pbm")))) - (image-height (and img (cdr (image-size img)))) - (window-height (1- (window-height (frame-selected-window frame))))) - (> window-height (+ image-height 19))))))) + (image-height (and img (cdr (image-size img nil frame)))) + ;; We test frame-height so that, if the frame is split + ;; by displaying a warning, that doesn't cause the normal + ;; splash screen to be used. + (frame-height (1- (frame-height frame)))) + (> frame-height (+ image-height 19))))))) (defun normal-splash-screen (&optional hide-on-input) |