diff options
| author | Karoly Lorentey | 2004-08-03 12:45:59 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-08-03 12:45:59 +0000 |
| commit | 4fce8dfae60dce6a19bef88ce893bcc019576c66 (patch) | |
| tree | 41dcfb7ebfda8af1faba9e2833283f3dd1fba472 | |
| parent | d0e37e4839b378aa90ba6686013f9563cc3c0821 (diff) | |
| parent | ed5c373cab5483317a8b6fca3d8d4d52432934fc (diff) | |
| download | emacs-4fce8dfae60dce6a19bef88ce893bcc019576c66.tar.gz emacs-4fce8dfae60dce6a19bef88ce893bcc019576c66.zip | |
Merged in changes from CVS trunk.
Patches applied:
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-473
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-474
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-475
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-476
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-477
Update from CVS
* miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-478
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-225
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | config.bat | 10 | ||||
| -rw-r--r-- | etc/NEWS | 4 | ||||
| -rw-r--r-- | lisp/ChangeLog | 45 | ||||
| -rw-r--r-- | lisp/abbrev.el | 15 | ||||
| -rw-r--r-- | lisp/avoid.el | 6 | ||||
| -rw-r--r-- | lisp/help-mode.el | 2 | ||||
| -rw-r--r-- | lisp/international/utf-8.el | 21 | ||||
| -rw-r--r-- | lisp/novice.el | 6 | ||||
| -rw-r--r-- | lisp/printing.el | 14 | ||||
| -rw-r--r-- | lisp/replace.el | 41 | ||||
| -rw-r--r-- | lisp/subr.el | 16 | ||||
| -rw-r--r-- | lisp/windmove.el | 6 | ||||
| -rw-r--r-- | lisp/window.el | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 39 | ||||
| -rw-r--r-- | src/abbrev.c | 4 | ||||
| -rw-r--r-- | src/callint.c | 3 | ||||
| -rw-r--r-- | src/data.c | 4 | ||||
| -rw-r--r-- | src/editfns.c | 5 | ||||
| -rw-r--r-- | src/indent.c | 79 | ||||
| -rw-r--r-- | src/keyboard.c | 4 | ||||
| -rw-r--r-- | src/keymap.c | 5 | ||||
| -rw-r--r-- | src/process.c | 12 | ||||
| -rw-r--r-- | src/window.c | 2 |
24 files changed, 249 insertions, 100 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-07-31 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * config.bat: Update URLs in the comments. | ||
| 4 | |||
| 1 | 2004-07-05 Andreas Schwab <schwab@suse.de> | 5 | 2004-07-05 Andreas Schwab <schwab@suse.de> |
| 2 | 6 | ||
| 3 | * Makefile.in (install-arch-indep): Remove .arch-inventory files. | 7 | * Makefile.in (install-arch-indep): Remove .arch-inventory files. |
diff --git a/config.bat b/config.bat index 732c4021aaf..c3e36975dec 100644 --- a/config.bat +++ b/config.bat | |||
| @@ -24,17 +24,15 @@ rem ---------------------------------------------------------------------- | |||
| 24 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: | 24 | rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: |
| 25 | rem | 25 | rem |
| 26 | rem + msdos version 3 or better. | 26 | rem + msdos version 3 or better. |
| 27 | rem + djgpp version 1.12maint1 or later (version 2.0 or later recommended). | 27 | rem + DJGPP version 1.12maint1 or later (version 2.03 or later recommended). |
| 28 | rem + make utility that allows breaking of the 128 chars limit on | 28 | rem + make utility that allows breaking of the 128 chars limit on |
| 29 | rem command lines. ndmake (as of version 4.5) won't work due to a | 29 | rem command lines. ndmake (as of version 4.5) won't work due to a |
| 30 | rem line length limit. The make that comes with djgpp does work. | 30 | rem line length limit. The make that comes with DJGPP does work. |
| 31 | rem + rm and mv (from GNU file utilities). | 31 | rem + rm and mv (from GNU file utilities). |
| 32 | rem + sed (you can use the port that comes with DJGPP). | 32 | rem + sed (you can use the port that comes with DJGPP). |
| 33 | rem | 33 | rem |
| 34 | rem You should be able to get all the above utilities from any SimTel | 34 | rem You should be able to get all the above utilities from the DJGPP FTP |
| 35 | rem repository, e.g. ftp.simtel.net, in the directory | 35 | rem site, ftp.delorie.com, in the directory "pub/djgpp/current/v2gnu". |
| 36 | rem "pub/simtelnet/gnu/djgpp/v2gnu". As usual, please use your local | ||
| 37 | rem mirroring site to reduce trans-Atlantic traffic. | ||
| 38 | rem ---------------------------------------------------------------------- | 36 | rem ---------------------------------------------------------------------- |
| 39 | set X11= | 37 | set X11= |
| 40 | set nodebug= | 38 | set nodebug= |
| @@ -2187,6 +2187,10 @@ configuration files. | |||
| 2187 | 2187 | ||
| 2188 | * Lisp Changes in Emacs 21.4 | 2188 | * Lisp Changes in Emacs 21.4 |
| 2189 | 2189 | ||
| 2190 | ** Function `compute-motion' now calculates the usable window | ||
| 2191 | width if the WIDTH argument is nil. If the TOPOS argument is nil, | ||
| 2192 | the usable window height and width is used. | ||
| 2193 | |||
| 2190 | +++ | 2194 | +++ |
| 2191 | ** `visited-file-modtime' and `calendar-time-from-absolute' now return | 2195 | ** `visited-file-modtime' and `calendar-time-from-absolute' now return |
| 2192 | a list of two integers, instead of a cons. | 2196 | a list of two integers, instead of a cons. |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea1392783f6..b5134b2647f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,48 @@ | |||
| 1 | 2004-08-02 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * avoid.el (mouse-avoidance-point-position): Use window-inside-edges | ||
| 4 | and call compute-motion with nil for topos and width to get proper | ||
| 5 | usable width and height for both window and non-window systems. | ||
| 6 | |||
| 7 | * windmove.el (windmove-coordinates-of-position): Let compute-motion | ||
| 8 | calculate usable window width and height. | ||
| 9 | |||
| 10 | * window.el (window-buffer-height): Call compute-motion with nil width. | ||
| 11 | |||
| 12 | 2004-08-01 David Kastrup <dak@gnu.org> | ||
| 13 | |||
| 14 | * replace.el (query-replace-read-from): Use | ||
| 15 | `query-replace-compile-replacement'. | ||
| 16 | (query-replace-compile-replacement): New function. | ||
| 17 | (query-replace-read-to): Use `query-replace-compile-replacement' | ||
| 18 | for repeating the last command. | ||
| 19 | |||
| 20 | 2004-08-01 John Paul Wallington <jpw@gnu.org> | ||
| 21 | |||
| 22 | * printing.el (toplevel, pr-ps-fast-fire, pr-ps-set-utility) | ||
| 23 | (pr-ps-set-printer, pr-txt-set-printer, pr-eval-setting-alist) | ||
| 24 | (pr-switches): Remove period from end of error messages. | ||
| 25 | |||
| 26 | * help-mode.el (help-go-back): Likewise. | ||
| 27 | |||
| 28 | * abbrev.el (only-global-abbrevs): Doc fix. | ||
| 29 | (edit-abbrevs-map): Define within defvar. | ||
| 30 | (quietly-read-abbrev-file): Doc fix. | ||
| 31 | |||
| 32 | 2004-07-31 Luc Teirlinck <teirllm@auburn.edu> | ||
| 33 | |||
| 34 | * novice.el (enable-command, disable-command): Doc fixes. | ||
| 35 | |||
| 36 | * subr.el (event-modifiers, event-basic-type): Doc fixes. | ||
| 37 | |||
| 38 | 2004-07-30 Richard M. Stallman <rms@gnu.org> | ||
| 39 | |||
| 40 | * subr.el (with-local-quit): Doc fix. | ||
| 41 | |||
| 42 | 2004-07-30 Luc Teirlinck <teirllm@auburn.edu> | ||
| 43 | |||
| 44 | * international/utf-8.el (utf-translate-cjk-mode): Doc fix. | ||
| 45 | |||
| 1 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> | 46 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 47 | ||
| 3 | * custom.el (defcustom): Doc fix. | 48 | * custom.el (defcustom): Doc fix. |
diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 3be0014fd0e..3580c136948 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el | |||
| @@ -29,7 +29,7 @@ | |||
| 29 | ;;; Code: | 29 | ;;; Code: |
| 30 | 30 | ||
| 31 | (defcustom only-global-abbrevs nil | 31 | (defcustom only-global-abbrevs nil |
| 32 | "*t means user plans to use global abbrevs only. | 32 | "Non-nil means user plans to use global abbrevs only. |
| 33 | This makes the commands that normally define mode-specific abbrevs | 33 | This makes the commands that normally define mode-specific abbrevs |
| 34 | define global abbrevs instead." | 34 | define global abbrevs instead." |
| 35 | :type 'boolean | 35 | :type 'boolean |
| @@ -59,13 +59,12 @@ to enable or disable Abbrev mode in the current buffer." | |||
| 59 | :group 'abbrev-mode) | 59 | :group 'abbrev-mode) |
| 60 | 60 | ||
| 61 | 61 | ||
| 62 | (defvar edit-abbrevs-map nil | 62 | (defvar edit-abbrevs-map |
| 63 | (let ((map (make-sparse-keymap))) | ||
| 64 | (define-key map "\C-x\C-s" 'edit-abbrevs-redefine) | ||
| 65 | (define-key map "\C-c\C-c" 'edit-abbrevs-redefine) | ||
| 66 | map) | ||
| 63 | "Keymap used in `edit-abbrevs'.") | 67 | "Keymap used in `edit-abbrevs'.") |
| 64 | (if edit-abbrevs-map | ||
| 65 | nil | ||
| 66 | (setq edit-abbrevs-map (make-sparse-keymap)) | ||
| 67 | (define-key edit-abbrevs-map "\C-x\C-s" 'edit-abbrevs-redefine) | ||
| 68 | (define-key edit-abbrevs-map "\C-c\C-c" 'edit-abbrevs-redefine)) | ||
| 69 | 68 | ||
| 70 | (defun kill-all-abbrevs () | 69 | (defun kill-all-abbrevs () |
| 71 | "Undefine all defined abbrevs." | 70 | "Undefine all defined abbrevs." |
| @@ -195,7 +194,7 @@ Optional second argument QUIETLY non-nil means don't display a message." | |||
| 195 | (setq abbrevs-changed nil)) | 194 | (setq abbrevs-changed nil)) |
| 196 | 195 | ||
| 197 | (defun quietly-read-abbrev-file (&optional file) | 196 | (defun quietly-read-abbrev-file (&optional file) |
| 198 | "Read abbrev definitions from file written with write-abbrev-file. | 197 | "Read abbrev definitions from file written with `write-abbrev-file'. |
| 199 | Optional argument FILE is the name of the file to read; | 198 | Optional argument FILE is the name of the file to read; |
| 200 | it defaults to the value of `abbrev-file-name'. | 199 | it defaults to the value of `abbrev-file-name'. |
| 201 | Does not display any message." | 200 | Does not display any message." |
diff --git a/lisp/avoid.el b/lisp/avoid.el index 5a5a09622cd..536b80abdbe 100644 --- a/lisp/avoid.el +++ b/lisp/avoid.el | |||
| @@ -139,15 +139,15 @@ Only applies in mouse-avoidance-modes `animate' and `jump'." | |||
| 139 | "Return the position of point as (FRAME X . Y). | 139 | "Return the position of point as (FRAME X . Y). |
| 140 | Analogous to mouse-position." | 140 | Analogous to mouse-position." |
| 141 | (let* ((w (selected-window)) | 141 | (let* ((w (selected-window)) |
| 142 | (edges (window-edges w)) | 142 | (edges (window-inside-edges w)) |
| 143 | (list | 143 | (list |
| 144 | (compute-motion (max (window-start w) (point-min)) ; start pos | 144 | (compute-motion (max (window-start w) (point-min)) ; start pos |
| 145 | ;; window-start can be < point-min if the | 145 | ;; window-start can be < point-min if the |
| 146 | ;; latter has changed since the last redisplay | 146 | ;; latter has changed since the last redisplay |
| 147 | '(0 . 0) ; start XY | 147 | '(0 . 0) ; start XY |
| 148 | (point) ; stop pos | 148 | (point) ; stop pos |
| 149 | (cons (window-width) (window-height)); stop XY: none | 149 | nil ; stop XY: none |
| 150 | (1- (window-width)) ; width | 150 | nil ; width |
| 151 | (cons (window-hscroll w) 0) ; 0 may not be right? | 151 | (cons (window-hscroll w) 0) ; 0 may not be right? |
| 152 | (selected-window)))) | 152 | (selected-window)))) |
| 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) | 153 | ;; compute-motion returns (pos HPOS VPOS prevhpos contin) |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 11656ec368c..a2dcdf91ed8 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -581,7 +581,7 @@ help buffer." | |||
| 581 | (interactive) | 581 | (interactive) |
| 582 | (if help-xref-stack | 582 | (if help-xref-stack |
| 583 | (help-xref-go-back (current-buffer)) | 583 | (help-xref-go-back (current-buffer)) |
| 584 | (error "No previous help buffer."))) | 584 | (error "No previous help buffer"))) |
| 585 | 585 | ||
| 586 | (defun help-do-xref (pos function args) | 586 | (defun help-do-xref (pos function args) |
| 587 | "Call the help cross-reference function FUNCTION with args ARGS. | 587 | "Call the help cross-reference function FUNCTION with args ARGS. |
diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 77a51abb43f..bad79b58743 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el | |||
| @@ -273,7 +273,7 @@ The value nil means that the tables are not yet loaded.") | |||
| 273 | (utf-translate-cjk-load-tables)) | 273 | (utf-translate-cjk-load-tables)) |
| 274 | (gethash code-point | 274 | (gethash code-point |
| 275 | (get 'utf-subst-table-for-decode 'translation-hash-table))) | 275 | (get 'utf-subst-table-for-decode 'translation-hash-table))) |
| 276 | 276 | ||
| 277 | 277 | ||
| 278 | (defun utf-lookup-subst-table-for-encode (char) | 278 | (defun utf-lookup-subst-table-for-encode (char) |
| 279 | (if (and utf-translate-cjk-mode | 279 | (if (and utf-translate-cjk-mode |
| @@ -282,9 +282,11 @@ The value nil means that the tables are not yet loaded.") | |||
| 282 | (utf-translate-cjk-load-tables)) | 282 | (utf-translate-cjk-load-tables)) |
| 283 | (gethash char | 283 | (gethash char |
| 284 | (get 'utf-subst-table-for-encode 'translation-hash-table))) | 284 | (get 'utf-subst-table-for-encode 'translation-hash-table))) |
| 285 | 285 | ||
| 286 | (define-minor-mode utf-translate-cjk-mode | 286 | (define-minor-mode utf-translate-cjk-mode |
| 287 | "Whether the UTF based coding systems should decode/encode CJK characters. | 287 | "Toggle whether UTF based coding systems de/encode CJK characters. |
| 288 | If ARG is an integer, enable if ARG is positive and disable if | ||
| 289 | zero or negative. This is a minor mode. | ||
| 288 | Enabling this allows the coding systems mule-utf-8, | 290 | Enabling this allows the coding systems mule-utf-8, |
| 289 | mule-utf-16le and mule-utf-16be to encode characters in the charsets | 291 | mule-utf-16le and mule-utf-16be to encode characters in the charsets |
| 290 | `korean-ksc5601', `chinese-gb2312', `chinese-big5-1', | 292 | `korean-ksc5601', `chinese-gb2312', `chinese-big5-1', |
| @@ -296,9 +298,10 @@ according to the language environment in effect when this option is | |||
| 296 | turned on: ksc5601 for Korean, gb2312 for Chinese-GB, big5 for | 298 | turned on: ksc5601 for Korean, gb2312 for Chinese-GB, big5 for |
| 297 | Chinese-Big5 and jisx for other environments. | 299 | Chinese-Big5 and jisx for other environments. |
| 298 | 300 | ||
| 299 | This option is on by default. If you are not interested in CJK | 301 | This mode is on by default. If you are not interested in CJK |
| 300 | characters and want to avoid some overhead on encoding/decoding | 302 | characters and want to avoid some overhead on encoding/decoding |
| 301 | by the above coding systems, you can customize this option to nil." | 303 | by the above coding systems, you can customize the user option |
| 304 | `utf-translate-cjk-mode' to nil." | ||
| 302 | :init-value t | 305 | :init-value t |
| 303 | :version "21.4" | 306 | :version "21.4" |
| 304 | :type 'boolean | 307 | :type 'boolean |
| @@ -605,7 +608,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 605 | ;; UTF-8 decoder generates an UTF-8 sequence represented by a | 608 | ;; UTF-8 decoder generates an UTF-8 sequence represented by a |
| 606 | ;; sequence eight-bit-control/graphic chars for an untranslatable | 609 | ;; sequence eight-bit-control/graphic chars for an untranslatable |
| 607 | ;; character and an invalid byte. | 610 | ;; character and an invalid byte. |
| 608 | ;; | 611 | ;; |
| 609 | ;; This CCL parses that sequence (the first byte is already in r1), | 612 | ;; This CCL parses that sequence (the first byte is already in r1), |
| 610 | ;; writes out the original bytes of that sequence, and sets r5 to | 613 | ;; writes out the original bytes of that sequence, and sets r5 to |
| 611 | ;; -1. | 614 | ;; -1. |
| @@ -624,7 +627,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 624 | (read-multibyte-character r5 r6) | 627 | (read-multibyte-character r5 r6) |
| 625 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 628 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 626 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 629 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 627 | ((write r1) ; invalid UTF-8 | 630 | ((write r1) ; invalid UTF-8 |
| 628 | (r1 = -1) | 631 | (r1 = -1) |
| 629 | (end))) | 632 | (end))) |
| 630 | 633 | ||
| @@ -641,7 +644,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 641 | (r1 = -1) | 644 | (r1 = -1) |
| 642 | ;; Read the 3rd byte. | 645 | ;; Read the 3rd byte. |
| 643 | (read-multibyte-character r5 r6) | 646 | (read-multibyte-character r5 r6) |
| 644 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 647 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 645 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 648 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 646 | (end)) ; invalid UTF-8 | 649 | (end)) ; invalid UTF-8 |
| 647 | (write r6) | 650 | (write r6) |
| @@ -651,7 +654,7 @@ eight-bit-control and eight-bit-graphic characters.") | |||
| 651 | (end))) | 654 | (end))) |
| 652 | ;; Read the 4th byte. | 655 | ;; Read the 4th byte. |
| 653 | (read-multibyte-character r5 r6) | 656 | (read-multibyte-character r5 r6) |
| 654 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) | 657 | (r0 = (r5 != ,(charset-id 'eight-bit-control))) |
| 655 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) | 658 | (if ((r5 != ,(charset-id 'eight-bit-graphic)) & r0) |
| 656 | (end)) ; invalid UTF-8 | 659 | (end)) ; invalid UTF-8 |
| 657 | ;; 4-byte sequence for an untranslated character. | 660 | ;; 4-byte sequence for an untranslated character. |
diff --git a/lisp/novice.el b/lisp/novice.el index 159c9a96780..1cb89066481 100644 --- a/lisp/novice.el +++ b/lisp/novice.el | |||
| @@ -104,7 +104,8 @@ SPC to try the command just this once, but leave it disabled. | |||
| 104 | ;;;###autoload | 104 | ;;;###autoload |
| 105 | (defun enable-command (command) | 105 | (defun enable-command (command) |
| 106 | "Allow COMMAND to be executed without special confirmation from now on. | 106 | "Allow COMMAND to be executed without special confirmation from now on. |
| 107 | The user's .emacs file is altered so that this will apply | 107 | COMMAND must be a symbol. |
| 108 | This command alters the user's .emacs file so that this will apply | ||
| 108 | to future sessions." | 109 | to future sessions." |
| 109 | (interactive "CEnable command: ") | 110 | (interactive "CEnable command: ") |
| 110 | (put command 'disabled nil) | 111 | (put command 'disabled nil) |
| @@ -141,7 +142,8 @@ to future sessions." | |||
| 141 | ;;;###autoload | 142 | ;;;###autoload |
| 142 | (defun disable-command (command) | 143 | (defun disable-command (command) |
| 143 | "Require special confirmation to execute COMMAND from now on. | 144 | "Require special confirmation to execute COMMAND from now on. |
| 144 | The user's .emacs file is altered so that this will apply | 145 | COMMAND must be a symbol. |
| 146 | This command alters the user's .emacs file so that this will apply | ||
| 145 | to future sessions." | 147 | to future sessions." |
| 146 | (interactive "CDisable command: ") | 148 | (interactive "CDisable command: ") |
| 147 | (if (not (commandp command)) | 149 | (if (not (commandp command)) |
diff --git a/lisp/printing.el b/lisp/printing.el index 22a3f762ab6..08303e0595d 100644 --- a/lisp/printing.el +++ b/lisp/printing.el | |||
| @@ -974,7 +974,7 @@ Please send all bug fixes and enhancements to | |||
| 974 | 974 | ||
| 975 | 975 | ||
| 976 | (and (string< ps-print-version "6.6.4") | 976 | (and (string< ps-print-version "6.6.4") |
| 977 | (error "`printing' requires `ps-print' package version 6.6.4 or later.")) | 977 | (error "`printing' requires `ps-print' package version 6.6.4 or later")) |
| 978 | 978 | ||
| 979 | 979 | ||
| 980 | (eval-and-compile | 980 | (eval-and-compile |
| @@ -4254,7 +4254,7 @@ are both set to t." | |||
| 4254 | (pr-ps-buffer-ps-print | 4254 | (pr-ps-buffer-ps-print |
| 4255 | (if (integerp n-up) | 4255 | (if (integerp n-up) |
| 4256 | (min (max n-up 1) 100) | 4256 | (min (max n-up 1) 100) |
| 4257 | (error "n-up must be an integer greater than zero.")) | 4257 | (error "n-up must be an integer greater than zero")) |
| 4258 | filename))) | 4258 | filename))) |
| 4259 | 4259 | ||
| 4260 | 4260 | ||
| @@ -5031,7 +5031,7 @@ non-nil." | |||
| 5031 | (let ((item (cdr (assq value pr-ps-utility-alist)))) | 5031 | (let ((item (cdr (assq value pr-ps-utility-alist)))) |
| 5032 | (or item | 5032 | (or item |
| 5033 | (error | 5033 | (error |
| 5034 | "Invalid PostScript utility name `%s' for variable `pr-ps-utility'." | 5034 | "Invalid PostScript utility name `%s' for variable `pr-ps-utility'" |
| 5035 | value)) | 5035 | value)) |
| 5036 | (setq pr-ps-utility value) | 5036 | (setq pr-ps-utility value) |
| 5037 | (pr-eval-alist (nthcdr 9 item))) | 5037 | (pr-eval-alist (nthcdr 9 item))) |
| @@ -5042,7 +5042,7 @@ non-nil." | |||
| 5042 | (let ((ps (cdr (assq value pr-ps-printer-alist)))) | 5042 | (let ((ps (cdr (assq value pr-ps-printer-alist)))) |
| 5043 | (or ps | 5043 | (or ps |
| 5044 | (error | 5044 | (error |
| 5045 | "Invalid PostScript printer name `%s' for variable `pr-ps-name'." | 5045 | "Invalid PostScript printer name `%s' for variable `pr-ps-name'" |
| 5046 | value)) | 5046 | value)) |
| 5047 | (setq pr-ps-name value | 5047 | (setq pr-ps-name value |
| 5048 | pr-ps-command (pr-dosify-file-name (nth 0 ps)) | 5048 | pr-ps-command (pr-dosify-file-name (nth 0 ps)) |
| @@ -5068,7 +5068,7 @@ non-nil." | |||
| 5068 | (defun pr-txt-set-printer (value) | 5068 | (defun pr-txt-set-printer (value) |
| 5069 | (let ((txt (cdr (assq value pr-txt-printer-alist)))) | 5069 | (let ((txt (cdr (assq value pr-txt-printer-alist)))) |
| 5070 | (or txt | 5070 | (or txt |
| 5071 | (error "Invalid text printer name `%s' for variable `pr-txt-name'." | 5071 | (error "Invalid text printer name `%s' for variable `pr-txt-name'" |
| 5072 | value)) | 5072 | value)) |
| 5073 | (setq pr-txt-name value | 5073 | (setq pr-txt-name value |
| 5074 | pr-txt-command (pr-dosify-file-name (nth 0 txt)) | 5074 | pr-txt-command (pr-dosify-file-name (nth 0 txt)) |
| @@ -5121,7 +5121,7 @@ non-nil." | |||
| 5121 | (setq global nil))) | 5121 | (setq global nil))) |
| 5122 | (and inherits | 5122 | (and inherits |
| 5123 | (if (memq inherits old) | 5123 | (if (memq inherits old) |
| 5124 | (error "Circular inheritance for `%S'." inherits) | 5124 | (error "Circular inheritance for `%S'" inherits) |
| 5125 | (setq local-list | 5125 | (setq local-list |
| 5126 | (pr-eval-setting-alist inherits global | 5126 | (pr-eval-setting-alist inherits global |
| 5127 | (cons inherits old))))) | 5127 | (cons inherits old))))) |
| @@ -5349,7 +5349,7 @@ non-nil." | |||
| 5349 | 5349 | ||
| 5350 | (defun pr-switches (switches mess) | 5350 | (defun pr-switches (switches mess) |
| 5351 | (or (listp switches) | 5351 | (or (listp switches) |
| 5352 | (error "%S should have a list of strings." mess)) | 5352 | (error "%S should have a list of strings" mess)) |
| 5353 | (ps-flatten-list ; dynamic evaluation | 5353 | (ps-flatten-list ; dynamic evaluation |
| 5354 | (mapcar 'ps-eval-switch switches))) | 5354 | (mapcar 'ps-eval-switch switches))) |
| 5355 | 5355 | ||
diff --git a/lisp/replace.el b/lisp/replace.el index f09868cc6d3..47437659923 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -94,7 +94,8 @@ wants to replace FROM with TO." | |||
| 94 | query-replace-from-history-variable | 94 | query-replace-from-history-variable |
| 95 | nil t)))) | 95 | nil t)))) |
| 96 | (if (and (zerop (length from)) lastto lastfrom) | 96 | (if (and (zerop (length from)) lastto lastfrom) |
| 97 | (cons lastfrom lastto) | 97 | (cons lastfrom |
| 98 | (query-replace-compile-replacement lastto regexp-flag)) | ||
| 98 | ;; Warn if user types \n or \t, but don't reject the input. | 99 | ;; Warn if user types \n or \t, but don't reject the input. |
| 99 | (and regexp-flag | 100 | (and regexp-flag |
| 100 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) | 101 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from) |
| @@ -107,15 +108,12 @@ wants to replace FROM with TO." | |||
| 107 | (sit-for 2))) | 108 | (sit-for 2))) |
| 108 | from)))) | 109 | from)))) |
| 109 | 110 | ||
| 110 | (defun query-replace-read-to (from string regexp-flag) | 111 | (defun query-replace-compile-replacement (to regexp-flag) |
| 111 | "Query and return the `from' argument of a query-replace operation." | 112 | "Maybe convert a regexp replacement TO to Lisp. |
| 112 | (let ((to (save-excursion | 113 | Returns a list suitable for `perform-replace' if necessary, |
| 113 | (read-from-minibuffer | 114 | the original string if not." |
| 114 | (format "%s %s with: " string (query-replace-descr from)) | 115 | (if (and regexp-flag |
| 115 | nil nil nil | 116 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)) |
| 116 | query-replace-to-history-variable from t)))) | ||
| 117 | (when (and regexp-flag | ||
| 118 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)) | ||
| 119 | (let (pos list char) | 117 | (let (pos list char) |
| 120 | (while | 118 | (while |
| 121 | (progn | 119 | (progn |
| @@ -142,14 +140,25 @@ wants to replace FROM with TO." | |||
| 142 | (cdr pos)))) | 140 | (cdr pos)))) |
| 143 | (setq to (substring to end))))) | 141 | (setq to (substring to end))))) |
| 144 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))) | 142 | (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))) |
| 145 | (setq to (nreverse (delete "" (cons to list))))) | 143 | (setq to (nreverse (delete "" (cons to list)))) |
| 146 | (replace-match-string-symbols to) | 144 | (replace-match-string-symbols to) |
| 147 | (setq to (cons 'replace-eval-replacement | 145 | (cons 'replace-eval-replacement |
| 148 | (if (> (length to) 1) | 146 | (if (cdr to) |
| 149 | (cons 'concat to) | 147 | (cons 'concat to) |
| 150 | (car to))))) | 148 | (car to)))) |
| 151 | to)) | 149 | to)) |
| 152 | 150 | ||
| 151 | |||
| 152 | (defun query-replace-read-to (from string regexp-flag) | ||
| 153 | "Query and return the `to' argument of a query-replace operation." | ||
| 154 | (query-replace-compile-replacement | ||
| 155 | (save-excursion | ||
| 156 | (read-from-minibuffer | ||
| 157 | (format "%s %s with: " string (query-replace-descr from)) | ||
| 158 | nil nil nil | ||
| 159 | query-replace-to-history-variable from t)) | ||
| 160 | regexp-flag)) | ||
| 161 | |||
| 153 | (defun query-replace-read-args (string regexp-flag &optional noerror) | 162 | (defun query-replace-read-args (string regexp-flag &optional noerror) |
| 154 | (unless noerror | 163 | (unless noerror |
| 155 | (barf-if-buffer-read-only)) | 164 | (barf-if-buffer-read-only)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 64e9bdc6e24..2b329ef623f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -644,7 +644,11 @@ The normal global definition of the character C-x indirects to this keymap.") | |||
| 644 | "Return a list of symbols representing the modifier keys in event EVENT. | 644 | "Return a list of symbols representing the modifier keys in event EVENT. |
| 645 | The elements of the list may include `meta', `control', | 645 | The elements of the list may include `meta', `control', |
| 646 | `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', | 646 | `shift', `hyper', `super', `alt', `click', `double', `triple', `drag', |
| 647 | and `down'." | 647 | and `down'. |
| 648 | EVENT may be an event or an event type. If EVENT is a symbol | ||
| 649 | that has never been used in an event that has been read as input | ||
| 650 | in the current Emacs session, then this function can return nil, | ||
| 651 | even when EVENT actually has modifiers." | ||
| 648 | (let ((type event)) | 652 | (let ((type event)) |
| 649 | (if (listp type) | 653 | (if (listp type) |
| 650 | (setq type (car type))) | 654 | (setq type (car type))) |
| @@ -671,7 +675,10 @@ and `down'." | |||
| 671 | 675 | ||
| 672 | (defun event-basic-type (event) | 676 | (defun event-basic-type (event) |
| 673 | "Return the basic type of the given event (all modifiers removed). | 677 | "Return the basic type of the given event (all modifiers removed). |
| 674 | The value is a printing character (not upper case) or a symbol." | 678 | The value is a printing character (not upper case) or a symbol. |
| 679 | EVENT may be an event or an event type. If EVENT is a symbol | ||
| 680 | that has never been used in an event that has been read as input | ||
| 681 | in the current Emacs session, then this function may return nil." | ||
| 675 | (if (consp event) | 682 | (if (consp event) |
| 676 | (setq event (car event))) | 683 | (setq event (car event))) |
| 677 | (if (symbolp event) | 684 | (if (symbolp event) |
| @@ -1906,7 +1913,10 @@ See also `with-temp-file' and `with-output-to-string'." | |||
| 1906 | (kill-buffer nil))))) | 1913 | (kill-buffer nil))))) |
| 1907 | 1914 | ||
| 1908 | (defmacro with-local-quit (&rest body) | 1915 | (defmacro with-local-quit (&rest body) |
| 1909 | "Execute BODY with `inhibit-quit' temporarily bound to nil." | 1916 | "Execute BODY, allowing quits to terminate BODY but not escape further. |
| 1917 | When a quit terminates BODY, `with-local-quit' requests another quit when | ||
| 1918 | it finishes. That quit will be processed in turn, the next time quitting | ||
| 1919 | is again allowed." | ||
| 1910 | (declare (debug t) (indent 0)) | 1920 | (declare (debug t) (indent 0)) |
| 1911 | `(condition-case nil | 1921 | `(condition-case nil |
| 1912 | (let ((inhibit-quit nil)) | 1922 | (let ((inhibit-quit nil)) |
diff --git a/lisp/windmove.el b/lisp/windmove.el index 7008b86335e..642f04a1d8d 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el | |||
| @@ -429,14 +429,12 @@ the return value from `windmove-coordinates-of-position' is (0 . 0) | |||
| 429 | regardless of the where point is in the buffer and where the window | 429 | regardless of the where point is in the buffer and where the window |
| 430 | is placed in the frame." | 430 | is placed in the frame." |
| 431 | (let* ((wind (if (null window) (selected-window) window)) | 431 | (let* ((wind (if (null window) (selected-window) window)) |
| 432 | (usable-width (1- (window-width wind))) ; 1- for cont. column | ||
| 433 | (usable-height (1- (window-height wind))) ; 1- for mode line | ||
| 434 | (big-hairy-result (compute-motion | 432 | (big-hairy-result (compute-motion |
| 435 | (window-start) | 433 | (window-start) |
| 436 | '(0 . 0) | 434 | '(0 . 0) |
| 437 | pos | 435 | pos |
| 438 | (cons usable-width usable-height) | 436 | nil ; (window-width window-height) |
| 439 | usable-width | 437 | nil ; window-width |
| 440 | (cons (window-hscroll) | 438 | (cons (window-hscroll) |
| 441 | 0) ; why zero? | 439 | 0) ; why zero? |
| 442 | wind))) | 440 | wind))) |
diff --git a/lisp/window.el b/lisp/window.el index 96bfc8b5581..5ec752f3f23 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -408,7 +408,7 @@ lines than are actually needed in the case where some error may be present." | |||
| 408 | '(0 . 0) | 408 | '(0 . 0) |
| 409 | (- (point-max) (if ignore-final-newline 1 0)) | 409 | (- (point-max) (if ignore-final-newline 1 0)) |
| 410 | (cons 0 100000000) | 410 | (cons 0 100000000) |
| 411 | (window-width window) | 411 | nil |
| 412 | nil | 412 | nil |
| 413 | window)))))) | 413 | window)))))) |
| 414 | 414 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 282d422beb1..0194c4b8c6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,42 @@ | |||
| 1 | 2004-08-03 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * indent.c (compute_motion): Fix check for full width window | ||
| 4 | in non-window case. Do not count left truncation glyph on | ||
| 5 | window systems. | ||
| 6 | |||
| 7 | 2004-08-02 Luc Teirlinck <teirllm@auburn.edu> | ||
| 8 | |||
| 9 | * data.c (Finteractive_form): Doc fix. | ||
| 10 | |||
| 11 | 2004-08-02 Kim F. Storm <storm@cua.dk> | ||
| 12 | |||
| 13 | * indent.c (compute_motion): Use actual window width if WIDTH is -1, | ||
| 14 | properly accounting for continuation glyph on non-window systems. | ||
| 15 | (Fcompute_motion): Use actual window width if WIDTH is nil, and | ||
| 16 | actual window width/height if TOPOS is nil, properly accounting for | ||
| 17 | continuation glyphs on non-window systems, and optional header lines. | ||
| 18 | (vmotion): Let compute_motion calculate actual window width. | ||
| 19 | |||
| 20 | * window.c (window_scroll_line_based): Let compute_motion | ||
| 21 | calculate actual window width. | ||
| 22 | |||
| 23 | 2004-08-02 Kim F. Storm <storm@cua.dk> | ||
| 24 | |||
| 25 | * process.c (read_process_output): Use whole read buffer. | ||
| 26 | Don't trigger adaptive read buffering on errors. | ||
| 27 | |||
| 28 | 2004-07-31 Luc Teirlinck <teirllm@auburn.edu> | ||
| 29 | |||
| 30 | * keymap.c (Fset_keymap_parent, Fdefine_prefix_command): Doc fixes. | ||
| 31 | |||
| 32 | * keyboard.c (syms_of_keyboard) <disable-point-adjustment>: Doc fix. | ||
| 33 | |||
| 34 | * callint.c (Fcall_interactively): Doc fix. | ||
| 35 | |||
| 36 | 2004-07-30 Kim F. Storm <storm@cua.dk> | ||
| 37 | |||
| 38 | * editfns.c (Fformat): Allocate extra (dummy) element in info. | ||
| 39 | |||
| 1 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> | 40 | 2004-07-28 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 41 | ||
| 3 | * eval.c (Fdefvar, Fdefconst): Doc fixes. | 42 | * eval.c (Fdefvar, Fdefconst): Doc fixes. |
diff --git a/src/abbrev.c b/src/abbrev.c index 37ab640ee43..ac132f20023 100644 --- a/src/abbrev.c +++ b/src/abbrev.c | |||
| @@ -248,6 +248,8 @@ Returns the abbrev symbol, if expansion took place. */) | |||
| 248 | 248 | ||
| 249 | value = Qnil; | 249 | value = Qnil; |
| 250 | 250 | ||
| 251 | Frun_hooks (1, &Qpre_abbrev_expand_hook); | ||
| 252 | |||
| 251 | wordstart = 0; | 253 | wordstart = 0; |
| 252 | if (!(BUFFERP (Vabbrev_start_location_buffer) | 254 | if (!(BUFFERP (Vabbrev_start_location_buffer) |
| 253 | && XBUFFER (Vabbrev_start_location_buffer) == current_buffer)) | 255 | && XBUFFER (Vabbrev_start_location_buffer) == current_buffer)) |
| @@ -324,8 +326,6 @@ Returns the abbrev symbol, if expansion took place. */) | |||
| 324 | if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) | 326 | if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym))) |
| 325 | return value; | 327 | return value; |
| 326 | 328 | ||
| 327 | Frun_hooks (1, &Qpre_abbrev_expand_hook); | ||
| 328 | |||
| 329 | if (INTERACTIVE && !EQ (minibuf_window, selected_window)) | 329 | if (INTERACTIVE && !EQ (minibuf_window, selected_window)) |
| 330 | { | 330 | { |
| 331 | /* Add an undo boundary, in case we are doing this for | 331 | /* Add an undo boundary, in case we are doing this for |
diff --git a/src/callint.c b/src/callint.c index a3e4984fd16..8b8cb032095 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -256,7 +256,8 @@ Optional second arg RECORD-FLAG non-nil | |||
| 256 | means unconditionally put this command in the command-history. | 256 | means unconditionally put this command in the command-history. |
| 257 | Otherwise, this is done only if an arg is read using the minibuffer. | 257 | Otherwise, this is done only if an arg is read using the minibuffer. |
| 258 | Optional third arg KEYS, if given, specifies the sequence of events to | 258 | Optional third arg KEYS, if given, specifies the sequence of events to |
| 259 | supply if the command inquires which events were used to invoke it. */) | 259 | supply if the command inquires which events were used to invoke it. |
| 260 | If KEYS is omitted or nil, the return value of `this-command-keys' is used. */) | ||
| 260 | (function, record_flag, keys) | 261 | (function, record_flag, keys) |
| 261 | Lisp_Object function, record_flag, keys; | 262 | Lisp_Object function, record_flag, keys; |
| 262 | { | 263 | { |
diff --git a/src/data.c b/src/data.c index 1259c5891a1..616e91c2d62 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -776,8 +776,8 @@ SUBR must be a built-in function. */) | |||
| 776 | 776 | ||
| 777 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, | 777 | DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, |
| 778 | doc: /* Return the interactive form of CMD or nil if none. | 778 | doc: /* Return the interactive form of CMD or nil if none. |
| 779 | CMD must be a command. Value, if non-nil, is a list | 779 | If CMD is not a command, the return value is nil. |
| 780 | \(interactive SPEC). */) | 780 | Value, if non-nil, is a list \(interactive SPEC). */) |
| 781 | (cmd) | 781 | (cmd) |
| 782 | Lisp_Object cmd; | 782 | Lisp_Object cmd; |
| 783 | { | 783 | { |
diff --git a/src/editfns.c b/src/editfns.c index a506c5f4fc8..88a0e63118f 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -3254,6 +3254,7 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3254 | /* Piggyback on this loop to initialize precision[N]. */ | 3254 | /* Piggyback on this loop to initialize precision[N]. */ |
| 3255 | precision[n] = -1; | 3255 | precision[n] = -1; |
| 3256 | } | 3256 | } |
| 3257 | precision[nargs] = -1; | ||
| 3257 | 3258 | ||
| 3258 | CHECK_STRING (args[0]); | 3259 | CHECK_STRING (args[0]); |
| 3259 | /* We may have to change "%S" to "%s". */ | 3260 | /* We may have to change "%S" to "%s". */ |
| @@ -3277,11 +3278,11 @@ usage: (format STRING &rest OBJECTS) */) | |||
| 3277 | 3278 | ||
| 3278 | /* Allocate the info and discarded tables. */ | 3279 | /* Allocate the info and discarded tables. */ |
| 3279 | { | 3280 | { |
| 3280 | int nbytes = nargs * sizeof *info; | 3281 | int nbytes = (nargs+1) * sizeof *info; |
| 3281 | int i; | 3282 | int i; |
| 3282 | info = (struct info *) alloca (nbytes); | 3283 | info = (struct info *) alloca (nbytes); |
| 3283 | bzero (info, nbytes); | 3284 | bzero (info, nbytes); |
| 3284 | for (i = 0; i < nargs; i++) | 3285 | for (i = 0; i <= nargs; i++) |
| 3285 | info[i].start = -1; | 3286 | info[i].start = -1; |
| 3286 | discarded = (char *) alloca (SBYTES (args[0])); | 3287 | discarded = (char *) alloca (SBYTES (args[0])); |
| 3287 | bzero (discarded, SBYTES (args[0])); | 3288 | bzero (discarded, SBYTES (args[0])); |
diff --git a/src/indent.c b/src/indent.c index 1dc5c91fbad..d6fea34f5f5 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1133,6 +1133,9 @@ struct position val_compute_motion; | |||
| 1133 | 1133 | ||
| 1134 | WIDTH is the number of columns available to display text; | 1134 | WIDTH is the number of columns available to display text; |
| 1135 | compute_motion uses this to handle continuation lines and such. | 1135 | compute_motion uses this to handle continuation lines and such. |
| 1136 | If WIDTH is -1, use width of window's text area adjusted for | ||
| 1137 | continuation glyph when needed. | ||
| 1138 | |||
| 1136 | HSCROLL is the number of columns not being displayed at the left | 1139 | HSCROLL is the number of columns not being displayed at the left |
| 1137 | margin; this is usually taken from a window's hscroll member. | 1140 | margin; this is usually taken from a window's hscroll member. |
| 1138 | TAB_OFFSET is the number of columns of the first tab that aren't | 1141 | TAB_OFFSET is the number of columns of the first tab that aren't |
| @@ -1230,6 +1233,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1230 | int prev_vpos = 0; | 1233 | int prev_vpos = 0; |
| 1231 | int contin_hpos; /* HPOS of last column of continued line. */ | 1234 | int contin_hpos; /* HPOS of last column of continued line. */ |
| 1232 | int prev_tab_offset; /* Previous tab offset. */ | 1235 | int prev_tab_offset; /* Previous tab offset. */ |
| 1236 | int continuation_glyph_width; | ||
| 1233 | 1237 | ||
| 1234 | XSETBUFFER (buffer, current_buffer); | 1238 | XSETBUFFER (buffer, current_buffer); |
| 1235 | XSETWINDOW (window, win); | 1239 | XSETWINDOW (window, win); |
| @@ -1247,6 +1251,23 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1247 | if (tab_width <= 0 || tab_width > 1000) | 1251 | if (tab_width <= 0 || tab_width > 1000) |
| 1248 | tab_width = 8; | 1252 | tab_width = 8; |
| 1249 | 1253 | ||
| 1254 | /* Negative width means use all available text columns. */ | ||
| 1255 | if (width < 0) | ||
| 1256 | { | ||
| 1257 | width = window_box_text_cols (win); | ||
| 1258 | /* We must make room for continuation marks if we don't have fringes. */ | ||
| 1259 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1260 | if (!FRAME_WINDOW_P (XFRAME (win->frame))) | ||
| 1261 | #endif | ||
| 1262 | width -= 1; | ||
| 1263 | } | ||
| 1264 | |||
| 1265 | continuation_glyph_width = 0; | ||
| 1266 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1267 | if (!FRAME_WINDOW_P (XFRAME (win->frame))) | ||
| 1268 | continuation_glyph_width = 1; | ||
| 1269 | #endif | ||
| 1270 | |||
| 1250 | immediate_quit = 1; | 1271 | immediate_quit = 1; |
| 1251 | QUIT; | 1272 | QUIT; |
| 1252 | 1273 | ||
| @@ -1370,7 +1391,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1370 | { | 1391 | { |
| 1371 | if (hscroll | 1392 | if (hscroll |
| 1372 | || (truncate_partial_width_windows | 1393 | || (truncate_partial_width_windows |
| 1373 | && width + 1 < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))) | 1394 | && ((width + continuation_glyph_width) |
| 1395 | < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) | ||
| 1374 | || !NILP (current_buffer->truncate_lines)) | 1396 | || !NILP (current_buffer->truncate_lines)) |
| 1375 | { | 1397 | { |
| 1376 | /* Truncating: skip to newline, unless we are already past | 1398 | /* Truncating: skip to newline, unless we are already past |
| @@ -1654,7 +1676,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1654 | hpos -= hscroll; | 1676 | hpos -= hscroll; |
| 1655 | /* Count the truncation glyph on column 0 */ | 1677 | /* Count the truncation glyph on column 0 */ |
| 1656 | if (hscroll > 0) | 1678 | if (hscroll > 0) |
| 1657 | hpos++; | 1679 | hpos += continuation_glyph_width; |
| 1658 | tab_offset = 0; | 1680 | tab_offset = 0; |
| 1659 | } | 1681 | } |
| 1660 | contin_hpos = 0; | 1682 | contin_hpos = 0; |
| @@ -1739,12 +1761,14 @@ assuming it is at position FROMPOS--a cons of the form (HPOS . VPOS)-- | |||
| 1739 | to position TO or position TOPOS--another cons of the form (HPOS . VPOS)-- | 1761 | to position TO or position TOPOS--another cons of the form (HPOS . VPOS)-- |
| 1740 | and return the ending buffer position and screen location. | 1762 | and return the ending buffer position and screen location. |
| 1741 | 1763 | ||
| 1764 | If TOPOS is nil, the actual width and height of the window's | ||
| 1765 | text area are used. | ||
| 1766 | |||
| 1742 | There are three additional arguments: | 1767 | There are three additional arguments: |
| 1743 | 1768 | ||
| 1744 | WIDTH is the number of columns available to display text; | 1769 | WIDTH is the number of columns available to display text; |
| 1745 | this affects handling of continuation lines. | 1770 | this affects handling of continuation lines. A value of nil |
| 1746 | This is usually the value returned by `window-width', less one (to allow | 1771 | corresponds to the actual number of available text columns. |
| 1747 | for the continuation glyph). | ||
| 1748 | 1772 | ||
| 1749 | OFFSETS is either nil or a cons cell (HSCROLL . TAB-OFFSET). | 1773 | OFFSETS is either nil or a cons cell (HSCROLL . TAB-OFFSET). |
| 1750 | HSCROLL is the number of columns not being displayed at the left | 1774 | HSCROLL is the number of columns not being displayed at the left |
| @@ -1776,6 +1800,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) | |||
| 1776 | Lisp_Object from, frompos, to, topos; | 1800 | Lisp_Object from, frompos, to, topos; |
| 1777 | Lisp_Object width, offsets, window; | 1801 | Lisp_Object width, offsets, window; |
| 1778 | { | 1802 | { |
| 1803 | struct window *w; | ||
| 1779 | Lisp_Object bufpos, hpos, vpos, prevhpos; | 1804 | Lisp_Object bufpos, hpos, vpos, prevhpos; |
| 1780 | struct position *pos; | 1805 | struct position *pos; |
| 1781 | int hscroll, tab_offset; | 1806 | int hscroll, tab_offset; |
| @@ -1785,10 +1810,15 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) | |||
| 1785 | CHECK_NUMBER_CAR (frompos); | 1810 | CHECK_NUMBER_CAR (frompos); |
| 1786 | CHECK_NUMBER_CDR (frompos); | 1811 | CHECK_NUMBER_CDR (frompos); |
| 1787 | CHECK_NUMBER_COERCE_MARKER (to); | 1812 | CHECK_NUMBER_COERCE_MARKER (to); |
| 1788 | CHECK_CONS (topos); | 1813 | if (!NILP (topos)) |
| 1789 | CHECK_NUMBER_CAR (topos); | 1814 | { |
| 1790 | CHECK_NUMBER_CDR (topos); | 1815 | CHECK_CONS (topos); |
| 1791 | CHECK_NUMBER (width); | 1816 | CHECK_NUMBER_CAR (topos); |
| 1817 | CHECK_NUMBER_CDR (topos); | ||
| 1818 | } | ||
| 1819 | if (!NILP (width)) | ||
| 1820 | CHECK_NUMBER (width); | ||
| 1821 | |||
| 1792 | if (!NILP (offsets)) | 1822 | if (!NILP (offsets)) |
| 1793 | { | 1823 | { |
| 1794 | CHECK_CONS (offsets); | 1824 | CHECK_CONS (offsets); |
| @@ -1804,6 +1834,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) | |||
| 1804 | window = Fselected_window (); | 1834 | window = Fselected_window (); |
| 1805 | else | 1835 | else |
| 1806 | CHECK_LIVE_WINDOW (window); | 1836 | CHECK_LIVE_WINDOW (window); |
| 1837 | w = XWINDOW (window); | ||
| 1807 | 1838 | ||
| 1808 | if (XINT (from) < BEGV || XINT (from) > ZV) | 1839 | if (XINT (from) < BEGV || XINT (from) > ZV) |
| 1809 | args_out_of_range_3 (from, make_number (BEGV), make_number (ZV)); | 1840 | args_out_of_range_3 (from, make_number (BEGV), make_number (ZV)); |
| @@ -1812,9 +1843,20 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) | |||
| 1812 | 1843 | ||
| 1813 | pos = compute_motion (XINT (from), XINT (XCDR (frompos)), | 1844 | pos = compute_motion (XINT (from), XINT (XCDR (frompos)), |
| 1814 | XINT (XCAR (frompos)), 0, | 1845 | XINT (XCAR (frompos)), 0, |
| 1815 | XINT (to), XINT (XCDR (topos)), | 1846 | XINT (to), |
| 1816 | XINT (XCAR (topos)), | 1847 | (NILP (topos) |
| 1817 | XINT (width), hscroll, tab_offset, | 1848 | ? window_internal_height (w) |
| 1849 | : XINT (XCDR (topos))), | ||
| 1850 | (NILP (topos) | ||
| 1851 | ? (window_box_text_cols (w) | ||
| 1852 | - ( | ||
| 1853 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1854 | FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 : | ||
| 1855 | #endif | ||
| 1856 | 1)) | ||
| 1857 | : XINT (XCAR (topos))), | ||
| 1858 | (NILP (width) ? -1 : XINT (width)), | ||
| 1859 | hscroll, tab_offset, | ||
| 1818 | XWINDOW (window)); | 1860 | XWINDOW (window)); |
| 1819 | 1861 | ||
| 1820 | XSETFASTINT (bufpos, pos->bufpos); | 1862 | XSETFASTINT (bufpos, pos->bufpos); |
| @@ -1839,7 +1881,6 @@ vmotion (from, vtarget, w) | |||
| 1839 | register int from, vtarget; | 1881 | register int from, vtarget; |
| 1840 | struct window *w; | 1882 | struct window *w; |
| 1841 | { | 1883 | { |
| 1842 | int width = window_box_text_cols (w); | ||
| 1843 | int hscroll = XINT (w->hscroll); | 1884 | int hscroll = XINT (w->hscroll); |
| 1844 | struct position pos; | 1885 | struct position pos; |
| 1845 | /* vpos is cumulative vertical position, changed as from is changed */ | 1886 | /* vpos is cumulative vertical position, changed as from is changed */ |
| @@ -1860,12 +1901,6 @@ vmotion (from, vtarget, w) | |||
| 1860 | 1901 | ||
| 1861 | XSETWINDOW (window, w); | 1902 | XSETWINDOW (window, w); |
| 1862 | 1903 | ||
| 1863 | /* We must make room for continuation marks if we don't have fringes. */ | ||
| 1864 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1865 | if (!FRAME_WINDOW_P (XFRAME (w->frame))) | ||
| 1866 | #endif | ||
| 1867 | width -= 1; | ||
| 1868 | |||
| 1869 | /* If the window contains this buffer, use it for getting text properties. | 1904 | /* If the window contains this buffer, use it for getting text properties. |
| 1870 | Otherwise use the current buffer as arg for doing that. */ | 1905 | Otherwise use the current buffer as arg for doing that. */ |
| 1871 | if (EQ (w->buffer, Fcurrent_buffer ())) | 1906 | if (EQ (w->buffer, Fcurrent_buffer ())) |
| @@ -1907,7 +1942,7 @@ vmotion (from, vtarget, w) | |||
| 1907 | 1 << (BITS_PER_SHORT - 1), | 1942 | 1 << (BITS_PER_SHORT - 1), |
| 1908 | /* ... nor HPOS. */ | 1943 | /* ... nor HPOS. */ |
| 1909 | 1 << (BITS_PER_SHORT - 1), | 1944 | 1 << (BITS_PER_SHORT - 1), |
| 1910 | width, hscroll, | 1945 | -1, hscroll, |
| 1911 | /* This compensates for start_hpos | 1946 | /* This compensates for start_hpos |
| 1912 | so that a tab as first character | 1947 | so that a tab as first character |
| 1913 | still occupies 8 columns. */ | 1948 | still occupies 8 columns. */ |
| @@ -1966,7 +2001,7 @@ vmotion (from, vtarget, w) | |||
| 1966 | 1 << (BITS_PER_SHORT - 1), | 2001 | 1 << (BITS_PER_SHORT - 1), |
| 1967 | /* ... nor HPOS. */ | 2002 | /* ... nor HPOS. */ |
| 1968 | 1 << (BITS_PER_SHORT - 1), | 2003 | 1 << (BITS_PER_SHORT - 1), |
| 1969 | width, hscroll, | 2004 | -1, hscroll, |
| 1970 | (XFASTINT (prevline) == BEG ? -start_hpos : 0), | 2005 | (XFASTINT (prevline) == BEG ? -start_hpos : 0), |
| 1971 | w); | 2006 | w); |
| 1972 | did_motion = 1; | 2007 | did_motion = 1; |
| @@ -1980,7 +2015,7 @@ vmotion (from, vtarget, w) | |||
| 1980 | } | 2015 | } |
| 1981 | return compute_motion (from, vpos, pos.hpos, did_motion, | 2016 | return compute_motion (from, vpos, pos.hpos, did_motion, |
| 1982 | ZV, vtarget, - (1 << (BITS_PER_SHORT - 1)), | 2017 | ZV, vtarget, - (1 << (BITS_PER_SHORT - 1)), |
| 1983 | width, hscroll, | 2018 | -1, hscroll, |
| 1984 | pos.tab_offset - (from == BEG ? start_hpos : 0), | 2019 | pos.tab_offset - (from == BEG ? start_hpos : 0), |
| 1985 | w); | 2020 | w); |
| 1986 | } | 2021 | } |
diff --git a/src/keyboard.c b/src/keyboard.c index 4d18435e17d..c84e5d7bedc 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -11505,8 +11505,8 @@ It's called with one argument, the help string to display. */); | |||
| 11505 | 11505 | ||
| 11506 | After a command is executed, if point is moved into a region that has | 11506 | After a command is executed, if point is moved into a region that has |
| 11507 | special properties (e.g. composition, display), we adjust point to | 11507 | special properties (e.g. composition, display), we adjust point to |
| 11508 | the boundary of the region. But, several special commands sets this | 11508 | the boundary of the region. But, when a command sets this variable to |
| 11509 | variable to non-nil, then we suppress the point adjustment. | 11509 | non-nil, we suppress the point adjustment. |
| 11510 | 11510 | ||
| 11511 | This variable is set to nil before reading a command, and is checked | 11511 | This variable is set to nil before reading a command, and is checked |
| 11512 | just after executing the command. */); | 11512 | just after executing the command. */); |
diff --git a/src/keymap.c b/src/keymap.c index 42bbeb92a18..ee4f41de6b8 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -343,7 +343,7 @@ keymap_memberp (map, maps) | |||
| 343 | 343 | ||
| 344 | DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, | 344 | DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, |
| 345 | doc: /* Modify KEYMAP to set its parent map to PARENT. | 345 | doc: /* Modify KEYMAP to set its parent map to PARENT. |
| 346 | PARENT should be nil or another keymap. */) | 346 | Return PARENT. PARENT should be nil or another keymap. */) |
| 347 | (keymap, parent) | 347 | (keymap, parent) |
| 348 | Lisp_Object keymap, parent; | 348 | Lisp_Object keymap, parent; |
| 349 | { | 349 | { |
| @@ -1687,7 +1687,8 @@ If a second optional argument MAPVAR is given, the map is stored as | |||
| 1687 | its value instead of as COMMAND's value; but COMMAND is still defined | 1687 | its value instead of as COMMAND's value; but COMMAND is still defined |
| 1688 | as a function. | 1688 | as a function. |
| 1689 | The third optional argument NAME, if given, supplies a menu name | 1689 | The third optional argument NAME, if given, supplies a menu name |
| 1690 | string for the map. This is required to use the keymap as a menu. */) | 1690 | string for the map. This is required to use the keymap as a menu. |
| 1691 | This function returns COMMAND. */) | ||
| 1691 | (command, mapvar, name) | 1692 | (command, mapvar, name) |
| 1692 | Lisp_Object command, mapvar, name; | 1693 | Lisp_Object command, mapvar, name; |
| 1693 | { | 1694 | { |
diff --git a/src/process.c b/src/process.c index 9e77123bee7..ff3f79158ca 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -4195,7 +4195,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display) | |||
| 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 | */ |
| 4200 | FD_CLR (0, &Atemp); | 4200 | FD_CLR (0, &Atemp); |
| 4201 | #endif | 4201 | #endif |
| @@ -4762,16 +4762,16 @@ read_process_output (proc, channel) | |||
| 4762 | if (DATAGRAM_CHAN_P (channel)) | 4762 | if (DATAGRAM_CHAN_P (channel)) |
| 4763 | { | 4763 | { |
| 4764 | int len = datagram_address[channel].len; | 4764 | int len = datagram_address[channel].len; |
| 4765 | nbytes = recvfrom (channel, chars + carryover, readmax - carryover, | 4765 | nbytes = recvfrom (channel, chars + carryover, readmax, |
| 4766 | 0, datagram_address[channel].sa, &len); | 4766 | 0, datagram_address[channel].sa, &len); |
| 4767 | } | 4767 | } |
| 4768 | else | 4768 | else |
| 4769 | #endif | 4769 | #endif |
| 4770 | if (proc_buffered_char[channel] < 0) | 4770 | if (proc_buffered_char[channel] < 0) |
| 4771 | { | 4771 | { |
| 4772 | nbytes = emacs_read (channel, chars + carryover, readmax - carryover); | 4772 | nbytes = emacs_read (channel, chars + carryover, readmax); |
| 4773 | #ifdef ADAPTIVE_READ_BUFFERING | 4773 | #ifdef ADAPTIVE_READ_BUFFERING |
| 4774 | if (!NILP (p->adaptive_read_buffering)) | 4774 | if (nbytes > 0 && !NILP (p->adaptive_read_buffering)) |
| 4775 | { | 4775 | { |
| 4776 | int delay = XINT (p->read_output_delay); | 4776 | int delay = XINT (p->read_output_delay); |
| 4777 | if (nbytes < 256) | 4777 | if (nbytes < 256) |
| @@ -4783,7 +4783,7 @@ read_process_output (proc, channel) | |||
| 4783 | delay += READ_OUTPUT_DELAY_INCREMENT * 2; | 4783 | delay += READ_OUTPUT_DELAY_INCREMENT * 2; |
| 4784 | } | 4784 | } |
| 4785 | } | 4785 | } |
| 4786 | else if (delay > 0 && (nbytes == readmax - carryover)) | 4786 | else if (delay > 0 && (nbytes == readmax)) |
| 4787 | { | 4787 | { |
| 4788 | delay -= READ_OUTPUT_DELAY_INCREMENT; | 4788 | delay -= READ_OUTPUT_DELAY_INCREMENT; |
| 4789 | if (delay == 0) | 4789 | if (delay == 0) |
| @@ -4802,7 +4802,7 @@ read_process_output (proc, channel) | |||
| 4802 | { | 4802 | { |
| 4803 | chars[carryover] = proc_buffered_char[channel]; | 4803 | chars[carryover] = proc_buffered_char[channel]; |
| 4804 | proc_buffered_char[channel] = -1; | 4804 | proc_buffered_char[channel] = -1; |
| 4805 | nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover); | 4805 | nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1); |
| 4806 | if (nbytes < 0) | 4806 | if (nbytes < 0) |
| 4807 | nbytes = 1; | 4807 | nbytes = 1; |
| 4808 | else | 4808 | else |
diff --git a/src/window.c b/src/window.c index 5edabc510be..4baf9d371bc 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -4709,7 +4709,7 @@ window_scroll_line_based (window, n, whole, noerror) | |||
| 4709 | 4709 | ||
| 4710 | posit = *compute_motion (startpos, 0, 0, 0, | 4710 | posit = *compute_motion (startpos, 0, 0, 0, |
| 4711 | PT, ht, 0, | 4711 | PT, ht, 0, |
| 4712 | window_box_text_cols (w), XINT (w->hscroll), | 4712 | -1, XINT (w->hscroll), |
| 4713 | 0, w); | 4713 | 0, w); |
| 4714 | original_vpos = posit.vpos; | 4714 | original_vpos = posit.vpos; |
| 4715 | 4715 | ||