diff options
| author | Karoly Lorentey | 2004-07-22 22:01:29 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-07-22 22:01:29 +0000 |
| commit | 407e382d35ede779a23b974d7ac40a7d3d0fa5ff (patch) | |
| tree | 4a9e97dd58011b0ce2d6223626554765860fd6db | |
| parent | 31d7e9bc5a474c2da8c40f4812ea3e09cd5fb82c (diff) | |
| parent | bb6a9650da7971581f2ddf625c172b58a6806e7a (diff) | |
| download | emacs-407e382d35ede779a23b974d7ac40a7d3d0fa5ff.tar.gz emacs-407e382d35ede779a23b974d7ac40a7d3d0fa5ff.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 25 | ||||
| -rw-r--r-- | lisp/dired-aux.el | 40 | ||||
| -rw-r--r-- | lisp/frame.el | 2 | ||||
| -rw-r--r-- | lisp/printing.el | 51 | ||||
| -rw-r--r-- | lisp/textmodes/fill.el | 7 | ||||
| -rw-r--r-- | lispref/ChangeLog | 21 | ||||
| -rw-r--r-- | lispref/minibuf.texi | 1 | ||||
| -rw-r--r-- | lispref/positions.texi | 1 | ||||
| -rw-r--r-- | lispref/windows.texi | 83 | ||||
| -rw-r--r-- | man/ChangeLog | 11 | ||||
| -rw-r--r-- | man/dired.texi | 9 | ||||
| -rw-r--r-- | man/emacs-xtra.texi | 6 | ||||
| -rw-r--r-- | man/search.texi | 7 | ||||
| -rw-r--r-- | src/ChangeLog | 73 | ||||
| -rw-r--r-- | src/atimer.c | 6 | ||||
| -rw-r--r-- | src/dispnew.c | 10 | ||||
| -rw-r--r-- | src/eval.c | 3 | ||||
| -rw-r--r-- | src/keyboard.c | 2 | ||||
| -rw-r--r-- | src/mac.c | 145 | ||||
| -rw-r--r-- | src/macterm.c | 4 | ||||
| -rw-r--r-- | src/process.c | 7 | ||||
| -rw-r--r-- | src/s/gnu-linux.h | 2 | ||||
| -rw-r--r-- | src/sysdep.c | 4 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/widget.c | 1 | ||||
| -rw-r--r-- | src/window.c | 54 | ||||
| -rw-r--r-- | src/window.h | 5 | ||||
| -rw-r--r-- | src/xdisp.c | 32 |
28 files changed, 419 insertions, 197 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 876646163e3..f0690a1fa44 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,28 @@ | |||
| 1 | 2004-07-21 Vinicius Jose Latorre <viniciusjl@ig.com.br> | ||
| 2 | |||
| 3 | * printing.el: Doc fix. | ||
| 4 | |||
| 5 | 2004-07-20 Luc Teirlinck <teirllm@auburn.edu> | ||
| 6 | |||
| 7 | * frame.el (modify-all-frames-parameters): Minor doc fix. | ||
| 8 | |||
| 9 | 2004-07-20 Richard M. Stallman <rms@gnu.org> | ||
| 10 | |||
| 11 | * textmodes/fill.el (fill-comment-paragraph): Handle indent-tabs-mode. | ||
| 12 | (fill-delete-newlines): Call sentence-end as function. | ||
| 13 | (fill-nobreak-p, canonically-space-region): Likewise. | ||
| 14 | (fill-nobreak-p): If this break point is at the end of the line, | ||
| 15 | don't consider the newline which follows as a reason to return t. | ||
| 16 | |||
| 17 | 2004-07-19 John Paul Wallington <jpw@gnu.org> | ||
| 18 | |||
| 19 | * dired-aux.el (dired-file-set-difference): Don't use `caddr'. | ||
| 20 | |||
| 21 | 2004-07-18 Luc Teirlinck <teirllm@auburn.edu> | ||
| 22 | |||
| 23 | * dired-aux.el (dired-do-kill-lines): Expand docstring. | ||
| 24 | Delete irrelevant code. | ||
| 25 | |||
| 1 | 2004-07-17 Kai Grossjohann <kai.grossjohann@gmx.net> | 26 | 2004-07-17 Kai Grossjohann <kai.grossjohann@gmx.net> |
| 2 | 27 | ||
| 3 | * net/tramp.el (tramp-handle-verify-visited-file-modtime): New | 28 | * net/tramp.el (tramp-handle-verify-visited-file-modtime): New |
diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index bf7c9c00d18..6c1a9ad36f0 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el | |||
| @@ -163,8 +163,8 @@ condition. Two file items are considered to match if they are equal | |||
| 163 | (unless (let ((list list2)) | 163 | (unless (let ((list list2)) |
| 164 | (while (and list | 164 | (while (and list |
| 165 | (not (let* ((file2 (car list)) | 165 | (not (let* ((file2 (car list)) |
| 166 | (fa1 (caddr file1)) | 166 | (fa1 (car (cddr file1))) |
| 167 | (fa2 (caddr file2)) | 167 | (fa2 (car (cddr file2))) |
| 168 | (size1 (nth 7 fa1)) | 168 | (size1 (nth 7 fa1)) |
| 169 | (size2 (nth 7 fa2)) | 169 | (size2 (nth 7 fa2)) |
| 170 | (mtime1 (float-time (nth 5 fa1))) | 170 | (mtime1 (float-time (nth 5 fa1))) |
| @@ -627,9 +627,14 @@ the list of file names explicitly with the FILE-LIST argument." | |||
| 627 | (defun dired-do-kill-lines (&optional arg fmt) | 627 | (defun dired-do-kill-lines (&optional arg fmt) |
| 628 | "Kill all marked lines (not the files). | 628 | "Kill all marked lines (not the files). |
| 629 | With a prefix argument, kill that many lines starting with the current line. | 629 | With a prefix argument, kill that many lines starting with the current line. |
| 630 | \(A negative argument kills lines before the current line.) | 630 | \(A negative argument kills backward.) |
| 631 | To kill an entire subdirectory, go to its directory header line | 631 | If you use this command with a prefix argument to kill the line |
| 632 | and use this command with a prefix argument (the value does not matter)." | 632 | for a file that is a directory, which you have inserted in the |
| 633 | Dired buffer as a subdirectory, then it deletes that subdirectory | ||
| 634 | from the buffer as well. | ||
| 635 | To kill an entire subdirectory \(without killing its line in the | ||
| 636 | parent directory), go to its directory header line and use this | ||
| 637 | command with a prefix argument (the value does not matter)." | ||
| 633 | ;; Returns count of killed lines. FMT="" suppresses message. | 638 | ;; Returns count of killed lines. FMT="" suppresses message. |
| 634 | (interactive "P") | 639 | (interactive "P") |
| 635 | (if arg | 640 | (if arg |
| @@ -638,23 +643,14 @@ and use this command with a prefix argument (the value does not matter)." | |||
| 638 | (dired-kill-line arg)) | 643 | (dired-kill-line arg)) |
| 639 | (save-excursion | 644 | (save-excursion |
| 640 | (goto-char (point-min)) | 645 | (goto-char (point-min)) |
| 641 | (let (buffer-read-only (count 0)) | 646 | (let (buffer-read-only |
| 642 | (if (not arg) ; kill marked lines | 647 | (count 0) |
| 643 | (let ((regexp (dired-marker-regexp))) | 648 | (regexp (dired-marker-regexp))) |
| 644 | (while (and (not (eobp)) | 649 | (while (and (not (eobp)) |
| 645 | (re-search-forward regexp nil t)) | 650 | (re-search-forward regexp nil t)) |
| 646 | (setq count (1+ count)) | 651 | (setq count (1+ count)) |
| 647 | (delete-region (progn (beginning-of-line) (point)) | 652 | (delete-region (progn (beginning-of-line) (point)) |
| 648 | (progn (forward-line 1) (point))))) | 653 | (progn (forward-line 1) (point)))) |
| 649 | ;; else kill unmarked lines | ||
| 650 | (while (not (eobp)) | ||
| 651 | (if (or (dired-between-files) | ||
| 652 | (not (looking-at "^ "))) | ||
| 653 | (forward-line 1) | ||
| 654 | (setq count (1+ count)) | ||
| 655 | (delete-region (point) (save-excursion | ||
| 656 | (forward-line 1) | ||
| 657 | (point)))))) | ||
| 658 | (or (equal "" fmt) | 654 | (or (equal "" fmt) |
| 659 | (message (or fmt "Killed %d line%s.") count (dired-plural-s count))) | 655 | (message (or fmt "Killed %d line%s.") count (dired-plural-s count))) |
| 660 | count)))) | 656 | count)))) |
diff --git a/lisp/frame.el b/lisp/frame.el index 243ad71497d..d032dfa82ec 100644 --- a/lisp/frame.el +++ b/lisp/frame.el | |||
| @@ -532,7 +532,7 @@ React to settings of `default-frame-alist', `initial-frame-alist' there." | |||
| 532 | ;;;; Creation of additional frames, and other frame miscellanea | 532 | ;;;; Creation of additional frames, and other frame miscellanea |
| 533 | 533 | ||
| 534 | (defun modify-all-frames-parameters (alist) | 534 | (defun modify-all-frames-parameters (alist) |
| 535 | "modify all current and future frames parameters according to ALIST. | 535 | "Modify all current and future frames parameters according to ALIST. |
| 536 | This changes `default-frame-alist' and possibly `initial-frame-alist'. | 536 | This changes `default-frame-alist' and possibly `initial-frame-alist'. |
| 537 | See help of `modify-frame-parameters' for more information." | 537 | See help of `modify-frame-parameters' for more information." |
| 538 | (let (element) ;; temp | 538 | (let (element) ;; temp |
diff --git a/lisp/printing.el b/lisp/printing.el index ae6e194d731..22a3f762ab6 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | 5 | ||
| 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 6 | ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 8 | ;; Time-stamp: <2004/07/12 21:10:35 vinicius> | 8 | ;; Time-stamp: <2004/07/20 21:44:43 vinicius> |
| 9 | ;; Keywords: wp, print, PostScript | 9 | ;; Keywords: wp, print, PostScript |
| 10 | ;; Version: 6.8 | 10 | ;; Version: 6.8 |
| 11 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ | 11 | ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ |
| @@ -40,37 +40,22 @@ Please send all bug fixes and enhancements to | |||
| 40 | ;; Introduction | 40 | ;; Introduction |
| 41 | ;; ------------ | 41 | ;; ------------ |
| 42 | ;; | 42 | ;; |
| 43 | ;; This package provides an user interface to some printing utilities that | 43 | ;; With `printing' you can preview or print a PostScript file. You can also |
| 44 | ;; includes previewing/printing a PostScript file, printing a text file and | 44 | ;; print a text file using PostScript, and preview or print buffers that use |
| 45 | ;; previewing/printing some major modes (like mh-folder-mode, | 45 | ;; certain special modes like mh-folder-mode, rmail-summary-mode, |
| 46 | ;; rmail-summary-mode, gnus-summary-mode, etc). It also includes a | 46 | ;; gnus-summary-mode, etc. This package also includes a PostScript/text |
| 47 | ;; PostScript/text printer database. | 47 | ;; printer database. |
| 48 | ;; | 48 | ;; |
| 49 | ;; Indeed, there are two user interfaces: | 49 | ;; There are two user interfaces: |
| 50 | ;; | 50 | ;; |
| 51 | ;; * Menu interface: | 51 | ;; * Menu interface: |
| 52 | ;; When `printing' is loaded, the menubar is modified to use `printing' | 52 | ;; The `printing' menu replaces the usual print options in the menu bar. |
| 53 | ;; menu instead of the print options in menubar. | ||
| 54 | ;; This is the default user interface. | 53 | ;; This is the default user interface. |
| 55 | ;; | 54 | ;; |
| 56 | ;; * Buffer interface: | 55 | ;; * Buffer interface: |
| 57 | ;; It is an option of `printing' menu, but it can be binded into another | 56 | ;; You can use a buffer interface instead of menus. It looks like a |
| 58 | ;; key, so user can activate the buffer interface directly without using | 57 | ;; customization buffer. Basically, it has the same options found in the |
| 59 | ;; a menu. See `pr-interface' command. | 58 | ;; menu and some extra options, all this on a buffer. |
| 60 | ;; | ||
| 61 | ;; `printing' was inspired on: | ||
| 62 | ;; | ||
| 63 | ;; print-nt.el Frederic Corne <frederic.corne@erli.fr> | ||
| 64 | ;; Special printing functions for Windows NT | ||
| 65 | ;; | ||
| 66 | ;; mh-e-init.el Tom Vogels <tov@ece.cmu.edu> | ||
| 67 | ;; PS-print for mail messages | ||
| 68 | ;; | ||
| 69 | ;; win32-ps-print.el Matthew O. Persico <mpersico@erols.com> | ||
| 70 | ;; PostScript printing with ghostscript | ||
| 71 | ;; | ||
| 72 | ;; ps-print-interface.el Volker Franz <volker.franz@tuebingen.mpg.de> | ||
| 73 | ;; Graphical front end for ps-print and previewing | ||
| 74 | ;; | 59 | ;; |
| 75 | ;; `printing' is prepared to run on GNU, Unix and NT systems. | 60 | ;; `printing' is prepared to run on GNU, Unix and NT systems. |
| 76 | ;; On GNU or Unix system, `printing' depends on gs and gv utilities. | 61 | ;; On GNU or Unix system, `printing' depends on gs and gv utilities. |
| @@ -86,6 +71,20 @@ Please send all bug fixes and enhancements to | |||
| 86 | ;; `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz'. | 71 | ;; `http://www.cpqd.com.br/~vinicius/emacs/ps-print.tar.gz'. |
| 87 | ;; Please, see README file for ps-print installation instructions. | 72 | ;; Please, see README file for ps-print installation instructions. |
| 88 | ;; | 73 | ;; |
| 74 | ;; `printing' was inspired on: | ||
| 75 | ;; | ||
| 76 | ;; print-nt.el Frederic Corne <frederic.corne@erli.fr> | ||
| 77 | ;; Special printing functions for Windows NT | ||
| 78 | ;; | ||
| 79 | ;; mh-e-init.el Tom Vogels <tov@ece.cmu.edu> | ||
| 80 | ;; PS-print for mail messages | ||
| 81 | ;; | ||
| 82 | ;; win32-ps-print.el Matthew O. Persico <mpersico@erols.com> | ||
| 83 | ;; PostScript printing with ghostscript | ||
| 84 | ;; | ||
| 85 | ;; ps-print-interface.el Volker Franz <volker.franz@tuebingen.mpg.de> | ||
| 86 | ;; Graphical front end for ps-print and previewing | ||
| 87 | ;; | ||
| 89 | ;; | 88 | ;; |
| 90 | ;; Log Messages | 89 | ;; Log Messages |
| 91 | ;; ------------ | 90 | ;; ------------ |
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index a888003402d..dfd471a87c4 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el | |||
| @@ -353,7 +353,12 @@ and `fill-nobreak-invisible'." | |||
| 353 | ;; Don't split a line if the rest would look like a new paragraph. | 353 | ;; Don't split a line if the rest would look like a new paragraph. |
| 354 | (unless use-hard-newlines | 354 | (unless use-hard-newlines |
| 355 | (save-excursion | 355 | (save-excursion |
| 356 | (skip-chars-forward " \t") (looking-at paragraph-start))) | 356 | (skip-chars-forward " \t") |
| 357 | ;; If this break point is at the end of the line, | ||
| 358 | ;; which can occur for auto-fill, don't consider the newline | ||
| 359 | ;; which follows as a reason to return t. | ||
| 360 | (and (not (eolp)) | ||
| 361 | (looking-at paragraph-start)))) | ||
| 357 | (run-hook-with-args-until-success 'fill-nobreak-predicate))))) | 362 | (run-hook-with-args-until-success 'fill-nobreak-predicate))))) |
| 358 | 363 | ||
| 359 | ;; Put `fill-find-break-point-function' property to charsets which | 364 | ;; Put `fill-find-break-point-function' property to charsets which |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 3e8fc5df417..14b0fcb4606 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,24 @@ | |||
| 1 | 2004-07-19 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * windows.texi: Various small changes in addition to: | ||
| 4 | (Window Point): Mention return value of `set-window-point'. | ||
| 5 | (Window Start): `pos-visible-in-window-p' disregards horizontal | ||
| 6 | scrolling. Explain return value if PARTIALLY is non-nil. | ||
| 7 | (Vertical Scrolling): Mention PIXELS-P argument to `window-vscroll' | ||
| 8 | and `set-window-vscroll'. | ||
| 9 | (Size of Window): The argument WINDOW to `window-inside-edges', | ||
| 10 | `window-pixel-edges' and `window-inside-pixel-edges' is optional. | ||
| 11 | (Resizing Windows): Explain return value of | ||
| 12 | `shrink-window-if-larger-than-buffer'. | ||
| 13 | `window-size-fixed' automatically becomes buffer local when set. | ||
| 14 | (Window Configurations): Explain return value of | ||
| 15 | `set-window-configuration'. | ||
| 16 | |||
| 17 | * minibuf.texi (Minibuffer Misc): Add anchor for | ||
| 18 | `minibuffer-scroll-window'. | ||
| 19 | |||
| 20 | * positions.texi (Text Lines): Add anchor for `count-lines'. | ||
| 21 | |||
| 1 | 2004-07-17 Richard M. Stallman <rms@gnu.org> | 22 | 2004-07-17 Richard M. Stallman <rms@gnu.org> |
| 2 | 23 | ||
| 3 | * display.texi (Overlay Properties): Adding `evaporate' prop | 24 | * display.texi (Overlay Properties): Adding `evaporate' prop |
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi index 8e8329967f3..bf858eff475 100644 --- a/lispref/minibuf.texi +++ b/lispref/minibuf.texi | |||
| @@ -1806,6 +1806,7 @@ a minibuffer window, is currently active. | |||
| 1806 | @end defun | 1806 | @end defun |
| 1807 | 1807 | ||
| 1808 | @defvar minibuffer-scroll-window | 1808 | @defvar minibuffer-scroll-window |
| 1809 | @anchor{Definition of minibuffer-scroll-window} | ||
| 1809 | If the value of this variable is non-@code{nil}, it should be a window | 1810 | If the value of this variable is non-@code{nil}, it should be a window |
| 1810 | object. When the function @code{scroll-other-window} is called in the | 1811 | object. When the function @code{scroll-other-window} is called in the |
| 1811 | minibuffer, it scrolls this window. | 1812 | minibuffer, it scrolls this window. |
diff --git a/lispref/positions.texi b/lispref/positions.texi index 22a800a2216..12ec9f7ff4e 100644 --- a/lispref/positions.texi +++ b/lispref/positions.texi | |||
| @@ -389,6 +389,7 @@ In an interactive call, @var{count} is the numeric prefix argument. | |||
| 389 | 389 | ||
| 390 | @defun count-lines start end | 390 | @defun count-lines start end |
| 391 | @cindex lines in region | 391 | @cindex lines in region |
| 392 | @anchor{Definition of count-lines} | ||
| 392 | This function returns the number of lines between the positions | 393 | This function returns the number of lines between the positions |
| 393 | @var{start} and @var{end} in the current buffer. If @var{start} and | 394 | @var{start} and @var{end} in the current buffer. If @var{start} and |
| 394 | @var{end} are equal, then it returns 0. Otherwise it returns at least | 395 | @var{end} are equal, then it returns 0. Otherwise it returns at least |
diff --git a/lispref/windows.texi b/lispref/windows.texi index 92eb6cbc85d..a01dc79d1f1 100644 --- a/lispref/windows.texi +++ b/lispref/windows.texi | |||
| @@ -1195,7 +1195,7 @@ forms. But that value is hard to find. | |||
| 1195 | 1195 | ||
| 1196 | @defun set-window-point window position | 1196 | @defun set-window-point window position |
| 1197 | This function positions point in @var{window} at position | 1197 | This function positions point in @var{window} at position |
| 1198 | @var{position} in @var{window}'s buffer. | 1198 | @var{position} in @var{window}'s buffer. It returns @var{position}. |
| 1199 | @end defun | 1199 | @end defun |
| 1200 | 1200 | ||
| 1201 | @node Window Start | 1201 | @node Window Start |
| @@ -1233,7 +1233,7 @@ window-start position to change in response until after the next | |||
| 1233 | redisplay. | 1233 | redisplay. |
| 1234 | 1234 | ||
| 1235 | For a realistic example of using @code{window-start}, see the | 1235 | For a realistic example of using @code{window-start}, see the |
| 1236 | description of @code{count-lines} in @ref{Text Lines}. | 1236 | description of @code{count-lines}. @xref{Definition of count-lines}. |
| 1237 | @end defun | 1237 | @end defun |
| 1238 | 1238 | ||
| 1239 | @defun window-end &optional window update | 1239 | @defun window-end &optional window update |
| @@ -1324,14 +1324,27 @@ position that works well with point, and thus @var{position} is not used. | |||
| 1324 | @end defun | 1324 | @end defun |
| 1325 | 1325 | ||
| 1326 | @defun pos-visible-in-window-p &optional position window partially | 1326 | @defun pos-visible-in-window-p &optional position window partially |
| 1327 | This function returns @code{t} if @var{position} is within the range of | 1327 | This function returns non-@code{nil} if @var{position} is within the |
| 1328 | text currently visible on the screen in @var{window}. It returns | 1328 | range of text currently visible on the screen in @var{window}. It |
| 1329 | @code{nil} if @var{position} is scrolled vertically or horizontally out | 1329 | returns @code{nil} if @var{position} is scrolled vertically out of |
| 1330 | of view. Locations that are partially obscured are not considered | 1330 | view. Locations that are partially obscured are not considered |
| 1331 | visible unless @var{partially} is non-@code{nil}. The argument | 1331 | visible unless @var{partially} is non-@code{nil}. The argument |
| 1332 | @var{position} defaults to the current position of point in | 1332 | @var{position} defaults to the current position of point in |
| 1333 | @var{window}; @var{window}, to the selected window. | 1333 | @var{window}; @var{window}, to the selected window. |
| 1334 | 1334 | ||
| 1335 | The @code{pos-visible-in-window-p} function considers only vertical | ||
| 1336 | scrolling. If @var{position} is out of view only because @var{window} | ||
| 1337 | has been scrolled horizontally, @code{pos-visible-in-window-p} returns | ||
| 1338 | non-@code{nil} anyway. @xref{Horizontal Scrolling}. | ||
| 1339 | |||
| 1340 | If @var{position} is visible, @code{pos-visible-in-window-p} returns | ||
| 1341 | @code{t} if @var{partially} is @code{nil}; if @var{partially} is | ||
| 1342 | non-@code{nil}, it returns a list of the form @code{(@var{x} @var{y} | ||
| 1343 | @var{fully})}, where @var{x} and @var{y} are the pixel coordinates | ||
| 1344 | relative to the top left corner of the window, and @var{fully} is | ||
| 1345 | @code{t} if the character after @var{position} is fully visible and | ||
| 1346 | @code{nil} otherwise. | ||
| 1347 | |||
| 1335 | Here is an example: | 1348 | Here is an example: |
| 1336 | 1349 | ||
| 1337 | @example | 1350 | @example |
| @@ -1348,7 +1361,7 @@ Here is an example: | |||
| 1348 | @cindex textual scrolling | 1361 | @cindex textual scrolling |
| 1349 | @cindex scrolling textually | 1362 | @cindex scrolling textually |
| 1350 | 1363 | ||
| 1351 | @dfn{Textual scrolling} means moving the text up or down though a | 1364 | @dfn{Textual scrolling} means moving the text up or down through a |
| 1352 | window. It works by changing the value of the window's display-start | 1365 | window. It works by changing the value of the window's display-start |
| 1353 | location. It may also change the value of @code{window-point} to keep | 1366 | location. It may also change the value of @code{window-point} to keep |
| 1354 | point on the screen. | 1367 | point on the screen. |
| @@ -1419,7 +1432,10 @@ When the selected window is the minibuffer, the next window is normally | |||
| 1419 | the one at the top left corner. You can specify a different window to | 1432 | the one at the top left corner. You can specify a different window to |
| 1420 | scroll, when the minibuffer is selected, by setting the variable | 1433 | scroll, when the minibuffer is selected, by setting the variable |
| 1421 | @code{minibuffer-scroll-window}. This variable has no effect when any | 1434 | @code{minibuffer-scroll-window}. This variable has no effect when any |
| 1422 | other window is selected. @xref{Minibuffer Misc}. | 1435 | other window is selected. When it is non-@code{nil} and the |
| 1436 | minibuffer is selected, it takes precedence over | ||
| 1437 | @code{other-window-scroll-buffer}. @xref{Definition of | ||
| 1438 | minibuffer-scroll-window}. | ||
| 1423 | 1439 | ||
| 1424 | When the minibuffer is active, it is the next window if the selected | 1440 | When the minibuffer is active, it is the next window if the selected |
| 1425 | window is the one at the bottom right corner. In this case, | 1441 | window is the one at the bottom right corner. In this case, |
| @@ -1563,10 +1579,11 @@ lines, depends on what the lines contain. A value of .5 could scroll a | |||
| 1563 | line whose height is very short off the screen, while a value of 3.3 | 1579 | line whose height is very short off the screen, while a value of 3.3 |
| 1564 | could scroll just part of the way through a tall line or an image. | 1580 | could scroll just part of the way through a tall line or an image. |
| 1565 | 1581 | ||
| 1566 | @defun window-vscroll &optional window | 1582 | @defun window-vscroll &optional window pixels-p |
| 1567 | This function returns the current vertical scroll position of | 1583 | This function returns the current vertical scroll position of |
| 1568 | @var{window}, If @var{window} is @code{nil}, the selected window is | 1584 | @var{window}. If @var{window} is @code{nil}, the selected window is |
| 1569 | used. | 1585 | used. If @var{pixels-p} is non-@code{nil}, the return value is |
| 1586 | measured in pixels, rather than in units of the normal line height. | ||
| 1570 | 1587 | ||
| 1571 | @example | 1588 | @example |
| 1572 | @group | 1589 | @group |
| @@ -1576,7 +1593,7 @@ used. | |||
| 1576 | @end example | 1593 | @end example |
| 1577 | @end defun | 1594 | @end defun |
| 1578 | 1595 | ||
| 1579 | @defun set-window-vscroll window lines | 1596 | @defun set-window-vscroll window lines &optional pixels-p |
| 1580 | This function sets @var{window}'s vertical scroll position to | 1597 | This function sets @var{window}'s vertical scroll position to |
| 1581 | @var{lines}. The argument @var{lines} should be zero or positive; if | 1598 | @var{lines}. The argument @var{lines} should be zero or positive; if |
| 1582 | not, it is taken as zero. | 1599 | not, it is taken as zero. |
| @@ -1595,6 +1612,9 @@ The return value is the result of this rounding. | |||
| 1595 | @result{} 1.13 | 1612 | @result{} 1.13 |
| 1596 | @end group | 1613 | @end group |
| 1597 | @end example | 1614 | @end example |
| 1615 | |||
| 1616 | If @var{pixels-p} is non-@code{nil}, @var{lines} specifies a number of | ||
| 1617 | pixels. In this case, the return value is @var{lines}. | ||
| 1598 | @end defun | 1618 | @end defun |
| 1599 | 1619 | ||
| 1600 | @node Horizontal Scrolling | 1620 | @node Horizontal Scrolling |
| @@ -1803,15 +1823,16 @@ the frame. The element @var{right} of the value is one more than the | |||
| 1803 | rightmost column used by @var{window}, and @var{bottom} is one more than | 1823 | rightmost column used by @var{window}, and @var{bottom} is one more than |
| 1804 | the bottommost row used by @var{window} and its mode-line. | 1824 | the bottommost row used by @var{window} and its mode-line. |
| 1805 | 1825 | ||
| 1806 | If a window has a scroll bar, the right edge value includes the width of | 1826 | The edges include the space used by the window's scroll bar, display |
| 1807 | the scroll bar. Otherwise, if the window has a neighbor on the right, | 1827 | margins, fringes, header line, and mode line, if it has them. Also, |
| 1808 | its right edge value includes the width of the separator line between | 1828 | if the window has a neighbor on the right, its right edge value |
| 1809 | the window and that neighbor. Since the width of the window does not | 1829 | includes the width of the separator line between the window and that |
| 1810 | include this separator, the width does not usually equal the difference | 1830 | neighbor. Since the width of the window does not include this |
| 1811 | between the right and left edges. | 1831 | separator, the width does not usually equal the difference between the |
| 1832 | right and left edges. | ||
| 1812 | @end defun | 1833 | @end defun |
| 1813 | 1834 | ||
| 1814 | @defun window-inside-edges window | 1835 | @defun window-inside-edges &optional window |
| 1815 | This is similar to @code{window-edges}, but the edge values | 1836 | This is similar to @code{window-edges}, but the edge values |
| 1816 | it returns include only the text area of the window. They | 1837 | it returns include only the text area of the window. They |
| 1817 | do not include the header line, mode line, scroll bar or | 1838 | do not include the header line, mode line, scroll bar or |
| @@ -1877,13 +1898,13 @@ and the inside edges of the right window are @w{@samp{4 0 7 2}}, | |||
| 1877 | @end group | 1898 | @end group |
| 1878 | @end example | 1899 | @end example |
| 1879 | 1900 | ||
| 1880 | @defun window-pixel-edges window | 1901 | @defun window-pixel-edges &optional window |
| 1881 | This function is like @code{window-edges} except that, on a graphical | 1902 | This function is like @code{window-edges} except that, on a graphical |
| 1882 | display, the edge values are measured in pixels instead of in | 1903 | display, the edge values are measured in pixels instead of in |
| 1883 | character lines and columns. | 1904 | character lines and columns. |
| 1884 | @end defun | 1905 | @end defun |
| 1885 | 1906 | ||
| 1886 | @defun window-inside-pixel-edges window | 1907 | @defun window-inside-pixel-edges &optional window |
| 1887 | This function is like @code{window-inside-edges} except that, on a | 1908 | This function is like @code{window-inside-edges} except that, on a |
| 1888 | graphical display, the edge values are measured in pixels instead of | 1909 | graphical display, the edge values are measured in pixels instead of |
| 1889 | in character lines and columns. | 1910 | in character lines and columns. |
| @@ -1975,6 +1996,9 @@ However, the command does nothing if the window is already too small to | |||
| 1975 | display the whole text of the buffer, or if part of the contents are | 1996 | display the whole text of the buffer, or if part of the contents are |
| 1976 | currently scrolled off screen, or if the window is not the full width of | 1997 | currently scrolled off screen, or if the window is not the full width of |
| 1977 | its frame, or if the window is the only window in its frame. | 1998 | its frame, or if the window is the only window in its frame. |
| 1999 | |||
| 2000 | This command returns non-@code{nil} if it actually shrank the window | ||
| 2001 | and @code{nil} otherwise. | ||
| 1978 | @end deffn | 2002 | @end deffn |
| 1979 | 2003 | ||
| 1980 | @tindex window-size-fixed | 2004 | @tindex window-size-fixed |
| @@ -1988,9 +2012,7 @@ If the value is @code{height}, then only the window's height is fixed; | |||
| 1988 | if the value is @code{width}, then only the window's width is fixed. | 2012 | if the value is @code{width}, then only the window's width is fixed. |
| 1989 | Any other non-@code{nil} value fixes both the width and the height. | 2013 | Any other non-@code{nil} value fixes both the width and the height. |
| 1990 | 2014 | ||
| 1991 | The usual way to use this variable is to give it a buffer-local value in | 2015 | This variable automatically becomes buffer-local when set. |
| 1992 | a particular buffer. That way, the windows (but usually there is only | ||
| 1993 | one) displaying that buffer have fixed size. | ||
| 1994 | 2016 | ||
| 1995 | Explicit size-change functions such as @code{enlarge-window} | 2017 | Explicit size-change functions such as @code{enlarge-window} |
| 1996 | get an error if they would have to change a window size which is fixed. | 2018 | get an error if they would have to change a window size which is fixed. |
| @@ -2132,7 +2154,8 @@ old one. | |||
| 2132 | 2154 | ||
| 2133 | If the frame which @var{configuration} was saved from is dead, all this | 2155 | If the frame which @var{configuration} was saved from is dead, all this |
| 2134 | function does is restore the three variables @code{window-min-height}, | 2156 | function does is restore the three variables @code{window-min-height}, |
| 2135 | @code{window-min-width} and @code{minibuffer-scroll-window}. | 2157 | @code{window-min-width} and @code{minibuffer-scroll-window}. In this |
| 2158 | case, the function returns @code{nil}. Otherwise, it returns @code{t}. | ||
| 2136 | 2159 | ||
| 2137 | Here is a way of using this function to get the same effect | 2160 | Here is a way of using this function to get the same effect |
| 2138 | as @code{save-window-excursion}: | 2161 | as @code{save-window-excursion}: |
| @@ -2151,10 +2174,11 @@ as @code{save-window-excursion}: | |||
| 2151 | @defspec save-window-excursion forms@dots{} | 2174 | @defspec save-window-excursion forms@dots{} |
| 2152 | This special form records the window configuration, executes @var{forms} | 2175 | This special form records the window configuration, executes @var{forms} |
| 2153 | in sequence, then restores the earlier window configuration. The window | 2176 | in sequence, then restores the earlier window configuration. The window |
| 2154 | configuration includes the value of point and the portion of the buffer | 2177 | configuration includes, for each window, the value of point and the |
| 2155 | that is visible. It also includes the choice of selected window. | 2178 | portion of the buffer that is visible. It also includes the choice of |
| 2156 | However, it does not include the value of point in the current buffer; | 2179 | selected window. However, it does not include the value of point in |
| 2157 | use @code{save-excursion} also, if you wish to preserve that. | 2180 | the current buffer; use @code{save-excursion} also, if you wish to |
| 2181 | preserve that. | ||
| 2158 | 2182 | ||
| 2159 | Don't use this construct when @code{save-selected-window} is sufficient. | 2183 | Don't use this construct when @code{save-selected-window} is sufficient. |
| 2160 | 2184 | ||
| @@ -2275,6 +2299,7 @@ This function sets @var{window}'s end trigger position at | |||
| 2275 | 2299 | ||
| 2276 | @defun window-redisplay-end-trigger &optional window | 2300 | @defun window-redisplay-end-trigger &optional window |
| 2277 | This function returns @var{window}'s current end trigger position. | 2301 | This function returns @var{window}'s current end trigger position. |
| 2302 | If @var{window} is @code{nil} or omitted, it uses the selected window. | ||
| 2278 | @end defun | 2303 | @end defun |
| 2279 | 2304 | ||
| 2280 | @defvar window-configuration-change-hook | 2305 | @defvar window-configuration-change-hook |
diff --git a/man/ChangeLog b/man/ChangeLog index 5473f8ff834..e4aba6ce722 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2004-07-18 Luc Teirlinck <teirllm@auburn.edu> | ||
| 2 | |||
| 3 | * emacs-xtra.texi (Subdir switches): Dired does not remember the | ||
| 4 | `R' switch. | ||
| 5 | |||
| 6 | * dired.texi (Dired Updating): `k' only deletes inserted | ||
| 7 | subdirectories from the Dired buffer if a prefix argument was given. | ||
| 8 | |||
| 9 | * search.texi (Regexps): Delete redundant definition of `symbol' in | ||
| 10 | description of `\_>'. It already occurs in the description of `\_<'. | ||
| 11 | |||
| 1 | 2004-07-02 Juri Linkov <juri@jurta.org> | 12 | 2004-07-02 Juri Linkov <juri@jurta.org> |
| 2 | 13 | ||
| 3 | * pcl-cvs.texi (Viewing differences): Add `d r'. | 14 | * pcl-cvs.texi (Viewing differences): Add `d r'. |
diff --git a/man/dired.texi b/man/dired.texi index 9d2c5f096d5..f19ce7e1ab0 100644 --- a/man/dired.texi +++ b/man/dired.texi | |||
| @@ -1030,10 +1030,11 @@ the file-operating commands, this command operates on the next @var{n} | |||
| 1030 | files, or on the marked files if any; but it does not operate on the | 1030 | files, or on the marked files if any; but it does not operate on the |
| 1031 | current file as a last resort. | 1031 | current file as a last resort. |
| 1032 | 1032 | ||
| 1033 | If you kill the line for a file that is a directory, the directory's | 1033 | If you use @kbd{k} with a numeric prefix argument to kill the line |
| 1034 | contents are also deleted from the buffer. Typing @kbd{C-u k} on the | 1034 | for a file that is a directory, which you have inserted in the Dired |
| 1035 | header line for a subdirectory is another way to delete a subdirectory | 1035 | buffer as a subdirectory, then this deletes that subdirectory from the |
| 1036 | from the Dired buffer. | 1036 | buffer as well. Typing @kbd{C-u k} on the header line for a subdirectory |
| 1037 | is another way to delete a subdirectory from the Dired buffer. | ||
| 1037 | 1038 | ||
| 1038 | The @kbd{g} command brings back any individual lines that you have | 1039 | The @kbd{g} command brings back any individual lines that you have |
| 1039 | killed in this way, but not subdirectories---you must use @kbd{i} to | 1040 | killed in this way, but not subdirectories---you must use @kbd{i} to |
diff --git a/man/emacs-xtra.texi b/man/emacs-xtra.texi index 0d5633d71ca..9dff3d9efd8 100644 --- a/man/emacs-xtra.texi +++ b/man/emacs-xtra.texi | |||
| @@ -291,6 +291,12 @@ its old switches. However, reverting the buffer will relist it using | |||
| 291 | the buffer's default switches. If any of this yields problems, you | 291 | the buffer's default switches. If any of this yields problems, you |
| 292 | can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. | 292 | can easily correct the situation using @kbd{C-u i} or @kbd{C-u l}. |
| 293 | 293 | ||
| 294 | Dired does not remember the @code{R} switch. Inserting a subdirectory | ||
| 295 | with switches that include the @code{R} switch is equivalent with | ||
| 296 | inserting each of its subdirectories using all remaining switches. | ||
| 297 | For instance, updating or killing a subdirectory that was inserted | ||
| 298 | with the @code{R} switch will not update or kill its subdirectories. | ||
| 299 | |||
| 294 | The buffer's default switches do not affect subdirectories that were | 300 | The buffer's default switches do not affect subdirectories that were |
| 295 | inserted using explicitly specified switches. In particular, | 301 | inserted using explicitly specified switches. In particular, |
| 296 | commands such as @kbd{s}, that change the buffer's switches do not | 302 | commands such as @kbd{s}, that change the buffer's switches do not |
diff --git a/man/search.texi b/man/search.texi index f07976f9aa2..5fa130a2e50 100644 --- a/man/search.texi +++ b/man/search.texi | |||
| @@ -748,10 +748,9 @@ characters. @samp{\_<} matches at the beginning of the buffer only if | |||
| 748 | a symbol-constituent character follows. | 748 | a symbol-constituent character follows. |
| 749 | 749 | ||
| 750 | @item \_> | 750 | @item \_> |
| 751 | matches the empty string, but only at the end of a symbol. A symbol | 751 | matches the empty string, but only at the end of a symbol. @samp{\_>} |
| 752 | is a sequence of one or more word or symbol constituent characters. | 752 | matches at the end of the buffer only if the contents end with a |
| 753 | @samp{\_>} matches at the end of the buffer only if the contents end | 753 | symbol-constituent character. |
| 754 | with a symbol-constituent character. | ||
| 755 | 754 | ||
| 756 | @item \s@var{c} | 755 | @item \s@var{c} |
| 757 | matches any character whose syntax is @var{c}. Here @var{c} is a | 756 | matches any character whose syntax is @var{c}. Here @var{c} is a |
diff --git a/src/ChangeLog b/src/ChangeLog index 9765ec9403c..e51cdf554ce 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,76 @@ | |||
| 1 | 2004-07-22 Barry Fishman <barry_fishman@att.net> (tiny change) | ||
| 2 | |||
| 3 | * s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined. | ||
| 4 | |||
| 5 | 2004-07-21 Kim F. Storm <storm@cua.dk> | ||
| 6 | |||
| 7 | * window.h (struct glyph_matrix): New members nrows_scale_factor | ||
| 8 | and ncols_scale_factor. | ||
| 9 | |||
| 10 | * window.c (make_window): Initialize nrows_scale_factor and | ||
| 11 | ncols_scale_factor members. | ||
| 12 | |||
| 13 | * dispnew.c (margin_glyphs_to_reserve): Apply ncols_scale_factor. | ||
| 14 | (allocate_matrices_for_frame_redisplay): Fix left/right margin mix-up. | ||
| 15 | (required_matrix_height): Apply nrows_scale_factor. | ||
| 16 | (required_matrix_width): Apply ncols_scale_factor. | ||
| 17 | |||
| 18 | * xdisp.c (display_line): Increment nrows_scale_factor and set | ||
| 19 | fonts_changed_p if past last allocated row. | ||
| 20 | (append_glyph, append_composite_glyph, produce_image_glyph) | ||
| 21 | (append_stretch_glyph): Increment ncols_scale_factor and set | ||
| 22 | fonts_changed_p if current area is full. | ||
| 23 | |||
| 24 | 2004-07-21 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 25 | |||
| 26 | * widget.c (EmacsFrameDestroy): Don't abort if normal_gc is 0. | ||
| 27 | |||
| 28 | 2004-07-19 Luc Teirlinck <teirllm@auburn.edu> | ||
| 29 | |||
| 30 | * window.c (Fpos_visible_in_window_p, Fset_window_hscroll) | ||
| 31 | (Fwindow_inside_pixel_edges, Fwindow_end, Fset_window_point) | ||
| 32 | (Fset_window_start, Fscroll_up, Fscroll_down) | ||
| 33 | (Fother_window_for_scrolling, Fscroll_other_window) | ||
| 34 | (Fsave_window_excursion, Fset_window_vscroll) | ||
| 35 | (syms_of_window) <window-size-fixed>: Doc fixes. | ||
| 36 | |||
| 37 | 2004-07-19 KOBAYASHI Yasuhiro <kobayays@otsukakj.co.jp> (tiny change) | ||
| 38 | |||
| 39 | * w32fns.c (Fx_file_dialog): Use ENCODE_FILE instead of | ||
| 40 | ENCODE_SYSTEM for filenames. | ||
| 41 | |||
| 42 | 2004-07-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 43 | |||
| 44 | * mac.c (sys_select): Block input around call to | ||
| 45 | ReceiveNextEvent to prevent breakage. Correctly handle | ||
| 46 | blocking on event queue only by calling ReceiveNextEvent | ||
| 47 | instead of select (since GUI events aren't on an fd). | ||
| 48 | (sys_read): Remove function | ||
| 49 | * sysdep.c: Remove redefine of read to sys_read if HAVE_CARBON | ||
| 50 | |||
| 51 | 2004-07-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 52 | |||
| 53 | * mac.c (sys_select): Redo sys_select to use alarm-based | ||
| 54 | polling instead of 1 sec timeouts (like solaris). | ||
| 55 | |||
| 56 | * macterm.c (x_make_frame_visible): Comment in polling on | ||
| 57 | frame creation. | ||
| 58 | |||
| 59 | * keyboard.c: Undef SIGIO on Carbon | ||
| 60 | |||
| 61 | * atimer.c (alarm_signal_handler): Call alarm handlers after | ||
| 62 | scheduling. | ||
| 63 | |||
| 64 | * eval.c (Feval): Remove quit_char test | ||
| 65 | |||
| 66 | * process.c (wait_reading_process_input): Remove clearing | ||
| 67 | stdin for select call on process input. | ||
| 68 | |||
| 69 | 2004-07-18 Luc Teirlinck <teirllm@auburn.edu> | ||
| 70 | |||
| 71 | * xdisp.c (syms_of_xdisp) <window-scroll-functions>: Correct | ||
| 72 | capitalization error in docstring. | ||
| 73 | |||
| 1 | 2004-07-17 Juanma Barranquero <lektu@terra.es> | 74 | 2004-07-17 Juanma Barranquero <lektu@terra.es> |
| 2 | 75 | ||
| 3 | * keyboard.c (not_single_kboard_state): Do nothing unless | 76 | * keyboard.c (not_single_kboard_state): Do nothing unless |
diff --git a/src/atimer.c b/src/atimer.c index 7e78bdad9c0..9ec0238ff28 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -375,7 +375,9 @@ alarm_signal_handler (signo) | |||
| 375 | 375 | ||
| 376 | t = atimers; | 376 | t = atimers; |
| 377 | atimers = atimers->next; | 377 | atimers = atimers->next; |
| 378 | #ifndef MAC_OSX | ||
| 378 | t->fn (t); | 379 | t->fn (t); |
| 380 | #endif | ||
| 379 | 381 | ||
| 380 | if (t->type == ATIMER_CONTINUOUS) | 382 | if (t->type == ATIMER_CONTINUOUS) |
| 381 | { | 383 | { |
| @@ -387,6 +389,10 @@ alarm_signal_handler (signo) | |||
| 387 | t->next = free_atimers; | 389 | t->next = free_atimers; |
| 388 | free_atimers = t; | 390 | free_atimers = t; |
| 389 | } | 391 | } |
| 392 | #ifdef MAC_OSX | ||
| 393 | /* Fix for Ctrl-G. Perhaps this should apply to all platforms. */ | ||
| 394 | t->fn (t); | ||
| 395 | #endif | ||
| 390 | 396 | ||
| 391 | EMACS_GET_TIME (now); | 397 | EMACS_GET_TIME (now); |
| 392 | } | 398 | } |
diff --git a/src/dispnew.c b/src/dispnew.c index b519dfa0752..a89bb0a9bcc 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -566,7 +566,7 @@ margin_glyphs_to_reserve (w, total_glyphs, margin) | |||
| 566 | int width = XFASTINT (w->total_cols); | 566 | int width = XFASTINT (w->total_cols); |
| 567 | double d = max (0, XFLOATINT (margin)); | 567 | double d = max (0, XFLOATINT (margin)); |
| 568 | d = min (width / 2 - 1, d); | 568 | d = min (width / 2 - 1, d); |
| 569 | n = (int) ((double) total_glyphs / width * d); | 569 | n = (int) ((double) total_glyphs / width * d) * w->ncols_scale_factor; |
| 570 | } | 570 | } |
| 571 | else | 571 | else |
| 572 | n = 0; | 572 | n = 0; |
| @@ -1900,10 +1900,10 @@ allocate_matrices_for_frame_redisplay (window, x, y, dim_only_p, | |||
| 1900 | || dim.width != w->desired_matrix->matrix_w | 1900 | || dim.width != w->desired_matrix->matrix_w |
| 1901 | || dim.height != w->desired_matrix->matrix_h | 1901 | || dim.height != w->desired_matrix->matrix_h |
| 1902 | || (margin_glyphs_to_reserve (w, dim.width, | 1902 | || (margin_glyphs_to_reserve (w, dim.width, |
| 1903 | w->right_margin_cols) | 1903 | w->left_margin_cols) |
| 1904 | != w->desired_matrix->left_margin_glyphs) | 1904 | != w->desired_matrix->left_margin_glyphs) |
| 1905 | || (margin_glyphs_to_reserve (w, dim.width, | 1905 | || (margin_glyphs_to_reserve (w, dim.width, |
| 1906 | w->left_margin_cols) | 1906 | w->right_margin_cols) |
| 1907 | != w->desired_matrix->right_margin_glyphs)) | 1907 | != w->desired_matrix->right_margin_glyphs)) |
| 1908 | *window_change_flags |= CHANGED_LEAF_MATRIX; | 1908 | *window_change_flags |= CHANGED_LEAF_MATRIX; |
| 1909 | 1909 | ||
| @@ -1971,7 +1971,7 @@ required_matrix_height (w) | |||
| 1971 | int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); | 1971 | int ch_height = FRAME_SMALLEST_FONT_HEIGHT (f); |
| 1972 | int window_pixel_height = window_box_height (w) + abs (w->vscroll); | 1972 | int window_pixel_height = window_box_height (w) + abs (w->vscroll); |
| 1973 | return (((window_pixel_height + ch_height - 1) | 1973 | return (((window_pixel_height + ch_height - 1) |
| 1974 | / ch_height) | 1974 | / ch_height) * w->nrows_scale_factor |
| 1975 | /* One partially visible line at the top and | 1975 | /* One partially visible line at the top and |
| 1976 | bottom of the window. */ | 1976 | bottom of the window. */ |
| 1977 | + 2 | 1977 | + 2 |
| @@ -1999,7 +1999,7 @@ required_matrix_width (w) | |||
| 1999 | 1999 | ||
| 2000 | /* Compute number of glyphs needed in a glyph row. */ | 2000 | /* Compute number of glyphs needed in a glyph row. */ |
| 2001 | return (((window_pixel_width + ch_width - 1) | 2001 | return (((window_pixel_width + ch_width - 1) |
| 2002 | / ch_width) | 2002 | / ch_width) * w->ncols_scale_factor |
| 2003 | /* 2 partially visible columns in the text area. */ | 2003 | /* 2 partially visible columns in the text area. */ |
| 2004 | + 2 | 2004 | + 2 |
| 2005 | /* One partially visible column at the right | 2005 | /* One partially visible column at the right |
diff --git a/src/eval.c b/src/eval.c index d7cfe959158..f28105ac987 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2145,9 +2145,6 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2145 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); | 2145 | val = call_debugger (Fcons (Qexit, Fcons (val, Qnil))); |
| 2146 | backtrace_list = backtrace.next; | 2146 | backtrace_list = backtrace.next; |
| 2147 | 2147 | ||
| 2148 | #ifdef HAVE_CARBON | ||
| 2149 | mac_check_for_quit_char(); | ||
| 2150 | #endif | ||
| 2151 | return val; | 2148 | return val; |
| 2152 | } | 2149 | } |
| 2153 | 2150 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 40a545180fe..4d18435e17d 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -595,7 +595,7 @@ int interrupts_deferred; | |||
| 595 | 595 | ||
| 596 | /* We are unable to use interrupts if FIONREAD is not available, | 596 | /* We are unable to use interrupts if FIONREAD is not available, |
| 597 | so flush SIGIO so we won't try. */ | 597 | so flush SIGIO so we won't try. */ |
| 598 | #ifndef FIONREAD | 598 | #if !defined (FIONREAD) || defined(HAVE_CARBON) |
| 599 | #ifdef SIGIO | 599 | #ifdef SIGIO |
| 600 | #undef SIGIO | 600 | #undef SIGIO |
| 601 | #endif | 601 | #endif |
| @@ -2769,6 +2769,8 @@ and t is the same as `SECONDARY'. */) | |||
| 2769 | extern int inhibit_window_system; | 2769 | extern int inhibit_window_system; |
| 2770 | extern int noninteractive; | 2770 | extern int noninteractive; |
| 2771 | 2771 | ||
| 2772 | #include "blockinput.h" | ||
| 2773 | |||
| 2772 | /* When Emacs is started from the Finder, SELECT always immediately | 2774 | /* When Emacs is started from the Finder, SELECT always immediately |
| 2773 | returns as if input is present when file descriptor 0 is polled for | 2775 | returns as if input is present when file descriptor 0 is polled for |
| 2774 | input. Strangely, when Emacs is run as a GUI application from the | 2776 | input. Strangely, when Emacs is run as a GUI application from the |
| @@ -2776,85 +2778,100 @@ extern int noninteractive; | |||
| 2776 | the system call SELECT corrects this discrepancy. */ | 2778 | the system call SELECT corrects this discrepancy. */ |
| 2777 | int | 2779 | int |
| 2778 | sys_select (n, rfds, wfds, efds, timeout) | 2780 | sys_select (n, rfds, wfds, efds, timeout) |
| 2779 | int n; | 2781 | int n; |
| 2780 | SELECT_TYPE *rfds; | 2782 | SELECT_TYPE *rfds; |
| 2781 | SELECT_TYPE *wfds; | 2783 | SELECT_TYPE *wfds; |
| 2782 | SELECT_TYPE *efds; | 2784 | SELECT_TYPE *efds; |
| 2783 | struct timeval *timeout; | 2785 | struct timeval *timeout; |
| 2784 | { | 2786 | { |
| 2785 | if (!inhibit_window_system && rfds && FD_ISSET (0, rfds)) | 2787 | OSErr err; |
| 2786 | return 1; | 2788 | EMACS_TIME end_time, now, remaining_time; |
| 2787 | else if (inhibit_window_system || noninteractive || | 2789 | |
| 2788 | (timeout && (EMACS_SECS(*timeout)==0) && | 2790 | if (inhibit_window_system || noninteractive |
| 2789 | (EMACS_USECS(*timeout)==0))) | 2791 | || rfds == NULL || !FD_ISSET (0, rfds)) |
| 2790 | return select(n, rfds, wfds, efds, timeout); | 2792 | return select (n, rfds, wfds, efds, timeout); |
| 2791 | else | 2793 | |
| 2792 | { | 2794 | if (wfds == NULL && efds == NULL) |
| 2793 | EMACS_TIME end_time, now; | 2795 | { |
| 2794 | 2796 | int i; | |
| 2795 | EMACS_GET_TIME (end_time); | 2797 | |
| 2796 | if (timeout) | 2798 | for (i = 1; i < n; i++) |
| 2797 | EMACS_ADD_TIME (end_time, end_time, *timeout); | 2799 | if (FD_ISSET (i, rfds)) |
| 2798 | 2800 | break; | |
| 2799 | do | 2801 | if (i == n) |
| 2800 | { | 2802 | { |
| 2801 | int r; | 2803 | EventTimeout timeout_sec = |
| 2802 | EMACS_TIME one_second; | 2804 | (timeout |
| 2803 | SELECT_TYPE orfds; | 2805 | ? (EMACS_SECS (*timeout) * kEventDurationSecond |
| 2804 | 2806 | + EMACS_USECS (*timeout) * kEventDurationMicrosecond) | |
| 2805 | FD_ZERO (&orfds); | 2807 | : kEventDurationForever); |
| 2806 | if (rfds) | 2808 | |
| 2809 | BLOCK_INPUT; | ||
| 2810 | err = ReceiveNextEvent (0, NULL, timeout_sec, | ||
| 2811 | kEventLeaveInQueue, NULL); | ||
| 2812 | UNBLOCK_INPUT; | ||
| 2813 | if (err == noErr) | ||
| 2807 | { | 2814 | { |
| 2808 | orfds = *rfds; | 2815 | FD_ZERO (rfds); |
| 2816 | FD_SET (0, rfds); | ||
| 2817 | return 1; | ||
| 2809 | } | 2818 | } |
| 2819 | else | ||
| 2820 | return 0; | ||
| 2821 | } | ||
| 2822 | } | ||
| 2810 | 2823 | ||
| 2811 | EMACS_SET_SECS (one_second, 1); | 2824 | if (timeout) |
| 2812 | EMACS_SET_USECS (one_second, 0); | 2825 | { |
| 2826 | remaining_time = *timeout; | ||
| 2827 | EMACS_GET_TIME (now); | ||
| 2828 | EMACS_ADD_TIME (end_time, now, remaining_time); | ||
| 2829 | } | ||
| 2830 | FD_CLR (0, rfds); | ||
| 2831 | do | ||
| 2832 | { | ||
| 2833 | EMACS_TIME select_timeout; | ||
| 2834 | SELECT_TYPE orfds = *rfds; | ||
| 2835 | int r; | ||
| 2813 | 2836 | ||
| 2814 | if (timeout && EMACS_TIME_LT(*timeout, one_second)) | 2837 | EMACS_SET_SECS_USECS (select_timeout, 0, 20000); |
| 2815 | one_second = *timeout; | ||
| 2816 | 2838 | ||
| 2817 | if ((r = select (n, &orfds, wfds, efds, &one_second)) > 0) | 2839 | if (timeout && EMACS_TIME_LT (remaining_time, select_timeout)) |
| 2840 | select_timeout = remaining_time; | ||
| 2841 | |||
| 2842 | r = select (n, &orfds, wfds, efds, &select_timeout); | ||
| 2843 | BLOCK_INPUT; | ||
| 2844 | err = ReceiveNextEvent (0, NULL, kEventDurationNoWait, | ||
| 2845 | kEventLeaveInQueue, NULL); | ||
| 2846 | UNBLOCK_INPUT; | ||
| 2847 | if (r > 0) | ||
| 2848 | { | ||
| 2849 | *rfds = orfds; | ||
| 2850 | if (err == noErr) | ||
| 2818 | { | 2851 | { |
| 2819 | *rfds = orfds; | 2852 | FD_SET (0, rfds); |
| 2820 | return r; | 2853 | r++; |
| 2821 | } | 2854 | } |
| 2855 | return r; | ||
| 2856 | } | ||
| 2857 | else if (err == noErr) | ||
| 2858 | { | ||
| 2859 | FD_ZERO (rfds); | ||
| 2860 | FD_SET (0, rfds); | ||
| 2861 | return 1; | ||
| 2862 | } | ||
| 2822 | 2863 | ||
| 2823 | mac_check_for_quit_char(); | 2864 | if (timeout) |
| 2824 | 2865 | { | |
| 2825 | EMACS_GET_TIME (now); | 2866 | EMACS_GET_TIME (now); |
| 2826 | EMACS_SUB_TIME (now, end_time, now); | 2867 | EMACS_SUB_TIME (remaining_time, end_time, now); |
| 2827 | } | 2868 | } |
| 2828 | while (!timeout || !EMACS_TIME_NEG_P (now)); | ||
| 2829 | |||
| 2830 | return 0; | ||
| 2831 | } | ||
| 2832 | } | ||
| 2833 | |||
| 2834 | #undef read | ||
| 2835 | int sys_read (fds, buf, nbyte) | ||
| 2836 | int fds; | ||
| 2837 | char *buf; | ||
| 2838 | unsigned int nbyte; | ||
| 2839 | { | ||
| 2840 | SELECT_TYPE rfds; | ||
| 2841 | EMACS_TIME one_second; | ||
| 2842 | int r; | ||
| 2843 | |||
| 2844 | /* Use select to block on IO while still checking for quit_char */ | ||
| 2845 | if (!inhibit_window_system && !noninteractive && | ||
| 2846 | ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK)) | ||
| 2847 | { | ||
| 2848 | FD_ZERO (&rfds); | ||
| 2849 | FD_SET (fds, &rfds); | ||
| 2850 | if (sys_select (fds+1, &rfds, 0, 0, NULL) < 0) | ||
| 2851 | return -1; | ||
| 2852 | } | 2869 | } |
| 2870 | while (!timeout || EMACS_TIME_LT (now, end_time)); | ||
| 2853 | 2871 | ||
| 2854 | return read (fds, buf, nbyte); | 2872 | return 0; |
| 2855 | } | 2873 | } |
| 2856 | 2874 | ||
| 2857 | |||
| 2858 | /* Set up environment variables so that Emacs can correctly find its | 2875 | /* Set up environment variables so that Emacs can correctly find its |
| 2859 | support files when packaged as an application bundle. Directories | 2876 | support files when packaged as an application bundle. Directories |
| 2860 | placed in /usr/local/share/emacs/<emacs-version>/, /usr/local/bin, | 2877 | placed in /usr/local/share/emacs/<emacs-version>/, /usr/local/bin, |
diff --git a/src/macterm.c b/src/macterm.c index efe3d166d11..eaf7517d71a 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -5321,7 +5321,6 @@ x_make_frame_visible (f) | |||
| 5321 | 5321 | ||
| 5322 | XFlush (FRAME_MAC_DISPLAY (f)); | 5322 | XFlush (FRAME_MAC_DISPLAY (f)); |
| 5323 | 5323 | ||
| 5324 | #if 0 /* MAC_TODO */ | ||
| 5325 | /* Synchronize to ensure Emacs knows the frame is visible | 5324 | /* Synchronize to ensure Emacs knows the frame is visible |
| 5326 | before we do anything else. We do this loop with input not blocked | 5325 | before we do anything else. We do this loop with input not blocked |
| 5327 | so that incoming events are handled. */ | 5326 | so that incoming events are handled. */ |
| @@ -5365,9 +5364,6 @@ x_make_frame_visible (f) | |||
| 5365 | FRAME_SAMPLE_VISIBILITY (f); | 5364 | FRAME_SAMPLE_VISIBILITY (f); |
| 5366 | } | 5365 | } |
| 5367 | } | 5366 | } |
| 5368 | #else | ||
| 5369 | UNBLOCK_INPUT; | ||
| 5370 | #endif /* MAC_TODO */ | ||
| 5371 | } | 5367 | } |
| 5372 | 5368 | ||
| 5373 | /* Change from mapped state to withdrawn state. */ | 5369 | /* Change from mapped state to withdrawn state. */ |
diff --git a/src/process.c b/src/process.c index 71f38afc776..9e77123bee7 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4190,12 +4190,13 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 4190 | SELECT_TYPE Atemp, Ctemp; | 4190 | SELECT_TYPE Atemp, Ctemp; |
| 4191 | 4191 | ||
| 4192 | Atemp = input_wait_mask; | 4192 | Atemp = input_wait_mask; |
| 4193 | #ifdef MAC_OSX | 4193 | #if 0 |
| 4194 | /* On Mac OS X, the SELECT system call always says input is | 4194 | /* On Mac OS X 10.0, the SELECT system call always says input is |
| 4195 | present (for reading) at stdin, even when none is. This | 4195 | present (for reading) at stdin, even when none is. This |
| 4196 | causes the call to SELECT below to return 1 and | 4196 | causes the call to SELECT below to return 1 and |
| 4197 | status_notify not to be called. As a result output of | 4197 | status_notify not to be called. As a result output of |
| 4198 | subprocesses are incorrectly discarded. */ | 4198 | subprocesses are incorrectly discarded. |
| 4199 | */ | ||
| 4199 | FD_CLR (0, &Atemp); | 4200 | FD_CLR (0, &Atemp); |
| 4200 | #endif | 4201 | #endif |
| 4201 | Ctemp = connect_wait_mask; | 4202 | Ctemp = connect_wait_mask; |
diff --git a/src/s/gnu-linux.h b/src/s/gnu-linux.h index efdc2bc00ef..033ce49293a 100644 --- a/src/s/gnu-linux.h +++ b/src/s/gnu-linux.h | |||
| @@ -355,7 +355,7 @@ Boston, MA 02111-1307, USA. */ | |||
| 355 | 355 | ||
| 356 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ | 356 | #if defined __i386__ || defined __sparc__ || defined __mc68000__ \ |
| 357 | || defined __alpha__ || defined __mips__ || defined __s390__ \ | 357 | || defined __alpha__ || defined __mips__ || defined __s390__ \ |
| 358 | || defined __arm__ || defined __powerpc__ | 358 | || defined __arm__ || defined __powerpc__ || defined __amd64__ |
| 359 | #define GC_SETJMP_WORKS 1 | 359 | #define GC_SETJMP_WORKS 1 |
| 360 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS | 360 | #define GC_MARK_STACK GC_MAKE_GCPROS_NOOPS |
| 361 | #ifdef __mc68000__ | 361 | #ifdef __mc68000__ |
diff --git a/src/sysdep.c b/src/sysdep.c index 20d57b6a6a3..018fdc1fd57 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -72,10 +72,6 @@ static int delete_exited_processes; | |||
| 72 | #endif | 72 | #endif |
| 73 | #endif /* not WINDOWSNT */ | 73 | #endif /* not WINDOWSNT */ |
| 74 | 74 | ||
| 75 | #ifdef HAVE_CARBON | ||
| 76 | #define read sys_read | ||
| 77 | #endif | ||
| 78 | |||
| 79 | /* Does anyone other than VMS need this? */ | 75 | /* Does anyone other than VMS need this? */ |
| 80 | #ifndef fwrite | 76 | #ifndef fwrite |
| 81 | #define sys_fwrite fwrite | 77 | #define sys_fwrite fwrite |
diff --git a/src/w32fns.c b/src/w32fns.c index d5ba6e9b078..0cb3abe91cd 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -7735,14 +7735,14 @@ specified. Ensure that file exists if MUSTMATCH is non-nil. */) | |||
| 7735 | /* Create the dialog with PROMPT as title, using DIR as initial | 7735 | /* Create the dialog with PROMPT as title, using DIR as initial |
| 7736 | directory and using "*" as pattern. */ | 7736 | directory and using "*" as pattern. */ |
| 7737 | dir = Fexpand_file_name (dir, Qnil); | 7737 | dir = Fexpand_file_name (dir, Qnil); |
| 7738 | strncpy (init_dir, SDATA (ENCODE_SYSTEM (dir)), MAX_PATH); | 7738 | strncpy (init_dir, SDATA (ENCODE_FILE (dir)), MAX_PATH); |
| 7739 | init_dir[MAX_PATH] = '\0'; | 7739 | init_dir[MAX_PATH] = '\0'; |
| 7740 | unixtodos_filename (init_dir); | 7740 | unixtodos_filename (init_dir); |
| 7741 | 7741 | ||
| 7742 | if (STRINGP (default_filename)) | 7742 | if (STRINGP (default_filename)) |
| 7743 | { | 7743 | { |
| 7744 | char *file_name_only; | 7744 | char *file_name_only; |
| 7745 | char *full_path_name = SDATA (ENCODE_SYSTEM (default_filename)); | 7745 | char *full_path_name = SDATA (ENCODE_FILE (default_filename)); |
| 7746 | 7746 | ||
| 7747 | unixtodos_filename (full_path_name); | 7747 | unixtodos_filename (full_path_name); |
| 7748 | 7748 | ||
diff --git a/src/widget.c b/src/widget.c index dbf55a34d9c..57eef4059e6 100644 --- a/src/widget.c +++ b/src/widget.c | |||
| @@ -758,7 +758,6 @@ EmacsFrameDestroy (widget) | |||
| 758 | 758 | ||
| 759 | if (! s) abort (); | 759 | if (! s) abort (); |
| 760 | if (! s->output_data.x) abort (); | 760 | if (! s->output_data.x) abort (); |
| 761 | if (! s->output_data.x->normal_gc) abort (); | ||
| 762 | 761 | ||
| 763 | BLOCK_INPUT; | 762 | BLOCK_INPUT; |
| 764 | x_free_gcs (s); | 763 | x_free_gcs (s); |
diff --git a/src/window.c b/src/window.c index 0e318b039a4..2ab9957153f 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -262,6 +262,7 @@ make_window () | |||
| 262 | bzero (&p->last_cursor, sizeof (p->last_cursor)); | 262 | bzero (&p->last_cursor, sizeof (p->last_cursor)); |
| 263 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); | 263 | bzero (&p->phys_cursor, sizeof (p->phys_cursor)); |
| 264 | p->desired_matrix = p->current_matrix = 0; | 264 | p->desired_matrix = p->current_matrix = 0; |
| 265 | p->nrows_scale_factor = p->ncols_scale_factor = 1; | ||
| 265 | p->phys_cursor_type = -1; | 266 | p->phys_cursor_type = -1; |
| 266 | p->phys_cursor_width = -1; | 267 | p->phys_cursor_width = -1; |
| 267 | p->must_be_updated_p = 0; | 268 | p->must_be_updated_p = 0; |
| @@ -320,15 +321,17 @@ WINDOW defaults to the selected window. */) | |||
| 320 | 321 | ||
| 321 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, | 322 | DEFUN ("pos-visible-in-window-p", Fpos_visible_in_window_p, |
| 322 | Spos_visible_in_window_p, 0, 3, 0, | 323 | Spos_visible_in_window_p, 0, 3, 0, |
| 323 | doc: /* Return t if position POS is currently on the frame in WINDOW. | 324 | doc: /* Return non-nil if position POS is currently on the frame in WINDOW. |
| 324 | Return nil if that position is scrolled vertically out of view. | 325 | Return nil if that position is scrolled vertically out of view. |
| 325 | If a character is only partially visible, nil is returned, unless the | 326 | If a character is only partially visible, nil is returned, unless the |
| 326 | optional argument PARTIALLY is non-nil. | 327 | optional argument PARTIALLY is non-nil. |
| 328 | If POS is only out of view because of horizontal scrolling, return non-nil. | ||
| 327 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. | 329 | POS defaults to point in WINDOW; WINDOW defaults to the selected window. |
| 328 | 330 | ||
| 329 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, | 331 | If POS is visible, return t if PARTIALLY is nil; if PARTIALLY is non-nil, |
| 330 | return value is a list (X Y PARTIAL) where X and Y are the pixel relative | 332 | return value is a list (X Y FULLY) where X and Y are the pixel coordinates |
| 331 | coordinate */) | 333 | relative to the top left corner of the window, and FULLY is t if the |
| 334 | character after POS is fully visible and nil otherwise. */) | ||
| 332 | (pos, window, partially) | 335 | (pos, window, partially) |
| 333 | Lisp_Object pos, window, partially; | 336 | Lisp_Object pos, window, partially; |
| 334 | { | 337 | { |
| @@ -432,7 +435,7 @@ DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | |||
| 432 | 435 | ||
| 433 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, | 436 | DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0, |
| 434 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. | 437 | doc: /* Set number of columns WINDOW is scrolled from left margin to NCOL. |
| 435 | NCOL should be zero or positive. | 438 | Return NCOL. NCOL should be zero or positive. |
| 436 | 439 | ||
| 437 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the | 440 | Note that if `automatic-hscrolling' is non-nil, you cannot scroll the |
| 438 | window so that the location of point becomes invisible. */) | 441 | window so that the location of point becomes invisible. */) |
| @@ -546,7 +549,7 @@ display margins, fringes, header line, and/or mode line. */) | |||
| 546 | } | 549 | } |
| 547 | 550 | ||
| 548 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, | 551 | DEFUN ("window-inside-pixel-edges", Fwindow_inside_pixel_edges, Swindow_inside_pixel_edges, 0, 1, 0, |
| 549 | doc: /* Return a list of the edge coordinates of WINDOW. | 552 | doc: /* Return a list of the edge pixel coordinates of WINDOW. |
| 550 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. | 553 | \(LEFT TOP RIGHT BOTTOM), all relative to 0, 0 at top left corner of frame. |
| 551 | RIGHT is one more than the rightmost x position used by text in WINDOW, | 554 | RIGHT is one more than the rightmost x position used by text in WINDOW, |
| 552 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. | 555 | and BOTTOM is one more than the bottommost y position used by text in WINDOW. |
| @@ -988,6 +991,8 @@ DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 2, 0, | |||
| 988 | This is updated by redisplay, when it runs to completion. | 991 | This is updated by redisplay, when it runs to completion. |
| 989 | Simply changing the buffer text or setting `window-start' | 992 | Simply changing the buffer text or setting `window-start' |
| 990 | does not update this value. | 993 | does not update this value. |
| 994 | Return nil if there is no recorded value. \(This can happen if the | ||
| 995 | last redisplay of WINDOW was preempted, and did not finish.) | ||
| 991 | If UPDATE is non-nil, compute the up-to-date position | 996 | If UPDATE is non-nil, compute the up-to-date position |
| 992 | if it isn't already recorded. */) | 997 | if it isn't already recorded. */) |
| 993 | (window, update) | 998 | (window, update) |
| @@ -1053,7 +1058,8 @@ if it isn't already recorded. */) | |||
| 1053 | } | 1058 | } |
| 1054 | 1059 | ||
| 1055 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | 1060 | DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, |
| 1056 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. */) | 1061 | doc: /* Make point value in WINDOW be at position POS in WINDOW's buffer. |
| 1062 | Return POS. */) | ||
| 1057 | (window, pos) | 1063 | (window, pos) |
| 1058 | Lisp_Object window, pos; | 1064 | Lisp_Object window, pos; |
| 1059 | { | 1065 | { |
| @@ -1076,6 +1082,7 @@ DEFUN ("set-window-point", Fset_window_point, Sset_window_point, 2, 2, 0, | |||
| 1076 | 1082 | ||
| 1077 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, | 1083 | DEFUN ("set-window-start", Fset_window_start, Sset_window_start, 2, 3, 0, |
| 1078 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. | 1084 | doc: /* Make display in WINDOW start at position POS in WINDOW's buffer. |
| 1085 | Return POS. | ||
| 1079 | Optional third arg NOFORCE non-nil inhibits next redisplay | 1086 | Optional third arg NOFORCE non-nil inhibits next redisplay |
| 1080 | from overriding motion of point in order to display at this exact start. */) | 1087 | from overriding motion of point in order to display at this exact start. */) |
| 1081 | (window, pos, noforce) | 1088 | (window, pos, noforce) |
| @@ -4850,7 +4857,8 @@ scroll_command (n, direction) | |||
| 4850 | } | 4857 | } |
| 4851 | 4858 | ||
| 4852 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", | 4859 | DEFUN ("scroll-up", Fscroll_up, Sscroll_up, 0, 1, "P", |
| 4853 | doc: /* Scroll text of current window upward ARG lines; or near full screen if no ARG. | 4860 | doc: /* Scroll text of current window upward ARG lines. |
| 4861 | If ARG is omitted or nil, scroll upward by a near full screen. | ||
| 4854 | A near full screen is `next-screen-context-lines' less than a full screen. | 4862 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4855 | Negative ARG means scroll downward. | 4863 | Negative ARG means scroll downward. |
| 4856 | If ARG is the atom `-', scroll downward by nearly full screen. | 4864 | If ARG is the atom `-', scroll downward by nearly full screen. |
| @@ -4863,7 +4871,8 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4863 | } | 4871 | } |
| 4864 | 4872 | ||
| 4865 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", | 4873 | DEFUN ("scroll-down", Fscroll_down, Sscroll_down, 0, 1, "P", |
| 4866 | doc: /* Scroll text of current window down ARG lines; or near full screen if no ARG. | 4874 | doc: /* Scroll text of current window down ARG lines. |
| 4875 | If ARG is omitted or nil, scroll down by a near full screen. | ||
| 4867 | A near full screen is `next-screen-context-lines' less than a full screen. | 4876 | A near full screen is `next-screen-context-lines' less than a full screen. |
| 4868 | Negative ARG means scroll upward. | 4877 | Negative ARG means scroll upward. |
| 4869 | If ARG is the atom `-', scroll upward by nearly full screen. | 4878 | If ARG is the atom `-', scroll upward by nearly full screen. |
| @@ -4877,10 +4886,11 @@ When calling from a program, supply as argument a number, nil, or `-'. */) | |||
| 4877 | 4886 | ||
| 4878 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, | 4887 | DEFUN ("other-window-for-scrolling", Fother_window_for_scrolling, Sother_window_for_scrolling, 0, 0, 0, |
| 4879 | doc: /* Return the other window for \"other window scroll\" commands. | 4888 | doc: /* Return the other window for \"other window scroll\" commands. |
| 4880 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4881 | specifies the window. | ||
| 4882 | If `other-window-scroll-buffer' is non-nil, a window | 4889 | If `other-window-scroll-buffer' is non-nil, a window |
| 4883 | showing that buffer is used. */) | 4890 | showing that buffer is used. |
| 4891 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4892 | specifies the window. This takes precedence over | ||
| 4893 | `other-window-scroll-buffer'. */) | ||
| 4884 | () | 4894 | () |
| 4885 | { | 4895 | { |
| 4886 | Lisp_Object window; | 4896 | Lisp_Object window; |
| @@ -4926,10 +4936,11 @@ if the current one is at the bottom. Negative ARG means scroll downward. | |||
| 4926 | If ARG is the atom `-', scroll downward by nearly full screen. | 4936 | If ARG is the atom `-', scroll downward by nearly full screen. |
| 4927 | When calling from a program, supply as argument a number, nil, or `-'. | 4937 | When calling from a program, supply as argument a number, nil, or `-'. |
| 4928 | 4938 | ||
| 4929 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4930 | specifies the window to scroll. | ||
| 4931 | If `other-window-scroll-buffer' is non-nil, scroll the window | 4939 | If `other-window-scroll-buffer' is non-nil, scroll the window |
| 4932 | showing that buffer, popping the buffer up if necessary. */) | 4940 | showing that buffer, popping the buffer up if necessary. |
| 4941 | If in the minibuffer, `minibuffer-scroll-window' if non-nil | ||
| 4942 | specifies the window to scroll. This takes precedence over | ||
| 4943 | `other-window-scroll-buffer'. */) | ||
| 4933 | (arg) | 4944 | (arg) |
| 4934 | Lisp_Object arg; | 4945 | Lisp_Object arg; |
| 4935 | { | 4946 | { |
| @@ -5905,7 +5916,8 @@ redirection (see `redirect-frame-focus'). */) | |||
| 5905 | 5916 | ||
| 5906 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, | 5917 | DEFUN ("save-window-excursion", Fsave_window_excursion, Ssave_window_excursion, |
| 5907 | 0, UNEVALLED, 0, | 5918 | 0, UNEVALLED, 0, |
| 5908 | doc: /* Execute body, preserving window sizes and contents. | 5919 | doc: /* Execute BODY, preserving window sizes and contents. |
| 5920 | Return the value of the last form in BODY. | ||
| 5909 | Restore which buffer appears in which window, where display starts, | 5921 | Restore which buffer appears in which window, where display starts, |
| 5910 | and the value of point and mark for each window. | 5922 | and the value of point and mark for each window. |
| 5911 | Also restore the choice of selected window. | 5923 | Also restore the choice of selected window. |
| @@ -6165,7 +6177,11 @@ DEFUN ("set-window-vscroll", Fset_window_vscroll, Sset_window_vscroll, | |||
| 6165 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. | 6177 | doc: /* Set amount by which WINDOW should be scrolled vertically to VSCROLL. |
| 6166 | WINDOW nil means use the selected window. Normally, VSCROLL is a | 6178 | WINDOW nil means use the selected window. Normally, VSCROLL is a |
| 6167 | non-negative multiple of the canonical character height of WINDOW; | 6179 | non-negative multiple of the canonical character height of WINDOW; |
| 6168 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. */) | 6180 | optional third arg PIXELS_P non-nil means that VSCROLL is in pixels. |
| 6181 | If PIXELS-P is nil, VSCROLL may have to be rounded so that it | ||
| 6182 | corresponds to an integral number of pixels. The return value is the | ||
| 6183 | result of this rounding. | ||
| 6184 | If PIXELS-P is non-nil, the return value is VSCROLL. */) | ||
| 6169 | (window, vscroll, pixels_p) | 6185 | (window, vscroll, pixels_p) |
| 6170 | Lisp_Object window, vscroll, pixels_p; | 6186 | Lisp_Object window, vscroll, pixels_p; |
| 6171 | { | 6187 | { |
| @@ -6649,9 +6665,11 @@ The selected frame is the one whose configuration has changed. */); | |||
| 6649 | 6665 | ||
| 6650 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, | 6666 | DEFVAR_BOOL ("window-size-fixed", &window_size_fixed, |
| 6651 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. | 6667 | doc: /* Non-nil in a buffer means windows displaying the buffer are fixed-size. |
| 6668 | If the value is`height', then only the window's height is fixed. | ||
| 6669 | If the value is `width', then only the window's width is fixed. | ||
| 6670 | Any other non-nil value fixes both the width and the height. | ||
| 6652 | Emacs won't change the size of any window displaying that buffer, | 6671 | Emacs won't change the size of any window displaying that buffer, |
| 6653 | unless you explicitly change the size, or Emacs has no other choice. | 6672 | unless you explicitly change the size, or Emacs has no other choice. */); |
| 6654 | This variable automatically becomes buffer-local when set. */); | ||
| 6655 | Fmake_variable_buffer_local (Qwindow_size_fixed); | 6673 | Fmake_variable_buffer_local (Qwindow_size_fixed); |
| 6656 | window_size_fixed = 0; | 6674 | window_size_fixed = 0; |
| 6657 | 6675 | ||
diff --git a/src/window.h b/src/window.h index 63a19cc4b0d..8df0b6bb3eb 100644 --- a/src/window.h +++ b/src/window.h | |||
| @@ -236,6 +236,11 @@ struct window | |||
| 236 | struct glyph_matrix *current_matrix; | 236 | struct glyph_matrix *current_matrix; |
| 237 | struct glyph_matrix *desired_matrix; | 237 | struct glyph_matrix *desired_matrix; |
| 238 | 238 | ||
| 239 | /* Scaling factor for the glyph_matrix size calculation in this window. | ||
| 240 | Used if window contains many small images or uses proportional fonts, | ||
| 241 | as the normal may yield a matrix which is too small. */ | ||
| 242 | int nrows_scale_factor, ncols_scale_factor; | ||
| 243 | |||
| 239 | /* Cursor position as of last update that completed without | 244 | /* Cursor position as of last update that completed without |
| 240 | pause. This is the position of last_point. */ | 245 | pause. This is the position of last_point. */ |
| 241 | struct cursor_pos last_cursor; | 246 | struct cursor_pos last_cursor; |
diff --git a/src/xdisp.c b/src/xdisp.c index b04eb7ab7b7..02f020ed57a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14461,9 +14461,13 @@ display_line (it) | |||
| 14461 | /* We always start displaying at hpos zero even if hscrolled. */ | 14461 | /* We always start displaying at hpos zero even if hscrolled. */ |
| 14462 | xassert (it->hpos == 0 && it->current_x == 0); | 14462 | xassert (it->hpos == 0 && it->current_x == 0); |
| 14463 | 14463 | ||
| 14464 | /* We must not display in a row that's not a text row. */ | 14464 | if (MATRIX_ROW_VPOS (row, it->w->desired_matrix) |
| 14465 | xassert (MATRIX_ROW_VPOS (row, it->w->desired_matrix) | 14465 | >= it->w->desired_matrix->nrows) |
| 14466 | < it->w->desired_matrix->nrows); | 14466 | { |
| 14467 | it->w->nrows_scale_factor++; | ||
| 14468 | fonts_changed_p = 1; | ||
| 14469 | return 0; | ||
| 14470 | } | ||
| 14467 | 14471 | ||
| 14468 | /* Is IT->w showing the region? */ | 14472 | /* Is IT->w showing the region? */ |
| 14469 | it->w->region_showing = it->region_beg_charpos > 0 ? Qt : Qnil; | 14473 | it->w->region_showing = it->region_beg_charpos > 0 ? Qt : Qnil; |
| @@ -18134,6 +18138,11 @@ append_glyph (it) | |||
| 18134 | glyph->font_type = FONT_TYPE_UNKNOWN; | 18138 | glyph->font_type = FONT_TYPE_UNKNOWN; |
| 18135 | ++it->glyph_row->used[area]; | 18139 | ++it->glyph_row->used[area]; |
| 18136 | } | 18140 | } |
| 18141 | else if (!fonts_changed_p) | ||
| 18142 | { | ||
| 18143 | it->w->ncols_scale_factor++; | ||
| 18144 | fonts_changed_p = 1; | ||
| 18145 | } | ||
| 18137 | } | 18146 | } |
| 18138 | 18147 | ||
| 18139 | /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. | 18148 | /* Store one glyph for the composition IT->cmp_id in IT->glyph_row. |
| @@ -18171,6 +18180,11 @@ append_composite_glyph (it) | |||
| 18171 | glyph->font_type = FONT_TYPE_UNKNOWN; | 18180 | glyph->font_type = FONT_TYPE_UNKNOWN; |
| 18172 | ++it->glyph_row->used[area]; | 18181 | ++it->glyph_row->used[area]; |
| 18173 | } | 18182 | } |
| 18183 | else if (!fonts_changed_p) | ||
| 18184 | { | ||
| 18185 | it->w->ncols_scale_factor++; | ||
| 18186 | fonts_changed_p = 1; | ||
| 18187 | } | ||
| 18174 | } | 18188 | } |
| 18175 | 18189 | ||
| 18176 | 18190 | ||
| @@ -18340,6 +18354,11 @@ produce_image_glyph (it) | |||
| 18340 | glyph->font_type = FONT_TYPE_UNKNOWN; | 18354 | glyph->font_type = FONT_TYPE_UNKNOWN; |
| 18341 | ++it->glyph_row->used[area]; | 18355 | ++it->glyph_row->used[area]; |
| 18342 | } | 18356 | } |
| 18357 | else if (!fonts_changed_p) | ||
| 18358 | { | ||
| 18359 | it->w->ncols_scale_factor++; | ||
| 18360 | fonts_changed_p = 1; | ||
| 18361 | } | ||
| 18343 | } | 18362 | } |
| 18344 | } | 18363 | } |
| 18345 | 18364 | ||
| @@ -18383,6 +18402,11 @@ append_stretch_glyph (it, object, width, height, ascent) | |||
| 18383 | glyph->font_type = FONT_TYPE_UNKNOWN; | 18402 | glyph->font_type = FONT_TYPE_UNKNOWN; |
| 18384 | ++it->glyph_row->used[area]; | 18403 | ++it->glyph_row->used[area]; |
| 18385 | } | 18404 | } |
| 18405 | else if (!fonts_changed_p) | ||
| 18406 | { | ||
| 18407 | it->w->ncols_scale_factor++; | ||
| 18408 | fonts_changed_p = 1; | ||
| 18409 | } | ||
| 18386 | } | 18410 | } |
| 18387 | 18411 | ||
| 18388 | 18412 | ||
| @@ -22178,7 +22202,7 @@ all the functions in the list are called, with the frame as argument. */); | |||
| 22178 | Vwindow_size_change_functions = Qnil; | 22202 | Vwindow_size_change_functions = Qnil; |
| 22179 | 22203 | ||
| 22180 | DEFVAR_LISP ("window-scroll-functions", &Vwindow_scroll_functions, | 22204 | DEFVAR_LISP ("window-scroll-functions", &Vwindow_scroll_functions, |
| 22181 | doc: /* List of Functions to call before redisplaying a window with scrolling. | 22205 | doc: /* List of functions to call before redisplaying a window with scrolling. |
| 22182 | Each function is called with two arguments, the window | 22206 | Each function is called with two arguments, the window |
| 22183 | and its new display-start position. Note that the value of `window-end' | 22207 | and its new display-start position. Note that the value of `window-end' |
| 22184 | is not valid when these functions are called. */); | 22208 | is not valid when these functions are called. */); |