aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2004-08-03 00:03:00 +0000
committerMiles Bader2004-08-03 00:03:00 +0000
commitac887bc2843e28a189afa7a1f83ca48157a5e750 (patch)
tree0c70dd197bc1fb64bc2edbfc8a6dcdec9cc8cf1b
parent54685a78a73fcf2f53fd0e8a7a3c7478b8650f1b (diff)
parented5c373cab5483317a8b6fca3d8d4d52432934fc (diff)
downloademacs-ac887bc2843e28a189afa7a1f83ca48157a5e750.tar.gz
emacs-ac887bc2843e28a189afa7a1f83ca48157a5e750.zip
Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-27
Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-471 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-478 Update from CVS
-rw-r--r--ChangeLog4
-rw-r--r--config.bat10
-rw-r--r--etc/ChangeLog4
-rw-r--r--etc/NEWS11
-rw-r--r--lisp/ChangeLog53
-rw-r--r--lisp/abbrev.el15
-rw-r--r--lisp/avoid.el6
-rw-r--r--lisp/custom.el7
-rw-r--r--lisp/help-mode.el2
-rw-r--r--lisp/novice.el6
-rw-r--r--lisp/printing.el14
-rw-r--r--lisp/progmodes/etags.el97
-rw-r--r--lisp/replace.el41
-rw-r--r--lisp/subr.el16
-rw-r--r--lisp/windmove.el6
-rw-r--r--lisp/window.el2
-rw-r--r--src/ChangeLog43
-rw-r--r--src/abbrev.c4
-rw-r--r--src/callint.c3
-rw-r--r--src/data.c4
-rw-r--r--src/editfns.c5
-rw-r--r--src/eval.c11
-rw-r--r--src/indent.c79
-rw-r--r--src/keyboard.c4
-rw-r--r--src/keymap.c5
-rw-r--r--src/process.c12
-rw-r--r--src/window.c2
27 files changed, 327 insertions, 139 deletions
diff --git a/ChangeLog b/ChangeLog
index aa2233a5480..60fbc7e8723 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
12004-07-31 Eli Zaretskii <eliz@gnu.org>
2
3 * config.bat: Update URLs in the comments.
4
12004-07-05 Andreas Schwab <schwab@suse.de> 52004-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 ----------------------------------------------------------------------
24rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS: 24rem YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
25rem 25rem
26rem + msdos version 3 or better. 26rem + msdos version 3 or better.
27rem + djgpp version 1.12maint1 or later (version 2.0 or later recommended). 27rem + DJGPP version 1.12maint1 or later (version 2.03 or later recommended).
28rem + make utility that allows breaking of the 128 chars limit on 28rem + make utility that allows breaking of the 128 chars limit on
29rem command lines. ndmake (as of version 4.5) won't work due to a 29rem command lines. ndmake (as of version 4.5) won't work due to a
30rem line length limit. The make that comes with djgpp does work. 30rem line length limit. The make that comes with DJGPP does work.
31rem + rm and mv (from GNU file utilities). 31rem + rm and mv (from GNU file utilities).
32rem + sed (you can use the port that comes with DJGPP). 32rem + sed (you can use the port that comes with DJGPP).
33rem 33rem
34rem You should be able to get all the above utilities from any SimTel 34rem You should be able to get all the above utilities from the DJGPP FTP
35rem repository, e.g. ftp.simtel.net, in the directory 35rem site, ftp.delorie.com, in the directory "pub/djgpp/current/v2gnu".
36rem "pub/simtelnet/gnu/djgpp/v2gnu". As usual, please use your local
37rem mirroring site to reduce trans-Atlantic traffic.
38rem ---------------------------------------------------------------------- 36rem ----------------------------------------------------------------------
39set X11= 37set X11=
40set nodebug= 38set nodebug=
diff --git a/etc/ChangeLog b/etc/ChangeLog
index aa1550122d5..5c86c060880 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12004-07-27 Werner Lemberg <wl@gnu.org>
2
3 * NEWS: Document all new tutorials.
4
12004-07-14 Luc Teirlinck <teirllm@auburn.edu> 52004-07-14 Luc Teirlinck <teirllm@auburn.edu>
2 6
3 * MORE.STUFF: Tramp is now distributed with Emacs. 7 * MORE.STUFF: Tramp is now distributed with Emacs.
diff --git a/etc/NEWS b/etc/NEWS
index 0364ecb6806..114674d6961 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -97,7 +97,11 @@ the supported image types and their associated dynamic libraries by
97setting the variable `image-library-alist'. 97setting the variable `image-library-alist'.
98 98
99--- 99---
100** A Bulgarian translation of the Emacs Tutorial is available. 100** New translations of the Emacs Tutorial are available in the following
101 languages: Brasilian, Bulgarian, Chinese (both with simplified and
102 traditional characters), French, and Italian. Type `C-u C-h t' to
103 choose one of them in case your language setup doesn't automatically
104 select the right one.
101 105
102** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk' 106** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk'
103when you run configure. This requires Gtk+ 2.0 or newer. This port 107when you run configure. This requires Gtk+ 2.0 or newer. This port
@@ -163,7 +167,6 @@ See the files mac/README and mac/INSTALL for build instructions.
163** A French translation of the `Emacs Survival Guide' is available. 167** A French translation of the `Emacs Survival Guide' is available.
164 168
165--- 169---
166** A French translation of the Emacs Tutorial is available.
167** Building with -DENABLE_CHECKING does not automatically build with union 170** Building with -DENABLE_CHECKING does not automatically build with union
168types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. 171types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
169 172
@@ -2259,6 +2262,10 @@ configuration files.
2259 2262
2260* Lisp Changes in Emacs 21.4 2263* Lisp Changes in Emacs 21.4
2261 2264
2265** Function `compute-motion' now calculates the usable window
2266width if the WIDTH argument is nil. If the TOPOS argument is nil,
2267the usable window height and width is used.
2268
2262+++ 2269+++
2263** `visited-file-modtime' and `calendar-time-from-absolute' now return 2270** `visited-file-modtime' and `calendar-time-from-absolute' now return
2264a list of two integers, instead of a cons. 2271a list of two integers, instead of a cons.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 4f1d0859f65..b5134b2647f 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,56 @@
12004-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
122004-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
202004-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
322004-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
382004-07-30 Richard M. Stallman <rms@gnu.org>
39
40 * subr.el (with-local-quit): Doc fix.
41
422004-07-30 Luc Teirlinck <teirllm@auburn.edu>
43
44 * international/utf-8.el (utf-translate-cjk-mode): Doc fix.
45
462004-07-28 Luc Teirlinck <teirllm@auburn.edu>
47
48 * custom.el (defcustom): Doc fix.
49
502004-07-28 Masatake YAMATO <jet@gyve.org>
51
52 * progmodes/etags.el (etags-tags-apropos): Show building progress.
53
12004-07-26 Stefan Monnier <monnier@iro.umontreal.ca> 542004-07-26 Stefan Monnier <monnier@iro.umontreal.ca>
2 55
3 * imenu.el (imenu-prev-index-position-function) 56 * imenu.el (imenu-prev-index-position-function)
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.
33This makes the commands that normally define mode-specific abbrevs 33This makes the commands that normally define mode-specific abbrevs
34define global abbrevs instead." 34define 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'.
199Optional argument FILE is the name of the file to read; 198Optional argument FILE is the name of the file to read;
200it defaults to the value of `abbrev-file-name'. 199it defaults to the value of `abbrev-file-name'.
201Does not display any message." 200Does 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).
140Analogous to mouse-position." 140Analogous 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/custom.el b/lisp/custom.el
index e86308c95e7..2ddd7ceb943 100644
--- a/lisp/custom.el
+++ b/lisp/custom.el
@@ -246,6 +246,13 @@ The following keywords are meaningful:
246 Specifies that SYMBOL should be set after the list of variables 246 Specifies that SYMBOL should be set after the list of variables
247 VARIABLES when both have been customized. 247 VARIABLES when both have been customized.
248 248
249If SYMBOL has a local binding, then this form affects the local
250binding. This is normally not what you want. Thus, if you need
251to load a file defining variables with this form, or with
252`defvar' or `defconst', you should always load that file
253_outside_ any bindings for these variables. \(`defvar' and
254`defconst' behave similarly in this respect.)
255
249Read the section about customization in the Emacs Lisp manual for more 256Read the section about customization in the Emacs Lisp manual for more
250information." 257information."
251 ;; It is better not to use backquote in this file, 258 ;; It is better not to use backquote in this file,
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/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.
107The user's .emacs file is altered so that this will apply 107COMMAND must be a symbol.
108This command alters the user's .emacs file so that this will apply
108to future sessions." 109to 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.
144The user's .emacs file is altered so that this will apply 145COMMAND must be a symbol.
146This command alters the user's .emacs file so that this will apply
145to future sessions." 147to 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/progmodes/etags.el b/lisp/progmodes/etags.el
index 184077f6a3a..4464df3a916 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1453,53 +1453,58 @@ where they were found."
1453 (tags-with-face 'highlight (princ buffer-file-name)) 1453 (tags-with-face 'highlight (princ buffer-file-name))
1454 (princ "':\n\n")) 1454 (princ "':\n\n"))
1455 (goto-char (point-min)) 1455 (goto-char (point-min))
1456 (while (re-search-forward string nil t) 1456 (let ((point-max (/ (float (point-max)) 100.0)))
1457 (beginning-of-line) 1457 (while (re-search-forward string nil t)
1458 (message "Making tags apropos buffer for `%s'...%d%%"
1459 string
1460 (/ (point) point-max))
1461 (beginning-of-line)
1458 1462
1459 (let* (;; Get the local value in the tags table 1463 (let* ( ;; Get the local value in the tags table
1460 ;; buffer before switching buffers. 1464 ;; buffer before switching buffers.
1461 (goto-func goto-tag-location-function) 1465 (goto-func goto-tag-location-function)
1462 (tag-info (save-excursion (funcall snarf-tag-function))) 1466 (tag-info (save-excursion (funcall snarf-tag-function)))
1463 (tag (if (eq t (car tag-info)) nil (car tag-info))) 1467 (tag (if (eq t (car tag-info)) nil (car tag-info)))
1464 (file-path (save-excursion (if tag (file-of-tag) 1468 (file-path (save-excursion (if tag (file-of-tag)
1465 (save-excursion (next-line 1) 1469 (save-excursion (next-line 1)
1466 (file-of-tag))))) 1470 (file-of-tag)))))
1467 (file-label (if tag (file-of-tag t) 1471 (file-label (if tag (file-of-tag t)
1468 (save-excursion (next-line 1) 1472 (save-excursion (next-line 1)
1469 (file-of-tag t)))) 1473 (file-of-tag t))))
1470 (pt (with-current-buffer standard-output (point)))) 1474 (pt (with-current-buffer standard-output (point))))
1471 (if tag 1475 (if tag
1472 (progn 1476 (progn
1473 (princ (format "[%s]: " file-label)) 1477 (princ (format "[%s]: " file-label))
1474 (princ tag) 1478 (princ tag)
1475 (when (= (aref tag 0) ?\() (princ " ...)")) 1479 (when (= (aref tag 0) ?\() (princ " ...)"))
1476 (with-current-buffer standard-output 1480 (with-current-buffer standard-output
1477 (make-text-button pt (point) 1481 (make-text-button pt (point)
1478 'tag-info tag-info 1482 'tag-info tag-info
1479 'file-path file-path 1483 'file-path file-path
1480 'goto-func goto-func 1484 'goto-func goto-func
1481 'action (lambda (button) 1485 'action (lambda (button)
1482 (let ((tag-info (button-get button 'tag-info)) 1486 (let ((tag-info (button-get button 'tag-info))
1483 (goto-func (button-get button 'goto-func))) 1487 (goto-func (button-get button 'goto-func)))
1484 (tag-find-file-of-tag (button-get button 'file-path)) 1488 (tag-find-file-of-tag (button-get button 'file-path))
1485 (widen) 1489 (widen)
1486 (funcall goto-func tag-info))) 1490 (funcall goto-func tag-info)))
1487 'face 'tags-tag-face 1491 'face 'tags-tag-face
1488 'type 'button))) 1492 'type 'button)))
1489 (princ (format "- %s" file-label)) 1493 (princ (format "- %s" file-label))
1490 (with-current-buffer standard-output 1494 (with-current-buffer standard-output
1491 (make-text-button pt (point) 1495 (make-text-button pt (point)
1492 'file-path file-path 1496 'file-path file-path
1493 'action (lambda (button) 1497 'action (lambda (button)
1494 (tag-find-file-of-tag (button-get button 'file-path)) 1498 (tag-find-file-of-tag (button-get button 'file-path))
1495 ;; Get the local value in the tags table 1499 ;; Get the local value in the tags table
1496 ;; buffer before switching buffers. 1500 ;; buffer before switching buffers.
1497 (goto-char (point-min))) 1501 (goto-char (point-min)))
1498 'face 'tags-tag-face 1502 'face 'tags-tag-face
1499 'type 'button)) 1503 'type 'button))
1500 )) 1504 ))
1501 (terpri) 1505 (terpri)
1502 (forward-line 1)) 1506 (forward-line 1))
1507 (message nil))
1503 (when tags-apropos-verbose (princ "\n"))) 1508 (when tags-apropos-verbose (princ "\n")))
1504 1509
1505(defun etags-tags-table-files () 1510(defun etags-tags-table-files ()
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 113Returns a list suitable for `perform-replace' if necessary,
113 (read-from-minibuffer 114the 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 354f911fe67..c3088cd9c0a 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.
645The elements of the list may include `meta', `control', 645The 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',
647and `down'." 647and `down'.
648EVENT may be an event or an event type. If EVENT is a symbol
649that has never been used in an event that has been read as input
650in the current Emacs session, then this function can return nil,
651even 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).
674The value is a printing character (not upper case) or a symbol." 678The value is a printing character (not upper case) or a symbol.
679EVENT may be an event or an event type. If EVENT is a symbol
680that has never been used in an event that has been read as input
681in 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)
@@ -1894,7 +1901,10 @@ See also `with-temp-file' and `with-output-to-string'."
1894 (kill-buffer nil))))) 1901 (kill-buffer nil)))))
1895 1902
1896(defmacro with-local-quit (&rest body) 1903(defmacro with-local-quit (&rest body)
1897 "Execute BODY with `inhibit-quit' temporarily bound to nil." 1904 "Execute BODY, allowing quits to terminate BODY but not escape further.
1905When a quit terminates BODY, `with-local-quit' requests another quit when
1906it finishes. That quit will be processed in turn, the next time quitting
1907is again allowed."
1898 (declare (debug t) (indent 0)) 1908 (declare (debug t) (indent 0))
1899 `(condition-case nil 1909 `(condition-case nil
1900 (let ((inhibit-quit nil)) 1910 (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)
429regardless of the where point is in the buffer and where the window 429regardless of the where point is in the buffer and where the window
430is placed in the frame." 430is 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 d06be958790..0194c4b8c6f 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,46 @@
12004-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
72004-08-02 Luc Teirlinck <teirllm@auburn.edu>
8
9 * data.c (Finteractive_form): Doc fix.
10
112004-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
232004-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
282004-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
362004-07-30 Kim F. Storm <storm@cua.dk>
37
38 * editfns.c (Fformat): Allocate extra (dummy) element in info.
39
402004-07-28 Luc Teirlinck <teirllm@auburn.edu>
41
42 * eval.c (Fdefvar, Fdefconst): Doc fixes.
43
12004-07-27 Kim F. Storm <storm@cua.dk> 442004-07-27 Kim F. Storm <storm@cua.dk>
2 45
3 * xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after 46 * xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after
diff --git a/src/abbrev.c b/src/abbrev.c
index 7e68011955d..086a58021fb 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
256means unconditionally put this command in the command-history. 256means unconditionally put this command in the command-history.
257Otherwise, this is done only if an arg is read using the minibuffer. 257Otherwise, this is done only if an arg is read using the minibuffer.
258Optional third arg KEYS, if given, specifies the sequence of events to 258Optional third arg KEYS, if given, specifies the sequence of events to
259supply if the command inquires which events were used to invoke it. */) 259supply if the command inquires which events were used to invoke it.
260If 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 1071107947c..558c7a974af 100644
--- a/src/data.c
+++ b/src/data.c
@@ -776,8 +776,8 @@ SUBR must be a built-in function. */)
776 776
777DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0, 777DEFUN ("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.
779CMD must be a command. Value, if non-nil, is a list 779If CMD is not a command, the return value is nil.
780\(interactive SPEC). */) 780Value, 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 2782a966bf0..7fdd5598bf8 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3410,6 +3410,7 @@ usage: (format STRING &rest OBJECTS) */)
3410 /* Piggyback on this loop to initialize precision[N]. */ 3410 /* Piggyback on this loop to initialize precision[N]. */
3411 precision[n] = -1; 3411 precision[n] = -1;
3412 } 3412 }
3413 precision[nargs] = -1;
3413 3414
3414 CHECK_STRING (args[0]); 3415 CHECK_STRING (args[0]);
3415 /* We may have to change "%S" to "%s". */ 3416 /* We may have to change "%S" to "%s". */
@@ -3433,11 +3434,11 @@ usage: (format STRING &rest OBJECTS) */)
3433 3434
3434 /* Allocate the info and discarded tables. */ 3435 /* Allocate the info and discarded tables. */
3435 { 3436 {
3436 int nbytes = nargs * sizeof *info; 3437 int nbytes = (nargs+1) * sizeof *info;
3437 int i; 3438 int i;
3438 info = (struct info *) alloca (nbytes); 3439 info = (struct info *) alloca (nbytes);
3439 bzero (info, nbytes); 3440 bzero (info, nbytes);
3440 for (i = 0; i < nargs; i++) 3441 for (i = 0; i <= nargs; i++)
3441 info[i].start = -1; 3442 info[i].start = -1;
3442 discarded = (char *) alloca (SBYTES (args[0])); 3443 discarded = (char *) alloca (SBYTES (args[0]));
3443 bzero (discarded, SBYTES (args[0])); 3444 bzero (discarded, SBYTES (args[0]));
diff --git a/src/eval.c b/src/eval.c
index f28105ac987..ee74215b2ee 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -742,6 +742,13 @@ If DOCSTRING starts with *, this variable is identified as a user option.
742 This means that M-x set-variable recognizes it. 742 This means that M-x set-variable recognizes it.
743 See also `user-variable-p'. 743 See also `user-variable-p'.
744If INITVALUE is missing, SYMBOL's value is not set. 744If INITVALUE is missing, SYMBOL's value is not set.
745
746If SYMBOL has a local binding, then this form affects the local
747binding. This is usually not what you want. Thus, if you need to
748load a file defining variables, with this form or with `defconst' or
749`defcustom', you should always load that file _outside_ any bindings
750for these variables. \(`defconst' and `defcustom' behave similarly in
751this respect.)
745usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */) 752usage: (defvar SYMBOL &optional INITVALUE DOCSTRING) */)
746 (args) 753 (args)
747 Lisp_Object args; 754 Lisp_Object args;
@@ -784,6 +791,10 @@ Always sets the value of SYMBOL to the result of evalling INITVALUE.
784If SYMBOL is buffer-local, its default value is what is set; 791If SYMBOL is buffer-local, its default value is what is set;
785 buffer-local values are not affected. 792 buffer-local values are not affected.
786DOCSTRING is optional. 793DOCSTRING is optional.
794
795If SYMBOL has a local binding, then this form sets the local binding's
796value. However, you should normally not make local bindings for
797variables defined with this form.
787usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */) 798usage: (defconst SYMBOL INITVALUE [DOCSTRING]) */)
788 (args) 799 (args)
789 Lisp_Object args; 800 Lisp_Object args;
diff --git a/src/indent.c b/src/indent.c
index a5de1431e4b..d8bd5f5c663 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -1131,6 +1131,9 @@ struct position val_compute_motion;
1131 1131
1132 WIDTH is the number of columns available to display text; 1132 WIDTH is the number of columns available to display text;
1133 compute_motion uses this to handle continuation lines and such. 1133 compute_motion uses this to handle continuation lines and such.
1134 If WIDTH is -1, use width of window's text area adjusted for
1135 continuation glyph when needed.
1136
1134 HSCROLL is the number of columns not being displayed at the left 1137 HSCROLL is the number of columns not being displayed at the left
1135 margin; this is usually taken from a window's hscroll member. 1138 margin; this is usually taken from a window's hscroll member.
1136 TAB_OFFSET is the number of columns of the first tab that aren't 1139 TAB_OFFSET is the number of columns of the first tab that aren't
@@ -1228,6 +1231,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1228 int prev_vpos = 0; 1231 int prev_vpos = 0;
1229 int contin_hpos; /* HPOS of last column of continued line. */ 1232 int contin_hpos; /* HPOS of last column of continued line. */
1230 int prev_tab_offset; /* Previous tab offset. */ 1233 int prev_tab_offset; /* Previous tab offset. */
1234 int continuation_glyph_width;
1231 1235
1232 XSETBUFFER (buffer, current_buffer); 1236 XSETBUFFER (buffer, current_buffer);
1233 XSETWINDOW (window, win); 1237 XSETWINDOW (window, win);
@@ -1245,6 +1249,23 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1245 if (tab_width <= 0 || tab_width > 1000) 1249 if (tab_width <= 0 || tab_width > 1000)
1246 tab_width = 8; 1250 tab_width = 8;
1247 1251
1252 /* Negative width means use all available text columns. */
1253 if (width < 0)
1254 {
1255 width = window_box_text_cols (win);
1256 /* We must make room for continuation marks if we don't have fringes. */
1257#ifdef HAVE_WINDOW_SYSTEM
1258 if (!FRAME_WINDOW_P (XFRAME (win->frame)))
1259#endif
1260 width -= 1;
1261 }
1262
1263 continuation_glyph_width = 0;
1264#ifdef HAVE_WINDOW_SYSTEM
1265 if (!FRAME_WINDOW_P (XFRAME (win->frame)))
1266 continuation_glyph_width = 1;
1267#endif
1268
1248 immediate_quit = 1; 1269 immediate_quit = 1;
1249 QUIT; 1270 QUIT;
1250 1271
@@ -1368,7 +1389,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1368 { 1389 {
1369 if (hscroll 1390 if (hscroll
1370 || (truncate_partial_width_windows 1391 || (truncate_partial_width_windows
1371 && width + 1 < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))) 1392 && ((width + continuation_glyph_width)
1393 < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))
1372 || !NILP (current_buffer->truncate_lines)) 1394 || !NILP (current_buffer->truncate_lines))
1373 { 1395 {
1374 /* Truncating: skip to newline, unless we are already past 1396 /* Truncating: skip to newline, unless we are already past
@@ -1652,7 +1674,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width,
1652 hpos -= hscroll; 1674 hpos -= hscroll;
1653 /* Count the truncation glyph on column 0 */ 1675 /* Count the truncation glyph on column 0 */
1654 if (hscroll > 0) 1676 if (hscroll > 0)
1655 hpos++; 1677 hpos += continuation_glyph_width;
1656 tab_offset = 0; 1678 tab_offset = 0;
1657 } 1679 }
1658 contin_hpos = 0; 1680 contin_hpos = 0;
@@ -1737,12 +1759,14 @@ assuming it is at position FROMPOS--a cons of the form (HPOS . VPOS)--
1737to position TO or position TOPOS--another cons of the form (HPOS . VPOS)-- 1759to position TO or position TOPOS--another cons of the form (HPOS . VPOS)--
1738and return the ending buffer position and screen location. 1760and return the ending buffer position and screen location.
1739 1761
1762If TOPOS is nil, the actual width and height of the window's
1763text area are used.
1764
1740There are three additional arguments: 1765There are three additional arguments:
1741 1766
1742WIDTH is the number of columns available to display text; 1767WIDTH is the number of columns available to display text;
1743this affects handling of continuation lines. 1768this affects handling of continuation lines. A value of nil
1744This is usually the value returned by `window-width', less one (to allow 1769corresponds to the actual number of available text columns.
1745for the continuation glyph).
1746 1770
1747OFFSETS is either nil or a cons cell (HSCROLL . TAB-OFFSET). 1771OFFSETS is either nil or a cons cell (HSCROLL . TAB-OFFSET).
1748HSCROLL is the number of columns not being displayed at the left 1772HSCROLL is the number of columns not being displayed at the left
@@ -1774,6 +1798,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1774 Lisp_Object from, frompos, to, topos; 1798 Lisp_Object from, frompos, to, topos;
1775 Lisp_Object width, offsets, window; 1799 Lisp_Object width, offsets, window;
1776{ 1800{
1801 struct window *w;
1777 Lisp_Object bufpos, hpos, vpos, prevhpos; 1802 Lisp_Object bufpos, hpos, vpos, prevhpos;
1778 struct position *pos; 1803 struct position *pos;
1779 int hscroll, tab_offset; 1804 int hscroll, tab_offset;
@@ -1783,10 +1808,15 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1783 CHECK_NUMBER_CAR (frompos); 1808 CHECK_NUMBER_CAR (frompos);
1784 CHECK_NUMBER_CDR (frompos); 1809 CHECK_NUMBER_CDR (frompos);
1785 CHECK_NUMBER_COERCE_MARKER (to); 1810 CHECK_NUMBER_COERCE_MARKER (to);
1786 CHECK_CONS (topos); 1811 if (!NILP (topos))
1787 CHECK_NUMBER_CAR (topos); 1812 {
1788 CHECK_NUMBER_CDR (topos); 1813 CHECK_CONS (topos);
1789 CHECK_NUMBER (width); 1814 CHECK_NUMBER_CAR (topos);
1815 CHECK_NUMBER_CDR (topos);
1816 }
1817 if (!NILP (width))
1818 CHECK_NUMBER (width);
1819
1790 if (!NILP (offsets)) 1820 if (!NILP (offsets))
1791 { 1821 {
1792 CHECK_CONS (offsets); 1822 CHECK_CONS (offsets);
@@ -1802,6 +1832,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1802 window = Fselected_window (); 1832 window = Fselected_window ();
1803 else 1833 else
1804 CHECK_LIVE_WINDOW (window); 1834 CHECK_LIVE_WINDOW (window);
1835 w = XWINDOW (window);
1805 1836
1806 if (XINT (from) < BEGV || XINT (from) > ZV) 1837 if (XINT (from) < BEGV || XINT (from) > ZV)
1807 args_out_of_range_3 (from, make_number (BEGV), make_number (ZV)); 1838 args_out_of_range_3 (from, make_number (BEGV), make_number (ZV));
@@ -1810,9 +1841,20 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1810 1841
1811 pos = compute_motion (XINT (from), XINT (XCDR (frompos)), 1842 pos = compute_motion (XINT (from), XINT (XCDR (frompos)),
1812 XINT (XCAR (frompos)), 0, 1843 XINT (XCAR (frompos)), 0,
1813 XINT (to), XINT (XCDR (topos)), 1844 XINT (to),
1814 XINT (XCAR (topos)), 1845 (NILP (topos)
1815 XINT (width), hscroll, tab_offset, 1846 ? window_internal_height (w)
1847 : XINT (XCDR (topos))),
1848 (NILP (topos)
1849 ? (window_box_text_cols (w)
1850 - (
1851#ifdef HAVE_WINDOW_SYSTEM
1852 FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
1853#endif
1854 1))
1855 : XINT (XCAR (topos))),
1856 (NILP (width) ? -1 : XINT (width)),
1857 hscroll, tab_offset,
1816 XWINDOW (window)); 1858 XWINDOW (window));
1817 1859
1818 XSETFASTINT (bufpos, pos->bufpos); 1860 XSETFASTINT (bufpos, pos->bufpos);
@@ -1837,7 +1879,6 @@ vmotion (from, vtarget, w)
1837 register int from, vtarget; 1879 register int from, vtarget;
1838 struct window *w; 1880 struct window *w;
1839{ 1881{
1840 int width = window_box_text_cols (w);
1841 int hscroll = XINT (w->hscroll); 1882 int hscroll = XINT (w->hscroll);
1842 struct position pos; 1883 struct position pos;
1843 /* vpos is cumulative vertical position, changed as from is changed */ 1884 /* vpos is cumulative vertical position, changed as from is changed */
@@ -1858,12 +1899,6 @@ vmotion (from, vtarget, w)
1858 1899
1859 XSETWINDOW (window, w); 1900 XSETWINDOW (window, w);
1860 1901
1861 /* We must make room for continuation marks if we don't have fringes. */
1862#ifdef HAVE_WINDOW_SYSTEM
1863 if (!FRAME_WINDOW_P (XFRAME (w->frame)))
1864#endif
1865 width -= 1;
1866
1867 /* If the window contains this buffer, use it for getting text properties. 1902 /* If the window contains this buffer, use it for getting text properties.
1868 Otherwise use the current buffer as arg for doing that. */ 1903 Otherwise use the current buffer as arg for doing that. */
1869 if (EQ (w->buffer, Fcurrent_buffer ())) 1904 if (EQ (w->buffer, Fcurrent_buffer ()))
@@ -1905,7 +1940,7 @@ vmotion (from, vtarget, w)
1905 1 << (BITS_PER_SHORT - 1), 1940 1 << (BITS_PER_SHORT - 1),
1906 /* ... nor HPOS. */ 1941 /* ... nor HPOS. */
1907 1 << (BITS_PER_SHORT - 1), 1942 1 << (BITS_PER_SHORT - 1),
1908 width, hscroll, 1943 -1, hscroll,
1909 /* This compensates for start_hpos 1944 /* This compensates for start_hpos
1910 so that a tab as first character 1945 so that a tab as first character
1911 still occupies 8 columns. */ 1946 still occupies 8 columns. */
@@ -1964,7 +1999,7 @@ vmotion (from, vtarget, w)
1964 1 << (BITS_PER_SHORT - 1), 1999 1 << (BITS_PER_SHORT - 1),
1965 /* ... nor HPOS. */ 2000 /* ... nor HPOS. */
1966 1 << (BITS_PER_SHORT - 1), 2001 1 << (BITS_PER_SHORT - 1),
1967 width, hscroll, 2002 -1, hscroll,
1968 (XFASTINT (prevline) == BEG ? -start_hpos : 0), 2003 (XFASTINT (prevline) == BEG ? -start_hpos : 0),
1969 w); 2004 w);
1970 did_motion = 1; 2005 did_motion = 1;
@@ -1978,7 +2013,7 @@ vmotion (from, vtarget, w)
1978 } 2013 }
1979 return compute_motion (from, vpos, pos.hpos, did_motion, 2014 return compute_motion (from, vpos, pos.hpos, did_motion,
1980 ZV, vtarget, - (1 << (BITS_PER_SHORT - 1)), 2015 ZV, vtarget, - (1 << (BITS_PER_SHORT - 1)),
1981 width, hscroll, 2016 -1, hscroll,
1982 pos.tab_offset - (from == BEG ? start_hpos : 0), 2017 pos.tab_offset - (from == BEG ? start_hpos : 0),
1983 w); 2018 w);
1984} 2019}
diff --git a/src/keyboard.c b/src/keyboard.c
index a6cc2836315..23e29e3f878 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -11369,8 +11369,8 @@ It's called with one argument, the help string to display. */);
11369 11369
11370After a command is executed, if point is moved into a region that has 11370After a command is executed, if point is moved into a region that has
11371special properties (e.g. composition, display), we adjust point to 11371special properties (e.g. composition, display), we adjust point to
11372the boundary of the region. But, several special commands sets this 11372the boundary of the region. But, when a command sets this variable to
11373variable to non-nil, then we suppress the point adjustment. 11373non-nil, we suppress the point adjustment.
11374 11374
11375This variable is set to nil before reading a command, and is checked 11375This variable is set to nil before reading a command, and is checked
11376just after executing the command. */); 11376just after executing the command. */);
diff --git a/src/keymap.c b/src/keymap.c
index 4c23977ef41..98e04f65717 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -343,7 +343,7 @@ keymap_memberp (map, maps)
343 343
344DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0, 344DEFUN ("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.
346PARENT should be nil or another keymap. */) 346Return 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{
@@ -1719,7 +1719,8 @@ If a second optional argument MAPVAR is given, the map is stored as
1719its value instead of as COMMAND's value; but COMMAND is still defined 1719its value instead of as COMMAND's value; but COMMAND is still defined
1720as a function. 1720as a function.
1721The third optional argument NAME, if given, supplies a menu name 1721The third optional argument NAME, if given, supplies a menu name
1722string for the map. This is required to use the keymap as a menu. */) 1722string for the map. This is required to use the keymap as a menu.
1723This function returns COMMAND. */)
1723 (command, mapvar, name) 1724 (command, mapvar, name)
1724 Lisp_Object command, mapvar, name; 1725 Lisp_Object command, mapvar, name;
1725{ 1726{
diff --git a/src/process.c b/src/process.c
index 0b3f6bfbbd2..24ec816a699 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4196,7 +4196,7 @@ wait_reading_process_input (time_limit, microsecs, read_kbd, do_display)
4196 present (for reading) at stdin, even when none is. This 4196 present (for reading) at stdin, even when none is. This
4197 causes the call to SELECT below to return 1 and 4197 causes the call to SELECT below to return 1 and
4198 status_notify not to be called. As a result output of 4198 status_notify not to be called. As a result output of
4199 subprocesses are incorrectly discarded. 4199 subprocesses are incorrectly discarded.
4200 */ 4200 */
4201 FD_CLR (0, &Atemp); 4201 FD_CLR (0, &Atemp);
4202#endif 4202#endif
@@ -4763,16 +4763,16 @@ read_process_output (proc, channel)
4763 if (DATAGRAM_CHAN_P (channel)) 4763 if (DATAGRAM_CHAN_P (channel))
4764 { 4764 {
4765 int len = datagram_address[channel].len; 4765 int len = datagram_address[channel].len;
4766 nbytes = recvfrom (channel, chars + carryover, readmax - carryover, 4766 nbytes = recvfrom (channel, chars + carryover, readmax,
4767 0, datagram_address[channel].sa, &len); 4767 0, datagram_address[channel].sa, &len);
4768 } 4768 }
4769 else 4769 else
4770#endif 4770#endif
4771 if (proc_buffered_char[channel] < 0) 4771 if (proc_buffered_char[channel] < 0)
4772 { 4772 {
4773 nbytes = emacs_read (channel, chars + carryover, readmax - carryover); 4773 nbytes = emacs_read (channel, chars + carryover, readmax);
4774#ifdef ADAPTIVE_READ_BUFFERING 4774#ifdef ADAPTIVE_READ_BUFFERING
4775 if (!NILP (p->adaptive_read_buffering)) 4775 if (nbytes > 0 && !NILP (p->adaptive_read_buffering))
4776 { 4776 {
4777 int delay = XINT (p->read_output_delay); 4777 int delay = XINT (p->read_output_delay);
4778 if (nbytes < 256) 4778 if (nbytes < 256)
@@ -4784,7 +4784,7 @@ read_process_output (proc, channel)
4784 delay += READ_OUTPUT_DELAY_INCREMENT * 2; 4784 delay += READ_OUTPUT_DELAY_INCREMENT * 2;
4785 } 4785 }
4786 } 4786 }
4787 else if (delay > 0 && (nbytes == readmax - carryover)) 4787 else if (delay > 0 && (nbytes == readmax))
4788 { 4788 {
4789 delay -= READ_OUTPUT_DELAY_INCREMENT; 4789 delay -= READ_OUTPUT_DELAY_INCREMENT;
4790 if (delay == 0) 4790 if (delay == 0)
@@ -4803,7 +4803,7 @@ read_process_output (proc, channel)
4803 { 4803 {
4804 chars[carryover] = proc_buffered_char[channel]; 4804 chars[carryover] = proc_buffered_char[channel];
4805 proc_buffered_char[channel] = -1; 4805 proc_buffered_char[channel] = -1;
4806 nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1 - carryover); 4806 nbytes = emacs_read (channel, chars + carryover + 1, readmax - 1);
4807 if (nbytes < 0) 4807 if (nbytes < 0)
4808 nbytes = 1; 4808 nbytes = 1;
4809 else 4809 else
diff --git a/src/window.c b/src/window.c
index 9c94a43c3cd..e2c3fe51744 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4707,7 +4707,7 @@ window_scroll_line_based (window, n, whole, noerror)
4707 4707
4708 posit = *compute_motion (startpos, 0, 0, 0, 4708 posit = *compute_motion (startpos, 0, 0, 0,
4709 PT, ht, 0, 4709 PT, ht, 0,
4710 window_box_text_cols (w), XINT (w->hscroll), 4710 -1, XINT (w->hscroll),
4711 0, w); 4711 0, w);
4712 original_vpos = posit.vpos; 4712 original_vpos = posit.vpos;
4713 4713