From: Miles Bader Date: Tue, 31 Jul 2007 05:50:45 +0000 (+0000) Subject: Merge from emacs--devo--0 X-Git-Tag: emacs-pretest-23.0.90~11236^2~62 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/9899d01a0ccec166e04caa60657a44e614be50cd Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 824-838) - Update from CVS - Merge from emacs--rel--22 - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Fix void function definition error in cus-edit.el - Restore lisp/emacs-lisp/cl-loaddefs.el * emacs--rel--22 (patch 70-83) - Update from CVS - Remove lisp/erc/erc-nicklist.el - Update some .arch-inventory files - Indicate that emacs--devo--0--patch-834 does not need to be applied - Merge from gnus--rel--5.10 - Restore lisp/emacs-lisp/cl-loaddefs.el * gnus--rel--5.10 (patch 239-241) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--multi-tty--0--patch-28 --- 9899d01a0ccec166e04caa60657a44e614be50cd diff --cc lisp/frame.el index 925b61ce75,863524d8ad..cbb8de0571 --- a/lisp/frame.el +++ b/lisp/frame.el @@@ -614,24 -567,38 +610,54 @@@ The optional second argument PARAMETER (interactive "sMake frame on display: ") (or (string-match "\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" display) (error "Invalid display, not HOST:SERVER or HOST:SERVER.SCREEN")) - (make-frame (cons (cons 'display display) parameters))) + (when (and (boundp 'x-initialized) (not x-initialized)) + (setq x-display-name display) + (x-initialize-window-system)) + (make-frame `((window-system . x) (display . ,display) . ,parameters))) + +(defun make-frame-on-tty (tty type &optional parameters) + "Make a frame on terminal device TTY. +TTY should be the file name of the tty device to use. TYPE +should be the terminal type string of TTY, for example \"xterm\" +or \"vt100\". The optional third argument PARAMETERS specifies +additional frame parameters." + (interactive "fOpen frame on tty device: \nsTerminal type of %s: ") + (unless tty + (error "Invalid terminal device")) + (unless type + (error "Invalid terminal type")) + (make-frame `((window-system . nil) (tty . ,tty) (tty-type . ,type) . ,parameters))) + (defun close-display-connection (display) + "Close the connection to a display, deleting all its associated frames. + For DISPLAY, specify either a frame or a display name (a string). + If DISPLAY is nil, that stands for the selected frame's display." + (interactive + (list + (let* ((default (frame-parameter nil 'display)) + (display (completing-read + (format "Close display (default %s): " default) + (delete-dups + (mapcar (lambda (frame) + (frame-parameter frame 'display)) + (frame-list))) + nil t nil nil + default))) + (if (zerop (length display)) default display)))) + (let ((frames (delq nil + (mapcar (lambda (frame) + (if (equal display + (frame-parameter frame 'display)) + frame)) + (frame-list))))) + (if (and (consp frames) + (not (y-or-n-p (if (cdr frames) + (format "Delete %s frames? " (length frames)) + (format "Delete %s ? " (car frames)))))) + (error "Abort!") + (mapc 'delete-frame frames) + (x-close-connection display)))) + (defun make-frame-command () "Make a new frame, and select it if the terminal displays only one frame." (interactive) @@@ -733,32 -664,26 +759,32 @@@ setup is for focus to follow the pointe (defun minibuffer-frame-list () "Return a list of all frames with their own minibuffers." (filtered-frame-list - (function (lambda (frame) - (eq frame (window-frame (minibuffer-window frame))))))) + (lambda (frame) + (eq frame (window-frame (minibuffer-window frame)))))) -(defun frames-on-display-list (&optional display) - "Return a list of all frames on DISPLAY. -DISPLAY is a name of a display, a string of the form HOST:SERVER.SCREEN. -If DISPLAY is omitted or nil, it defaults to the selected frame's display." - (let* ((display (or display (frame-parameter nil 'display))) +(defun frames-on-display-list (&optional terminal) + "Return a list of all frames on TERMINAL. + +TERMINAL should be a terminal identifier (an integer), a frame, +or a name of an X display (a string of the form +HOST:SERVER.SCREEN). + +If TERMINAL is omitted or nil, it defaults to the selected +frame's terminal device." + (let* ((terminal (terminal-id terminal)) (func #'(lambda (frame) - (equal (frame-parameter frame 'display) display)))) + (eq (frame-terminal frame) terminal)))) (filtered-frame-list func))) -(defun framep-on-display (&optional display) - "Return the type of frames on DISPLAY. -DISPLAY may be a display name or a frame. If it is a frame, its type is -returned. -If DISPLAY is omitted or nil, it defaults to the selected frame's display. -All frames on a given display are of the same type." - (or (framep display) - (framep (car (frames-on-display-list display))))) +(defun framep-on-display (&optional terminal) + "Return the type of frames on TERMINAL. +TERMINAL may be a terminal id, a display name or a frame. If it +is a frame, its type is returned. If TERMINAL is omitted or nil, +it defaults to the selected frame's terminal device. All frames +on a given display are of the same type." + (or (terminal-live-p terminal) + (framep terminal) + (framep (car (frames-on-display-list terminal))))) (defun frame-remove-geometry-params (param-list) "Return the parameter list PARAM-LIST, but with geometry specs removed. diff --cc lisp/startup.el index 7cc6fdc3d0,184a242475..3ab65eba5d --- a/lisp/startup.el +++ b/lisp/startup.el @@@ -1566,21 -1563,20 +1566,20 @@@ Getting New Versions How to obtain the More Manuals / Ordering Manuals How to order printed manuals from the FSF ") (insert "\n\n" (emacs-version) - " - Copyright (C) 2007 Free Software Foundation, Inc.")) + "\n" emacs-copyright)) - ;; No mouse menus, so give help using kbd commands. - - ;; If keys have their default meanings, - ;; use precomputed string to save lots of time. - (if (and (eq (key-binding "\C-h") 'help-command) - (eq (key-binding "\C-xu") 'advertised-undo) - (eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs) - (eq (key-binding "\C-ht") 'help-with-tutorial) - (eq (key-binding "\C-hi") 'info) - (eq (key-binding "\C-hr") 'info-emacs-manual) - (eq (key-binding "\C-h\C-n") 'view-emacs-news)) - (insert " + ;; No mouse menus, so give help using kbd commands. + + ;; If keys have their default meanings, + ;; use precomputed string to save lots of time. + (if (and (eq (key-binding "\C-h") 'help-command) + (eq (key-binding "\C-xu") 'advertised-undo) + (eq (key-binding "\C-x\C-c") 'save-buffers-kill-terminal) + (eq (key-binding "\C-ht") 'help-with-tutorial) + (eq (key-binding "\C-hi") 'info) + (eq (key-binding "\C-hr") 'info-emacs-manual) + (eq (key-binding "\C-h\C-n") 'view-emacs-news)) + (insert " Get help C-h (Hold down CTRL and press h) Emacs manual C-h r Emacs tutorial C-h t Undo changes C-x u @@@ -1613,15 -1609,14 +1612,14 @@@ Activate menubar \\[tmm-menubar]")) \(`C-' means use the CTRL key. `M-' means use the Meta (or Alt) key. If you have no Meta key, you may instead type ESC followed by the character.)") - (insert "\n\n" (emacs-version) - " - Copyright (C) 2007 Free Software Foundation, Inc.") + (insert "\n\n" (emacs-version) + "\n" emacs-copyright) - (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) - (eq (key-binding "\C-h\C-d") 'describe-distribution) - (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) - (insert - "\n + (if (and (eq (key-binding "\C-h\C-c") 'describe-copying) + (eq (key-binding "\C-h\C-d") 'describe-distribution) + (eq (key-binding "\C-h\C-w") 'describe-no-warranty)) + (insert + "\n GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details. Emacs is Free Software--Free as in Freedom--so you can redistribute copies of Emacs and modify it; type C-h C-c to see the conditions. diff --cc src/w32term.h index 46d9614e47,d809992b8f..bd1a5ab2aa --- a/src/w32term.h +++ b/src/w32term.h @@@ -586,13 -587,13 +590,13 @@@ do { rect.right = x + nx; \ rect.bottom = y + ny; \ w32_fill_rect (f,hdc,pix,&rect); \ - } + } while (0) #define w32_clear_rect(f,hdc,lprect) \ -w32_fill_rect (f,hdc,f->output_data.x->background_pixel,lprect) + w32_fill_rect (f, hdc, FRAME_BACKGROUND_PIXEL (f), lprect) #define w32_clear_area(f,hdc,px,py,nx,ny) \ -w32_fill_area (f,hdc,f->output_data.x->background_pixel,px,py,nx,ny) + w32_fill_area (f, hdc, FRAME_BACKGROUND_PIXEL (f), px, py, nx, ny) extern struct font_info *w32_load_font (); extern void w32_unload_font ();