Mercurial > emacs
changeset 83180:e657dca8261e
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-461
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-462
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-463
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-220
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Thu, 22 Jul 2004 22:01:29 +0000 |
parents | 3864ee1088e9 (current diff) 9dce5e8bf384 (diff) |
children | 159920fd1024 |
files | lisp/ChangeLog lisp/frame.el man/ChangeLog src/dispnew.c src/keyboard.c src/macterm.c src/process.c src/sysdep.c src/window.c src/window.h src/xdisp.c |
diffstat | 28 files changed, 424 insertions(+), 202 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Jul 18 21:49:24 2004 +0000 +++ b/lisp/ChangeLog Thu Jul 22 22:01:29 2004 +0000 @@ -1,3 +1,28 @@ +2004-07-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> + + * printing.el: Doc fix. + +2004-07-20 Luc Teirlinck <teirllm@auburn.edu> + + * frame.el (modify-all-frames-parameters): Minor doc fix. + +2004-07-20 Richard M. Stallman <rms@gnu.org> + + * textmodes/fill.el (fill-comment-paragraph): Handle indent-tabs-mode. + (fill-delete-newlines): Call sentence-end as function. + (fill-nobreak-p, canonically-space-region): Likewise. + (fill-nobreak-p): If this break point is at the end of the line, + don't consider the newline which follows as a reason to return t. + +2004-07-19 John Paul Wallington <jpw@gnu.org> + + * dired-aux.el (dired-file-set-difference): Don't use `caddr'. + +2004-07-18 Luc Teirlinck <teirllm@auburn.edu> + + * dired-aux.el (dired-do-kill-lines): Expand docstring. + Delete irrelevant code. + 2004-07-17 Kai Grossjohann <kai.grossjohann@gmx.net> * net/tramp.el (tramp-handle-verify-visited-file-modtime): New
--- a/lisp/dired-aux.el Sun Jul 18 21:49:24 2004 +0000 +++ b/lisp/dired-aux.el Thu Jul 22 22:01:29 2004 +0000 @@ -163,8 +163,8 @@ (unless (let ((list list2)) (while (and list (not (let* ((file2 (car list)) - (fa1 (caddr file1)) - (fa2 (caddr file2)) + (fa1 (car (cddr file1))) + (fa2 (car (cddr file2))) (size1 (nth 7 fa1)) (size2 (nth 7 fa2)) (mtime1 (float-time (nth 5 fa1))) @@ -627,9 +627,14 @@ (defun dired-do-kill-lines (&optional arg fmt) "Kill all marked lines (not the files). With a prefix argument, kill that many lines starting with the current line. -\(A negative argument kills lines before the current line.) -To kill an entire subdirectory, go to its directory header line -and use this command with a prefix argument (the value does not matter)." +\(A negative argument kills backward.) +If you use this command with a prefix argument to kill the line +for a file that is a directory, which you have inserted in the +Dired buffer as a subdirectory, then it deletes that subdirectory +from the buffer as well. +To kill an entire subdirectory \(without killing its line in the +parent directory), go to its directory header line and use this +command with a prefix argument (the value does not matter)." ;; Returns count of killed lines. FMT="" suppresses message. (interactive "P") (if arg @@ -638,23 +643,14 @@ (dired-kill-line arg)) (save-excursion (goto-char (point-min)) - (let (buffer-read-only (count 0)) - (if (not arg) ; kill marked lines - (let ((regexp (dired-marker-regexp))) - (while (and (not (eobp)) - (re-search-forward regexp nil t)) - (setq count (1+ count)) - (delete-region (progn (beginning-of-line) (point)) - (progn (forward-line 1) (point))))) - ;; else kill unmarked lines - (while (not (eobp)) - (if (or (dired-between-files) - (not (looking-at "^ "))) - (forward-line 1) - (setq count (1+ count)) - (delete-region (point) (save-excursion - (forward-line 1) - (point)))))) + (let (buffer-read-only + (count 0) + (regexp (dired-marker-regexp))) + (while (and (not (eobp)) + (re-search-forward regexp nil t)) + (setq count (1+ count)) + (delete-region (progn (beginning-of-line) (point)) + (progn (forward-line 1) (point)))) (or (equal "" fmt) (message (or fmt "Killed %d line%s.") count (dired-plural-s count))) count))))
--- a/lisp/frame.el Sun Jul 18 21:49:24 2004 +0000 +++ b/lisp/frame.el Thu Jul 22 22:01:29 2004 +0000 @@ -532,7 +532,7 @@ ;;;; Creation of additional frames, and other frame miscellanea (defun modify-all-frames-parameters (alist) - "modify all current and future frames parameters according to ALIST. + "Modify all current and future frames parameters according to ALIST. This changes `default-frame-alist' and possibly `initial-frame-alist'. See help of `modify-frame-parameters' for more information." (let (element) ;; temp
--- a/lisp/printing.el Sun Jul 18 21:49:24 2004 +0000 +++ b/lisp/printing.el Thu Jul 22 22:01:29 2004 +0000 @@ -5,7 +5,7 @@ ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> -;; Time-stamp: <2004/07/12 21:10:35 vinicius> +;; Time-stamp: <2004/07/20 21:44:43 vinicius> ;; Keywords: wp, print, PostScript ;; Version: 6.8 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ @@ -40,23 +40,36 @@ ;; Introduction ;; ------------ ;; -;; This package provides an user interface to some printing utilities that -;; includes previewing/printing a PostScript file, printing a text file and -;; previewing/printing some major modes (like mh-folder-mode, -;; rmail-summary-mode, gnus-summary-mode, etc). It also includes a -;; PostScript/text printer database. -;; -;; Indeed, there are two user interfaces: +;; With `printing' you can preview or print a PostScript file. You can also +;; print a text file using PostScript, and preview or print buffers that use +;; certain special modes like mh-folder-mode, rmail-summary-mode, +;; gnus-summary-mode, etc. This package also includes a PostScript/text +;; printer database. +;; +;; There are two user interfaces: ;; ;; * Menu interface: -;; When `printing' is loaded, the menubar is modified to use `printing' -;; menu instead of the print options in menubar. +;; The `printing' menu replaces the usual print options in the menu bar. ;; This is the default user interface. ;; ;; * Buffer interface: -;; It is an option of `printing' menu, but it can be binded into another -;; key, so user can activate the buffer interface directly without using -;; a menu. See `pr-interface' command. +;; You can use a buffer interface instead of menus. It looks like a +;; customization buffer. Basically, it has the same options found in the +;; menu and some extra options, all this on a buffer. +;; +;; `printing' is prepared to run on GNU, Unix and NT systems. +;; On GNU or Unix system, `printing' depends on gs and gv utilities. +;; On NT system, `printing' depends on gstools (gswin32.exe and gsview32.exe). +;; To obtain ghostscript, ghostview and GSview see the URL +;; `http://www.gnu.org/software/ghostscript/ghostscript.html'. +;; +;; `printing' depends on ps-print package to generate PostScript files, to +;; spool and to despool PostScript buffer. So, `printing' provides an +;; interface to ps-print package and it also provides some extra stuff. +;; +;; To download the latest ps-print package see +;; `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz'. +;; Please, see README file for ps-print installation instructions. ;; ;; `printing' was inspired on: ;; @@ -72,20 +85,6 @@ ;; ps-print-interface.el Volker Franz <volker.franz@tuebingen.mpg.de> ;; Graphical front end for ps-print and previewing ;; -;; `printing' is prepared to run on GNU, Unix and NT systems. -;; On GNU or Unix system, `printing' depends on gs and gv utilities. -;; On NT system, `printing' depends on gstools (gswin32.exe and gsview32.exe). -;; To obtain ghostscript, ghostview and GSview see the URL -;; `http://www.gnu.org/software/ghostscript/ghostscript.html'. -;; -;; `printing' depends on ps-print package to generate PostScript files, to -;; spool and to despool PostScript buffer. So, `printing' provides an -;; interface to ps-print package and it also provides some extra stuff. -;; -;; To download the latest ps-print package see -;; `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz'. -;; Please, see README file for ps-print installation instructions. -;; ;; ;; Log Messages ;; ------------
--- a/lisp/textmodes/fill.el Sun Jul 18 21:49:24 2004 +0000 +++ b/lisp/textmodes/fill.el Thu Jul 22 22:01:29 2004 +0000 @@ -353,7 +353,12 @@ ;; Don't split a line if the rest would look like a new paragraph. (unless use-hard-newlines (save-excursion - (skip-chars-forward " \t") (looking-at paragraph-start))) + (skip-chars-forward " \t") + ;; If this break point is at the end of the line, + ;; which can occur for auto-fill, don't consider the newline + ;; which follows as a reason to return t. + (and (not (eolp)) + (looking-at paragraph-start)))) (run-hook-with-args-until-success 'fill-nobreak-predicate))))) ;; Put `fill-find-break-point-function' property to charsets which
--- a/lispref/ChangeLog Sun Jul 18 21:49:24 2004 +0000 +++ b/lispref/ChangeLog Thu Jul 22 22:01:29 2004 +0000 @@ -1,3 +1,24 @@ +2004-07-19 Luc Teirlinck <teirllm@auburn.edu> + + * windows.texi: Various small changes in addition to: + (Window Point): Mention return value of `set-window-point'. + (Window Start): `pos-visible-in-window-p' disregards horizontal + scrolling. Explain return value if PARTIALLY is non-nil. + (Vertical Scrolling): Mention PIXELS-P argument to `window-vscroll' + and `set-window-vscroll'. + (Size of Window): The argument WINDOW to `window-inside-edges', + `window-pixel-edges' and `window-inside-pixel-edges' is optional. + (Resizing Windows): Explain return value of + `shrink-window-if-larger-than-buffer'. + `window-size-fixed' automatically becomes buffer local when set. + (Window Configurations): Explain return value of + `set-window-configuration'. + + * minibuf.texi (Minibuffer Misc): Add anchor for + `minibuffer-scroll-window'. + + * positions.texi (Text Lines): Add anchor for `count-lines'. + 2004-07-17 Richard M. Stallman <rms@gnu.org> * display.texi (Overlay Properties): Adding `evaporate' prop
--- a/lispref/minibuf.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/lispref/minibuf.texi Thu Jul 22 22:01:29 2004 +0000 @@ -1806,6 +1806,7 @@ @end defun @defvar minibuffer-scroll-window +@anchor{Definition of minibuffer-scroll-window} If the value of this variable is non-@code{nil}, it should be a window object. When the function @code{scroll-other-window} is called in the minibuffer, it scrolls this window.
--- a/lispref/positions.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/lispref/positions.texi Thu Jul 22 22:01:29 2004 +0000 @@ -389,6 +389,7 @@ @defun count-lines start end @cindex lines in region +@anchor{Definition of count-lines} This function returns the number of lines between the positions @var{start} and @var{end} in the current buffer. If @var{start} and @var{end} are equal, then it returns 0. Otherwise it returns at least
--- a/lispref/windows.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/lispref/windows.texi Thu Jul 22 22:01:29 2004 +0000 @@ -1195,7 +1195,7 @@ @defun set-window-point window position This function positions point in @var{window} at position -@var{position} in @var{window}'s buffer. +@var{position} in @var{window}'s buffer. It returns @var{position}. @end defun @node Window Start @@ -1233,7 +1233,7 @@ redisplay. For a realistic example of using @code{window-start}, see the -description of @code{count-lines} in @ref{Text Lines}. +description of @code{count-lines}. @xref{Definition of count-lines}. @end defun @defun window-end &optional window update @@ -1324,14 +1324,27 @@ @end defun @defun pos-visible-in-window-p &optional position window partially -This function returns @code{t} if @var{position} is within the range of -text currently visible on the screen in @var{window}. It returns -@code{nil} if @var{position} is scrolled vertically or horizontally out -of view. Locations that are partially obscured are not considered +This function returns non-@code{nil} if @var{position} is within the +range of text currently visible on the screen in @var{window}. It +returns @code{nil} if @var{position} is scrolled vertically out of +view. Locations that are partially obscured are not considered visible unless @var{partially} is non-@code{nil}. The argument @var{position} defaults to the current position of point in @var{window}; @var{window}, to the selected window. +The @code{pos-visible-in-window-p} function considers only vertical +scrolling. If @var{position} is out of view only because @var{window} +has been scrolled horizontally, @code{pos-visible-in-window-p} returns +non-@code{nil} anyway. @xref{Horizontal Scrolling}. + +If @var{position} is visible, @code{pos-visible-in-window-p} returns +@code{t} if @var{partially} is @code{nil}; if @var{partially} is +non-@code{nil}, it returns a list of the form @code{(@var{x} @var{y} +@var{fully})}, where @var{x} and @var{y} are the pixel coordinates +relative to the top left corner of the window, and @var{fully} is +@code{t} if the character after @var{position} is fully visible and +@code{nil} otherwise. + Here is an example: @example @@ -1348,7 +1361,7 @@ @cindex textual scrolling @cindex scrolling textually - @dfn{Textual scrolling} means moving the text up or down though a + @dfn{Textual scrolling} means moving the text up or down through a window. It works by changing the value of the window's display-start location. It may also change the value of @code{window-point} to keep point on the screen. @@ -1419,7 +1432,10 @@ the one at the top left corner. You can specify a different window to scroll, when the minibuffer is selected, by setting the variable @code{minibuffer-scroll-window}. This variable has no effect when any -other window is selected. @xref{Minibuffer Misc}. +other window is selected. When it is non-@code{nil} and the +minibuffer is selected, it takes precedence over +@code{other-window-scroll-buffer}. @xref{Definition of +minibuffer-scroll-window}. When the minibuffer is active, it is the next window if the selected window is the one at the bottom right corner. In this case, @@ -1563,10 +1579,11 @@ line whose height is very short off the screen, while a value of 3.3 could scroll just part of the way through a tall line or an image. -@defun window-vscroll &optional window +@defun window-vscroll &optional window pixels-p This function returns the current vertical scroll position of -@var{window}, If @var{window} is @code{nil}, the selected window is -used. +@var{window}. If @var{window} is @code{nil}, the selected window is +used. If @var{pixels-p} is non-@code{nil}, the return value is +measured in pixels, rather than in units of the normal line height. @example @group @@ -1576,7 +1593,7 @@ @end example @end defun -@defun set-window-vscroll window lines +@defun set-window-vscroll window lines &optional pixels-p This function sets @var{window}'s vertical scroll position to @var{lines}. The argument @var{lines} should be zero or positive; if not, it is taken as zero. @@ -1595,6 +1612,9 @@ @result{} 1.13 @end group @end example + +If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of +pixels. In this case, the return value is @var{lines}. @end defun @node Horizontal Scrolling @@ -1803,15 +1823,16 @@ rightmost column used by @var{window}, and @var{bottom} is one more than the bottommost row used by @var{window} and its mode-line. -If a window has a scroll bar, the right edge value includes the width of -the scroll bar. Otherwise, if the window has a neighbor on the right, -its right edge value includes the width of the separator line between -the window and that neighbor. Since the width of the window does not -include this separator, the width does not usually equal the difference -between the right and left edges. +The edges include the space used by the window's scroll bar, display +margins, fringes, header line, and mode line, if it has them. Also, +if the window has a neighbor on the right, its right edge value +includes the width of the separator line between the window and that +neighbor. Since the width of the window does not include this +separator, the width does not usually equal the difference between the +right and left edges. @end defun -@defun window-inside-edges window +@defun window-inside-edges &optional window This is similar to @code{window-edges}, but the edge values it returns include only the text area of the window. They do not include the header line, mode line, scroll bar or @@ -1877,13 +1898,13 @@ @end group @end example -@defun window-pixel-edges window +@defun window-pixel-edges &optional window This function is like @code{window-edges} except that, on a graphical display, the edge values are measured in pixels instead of in character lines and columns. @end defun -@defun window-inside-pixel-edges window +@defun window-inside-pixel-edges &optional window This function is like @code{window-inside-edges} except that, on a graphical display, the edge values are measured in pixels instead of in character lines and columns. @@ -1975,6 +1996,9 @@ display the whole text of the buffer, or if part of the contents are currently scrolled off screen, or if the window is not the full width of its frame, or if the window is the only window in its frame. + +This command returns non-@code{nil} if it actually shrank the window +and @code{nil} otherwise. @end deffn @tindex window-size-fixed @@ -1988,9 +2012,7 @@ if the value is @code{width}, then only the window's width is fixed. Any other non-@code{nil} value fixes both the width and the height. -The usual way to use this variable is to give it a buffer-local value in -a particular buffer. That way, the windows (but usually there is only -one) displaying that buffer have fixed size. +This variable automatically becomes buffer-local when set. Explicit size-change functions such as @code{enlarge-window} get an error if they would have to change a window size which is fixed. @@ -2132,7 +2154,8 @@ If the frame which @var{configuration} was saved from is dead, all this function does is restore the three variables @code{window-min-height}, -@code{window-min-width} and @code{minibuffer-scroll-window}. +@code{window-min-width} and @code{minibuffer-scroll-window}. In this +case, the function returns @code{nil}. Otherwise, it returns @code{t}. Here is a way of using this function to get the same effect as @code{save-window-excursion}: @@ -2151,10 +2174,11 @@ @defspec save-window-excursion forms@dots{} This special form records the window configuration, executes @var{forms} in sequence, then restores the earlier window configuration. The window -configuration includes the value of point and the portion of the buffer -that is visible. It also includes the choice of selected window. -However, it does not include the value of point in the current buffer; -use @code{save-excursion} also, if you wish to preserve that. +configuration includes, for each window, the value of point and the +portion of the buffer that is visible. It also includes the choice of +selected window. However, it does not include the value of point in +the current buffer; use @code{save-excursion} also, if you wish to +preserve that. Don't use this construct when @code{save-selected-window} is sufficient. @@ -2275,6 +2299,7 @@ @defun window-redisplay-end-trigger &optional window This function returns @var{window}'s current end trigger position. +If @var{window} is @code{nil} or omitted, it uses the selected window. @end defun @defvar window-configuration-change-hook
--- a/man/ChangeLog Sun Jul 18 21:49:24 2004 +0000 +++ b/man/ChangeLog Thu Jul 22 22:01:29 2004 +0000 @@ -1,3 +1,14 @@ +2004-07-18 Luc Teirlinck <teirllm@auburn.edu> + + * emacs-xtra.texi (Subdir switches): Dired does not remember the + `R' switch. + + * dired.texi (Dired Updating): `k' only deletes inserted + subdirectories from the Dired buffer if a prefix argument was given. + + * search.texi (Regexps): Delete redundant definition of `symbol' in + description of `\_>'. It already occurs in the description of `\_<'. + 2004-07-02 Juri Linkov <juri@jurta.org> * pcl-cvs.texi (Viewing differences): Add `d r'.
--- a/man/dired.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/man/dired.texi Thu Jul 22 22:01:29 2004 +0000 @@ -1030,10 +1030,11 @@ files, or on the marked files if any; but it does not operate on the current file as a last resort. - If you kill the line for a file that is a directory, the directory's -contents are also deleted from the buffer. Typing @kbd{C-u k} on the -header line for a subdirectory is another way to delete a subdirectory -from the Dired buffer. + If you use @kbd{k} with a numeric prefix argument to kill the line +for a file that is a directory, which you have inserted in the Dired +buffer as a subdirectory, then this deletes that subdirectory from the +buffer as well. Typing @kbd{C-u k} on the header line for a subdirectory +is another way to delete a subdirectory from the Dired buffer. The @kbd{g} command brings back any individual lines that you have killed in this way, but not subdirectories---you must use @kbd{i} to
--- a/man/emacs-xtra.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/man/emacs-xtra.texi Thu Jul 22 22:01:29 2004 +0000 @@ -291,6 +291,12 @@ the buffer's default switches. If any of this yields problems, you can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. +Dired does not remember the @code{R} switch. Inserting a subdirectory +with switches that include the @code{R} switch is equivalent with +inserting each of its subdirectories using all remaining switches. +For instance, updating or killing a subdirectory that was inserted +with the @code{R} switch will not update or kill its subdirectories. + The buffer's default switches do not affect subdirectories that were inserted using explicitly specified switches. In particular, commands such as @kbd{s}, that change the buffer's switches do not
--- a/man/search.texi Sun Jul 18 21:49:24 2004 +0000 +++ b/man/search.texi Thu Jul 22 22:01:29 2004 +0000 @@ -748,10 +748,9 @@ a symbol-constituent character follows. @item \_> -matches the empty string, but only at the end of a symbol. A symbol -is a sequence of one or more word or symbol constituent characters. -@samp{\_>} matches at the end of the buffer only if the contents end -with a symbol-constituent character. +matches the empty string, but only at the end of a symbol. @samp{\_>} +matches at the end of the buffer only if the contents end with a +symbol-constituent character. @item \s@var{c} matches any character whose syntax is @var{c}. Here @var{c} is a
--- a/src/ChangeLog Sun Jul 18 21:49:24 2004 +0000 +++ b/src/ChangeLog Thu Jul 22 22:01:29 2004 +0000 @@ -1,3 +1,76 @@ +2004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change) + + * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined. + +2004-07-21 Kim F. Storm <storm@cua.dk> + + * window.h (struct glyph_matrix): New members nrows_scale_factor + and ncols_scale_factor. + + * window.c (make_window): Initialize nrows_scale_factor and + ncols_scale_factor members. + + * dispnew.c (margin_glyphs_to_reserve): Apply ncols_scale_factor. + (allocate_matrices_for_frame_redisplay): Fix left/right margin mix-up. + (required_matrix_height): Apply nrows_scale_factor. + (required_matrix_width): Apply ncols_scale_factor. + + * xdisp.c (display_line): Increment nrows_scale_factor and set + fonts_changed_p if past last allocated row. + (append_glyph, append_composite_glyph, produce_image_glyph) + (append_stretch_glyph): Increment ncols_scale_factor and set + fonts_changed_p if current area is full. + +2004-07-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> + + * widget.c (EmacsFrameDestroy): Don't abort if normal_gc is 0. + +2004-07-19 Luc Teirlinck <teirllm@auburn.edu> + + * window.c (Fpos_visible_in_window_p, Fset_window_hscroll) + (Fwindow_inside_pixel_edges, Fwindow_end, Fset_window_point) + (Fset_window_start, Fscroll_up, Fscroll_down) + (Fother_window_for_scrolling, Fscroll_other_window) + (Fsave_window_excursion, Fset_window_vscroll) + (syms_of_window) <window-size-fixed>: Doc fixes. + +2004-07-19 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> (tiny change) + + * w32fns.c (Fx_file_dialog): Use ENCODE_FILE instead of + ENCODE_SYSTEM for filenames. + +2004-07-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mac.c (sys_select): Block input around call to + ReceiveNextEvent to prevent breakage. Correctly handle + blocking on event queue only by calling ReceiveNextEvent + instead of select (since GUI events aren't on an fd). + (sys_read): Remove function + * sysdep.c: Remove redefine of read to sys_read if HAVE_CARBON + +2004-07-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * mac.c (sys_select): Redo sys_select to use alarm-based + polling instead of 1 sec timeouts (like solaris). + + * macterm.c (x_make_frame_visible): Comment in polling on + frame creation. + + * keyboard.c: Undef SIGIO on Carbon + + * atimer.c (alarm_signal_handler): Call alarm handlers after + scheduling. + + * eval.c (Feval): Remove quit_char test + + * process.c (wait_reading_process_input): Remove clearing + stdin for select call on process input. + +2004-07-18 Luc Teirlinck <teirllm@auburn.edu> + + * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Correct + capitalization error in docstring. + 2004-07-17 Juanma Barranquero <lektu@terra.es> * keyboard.c (not_single_kboard_state): Do nothing unless
--- a/src/atimer.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/atimer.c Thu Jul 22 22:01:29 2004 +0000 @@ -375,7 +375,9 @@ t = atimers; atimers = atimers->next; +#ifndef MAC_OSX t->fn (t); +#endif if (t->type == ATIMER_CONTINUOUS) { @@ -387,6 +389,10 @@ t->next = free_atimers; free_atimers = t; } +#ifdef MAC_OSX + /* Fix for Ctrl-G. Perhaps this should apply to all platforms. */ + t->fn (t); +#endif EMACS_GET_TIME (now); }
--- a/src/dispnew.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/dispnew.c Thu Jul 22 22:01:29 2004 +0000 @@ -566,7 +566,7 @@ int width = XFASTINT (w->total_cols); double d = max (0, XFLOATINT (margin)); d = min (width / 2 - 1, d); - n = (int) ((double) total_glyphs / width * d); + n = (int) ((double) total_glyphs / width * d) * w->ncols_scale_factor; } else n = 0; @@ -1900,10 +1900,10 @@ || dim.width != w->desired_matrix->matrix_w || dim.height != w->desired_matrix->matrix_h || (margin_glyphs_to_reserve (w, dim.width, - w->right_margin_cols) + w->left_margin_cols) != w->desired_matrix->left_margin_glyphs) || (margin_glyphs_to_reserve (w, dim.width, - w->left_margin_cols) + w->right_margin_cols) != w->desired_matrix->right_margin_glyphs)) *window_change_flags |= CHANGED_LEAF_MATRIX; @@ -1971,7 +1971,7 @@ int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); int window_pixel_height = window_box_height (w) + abs (w->vscroll); return (((window_pixel_height + ch_height - 1) - / ch_height) + / ch_height) * w->nrows_scale_factor /* One partially visible line at the top and bottom of the window. */ + 2 @@ -1999,7 +1999,7 @@ /* Compute number of glyphs needed in a glyph row. */ return (((window_pixel_width + ch_width - 1) - / ch_width) + / ch_width) * w->ncols_scale_factor /* 2 partially visible columns in the text area. */ + 2 /* One partially visible column at the right
--- a/src/eval.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/eval.c Thu Jul 22 22:01:29 2004 +0000 @@ -2145,9 +2145,6 @@ val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); backtrace_list = backtrace.next; -#ifdef HAVE_CARBON - mac_check_for_quit_char(); -#endif return val; }
--- a/src/keyboard.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/keyboard.c Thu Jul 22 22:01:29 2004 +0000 @@ -595,7 +595,7 @@ /* We are unable to use interrupts if FIONREAD is not available, so flush SIGIO so we won't try. */ -#ifndef FIONREAD +#if !defined (FIONREAD) || defined(HAVE_CARBON) #ifdef SIGIO #undef SIGIO #endif
--- a/src/mac.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/mac.c Thu Jul 22 22:01:29 2004 +0000 @@ -2769,6 +2769,8 @@ extern int inhibit_window_system; extern int noninteractive; +#include "blockinput.h" + /* When Emacs is started from the Finder, SELECT always immediately returns as if input is present when file descriptor 0 is polled for input. Strangely, when Emacs is run as a GUI application from the @@ -2776,85 +2778,100 @@ the system call SELECT corrects this discrepancy. */ int sys_select (n, rfds, wfds, efds, timeout) - int n; - SELECT_TYPE *rfds; - SELECT_TYPE *wfds; - SELECT_TYPE *efds; - struct timeval *timeout; + int n; + SELECT_TYPE *rfds; + SELECT_TYPE *wfds; + SELECT_TYPE *efds; + struct timeval *timeout; { - if (!inhibit_window_system && rfds && FD_ISSET (0, rfds)) - return 1; - else if (inhibit_window_system || noninteractive || - (timeout && (EMACS_SECS(*timeout)==0) && - (EMACS_USECS(*timeout)==0))) - return select(n, rfds, wfds, efds, timeout); - else + OSErr err; + EMACS_TIME end_time, now, remaining_time; + + if (inhibit_window_system || noninteractive + || rfds == NULL || !FD_ISSET (0, rfds)) + return select (n, rfds, wfds, efds, timeout); + + if (wfds == NULL && efds == NULL) { - EMACS_TIME end_time, now; - - EMACS_GET_TIME (end_time); - if (timeout) - EMACS_ADD_TIME (end_time, end_time, *timeout); - - do - { - int r; - EMACS_TIME one_second; - SELECT_TYPE orfds; - - FD_ZERO (&orfds); - if (rfds) + int i; + + for (i = 1; i < n; i++) + if (FD_ISSET (i, rfds)) + break; + if (i == n) + { + EventTimeout timeout_sec = + (timeout + ? (EMACS_SECS (*timeout) * kEventDurationSecond + + EMACS_USECS (*timeout) * kEventDurationMicrosecond) + : kEventDurationForever); + + BLOCK_INPUT; + err = ReceiveNextEvent (0, NULL, timeout_sec, + kEventLeaveInQueue, NULL); + UNBLOCK_INPUT; + if (err == noErr) { - orfds = *rfds; + FD_ZERO (rfds); + FD_SET (0, rfds); + return 1; } - - EMACS_SET_SECS (one_second, 1); - EMACS_SET_USECS (one_second, 0); - - if (timeout && EMACS_TIME_LT(*timeout, one_second)) - one_second = *timeout; - - if ((r = select (n, &orfds, wfds, efds, &one_second)) > 0) + else + return 0; + } + } + + if (timeout) + { + remaining_time = *timeout; + EMACS_GET_TIME (now); + EMACS_ADD_TIME (end_time, now, remaining_time); + } + FD_CLR (0, rfds); + do + { + EMACS_TIME select_timeout; + SELECT_TYPE orfds = *rfds; + int r; + + EMACS_SET_SECS_USECS (select_timeout, 0, 20000); + + if (timeout && EMACS_TIME_LT (remaining_time, select_timeout)) + select_timeout = remaining_time; + + r = select (n, &orfds, wfds, efds, &select_timeout); + BLOCK_INPUT; + err = ReceiveNextEvent (0, NULL, kEventDurationNoWait, + kEventLeaveInQueue, NULL); + UNBLOCK_INPUT; + if (r > 0) + { + *rfds = orfds; + if (err == noErr) { - *rfds = orfds; - return r; + FD_SET (0, rfds); + r++; } - - mac_check_for_quit_char(); - + return r; + } + else if (err == noErr) + { + FD_ZERO (rfds); + FD_SET (0, rfds); + return 1; + } + + if (timeout) + { EMACS_GET_TIME (now); - EMACS_SUB_TIME (now, end_time, now); + EMACS_SUB_TIME (remaining_time, end_time, now); } - while (!timeout || !EMACS_TIME_NEG_P (now)); - - return 0; } + while (!timeout || EMACS_TIME_LT (now, end_time)); + + return 0; } -#undef read -int sys_read (fds, buf, nbyte) - int fds; - char *buf; - unsigned int nbyte; -{ - SELECT_TYPE rfds; - EMACS_TIME one_second; - int r; - - /* Use select to block on IO while still checking for quit_char */ - if (!inhibit_window_system && !noninteractive && - ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) - { - FD_ZERO (&rfds); - FD_SET (fds, &rfds); - if (sys_select (fds+1, &rfds, 0, 0, NULL) < 0) - return -1; - } - - return read (fds, buf, nbyte); -} - - /* Set up environment variables so that Emacs can correctly find its support files when packaged as an application bundle. Directories placed in /usr/local/share/emacs/<emacs-version>/, /usr/local/bin,
--- a/src/macterm.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/macterm.c Thu Jul 22 22:01:29 2004 +0000 @@ -5321,7 +5321,6 @@ XFlush (FRAME_MAC_DISPLAY (f)); -#if 0 /* MAC_TODO */ /* Synchronize to ensure Emacs knows the frame is visible before we do anything else. We do this loop with input not blocked so that incoming events are handled. */ @@ -5365,9 +5364,6 @@ FRAME_SAMPLE_VISIBILITY (f); } } -#else - UNBLOCK_INPUT; -#endif /* MAC_TODO */ } /* Change from mapped state to withdrawn state. */
--- a/src/process.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/process.c Thu Jul 22 22:01:29 2004 +0000 @@ -4190,12 +4190,13 @@ SELECT_TYPE Atemp, Ctemp; Atemp = input_wait_mask; -#ifdef MAC_OSX - /* On Mac OS X, the SELECT system call always says input is +#if 0 + /* On Mac OS X 10.0, the SELECT system call always says input is present (for reading) at stdin, even when none is. This causes the call to SELECT below to return 1 and status_notify not to be called. As a result output of - subprocesses are incorrectly discarded. */ + subprocesses are incorrectly discarded. + */ FD_CLR (0, &Atemp); #endif Ctemp = connect_wait_mask;
--- a/src/s/gnu-linux.h Sun Jul 18 21:49:24 2004 +0000 +++ b/src/s/gnu-linux.h Thu Jul 22 22:01:29 2004 +0000 @@ -355,7 +355,7 @@ #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ || defined __alpha__ || defined __mips__ || defined __s390__ \ - || defined __arm__ || defined __powerpc__ + || defined __arm__ || defined __powerpc__ || defined __amd64__ #define GC_SETJMP_WORKS 1 #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS #ifdef __mc68000__
--- a/src/sysdep.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/sysdep.c Thu Jul 22 22:01:29 2004 +0000 @@ -72,10 +72,6 @@ #endif #endif /* not WINDOWSNT */ -#ifdef HAVE_CARBON -#define read sys_read -#endif - /* Does anyone other than VMS need this? */ #ifndef fwrite #define sys_fwrite fwrite
--- a/src/w32fns.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/w32fns.c Thu Jul 22 22:01:29 2004 +0000 @@ -7735,14 +7735,14 @@ /* Create the dialog with PROMPT as title, using DIR as initial directory and using "*" as pattern. */ dir = Fexpand_file_name (dir, Qnil); - strncpy (init_dir, SDATA (ENCODE_SYSTEM (dir)), MAX_PATH); + strncpy (init_dir, SDATA (ENCODE_FILE (dir)), MAX_PATH); init_dir[MAX_PATH] = '\0'; unixtodos_filename (init_dir); if (STRINGP (default_filename)) { char *file_name_only; - char *full_path_name = SDATA (ENCODE_SYSTEM (default_filename)); + char *full_path_name = SDATA (ENCODE_FILE (default_filename)); unixtodos_filename (full_path_name);
--- a/src/widget.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/widget.c Thu Jul 22 22:01:29 2004 +0000 @@ -758,7 +758,6 @@ if (! s) abort (); if (! s->output_data.x) abort (); - if (! s->output_data.x->normal_gc) abort (); BLOCK_INPUT; x_free_gcs (s);
--- a/src/window.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/window.c Thu Jul 22 22:01:29 2004 +0000 @@ -262,6 +262,7 @@ bzero (&p->last_cursor, sizeof (p->last_cursor)); bzero (&p->phys_cursor, sizeof (p->phys_cursor)); p->desired_matrix = p->current_matrix = 0; + p->nrows_scale_factor = p->ncols_scale_factor = 1; p->phys_cursor_type = -1; p->phys_cursor_width = -1; p->must_be_updated_p = 0; @@ -320,15 +321,17 @@ DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, Spos_visible_in_window_p, 0, 3, 0, - doc: /* Return t if position POS is currently on the frame in WINDOW. + doc: /* Return non-nil if position POS is currently on the frame in WINDOW. Return nil if that position is scrolled vertically out of view. If a character is only partially visible, nil is returned, unless the optional argument PARTIALLY is non-nil. +If POS is only out of view because of horizontal scrolling, return non-nil. POS defaults to point in WINDOW; WINDOW defaults to the selected window. If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, -return value is a list (X Y PARTIAL) where X and Y are the pixel relative -coordinate */) +return value is a list (X Y FULLY) where X and Y are the pixel coordinates +relative to the top left corner of the window, and FULLY is t if the +character after POS is fully visible and nil otherwise. */) (pos, window, partially) Lisp_Object pos, window, partially; { @@ -432,7 +435,7 @@ DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. -NCOL should be zero or positive. +Return NCOL. NCOL should be zero or positive. Note that if `automatic-hscrolling' is non-nil, you cannot scroll the window so that the location of point becomes invisible. */) @@ -546,7 +549,7 @@ } DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, - doc: /* Return a list of the edge coordinates of WINDOW. + doc: /* Return a list of the edge pixel coordinates of WINDOW. \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. RIGHT is one more than the rightmost x position used by text in WINDOW, and BOTTOM is one more than the bottommost y position used by text in WINDOW. @@ -988,6 +991,8 @@ This is updated by redisplay, when it runs to completion. Simply changing the buffer text or setting `window-start' does not update this value. +Return nil if there is no recorded value. \(This can happen if the +last redisplay of WINDOW was preempted, and did not finish.) If UPDATE is non-nil, compute the up-to-date position if it isn't already recorded. */) (window, update) @@ -1053,7 +1058,8 @@ } DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, - doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. */) + doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. +Return POS. */) (window, pos) Lisp_Object window, pos; { @@ -1076,6 +1082,7 @@ DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. +Return POS. Optional third arg NOFORCE non-nil inhibits next redisplay from overriding motion of point in order to display at this exact start. */) (window, pos, noforce) @@ -4850,7 +4857,8 @@ } DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", - doc: /* Scroll text of current window upward ARG lines; or near full screen if no ARG. + doc: /* Scroll text of current window upward ARG lines. +If ARG is omitted or nil, scroll upward by a near full screen. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll downward. If ARG is the atom `-', scroll downward by nearly full screen. @@ -4863,7 +4871,8 @@ } DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", - doc: /* Scroll text of current window down ARG lines; or near full screen if no ARG. + doc: /* Scroll text of current window down ARG lines. +If ARG is omitted or nil, scroll down by a near full screen. A near full screen is `next-screen-context-lines' less than a full screen. Negative ARG means scroll upward. If ARG is the atom `-', scroll upward by nearly full screen. @@ -4877,10 +4886,11 @@ DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, doc: /* Return the other window for \"other window scroll\" commands. +If `other-window-scroll-buffer' is non-nil, a window +showing that buffer is used. If in the minibuffer, `minibuffer-scroll-window' if non-nil -specifies the window. -If `other-window-scroll-buffer' is non-nil, a window -showing that buffer is used. */) +specifies the window. This takes precedence over +`other-window-scroll-buffer'. */) () { Lisp_Object window; @@ -4926,10 +4936,11 @@ If ARG is the atom `-', scroll downward by nearly full screen. When calling from a program, supply as argument a number, nil, or `-'. +If `other-window-scroll-buffer' is non-nil, scroll the window +showing that buffer, popping the buffer up if necessary. If in the minibuffer, `minibuffer-scroll-window' if non-nil -specifies the window to scroll. -If `other-window-scroll-buffer' is non-nil, scroll the window -showing that buffer, popping the buffer up if necessary. */) +specifies the window to scroll. This takes precedence over +`other-window-scroll-buffer'. */) (arg) Lisp_Object arg; { @@ -5905,7 +5916,8 @@ DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, 0, UNEVALLED, 0, - doc: /* Execute body, preserving window sizes and contents. + doc: /* Execute BODY, preserving window sizes and contents. +Return the value of the last form in BODY. Restore which buffer appears in which window, where display starts, and the value of point and mark for each window. Also restore the choice of selected window. @@ -6165,7 +6177,11 @@ doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. WINDOW nil means use the selected window. Normally, VSCROLL is a non-negative multiple of the canonical character height of WINDOW; -optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. */) +optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. +If PIXELS-P is nil, VSCROLL may have to be rounded so that it +corresponds to an integral number of pixels. The return value is the +result of this rounding. +If PIXELS-P is non-nil, the return value is VSCROLL. */) (window, vscroll, pixels_p) Lisp_Object window, vscroll, pixels_p; { @@ -6649,9 +6665,11 @@ DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. +If the value is`height', then only the window's height is fixed. +If the value is `width', then only the window's width is fixed. +Any other non-nil value fixes both the width and the height. Emacs won't change the size of any window displaying that buffer, -unless you explicitly change the size, or Emacs has no other choice. -This variable automatically becomes buffer-local when set. */); +unless you explicitly change the size, or Emacs has no other choice. */); Fmake_variable_buffer_local (Qwindow_size_fixed); window_size_fixed = 0;
--- a/src/window.h Sun Jul 18 21:49:24 2004 +0000 +++ b/src/window.h Thu Jul 22 22:01:29 2004 +0000 @@ -236,6 +236,11 @@ struct glyph_matrix *current_matrix; struct glyph_matrix *desired_matrix; + /* Scaling factor for the glyph_matrix size calculation in this window. + Used if window contains many small images or uses proportional fonts, + as the normal may yield a matrix which is too small. */ + int nrows_scale_factor, ncols_scale_factor; + /* Cursor position as of last update that completed without pause. This is the position of last_point. */ struct cursor_pos last_cursor;
--- a/src/xdisp.c Sun Jul 18 21:49:24 2004 +0000 +++ b/src/xdisp.c Thu Jul 22 22:01:29 2004 +0000 @@ -14461,9 +14461,13 @@ /* We always start displaying at hpos zero even if hscrolled. */ xassert (it->hpos == 0 && it->current_x == 0); - /* We must not display in a row that's not a text row. */ - xassert (MATRIX_ROW_VPOS (row, it->w->desired_matrix) - < it->w->desired_matrix->nrows); + if (MATRIX_ROW_VPOS (row, it->w->desired_matrix) + >= it->w->desired_matrix->nrows) + { + it->w->nrows_scale_factor++; + fonts_changed_p = 1; + return 0; + } /* Is IT->w showing the region? */ it->w->region_showing = it->region_beg_charpos > 0 ? Qt : Qnil; @@ -18134,6 +18138,11 @@ glyph->font_type = FONT_TYPE_UNKNOWN; ++it->glyph_row->used[area]; } + else if (!fonts_changed_p) + { + it->w->ncols_scale_factor++; + fonts_changed_p = 1; + } } /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. @@ -18171,6 +18180,11 @@ glyph->font_type = FONT_TYPE_UNKNOWN; ++it->glyph_row->used[area]; } + else if (!fonts_changed_p) + { + it->w->ncols_scale_factor++; + fonts_changed_p = 1; + } } @@ -18340,6 +18354,11 @@ glyph->font_type = FONT_TYPE_UNKNOWN; ++it->glyph_row->used[area]; } + else if (!fonts_changed_p) + { + it->w->ncols_scale_factor++; + fonts_changed_p = 1; + } } } @@ -18383,6 +18402,11 @@ glyph->font_type = FONT_TYPE_UNKNOWN; ++it->glyph_row->used[area]; } + else if (!fonts_changed_p) + { + it->w->ncols_scale_factor++; + fonts_changed_p = 1; + } } @@ -22178,7 +22202,7 @@ Vwindow_size_change_functions = Qnil; DEFVAR_LISP ("window-scroll-functions", &Vwindow_scroll_functions, - doc: /* List of Functions to call before redisplaying a window with scrolling. + doc: /* List of functions to call before redisplaying a window with scrolling. Each function is called with two arguments, the window and its new display-start position. Note that the value of `window-end' is not valid when these functions are called. */);