changeset 89958:0bdb5a16ae51

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
author Miles Bader <miles@gnu.org>
date Tue, 03 Aug 2004 00:03:00 +0000
parents c08afac24467 (current diff) 47fd67a37101 (diff)
children e301e3f2bef8
files ChangeLog config.bat etc/ChangeLog etc/NEWS lisp/ChangeLog lisp/abbrev.el lisp/avoid.el lisp/custom.el lisp/help-mode.el lisp/novice.el lisp/printing.el lisp/progmodes/etags.el lisp/replace.el lisp/subr.el lisp/windmove.el lisp/window.el src/ChangeLog src/abbrev.c src/callint.c src/data.c src/editfns.c src/eval.c src/indent.c src/keyboard.c src/keymap.c src/process.c src/window.c
diffstat 27 files changed, 327 insertions(+), 139 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
+++ b/ChangeLog	Tue Aug 03 00:03:00 2004 +0000
@@ -1,3 +1,7 @@
+2004-07-31  Eli Zaretskii  <eliz@gnu.org>
+
+	* config.bat: Update URLs in the comments.
+
 2004-07-05  Andreas Schwab  <schwab@suse.de>
 
 	* Makefile.in (install-arch-indep): Remove .arch-inventory files.
--- a/config.bat	Wed Jul 28 07:05:52 2004 +0000
+++ b/config.bat	Tue Aug 03 00:03:00 2004 +0000
@@ -24,17 +24,15 @@
 rem   YOU'LL NEED THE FOLLOWING UTILITIES TO MAKE EMACS:
 rem
 rem   + msdos version 3 or better.
-rem   + djgpp version 1.12maint1 or later (version 2.0 or later recommended).
+rem   + DJGPP version 1.12maint1 or later (version 2.03 or later recommended).
 rem   + make utility that allows breaking of the 128 chars limit on
 rem     command lines.  ndmake (as of version 4.5) won't work due to a
-rem     line length limit.  The make that comes with djgpp does work.
+rem     line length limit.  The make that comes with DJGPP does work.
 rem   + rm and mv (from GNU file utilities).
 rem   + sed (you can use the port that comes with DJGPP).
 rem
-rem   You should be able to get all the above utilities from any SimTel
-rem   repository, e.g. ftp.simtel.net, in the directory
-rem   "pub/simtelnet/gnu/djgpp/v2gnu".  As usual, please use your local
-rem   mirroring site to reduce trans-Atlantic traffic.
+rem   You should be able to get all the above utilities from the DJGPP FTP
+rem   site, ftp.delorie.com, in the directory "pub/djgpp/current/v2gnu".
 rem   ----------------------------------------------------------------------
 set X11=
 set nodebug=
--- a/etc/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
+++ b/etc/ChangeLog	Tue Aug 03 00:03:00 2004 +0000
@@ -1,3 +1,7 @@
+2004-07-27  Werner Lemberg  <wl@gnu.org>
+
+	* NEWS: Document all new tutorials.
+
 2004-07-14  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* MORE.STUFF: Tramp is now distributed with Emacs.
--- a/etc/NEWS	Wed Jul 28 07:05:52 2004 +0000
+++ b/etc/NEWS	Tue Aug 03 00:03:00 2004 +0000
@@ -97,7 +97,11 @@
 setting the variable `image-library-alist'.
 
 ---
-** A Bulgarian translation of the Emacs Tutorial is available.
+** New translations of the Emacs Tutorial are available in the following
+   languages: Brasilian, Bulgarian, Chinese (both with simplified and
+   traditional characters), French, and Italian.  Type `C-u C-h t' to
+   choose one of them in case your language setup doesn't automatically
+   select the right one.
 
 ** You can build Emacs with Gtk+ widgets by specifying `--with-x-toolkit=gtk'
 when you run configure.  This requires Gtk+ 2.0 or newer.  This port
@@ -163,7 +167,6 @@
 ** A French translation of the `Emacs Survival Guide' is available.
 
 ---
-** A French translation of the Emacs Tutorial is available.
 ** Building with -DENABLE_CHECKING does not automatically build with union
 types any more.  Add -DUSE_LISP_UNION_TYPE if you want union types.
 
@@ -2259,6 +2262,10 @@
 
 * Lisp Changes in Emacs 21.4
 
+** Function `compute-motion' now calculates the usable window
+width if the WIDTH argument is nil.  If the TOPOS argument is nil,
+the usable window height and width is used.
+
 +++
 ** `visited-file-modtime' and `calendar-time-from-absolute' now return
 a list of two integers, instead of a cons.
--- a/lisp/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/ChangeLog	Tue Aug 03 00:03:00 2004 +0000
@@ -1,3 +1,56 @@
+2004-08-02  Kim F. Storm  <storm@cua.dk>
+
+	* avoid.el (mouse-avoidance-point-position): Use window-inside-edges
+	and call compute-motion with nil for topos and width to get proper
+	usable width and height for both window and non-window systems.
+
+	* windmove.el (windmove-coordinates-of-position): Let compute-motion
+	calculate usable window width and height.
+
+	* window.el (window-buffer-height): Call compute-motion with nil width.
+
+2004-08-01  David Kastrup  <dak@gnu.org>
+
+	* replace.el (query-replace-read-from): Use
+	`query-replace-compile-replacement'.
+	(query-replace-compile-replacement): New function.
+	(query-replace-read-to): Use `query-replace-compile-replacement'
+	for repeating the last command.
+
+2004-08-01  John Paul Wallington  <jpw@gnu.org>
+
+	* printing.el (toplevel, pr-ps-fast-fire, pr-ps-set-utility)
+	(pr-ps-set-printer, pr-txt-set-printer, pr-eval-setting-alist)
+	(pr-switches): Remove period from end of error messages.
+
+	* help-mode.el (help-go-back): Likewise.
+
+	* abbrev.el (only-global-abbrevs): Doc fix.
+	(edit-abbrevs-map): Define within defvar.
+	(quietly-read-abbrev-file): Doc fix.
+
+2004-07-31  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* novice.el (enable-command, disable-command): Doc fixes.
+
+	* subr.el (event-modifiers, event-basic-type): Doc fixes.
+
+2004-07-30  Richard M. Stallman  <rms@gnu.org>
+
+	* subr.el (with-local-quit): Doc fix.
+
+2004-07-30  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* international/utf-8.el (utf-translate-cjk-mode): Doc fix.
+
+2004-07-28  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* custom.el (defcustom): Doc fix.
+
+2004-07-28  Masatake YAMATO  <jet@gyve.org>
+
+	* progmodes/etags.el (etags-tags-apropos): Show building progress.
+
 2004-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* imenu.el (imenu-prev-index-position-function)
--- a/lisp/abbrev.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/abbrev.el	Tue Aug 03 00:03:00 2004 +0000
@@ -29,7 +29,7 @@
 ;;; Code:
 
 (defcustom only-global-abbrevs nil
-  "*t means user plans to use global abbrevs only.
+  "Non-nil means user plans to use global abbrevs only.
 This makes the commands that normally define mode-specific abbrevs
 define global abbrevs instead."
   :type 'boolean
@@ -59,13 +59,12 @@
   :group 'abbrev-mode)
 
 
-(defvar edit-abbrevs-map nil
+(defvar edit-abbrevs-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map "\C-x\C-s" 'edit-abbrevs-redefine)
+    (define-key map "\C-c\C-c" 'edit-abbrevs-redefine)
+    map)
   "Keymap used in `edit-abbrevs'.")
-(if edit-abbrevs-map
-    nil
-  (setq edit-abbrevs-map (make-sparse-keymap))
-  (define-key edit-abbrevs-map "\C-x\C-s" 'edit-abbrevs-redefine)
-  (define-key edit-abbrevs-map "\C-c\C-c" 'edit-abbrevs-redefine))
 
 (defun kill-all-abbrevs ()
   "Undefine all defined abbrevs."
@@ -195,7 +194,7 @@
   (setq abbrevs-changed nil))
 
 (defun quietly-read-abbrev-file (&optional file)
-  "Read abbrev definitions from file written with write-abbrev-file.
+  "Read abbrev definitions from file written with `write-abbrev-file'.
 Optional argument FILE is the name of the file to read;
 it defaults to the value of `abbrev-file-name'.
 Does not display any message."
--- a/lisp/avoid.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/avoid.el	Tue Aug 03 00:03:00 2004 +0000
@@ -139,15 +139,15 @@
   "Return the position of point as (FRAME X . Y).
 Analogous to mouse-position."
   (let* ((w (selected-window))
-	 (edges (window-edges w))
+	 (edges (window-inside-edges w))
 	 (list
 	  (compute-motion (max (window-start w) (point-min))   ; start pos
 			  ;; window-start can be < point-min if the
 			  ;; latter has changed since the last redisplay
 			  '(0 . 0)	                       ; start XY
 			  (point)	                       ; stop pos
-			  (cons (window-width) (window-height)); stop XY: none
-			  (1- (window-width))                  ; width
+			  nil				       ; stop XY: none
+			  nil				       ; width
 			  (cons (window-hscroll w) 0)          ; 0 may not be right?
 			  (selected-window))))
     ;; compute-motion returns (pos HPOS VPOS prevhpos contin)
--- a/lisp/custom.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/custom.el	Tue Aug 03 00:03:00 2004 +0000
@@ -246,6 +246,13 @@
 	Specifies that SYMBOL should be set after the list of variables
         VARIABLES when both have been customized.
 
+If SYMBOL has a local binding, then this form affects the local
+binding.  This is normally not what you want.  Thus, if you need
+to load a file defining variables with this form, or with
+`defvar' or `defconst', you should always load that file
+_outside_ any bindings for these variables.  \(`defvar' and
+`defconst' behave similarly in this respect.)
+
 Read the section about customization in the Emacs Lisp manual for more
 information."
   ;; It is better not to use backquote in this file,
--- a/lisp/help-mode.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/help-mode.el	Tue Aug 03 00:03:00 2004 +0000
@@ -581,7 +581,7 @@
   (interactive)
   (if help-xref-stack
       (help-xref-go-back (current-buffer))
-    (error "No previous help buffer.")))
+    (error "No previous help buffer")))
 
 (defun help-do-xref (pos function args)
   "Call the help cross-reference function FUNCTION with args ARGS.
--- a/lisp/novice.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/novice.el	Tue Aug 03 00:03:00 2004 +0000
@@ -104,7 +104,8 @@
 ;;;###autoload
 (defun enable-command (command)
   "Allow COMMAND to be executed without special confirmation from now on.
-The user's .emacs file is altered so that this will apply
+COMMAND must be a symbol.
+This command alters the user's .emacs file so that this will apply
 to future sessions."
   (interactive "CEnable command: ")
   (put command 'disabled nil)
@@ -141,7 +142,8 @@
 ;;;###autoload
 (defun disable-command (command)
   "Require special confirmation to execute COMMAND from now on.
-The user's .emacs file is altered so that this will apply
+COMMAND must be a symbol.
+This command alters the user's .emacs file so that this will apply
 to future sessions."
   (interactive "CDisable command: ")
   (if (not (commandp command))
--- a/lisp/printing.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/printing.el	Tue Aug 03 00:03:00 2004 +0000
@@ -974,7 +974,7 @@
 
 
 (and (string< ps-print-version "6.6.4")
-     (error "`printing' requires `ps-print' package version 6.6.4 or later."))
+     (error "`printing' requires `ps-print' package version 6.6.4 or later"))
 
 
 (eval-and-compile
@@ -4254,7 +4254,7 @@
     (pr-ps-buffer-ps-print
      (if (integerp n-up)
 	 (min (max n-up 1) 100)
-       (error "n-up must be an integer greater than zero."))
+       (error "n-up must be an integer greater than zero"))
      filename)))
 
 
@@ -5031,7 +5031,7 @@
   (let ((item (cdr (assq value pr-ps-utility-alist))))
     (or item
 	(error
-	 "Invalid PostScript utility name `%s' for variable `pr-ps-utility'."
+	 "Invalid PostScript utility name `%s' for variable `pr-ps-utility'"
 	 value))
     (setq pr-ps-utility value)
     (pr-eval-alist (nthcdr 9 item)))
@@ -5042,7 +5042,7 @@
   (let ((ps (cdr (assq value pr-ps-printer-alist))))
     (or ps
 	(error
-	 "Invalid PostScript printer name `%s' for variable `pr-ps-name'."
+	 "Invalid PostScript printer name `%s' for variable `pr-ps-name'"
 	 value))
     (setq pr-ps-name           value
 	  pr-ps-command        (pr-dosify-file-name (nth 0 ps))
@@ -5068,7 +5068,7 @@
 (defun pr-txt-set-printer (value)
   (let ((txt (cdr (assq value pr-txt-printer-alist))))
     (or txt
-	(error "Invalid text printer name `%s' for variable `pr-txt-name'."
+	(error "Invalid text printer name `%s' for variable `pr-txt-name'"
 	       value))
     (setq pr-txt-name     value
 	  pr-txt-command  (pr-dosify-file-name (nth 0 txt))
@@ -5121,7 +5121,7 @@
 		  (setq global nil)))
 	   (and inherits
 		(if (memq inherits old)
-		    (error "Circular inheritance for `%S'." inherits)
+		    (error "Circular inheritance for `%S'" inherits)
 		  (setq local-list
 			(pr-eval-setting-alist inherits global
 					       (cons inherits old)))))
@@ -5349,7 +5349,7 @@
 
 (defun pr-switches (switches mess)
   (or (listp switches)
-      (error "%S should have a list of strings." mess))
+      (error "%S should have a list of strings" mess))
   (ps-flatten-list			; dynamic evaluation
    (mapcar 'ps-eval-switch switches)))
 
--- a/lisp/progmodes/etags.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/progmodes/etags.el	Tue Aug 03 00:03:00 2004 +0000
@@ -1453,53 +1453,58 @@
     (tags-with-face 'highlight (princ buffer-file-name))
     (princ "':\n\n"))
   (goto-char (point-min))
-  (while (re-search-forward string nil t)
-    (beginning-of-line)
+  (let ((point-max (/ (float (point-max)) 100.0)))
+    (while (re-search-forward string nil t)
+      (message "Making tags apropos buffer for `%s'...%d%%"
+	       string
+	       (/ (point) point-max))
+      (beginning-of-line)
 
-    (let* (;; Get the local value in the tags table
-	   ;; buffer before switching buffers.
-	   (goto-func goto-tag-location-function)
-	   (tag-info (save-excursion (funcall snarf-tag-function)))
-	   (tag (if (eq t (car tag-info)) nil (car tag-info)))
-	   (file-path (save-excursion (if tag (file-of-tag)
-					(save-excursion (next-line 1)
-							(file-of-tag)))))
-	   (file-label (if tag (file-of-tag t)
-			 (save-excursion (next-line 1)
-					 (file-of-tag t))))
-	   (pt (with-current-buffer standard-output (point))))
-      (if tag
-	  (progn
-	    (princ (format "[%s]: " file-label))
-	    (princ tag)
-	    (when (= (aref tag 0) ?\() (princ " ...)"))
-	    (with-current-buffer standard-output
-	      (make-text-button pt (point)
-				'tag-info tag-info
-				'file-path file-path
-				'goto-func goto-func
-				'action (lambda (button)
-					  (let ((tag-info (button-get button 'tag-info))
-						(goto-func (button-get button 'goto-func)))
-					    (tag-find-file-of-tag (button-get button 'file-path))
-					    (widen)
-					    (funcall goto-func tag-info)))
-				'face 'tags-tag-face
-				'type 'button)))
-	(princ (format "- %s" file-label))
-	(with-current-buffer standard-output
-	  (make-text-button pt (point)
-			    'file-path file-path
-			    'action (lambda (button)
-				      (tag-find-file-of-tag (button-get button 'file-path))
-				      ;; Get the local value in the tags table
-				      ;; buffer before switching buffers.
-				      (goto-char (point-min)))
-			    'face 'tags-tag-face
-			    'type 'button))
-	))
-    (terpri)
-    (forward-line 1))
+      (let* ( ;; Get the local value in the tags table
+	     ;; buffer before switching buffers.
+	     (goto-func goto-tag-location-function)
+	     (tag-info (save-excursion (funcall snarf-tag-function)))
+	     (tag (if (eq t (car tag-info)) nil (car tag-info)))
+	     (file-path (save-excursion (if tag (file-of-tag)
+					  (save-excursion (next-line 1)
+							  (file-of-tag)))))
+	     (file-label (if tag (file-of-tag t)
+			   (save-excursion (next-line 1)
+					   (file-of-tag t))))
+	     (pt (with-current-buffer standard-output (point))))
+	(if tag
+	    (progn
+	      (princ (format "[%s]: " file-label))
+	      (princ tag)
+	      (when (= (aref tag 0) ?\() (princ " ...)"))
+	      (with-current-buffer standard-output
+		(make-text-button pt (point)
+				  'tag-info tag-info
+				  'file-path file-path
+				  'goto-func goto-func
+				  'action (lambda (button)
+					    (let ((tag-info (button-get button 'tag-info))
+						  (goto-func (button-get button 'goto-func)))
+					      (tag-find-file-of-tag (button-get button 'file-path))
+					      (widen)
+					      (funcall goto-func tag-info)))
+				  'face 'tags-tag-face
+				  'type 'button)))
+	  (princ (format "- %s" file-label))
+	  (with-current-buffer standard-output
+	    (make-text-button pt (point)
+			      'file-path file-path
+			      'action (lambda (button)
+					(tag-find-file-of-tag (button-get button 'file-path))
+					;; Get the local value in the tags table
+					;; buffer before switching buffers.
+					(goto-char (point-min)))
+			      'face 'tags-tag-face
+			      'type 'button))
+	  ))
+      (terpri)
+      (forward-line 1))
+    (message nil))
   (when tags-apropos-verbose (princ "\n")))
 
 (defun etags-tags-table-files ()
--- a/lisp/replace.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/replace.el	Tue Aug 03 00:03:00 2004 +0000
@@ -94,7 +94,8 @@
 	       query-replace-from-history-variable
 	       nil t))))
       (if (and (zerop (length from)) lastto lastfrom)
-	  (cons lastfrom lastto)
+	  (cons lastfrom
+		(query-replace-compile-replacement lastto regexp-flag))
 	;; Warn if user types \n or \t, but don't reject the input.
 	(and regexp-flag
 	     (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\(\\\\[nt]\\)" from)
@@ -107,15 +108,12 @@
 	       (sit-for 2)))
 	from))))
 
-(defun query-replace-read-to (from string regexp-flag)
-  "Query and return the `from' argument of a query-replace operation."
-  (let ((to (save-excursion
-	      (read-from-minibuffer
-	       (format "%s %s with: " string (query-replace-descr from))
-	       nil nil nil
-	       query-replace-to-history-variable from t))))
-    (when (and regexp-flag
-	       (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))
+(defun query-replace-compile-replacement (to regexp-flag)
+  "Maybe convert a regexp replacement TO to Lisp.
+Returns a list suitable for `perform-replace' if necessary,
+the original string if not."
+  (if (and regexp-flag
+	   (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to))
       (let (pos list char)
 	(while
 	    (progn
@@ -142,14 +140,25 @@
 			      (cdr pos))))
 		       (setq to (substring to end)))))
 	      (string-match "\\(\\`\\|[^\\]\\)\\(\\\\\\\\\\)*\\\\[,#]" to)))
-	(setq to (nreverse (delete "" (cons to list)))))
-      (replace-match-string-symbols to)
-      (setq to (cons 'replace-eval-replacement
-		     (if (> (length to) 1)
-			 (cons 'concat to)
-		       (car to)))))
+	(setq to (nreverse (delete "" (cons to list))))
+	(replace-match-string-symbols to)
+	(cons 'replace-eval-replacement
+	      (if (cdr to)
+		  (cons 'concat to)
+		(car to))))
     to))
 
+
+(defun query-replace-read-to (from string regexp-flag)
+  "Query and return the `to' argument of a query-replace operation."
+  (query-replace-compile-replacement
+   (save-excursion
+     (read-from-minibuffer
+      (format "%s %s with: " string (query-replace-descr from))
+      nil nil nil
+      query-replace-to-history-variable from t))
+   regexp-flag))
+
 (defun query-replace-read-args (string regexp-flag &optional noerror)
   (unless noerror
     (barf-if-buffer-read-only))
--- a/lisp/subr.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/subr.el	Tue Aug 03 00:03:00 2004 +0000
@@ -644,7 +644,11 @@
   "Return a list of symbols representing the modifier keys in event EVENT.
 The elements of the list may include `meta', `control',
 `shift', `hyper', `super', `alt', `click', `double', `triple', `drag',
-and `down'."
+and `down'.
+EVENT may be an event or an event type.  If EVENT is a symbol
+that has never been used in an event that has been read as input
+in the current Emacs session, then this function can return nil,
+even when EVENT actually has modifiers."
   (let ((type event))
     (if (listp type)
 	(setq type (car type)))
@@ -671,7 +675,10 @@
 
 (defun event-basic-type (event)
   "Return the basic type of the given event (all modifiers removed).
-The value is a printing character (not upper case) or a symbol."
+The value is a printing character (not upper case) or a symbol.
+EVENT may be an event or an event type.  If EVENT is a symbol
+that has never been used in an event that has been read as input
+in the current Emacs session, then this function may return nil."
   (if (consp event)
       (setq event (car event)))
   (if (symbolp event)
@@ -1894,7 +1901,10 @@
 	 (kill-buffer nil)))))
 
 (defmacro with-local-quit (&rest body)
-  "Execute BODY with `inhibit-quit' temporarily bound to nil."
+  "Execute BODY, allowing quits to terminate BODY but not escape further.
+When a quit terminates BODY, `with-local-quit' requests another quit when
+it finishes.  That quit will be processed in turn, the next time quitting
+is again allowed."
   (declare (debug t) (indent 0))
   `(condition-case nil
        (let ((inhibit-quit nil))
--- a/lisp/windmove.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/windmove.el	Tue Aug 03 00:03:00 2004 +0000
@@ -429,14 +429,12 @@
 regardless of the where point is in the buffer and where the window
 is placed in the frame."
   (let* ((wind (if (null window) (selected-window) window))
-         (usable-width (1- (window-width wind))) ; 1- for cont. column
-         (usable-height (1- (window-height wind))) ; 1- for mode line
          (big-hairy-result (compute-motion
                             (window-start)
                             '(0 . 0)
                             pos
-                            (cons usable-width usable-height)
-                            usable-width
+                            nil ; (window-width window-height)
+                            nil ; window-width
                             (cons (window-hscroll)
                                   0)    ; why zero?
                             wind)))
--- a/lisp/window.el	Wed Jul 28 07:05:52 2004 +0000
+++ b/lisp/window.el	Tue Aug 03 00:03:00 2004 +0000
@@ -408,7 +408,7 @@
                                   '(0 . 0)
                                   (- (point-max) (if ignore-final-newline 1 0))
                                   (cons 0 100000000)
-                                  (window-width window)
+                                  nil
                                   nil
                                   window))))))
 
--- a/src/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/ChangeLog	Tue Aug 03 00:03:00 2004 +0000
@@ -1,3 +1,46 @@
+2004-08-03  Kim F. Storm  <storm@cua.dk>
+
+	* indent.c (compute_motion): Fix check for full width window
+	in non-window case.  Do not count left truncation glyph on
+	window systems.
+
+2004-08-02  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* data.c (Finteractive_form): Doc fix.
+
+2004-08-02  Kim F. Storm  <storm@cua.dk>
+
+	* indent.c (compute_motion): Use actual window width if WIDTH is -1,
+	properly accounting for continuation glyph on non-window systems.
+	(Fcompute_motion): Use actual window width if WIDTH is nil, and
+	actual window width/height if TOPOS is nil, properly accounting for
+	continuation glyphs on non-window systems, and optional header lines.
+	(vmotion): Let compute_motion calculate actual window width.
+
+	* window.c (window_scroll_line_based): Let compute_motion
+	calculate actual window width.
+
+2004-08-02  Kim F. Storm  <storm@cua.dk>
+
+	* process.c (read_process_output): Use whole read buffer.
+	Don't trigger adaptive read buffering on errors.
+
+2004-07-31  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* keymap.c (Fset_keymap_parent, Fdefine_prefix_command): Doc fixes.
+
+	* keyboard.c (syms_of_keyboard) <disable-point-adjustment>:  Doc fix.
+
+	* callint.c (Fcall_interactively): Doc fix.
+
+2004-07-30  Kim F. Storm  <storm@cua.dk>
+
+	* editfns.c (Fformat): Allocate extra (dummy) element in info.
+
+2004-07-28  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* eval.c (Fdefvar, Fdefconst): Doc fixes.
+
 2004-07-27  Kim F. Storm  <storm@cua.dk>
 
 	* xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after
--- a/src/abbrev.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/abbrev.c	Tue Aug 03 00:03:00 2004 +0000
@@ -248,6 +248,8 @@
 
   value = Qnil;
 
+  Frun_hooks (1, &Qpre_abbrev_expand_hook);
+
   wordstart = 0;
   if (!(BUFFERP (Vabbrev_start_location_buffer)
 	&& XBUFFER (Vabbrev_start_location_buffer) == current_buffer))
@@ -324,8 +326,6 @@
   if (INTEGERP (sym) || NILP (SYMBOL_VALUE (sym)))
     return value;
 
-  Frun_hooks (1, &Qpre_abbrev_expand_hook);
-
   if (INTERACTIVE && !EQ (minibuf_window, selected_window))
     {
       /* Add an undo boundary, in case we are doing this for
--- a/src/callint.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/callint.c	Tue Aug 03 00:03:00 2004 +0000
@@ -256,7 +256,8 @@
 means unconditionally put this command in the command-history.
 Otherwise, this is done only if an arg is read using the minibuffer.
 Optional third arg KEYS, if given, specifies the sequence of events to
-supply if the command inquires which events were used to invoke it.  */)
+supply if the command inquires which events were used to invoke it.
+If KEYS is omitted or nil, the return value of `this-command-keys' is used.  */)
      (function, record_flag, keys)
      Lisp_Object function, record_flag, keys;
 {
--- a/src/data.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/data.c	Tue Aug 03 00:03:00 2004 +0000
@@ -776,8 +776,8 @@
 
 DEFUN ("interactive-form", Finteractive_form, Sinteractive_form, 1, 1, 0,
        doc: /* Return the interactive form of CMD or nil if none.
-CMD must be a command.  Value, if non-nil, is a list
-\(interactive SPEC).  */)
+If CMD is not a command, the return value is nil.
+Value, if non-nil, is a list \(interactive SPEC).  */)
      (cmd)
      Lisp_Object cmd;
 {
--- a/src/editfns.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/editfns.c	Tue Aug 03 00:03:00 2004 +0000
@@ -3410,6 +3410,7 @@
       /* Piggyback on this loop to initialize precision[N]. */
       precision[n] = -1;
     }
+  precision[nargs] = -1;
 
   CHECK_STRING (args[0]);
   /* We may have to change "%S" to "%s". */
@@ -3433,11 +3434,11 @@
 
   /* Allocate the info and discarded tables.  */
   {
-    int nbytes = nargs * sizeof *info;
+    int nbytes = (nargs+1) * sizeof *info;
     int i;
     info = (struct info *) alloca (nbytes);
     bzero (info, nbytes);
-    for (i = 0; i < nargs; i++)
+    for (i = 0; i <= nargs; i++)
       info[i].start = -1;
     discarded = (char *) alloca (SBYTES (args[0]));
     bzero (discarded, SBYTES (args[0]));
--- a/src/eval.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/eval.c	Tue Aug 03 00:03:00 2004 +0000
@@ -742,6 +742,13 @@
  This means that M-x set-variable recognizes it.
  See also `user-variable-p'.
 If INITVALUE is missing, SYMBOL's value is not set.
+
+If SYMBOL has a local binding, then this form affects the local
+binding.  This is usually not what you want.  Thus, if you need to
+load a file defining variables, with this form or with `defconst' or
+`defcustom', you should always load that file _outside_ any bindings
+for these variables.  \(`defconst' and `defcustom' behave similarly in
+this respect.)
 usage: (defvar SYMBOL &optional INITVALUE DOCSTRING)  */)
      (args)
      Lisp_Object args;
@@ -784,6 +791,10 @@
 If SYMBOL is buffer-local, its default value is what is set;
  buffer-local values are not affected.
 DOCSTRING is optional.
+
+If SYMBOL has a local binding, then this form sets the local binding's
+value.  However, you should normally not make local bindings for
+variables defined with this form.
 usage: (defconst SYMBOL INITVALUE [DOCSTRING])  */)
      (args)
      Lisp_Object args;
--- a/src/indent.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/indent.c	Tue Aug 03 00:03:00 2004 +0000
@@ -1131,6 +1131,9 @@
 
    WIDTH is the number of columns available to display text;
    compute_motion uses this to handle continuation lines and such.
+   If WIDTH is -1, use width of window's text area adjusted for
+   continuation glyph when needed.
+
    HSCROLL is the number of columns not being displayed at the left
    margin; this is usually taken from a window's hscroll member.
    TAB_OFFSET is the number of columns of the first tab that aren't
@@ -1228,6 +1231,7 @@
   int prev_vpos = 0;
   int contin_hpos;		/* HPOS of last column of continued line.  */
   int prev_tab_offset;		/* Previous tab offset.  */
+  int continuation_glyph_width;
 
   XSETBUFFER (buffer, current_buffer);
   XSETWINDOW (window, win);
@@ -1245,6 +1249,23 @@
   if (tab_width <= 0 || tab_width > 1000)
     tab_width = 8;
 
+  /* Negative width means use all available text columns.  */
+  if (width < 0)
+    {
+      width = window_box_text_cols (win);
+      /* We must make room for continuation marks if we don't have fringes.  */
+#ifdef HAVE_WINDOW_SYSTEM
+      if (!FRAME_WINDOW_P (XFRAME (win->frame)))
+#endif
+	width -= 1;
+    }
+
+  continuation_glyph_width = 0;
+#ifdef HAVE_WINDOW_SYSTEM
+  if (!FRAME_WINDOW_P (XFRAME (win->frame)))
+    continuation_glyph_width = 1;
+#endif
+
   immediate_quit = 1;
   QUIT;
 
@@ -1368,7 +1389,8 @@
 	{
 	  if (hscroll
 	      || (truncate_partial_width_windows
-		  && width + 1 < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))
+		  && ((width + continuation_glyph_width)
+		      < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))
 	      || !NILP (current_buffer->truncate_lines))
 	    {
 	      /* Truncating: skip to newline, unless we are already past
@@ -1652,7 +1674,7 @@
 		      hpos -= hscroll;
 		      /* Count the truncation glyph on column 0 */
 		      if (hscroll > 0)
-			hpos++;
+			hpos += continuation_glyph_width;
 		      tab_offset = 0;
 		    }
 		  contin_hpos = 0;
@@ -1737,12 +1759,14 @@
 to position TO or position TOPOS--another cons of the form (HPOS . VPOS)--
 and return the ending buffer position and screen location.
 
+If TOPOS is nil, the actual width and height of the window's
+text area are used.
+
 There are three additional arguments:
 
 WIDTH is the number of columns available to display text;
-this affects handling of continuation lines.
-This is usually the value returned by `window-width', less one (to allow
-for the continuation glyph).
+this affects handling of continuation lines.  A value of nil
+corresponds to the actual number of available text columns.
 
 OFFSETS is either nil or a cons cell (HSCROLL . TAB-OFFSET).
 HSCROLL is the number of columns not being displayed at the left
@@ -1774,6 +1798,7 @@
      Lisp_Object from, frompos, to, topos;
      Lisp_Object width, offsets, window;
 {
+  struct window *w;
   Lisp_Object bufpos, hpos, vpos, prevhpos;
   struct position *pos;
   int hscroll, tab_offset;
@@ -1783,10 +1808,15 @@
   CHECK_NUMBER_CAR (frompos);
   CHECK_NUMBER_CDR (frompos);
   CHECK_NUMBER_COERCE_MARKER (to);
-  CHECK_CONS (topos);
-  CHECK_NUMBER_CAR (topos);
-  CHECK_NUMBER_CDR (topos);
-  CHECK_NUMBER (width);
+  if (!NILP (topos))
+    {
+      CHECK_CONS (topos);
+      CHECK_NUMBER_CAR (topos);
+      CHECK_NUMBER_CDR (topos);
+    }
+  if (!NILP (width))
+    CHECK_NUMBER (width);
+
   if (!NILP (offsets))
     {
       CHECK_CONS (offsets);
@@ -1802,6 +1832,7 @@
     window = Fselected_window ();
   else
     CHECK_LIVE_WINDOW (window);
+  w = XWINDOW (window);
 
   if (XINT (from) < BEGV || XINT (from) > ZV)
     args_out_of_range_3 (from, make_number (BEGV), make_number (ZV));
@@ -1810,9 +1841,20 @@
 
   pos = compute_motion (XINT (from), XINT (XCDR (frompos)),
 			XINT (XCAR (frompos)), 0,
-			XINT (to), XINT (XCDR (topos)),
-			XINT (XCAR (topos)),
-			XINT (width), hscroll, tab_offset,
+			XINT (to),
+			(NILP (topos)
+			 ? window_internal_height (w)
+			 : XINT (XCDR (topos))),
+			(NILP (topos)
+			 ? (window_box_text_cols (w)
+			    - (
+#ifdef HAVE_WINDOW_SYSTEM
+			       FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
+#endif
+			       1))
+			 : XINT (XCAR (topos))),
+			(NILP (width) ? -1 : XINT (width)),
+			hscroll, tab_offset,
 			XWINDOW (window));
 
   XSETFASTINT (bufpos, pos->bufpos);
@@ -1837,7 +1879,6 @@
      register int from, vtarget;
      struct window *w;
 {
-  int width = window_box_text_cols (w);
   int hscroll = XINT (w->hscroll);
   struct position pos;
   /* vpos is cumulative vertical position, changed as from is changed */
@@ -1858,12 +1899,6 @@
 
   XSETWINDOW (window, w);
 
-  /* We must make room for continuation marks if we don't have fringes.  */
-#ifdef HAVE_WINDOW_SYSTEM
-  if (!FRAME_WINDOW_P (XFRAME (w->frame)))
-#endif
-    width -= 1;
-
   /* If the window contains this buffer, use it for getting text properties.
      Otherwise use the current buffer as arg for doing that.  */
   if (EQ (w->buffer, Fcurrent_buffer ()))
@@ -1905,7 +1940,7 @@
 				 1 << (BITS_PER_SHORT - 1),
 				 /* ... nor HPOS.  */
 				 1 << (BITS_PER_SHORT - 1),
-				 width, hscroll,
+				 -1, hscroll,
 				 /* This compensates for start_hpos
 				    so that a tab as first character
 				    still occupies 8 columns.  */
@@ -1964,7 +1999,7 @@
 			     1 << (BITS_PER_SHORT - 1),
 			     /* ... nor HPOS.  */
 			     1 << (BITS_PER_SHORT - 1),
-			     width, hscroll,
+			     -1, hscroll,
 			     (XFASTINT (prevline) == BEG ? -start_hpos : 0),
 			     w);
       did_motion = 1;
@@ -1978,7 +2013,7 @@
     }
   return compute_motion (from, vpos, pos.hpos, did_motion,
 			 ZV, vtarget, - (1 << (BITS_PER_SHORT - 1)),
-			 width, hscroll,
+			 -1, hscroll,
 			 pos.tab_offset - (from == BEG ? start_hpos : 0),
 			 w);
 }
--- a/src/keyboard.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/keyboard.c	Tue Aug 03 00:03:00 2004 +0000
@@ -11369,8 +11369,8 @@
 
 After a command is executed, if point is moved into a region that has
 special properties (e.g. composition, display), we adjust point to
-the boundary of the region.  But, several special commands sets this
-variable to non-nil, then we suppress the point adjustment.
+the boundary of the region.  But, when a command sets this variable to
+non-nil, we suppress the point adjustment.
 
 This variable is set to nil before reading a command, and is checked
 just after executing the command.  */);
--- a/src/keymap.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/keymap.c	Tue Aug 03 00:03:00 2004 +0000
@@ -343,7 +343,7 @@
 
 DEFUN ("set-keymap-parent", Fset_keymap_parent, Sset_keymap_parent, 2, 2, 0,
        doc: /* Modify KEYMAP to set its parent map to PARENT.
-PARENT should be nil or another keymap.  */)
+Return PARENT.  PARENT should be nil or another keymap.  */)
      (keymap, parent)
      Lisp_Object keymap, parent;
 {
@@ -1719,7 +1719,8 @@
 its value instead of as COMMAND's value; but COMMAND is still defined
 as a function.
 The third optional argument NAME, if given, supplies a menu name
-string for the map.  This is required to use the keymap as a menu.  */)
+string for the map.  This is required to use the keymap as a menu.
+This function returns COMMAND.  */)
      (command, mapvar, name)
      Lisp_Object command, mapvar, name;
 {
--- a/src/process.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/process.c	Tue Aug 03 00:03:00 2004 +0000
@@ -4196,7 +4196,7 @@
              present (for reading) at stdin, even when none is.  This
              causes the call to SELECT below to return 1 and
              status_notify not to be called.  As a result output of
-             subprocesses are incorrectly discarded.  
+             subprocesses are incorrectly discarded.
 	  */
           FD_CLR (0, &Atemp);
 #endif
@@ -4763,16 +4763,16 @@
   if (DATAGRAM_CHAN_P (channel))
     {
       int len = datagram_address[channel].len;
-      nbytes = recvfrom (channel, chars + carryover, readmax - carryover,
+      nbytes = recvfrom (channel, chars + carryover, readmax,
 			 0, datagram_address[channel].sa, &len);
     }
   else
 #endif
   if (proc_buffered_char[channel] < 0)
     {
-      nbytes = emacs_read (channel, chars + carryover, readmax - carryover);
+      nbytes = emacs_read (channel, chars + carryover, readmax);
 #ifdef ADAPTIVE_READ_BUFFERING
-      if (!NILP (p->adaptive_read_buffering))
+      if (nbytes > 0 && !NILP (p->adaptive_read_buffering))
 	{
 	  int delay = XINT (p->read_output_delay);
 	  if (nbytes < 256)
@@ -4784,7 +4784,7 @@
 		  delay += READ_OUTPUT_DELAY_INCREMENT * 2;
 		}
 	    }
-	  else if (delay > 0 && (nbytes == readmax - carryover))
+	  else if (delay > 0 && (nbytes == readmax))
 	    {
 	      delay -= READ_OUTPUT_DELAY_INCREMENT;
 	      if (delay == 0)
@@ -4803,7 +4803,7 @@
     {
       chars[carryover] = proc_buffered_char[channel];
       proc_buffered_char[channel] = -1;
-      nbytes = emacs_read (channel, chars + carryover + 1,  readmax - 1 - carryover);
+      nbytes = emacs_read (channel, chars + carryover + 1,  readmax - 1);
       if (nbytes < 0)
 	nbytes = 1;
       else
--- a/src/window.c	Wed Jul 28 07:05:52 2004 +0000
+++ b/src/window.c	Tue Aug 03 00:03:00 2004 +0000
@@ -4707,7 +4707,7 @@
 
   posit = *compute_motion (startpos, 0, 0, 0,
 			   PT, ht, 0,
-			   window_box_text_cols (w), XINT (w->hscroll),
+			   -1, XINT (w->hscroll),
 			   0, w);
   original_vpos = posit.vpos;