changeset 89957:c08afac24467

Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-26 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-466 - miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 28 Jul 2004 07:05:52 +0000
parents b9eee0a7bef5 (current diff) e7ddaefbeaa4 (diff)
children 0bdb5a16ae51
files lisp/ChangeLog lisp/autorevert.el lisp/font-lock.el lisp/frame.el lisp/imenu.el lisp/mail/rmail.el lisp/makefile.w32-in lisp/ps-print.el lisp/replace.el lisp/select.el lisp/simple.el lisp/subr.el lisp/term/tty-colors.el lisp/textmodes/flyspell.el lispref/ChangeLog lispref/frames.texi lispref/macros.texi lispref/minibuf.texi lispref/windows.texi man/ChangeLog man/search.texi man/text.texi nt/makefile.w32-in src/ChangeLog src/abbrev.c src/alloc.c src/dispextern.h src/fileio.c src/frame.c src/keyboard.h src/window.c src/xdisp.c src/xfaces.c src/xfns.c
diffstat 35 files changed, 478 insertions(+), 180 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
@@ -1,11 +1,58 @@
+2004-07-26  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+	* imenu.el (imenu-prev-index-position-function)
+	(imenu-extract-index-name-function, imenu-name-lookup-function)
+	(imenu--index-alist): Docstring redundancy fix.
+
+2004-07-25  Lars Hansen  <larsh@math.ku.dk>
+
+	* wdired.el (wdired-finish-edit): Require dired-aux before locally
+	binding dired-backup-overwrite.
+
+2004-07-25  John Paul Wallington  <jpw@gnu.org>
+
+	* subr.el (butlast, event-modifiers, event-basic-type): Doc fixes.
+
+2004-07-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* term/tty-colors.el (tty-color-approximate): Doc fix.
+
+	* select.el (x-get-selection, x-set-selection): Doc fixes.
+
+	* frame.el (make-frame): Doc fix.
+
+2004-07-24  Richard M. Stallman  <rms@gnu.org>
+
+	* mail/rmail.el (rmail-mime-charset-pattern):
+	Don't include semicolon in the charset value.
+
+	* replace.el (occur-next-error): Call set-window-point.
+	(occur-engine): Handle negative NLINES.
+
+2004-07-23  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* frame.el (modify-all-frames-parameters): Minor doc fix.
+	(set-frame-configuration): Doc fix.
+
+2004-07-23  Matt Hodges  <matt@stchem.bham.ac.uk>  (tiny change)
+
+	* simple.el (completion-setup-function): Compute the common parts
+	and the first difference place correctly when
+	partial-completion-mode is on.
+
 2004-07-22  Vinicius Jose Latorre  <viniciusjl@ig.com.br>
 
-	* ps-print.el: Doc fix.  Improve the DSC compliance of the generated
-	PostScript.  Suggested by Michael Piotrowski <mxp@dynalabs.de>.
+	* ps-print.el: Doc fix.
 	(ps-print-version): New version 6.6.5.
 	(ps-printing-region): Doc fix.
 	(ps-generate-string-list): Comment fix.
-	(ps-message-log-max, ps-begin-file): Code fix.
+	(ps-message-log-max): Code fix.
+
+
+2004-07-22  Michael Piotrowski  <mxp@dynalabs.de>  (tiny change)
+
+	* ps-print.el (ps-begin-file): Improve the DSC compliance of the
+	generated PostScript.
 
 2004-07-22  Kim F. Storm  <storm@cua.dk>
 
@@ -38,8 +85,8 @@
 
 2004-07-17  Kai Grossjohann  <kai.grossjohann@gmx.net>
 
-	* net/tramp.el (tramp-handle-verify-visited-file-modtime): New
-	docstring.  From Luc Teirlinck.
+	* net/tramp.el (tramp-handle-verify-visited-file-modtime):
+	New docstring.  From Luc Teirlinck.
 
 2004-07-17  Luc Teirlinck  <teirllm@auburn.edu>
 
--- a/lisp/autorevert.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/autorevert.el	Wed Jul 28 07:05:52 2004 +0000
@@ -1,6 +1,6 @@
 ;;; autorevert.el --- revert buffers when files on disk change
 
-;; Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 1998, 1999, 2001, 2004 Free Software Foundation, Inc.
 
 ;; Author: Anders Lindgren <andersl@andersl.com>
 ;; Keywords: convenience
--- a/lisp/font-lock.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/font-lock.el	Wed Jul 28 07:05:52 2004 +0000
@@ -358,8 +358,9 @@
  (eval . FORM)
 
 where MATCHER can be either the regexp to search for, or the function name to
-call to make the search (called with one argument, the limit of the search) and
-return non-nil if it succeeds (and set `match-data' appropriately).
+call to make the search (called with one argument, the limit of the search;
+it should return non-nil, move point, and set `match-data' appropriately iff
+it succeeds; like `re-search-forward' would).
 MATCHER regexps can be generated via the function `regexp-opt'.
 
 FORM is an expression, whose value should be a keyword element, evaluated when
--- a/lisp/frame.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/frame.el	Wed Jul 28 07:05:52 2004 +0000
@@ -520,7 +520,7 @@
 ;;;; Creation of additional frames, and other frame miscellanea
 
 (defun modify-all-frames-parameters (alist)
-  "Modify all current and future frames parameters according to ALIST.
+  "Modify all current and future frames' parameters according to ALIST.
 This changes `default-frame-alist' and possibly `initial-frame-alist'.
 See help of `modify-frame-parameters' for more information."
   (let (element)			;; temp
@@ -612,7 +612,13 @@
 
 Before the frame is created (via `frame-creation-function'), functions on the
 hook `before-make-frame-hook' are run.  After the frame is created, functions
-on `after-make-frame-functions' are run with one arg, the newly created frame."
+on `after-make-frame-functions' are run with one arg, the newly created frame.
+
+This function itself does not make the new frame the selected frame.
+The previously selected frame remains selected.  However, the
+window system may select the new frame for its own reasons, for
+instance if the frame appears under the mouse pointer and your
+setup is for focus to follow the pointer."
   (interactive)
   (run-hooks 'before-make-frame-hook)
   (let ((frame (funcall frame-creation-function parameters)))
@@ -789,6 +795,8 @@
   "Restore the frames to the state described by CONFIGURATION.
 Each frame listed in CONFIGURATION has its position, size, window
 configuration, and other parameters set as specified in CONFIGURATION.
+However, this function does not restore deleted frames.
+
 Ordinarily, this function deletes all existing frames not
 listed in CONFIGURATION.  But if optional second argument NODELETE
 is given and non-nil, the unwanted frames are iconified instead."
--- a/lisp/imenu.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/imenu.el	Wed Jul 28 07:05:52 2004 +0000
@@ -1,6 +1,7 @@
 ;;; imenu.el --- framework for mode-specific buffer indexes
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 2003, 2004
+;;           Free Software Foundation, Inc.
 
 ;; Author: Ake Stenhoff <etxaksf@aom.ericsson.se>
 ;;         Lars Lindberg <lli@sypro.cap.se>
@@ -255,9 +256,7 @@
 file.
 
 The function should leave point at the place to be connected to the
-index and it should return nil when it doesn't find another index.
-
-This variable is local in all buffers.")
+index and it should return nil when it doesn't find another index.")
 ;;;###autoload
 (make-variable-buffer-local 'imenu-prev-index-position-function)
 
@@ -267,9 +266,7 @@
 
 This function is called after `imenu-prev-index-position-function'
 finds a position for an index item, with point at that position.
-It should return the name for that index item.
-
-This variable is local in all buffers.")
+It should return the name for that index item.")
 ;;;###autoload
 (make-variable-buffer-local 'imenu-extract-index-name-function)
 
@@ -283,9 +280,7 @@
 If nil, comparison is done with `string='.
 Set this to some other function for more advanced comparisons,
 such as \"begins with\" or \"name matches and number of
-arguments match\".
-
-This variable is local in all buffers.")
+arguments match\".")
 ;;;###autoload
 (make-variable-buffer-local 'imenu-name-lookup-function)
 
@@ -453,9 +448,7 @@
   "The buffer index computed for this buffer in Imenu.
 Simple elements in the alist look like (INDEX-NAME . INDEX-POSITION).
 Special elements look like (INDEX-NAME INDEX-POSITION FUNCTION ARGUMENTS...).
-A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).
-
-This variable is local in all buffers, once set.")
+A nested sub-alist element looks like (INDEX-NAME SUB-ALIST).")
 
 (make-variable-buffer-local 'imenu--index-alist)
 
--- a/lisp/mail/rmail.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/mail/rmail.el	Wed Jul 28 07:05:52 2004 +0000
@@ -484,7 +484,7 @@
 
 ;;;###autoload
 (defvar rmail-mime-charset-pattern
-  "^content-type:[ ]*text/plain;[ \t\n]*charset=\"?\\([^ \t\n\"]+\\)\"?"
+  "^content-type:[ ]*text/plain;[ \t\n]*charset=\"?\\([^ \t\n\";]+\\)\"?"
   "Regexp to match MIME-charset specification in a header of message.
 The first parenthesized expression should match the MIME-charset name.")
 
--- a/lisp/makefile.w32-in	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/makefile.w32-in	Wed Jul 28 07:05:52 2004 +0000
@@ -209,7 +209,7 @@
 	echo (autoload 'define-derived-mode "derived")>> $@
 	echo (autoload 'encoded-kbd-mode "encoded-kb")>> $@
 	echo (defvar cvs-global-menu nil)>> $@
-	echo.>> $@
+	echo ;;; >> $@
 	echo ;;; Local Variables:>> $@
 	echo ;;; version-control: never>> $@
 	echo ;;; no-byte-compile: t>> $@
--- a/lisp/ps-print.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/ps-print.el	Wed Jul 28 07:05:52 2004 +0000
@@ -5544,17 +5544,15 @@
     (setq ps-background-all-pages (nreverse ps-background-all-pages)
 	  ps-background-pages (nreverse ps-background-pages))
 
-    (ps-output "\n" ps-print-prologue-1)
-
-    (ps-output "\n/printGlobalBackground{\n")
+    (ps-output "\n" ps-print-prologue-1
+	       "\n/printGlobalBackground{\n")
     (mapcar 'ps-output ps-background-all-pages)
-    (ps-output "}def\n/printLocalBackground{\n}def\n")
-
-    (ps-output "\n%%EndProlog\n\n%%BeginSetup\n")
-
     (ps-output
+     "}def\n/printLocalBackground{\n}def\n"
+     "\n%%EndProlog\n\n%%BeginSetup\n"
      "\n%%IncludeResource: font Times-Roman"
-     "\n%%IncludeResource: font Times-Italic\n%%IncludeResource: font "
+     "\n%%IncludeResource: font Times-Italic"
+     "\n%%IncludeResource: font "
      (mapconcat 'identity
 		(ps-remove-duplicates
 		 (append (ps-fonts 'ps-font-for-text)
@@ -5563,22 +5561,20 @@
 			       (ps-font 'ps-font-for-footer 'normal)
 			       (ps-font 'ps-font-for-footer 'bold))))
 		"\n%%IncludeResource: font ")
-     "\n")
-
-    ;; Header/line number fonts
-    (ps-output (format "/h0 %s(%s)cvn DefFont\n" ; /h0 14/Helvetica-Bold DefFont
-		       ps-header-title-font-size-internal
-		       (ps-font 'ps-font-for-header 'bold))
-	       (format "/h1 %s(%s)cvn DefFont\n" ; /h1 12/Helvetica DefFont
-		       ps-header-font-size-internal
-		       (ps-font 'ps-font-for-header 'normal))
-	       (format "/L0 %s(%s)cvn DefFont\n" ; /L0 6/Times-Italic DefFont
-		       (ps-get-font-size 'ps-line-number-font-size)
-		       ps-line-number-font)
-	       (format "/H0 %s(%s)cvn DefFont\n" ; /H0 12/Helvetica DefFont
-		       ps-footer-font-size-internal
-		       (ps-font 'ps-font-for-footer 'normal))
-	       "\n\n% ---- These lines must be kept together because...
+     ;; Header/line number fonts
+     (format "\n/h0 %s(%s)cvn DefFont\n" ; /h0 14/Helvetica-Bold DefFont
+	     ps-header-title-font-size-internal
+	     (ps-font 'ps-font-for-header 'bold))
+     (format "/h1 %s(%s)cvn DefFont\n"	; /h1 12/Helvetica DefFont
+	     ps-header-font-size-internal
+	     (ps-font 'ps-font-for-header 'normal))
+     (format "/L0 %s(%s)cvn DefFont\n"	; /L0 6/Times-Italic DefFont
+	     (ps-get-font-size 'ps-line-number-font-size)
+	     ps-line-number-font)
+     (format "/H0 %s(%s)cvn DefFont\n"	; /H0 12/Helvetica DefFont
+	     ps-footer-font-size-internal
+	     (ps-font 'ps-font-for-footer 'normal))
+     "\n\n% ---- These lines must be kept together because...
 
 /h0 F
 /HeaderTitleLineHeight FontHeight def
--- a/lisp/replace.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/replace.el	Wed Jul 28 07:05:52 2004 +0000
@@ -732,6 +732,8 @@
        #'previous-single-property-change
      #'next-single-property-change)
    "No more matches")
+  ;; In case the *Occur* buffer is visible in a nonselected window.
+  (set-window-point (get-buffer-window (current-buffer)) (point))
   (occur-mode-goto-occurrence))
 
 
@@ -1009,9 +1011,11 @@
 			      ;; concatenate them all together.
 			      (apply #'concat
 				     (nconc
-				      (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ nlines)) keep-props))))
+				      (occur-engine-add-prefix (nreverse (cdr (occur-accumulate-lines (- (1+ (abs nlines))) keep-props))))
 				      (list out-line)
-				      (occur-engine-add-prefix (cdr (occur-accumulate-lines (1+ nlines) keep-props))))))))
+				      (if (> nlines 0)
+					  (occur-engine-add-prefix
+					   (cdr (occur-accumulate-lines (1+ nlines) keep-props)))))))))
 		      ;; Actually insert the match display data
 		      (with-current-buffer out-buf
 			(let ((beg (point))
--- a/lisp/select.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/select.el	Wed Jul 28 07:05:52 2004 +0000
@@ -3,7 +3,7 @@
 ;; Maintainer: FSF
 ;; Keywords: internal
 
-;; Copyright (c) 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (c) 1993, 1994, 2004 Free Software Foundation, Inc.
 ;; Based partially on earlier release by Lucid.
 
 ;; This file is part of GNU Emacs.
@@ -35,7 +35,11 @@
 and the argument DATA-TYPE (default `STRING') says
 how to convert the data.
 
-TYPE may be `SECONDARY' or `CLIPBOARD', in addition to `PRIMARY'.
+TYPE may be any symbol \(but nil stands for `PRIMARY').  However,
+only a few symbols are commonly used.  They conventionally have
+all upper-case names.  The most often used ones, in addition to
+`PRIMARY', are `SECONDARY' and `CLIPBOARD'.
+
 DATA-TYPE is usually `STRING', but can also be one of the symbols
 in `selection-converter-alist', which see."
   (let ((data (x-get-selection-internal (or type 'PRIMARY)
@@ -57,9 +61,11 @@
 
 (defun x-set-selection (type data)
   "Make an X Windows selection of type TYPE and value DATA.
-The argument TYPE (default `PRIMARY') says which selection,
-and DATA specifies the contents.  DATA may be a string,
-a symbol, an integer (or a cons of two integers or list of two integers).
+The argument TYPE (nil means `PRIMARY') says which selection, and
+DATA specifies the contents.  TYPE must be a symbol.  \(It can also
+be a string, which stands for the symbol with that name, but this
+is considered obsolete.)  DATA may be a string, a symbol, an
+integer (or a cons of two integers or list of two integers).
 
 The selection may also be a cons of two markers pointing to the same buffer,
 or an overlay.  In these cases, the selection is considered to be the text
@@ -69,8 +75,11 @@
 
 The data may also be a vector of valid non-vector selection values.
 
-Interactively, the text of the region is used as the selection value
-if the prefix arg is set."
+The return value is DATA.
+
+Interactively, this command sets the primary selection.  Without
+prefix argument, it reads the selection in the minibuffer.  With
+prefix argument, it uses the text of the region as the selection value ."
   (interactive (if (not current-prefix-arg)
 		   (list 'PRIMARY (read-string "Set text for pasting: "))
 		 (list 'PRIMARY (buffer-substring (region-beginning) (region-end)))))
--- a/lisp/simple.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/simple.el	Wed Jul 28 07:05:52 2004 +0000
@@ -4313,6 +4313,13 @@
     (if minibuffer-completing-file-name
 	(with-current-buffer mainbuf
 	  (setq default-directory (file-name-directory mbuf-contents))))
+    ;; If partial-completion-mode is on, point might not be after the
+    ;; last character in the minibuffer.
+    ;; FIXME: This still doesn't work if the text to be completed
+    ;; starts with a `-'.
+    (when (and partial-completion-mode (not (eobp)))
+      (setq mbuf-contents
+	    (substring mbuf-contents 0 (- (point) (point-max)))))
     (with-current-buffer standard-output
       (completion-list-mode)
       (make-local-variable 'completion-reference-buffer)
--- a/lisp/subr.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/subr.el	Wed Jul 28 07:05:52 2004 +0000
@@ -198,7 +198,7 @@
     list))
 
 (defun butlast (list &optional n)
-  "Returns a copy of LIST with the last N elements removed."
+  "Return a copy of LIST with the last N elements removed."
   (if (and n (<= n 0)) list
     (nbutlast (copy-sequence list) n)))
 
@@ -641,7 +641,7 @@
 	   (get (car obj) 'event-symbol-elements))))
 
 (defun event-modifiers (event)
-  "Returns a list of symbols representing the modifier keys in event EVENT.
+  "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'."
@@ -670,7 +670,7 @@
 	list))))
 
 (defun event-basic-type (event)
-  "Returns the basic type of the given event (all modifiers removed).
+  "Return the basic type of the given event (all modifiers removed).
 The value is a printing character (not upper case) or a symbol."
   (if (consp event)
       (setq event (car event)))
--- a/lisp/term/tty-colors.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/term/tty-colors.el	Wed Jul 28 07:05:52 2004 +0000
@@ -864,15 +864,10 @@
     (if (< mag 1) 0 (acos (/ (+ r g b) mag)))))
 
 (defun tty-color-approximate (rgb &optional frame)
-  "Given a list of 3 rgb values in RGB, find the color in `tty-color-alist'
-which is the best approximation in the 3-dimensional RGB space,
-and return its description.
-
-Value is a list of the form \(NAME INDEX R G B\).  Note that the returned
-NAME is not necessarily the same string as the argument COLOR, because
-the latter might need to be approximated if it is not supported directly.
-
-Each value of the RGB triplet should be in the range 0..65535 range.
+  "Find the color in `tty-color-alist' that best approximates RGB.
+Value is a list of the form \(NAME INDEX R G B\).
+The argument RGB should be an rgb value, that is, a list of three
+integers in the 0..65535 range.
 FRAME defaults to the selected frame."
   (let* ((color-list (tty-color-alist frame))
 	 (candidate (car color-list))
--- a/lisp/textmodes/flyspell.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/textmodes/flyspell.el	Wed Jul 28 07:05:52 2004 +0000
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
 
-;; Author: Manuel Serrano <Manuel.Serrano@unice.fr>
+;; Author: Manuel Serrano <Manuel.Serrano@sophia.inria.fr>
 ;; Maintainer: FSF
 ;; Keywords: convenience
 
--- a/lisp/wdired.el	Fri Jul 23 04:30:44 2004 +0000
+++ b/lisp/wdired.el	Wed Jul 28 07:05:52 2004 +0000
@@ -455,6 +455,11 @@
 		  (setq file-new (substitute-in-file-name file-new))
 		  (if wdired-use-interactive-rename
 		      (wdired-search-and-rename file-ori file-new)
+                    ;; If dired-rename-file autoloads dired-aux while
+                    ;; dired-backup-overwrite is locally bound,
+                    ;; dired-backup-overwrite won't be initialized.
+                    ;; So we must ensure dired-aux is loaded.
+                    (require 'dired-aux)
 		    (condition-case err
 			(let ((dired-backup-overwrite nil))
 			  (dired-rename-file file-ori file-new
--- a/lispref/ChangeLog	Fri Jul 23 04:30:44 2004 +0000
+++ b/lispref/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
@@ -1,3 +1,36 @@
+2004-07-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* frames.texi: Various changes in addition to:
+	(Creating Frames): Expand and clarify description of `make-frame'.
+	(Window Frame Parameters): Either none or both of the `icon-left'
+	and `icon-top' parameters must be specified.  Put descriptions of
+	`menu-bar-lines' and `toolbar-lines' closer together and change
+	them accordingly.
+	(Frame Titles): `multiple-frames' is not guaranteed to be accurate
+	except while processing `frame-title-format' or `icon-title-format'.
+	(Deleting Frames): Correct description of `delete-frame'.
+	Non-nil return values of `frame-live-p' are like those of `framep'.
+	(Frames and Windows): mention return value of
+	`set-frame-selected-window'.
+	(Visibility of Frames): Mention `force' argument to
+	`make-frame-invisible'.  `frame-visible-p' returns t for all
+	frames on text-only terminals.
+	(Frame Configurations): Restoring a frame configuration does not
+	restore deleted frames.
+	(Window System Selections): `x-set-selection' returns DATA.
+	(Resources): Add example.
+	(Display Feature Testing): Clarify descriptions of
+	`display-pixel-height', `display-pixel-width', `x-server-version'
+	and `x-server-vendor'.
+
+	* windows.texi (Choosing Window): Add anchor.
+	* minibuf.texi (Minibuffer Misc): Add anchor.
+
+2004-07-23  John Paul Wallington  <jpw@gnu.org>
+
+	* macros.texi (Defining Macros): Declaration keyword for setting
+	Edebug spec is `debug' not `edebug'.
+
 2004-07-19  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* windows.texi: Various small changes in addition to:
--- a/lispref/frames.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/lispref/frames.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -79,8 +79,9 @@
 To create a new frame, call the function @code{make-frame}.
 
 @defun make-frame &optional alist
-This function creates a new frame.  If you are using a supported window
-system, it makes a window frame; otherwise, it makes a terminal frame.
+This function creates and returns a new frame, displaying the current
+buffer.  If you are using a supported window system, it makes a window
+frame; otherwise, it makes a terminal frame.
 
 The argument is an alist specifying frame parameters.  Any parameters
 not mentioned in @var{alist} default according to the value of the
@@ -91,6 +92,12 @@
 The set of possible parameters depends in principle on what kind of
 window system Emacs uses to display its frames.  @xref{Window Frame
 Parameters}, for documentation of individual parameters you can specify.
+
+This function itself does not make the new frame the selected frame.
+@xref{Input Focus}.  The previously selected frame remains selected.
+However, the window system may select the new frame for its own reasons,
+for instance if the frame appears under the mouse pointer and your
+setup is for focus to follow the pointer.
 @end defun
 
 @defvar before-make-frame-hook
@@ -138,9 +145,10 @@
 terminal.
 
 @deffn Command make-frame-on-display display &optional parameters
-This creates a new frame on display @var{display}, taking the other
-frame parameters from @var{parameters}.  Aside from the @var{display}
-argument, it is like @code{make-frame} (@pxref{Creating Frames}).
+This creates and returns a new frame on display @var{display}, taking
+the other frame parameters from @var{parameters}.  Aside from the
+@var{display} argument, it is like @code{make-frame} (@pxref{Creating
+Frames}).
 @end deffn
 
 @defun x-display-list
@@ -165,7 +173,7 @@
 "*BorderWidth: 3\n*InternalBorder: 2\n"
 @end example
 
-@xref{Resources}.
+@xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}.
 
 If @var{must-succeed} is non-@code{nil}, failure to open the connection
 terminates Emacs.  Otherwise, it is an ordinary Lisp error.
@@ -207,9 +215,10 @@
 
 @defun frame-parameter frame parameter
 @tindex frame-parameter
-This function returns the value of the parameter named @var{parameter}
-of @var{frame}.  If @var{frame} is @code{nil}, it returns the
-selected  frame's parameter.
+This function returns the value of the parameter @var{parameter} (a
+symbol) of @var{frame}.  If @var{frame} is @code{nil}, it returns the
+selected frame's parameter.  If @var{frame} has no setting for
+@var{parameter}, this function returns @code{nil}.
 @end defun
 
 @defun frame-parameters &optional frame
@@ -230,8 +239,8 @@
 @defun modify-all-frames-parameters alist
 This function alters the frame parameters of all existing frames
 according to @var{alist}, then modifies @code{default-frame-alist}
-to apply the same parameter values to frames that will be created
-henceforth.
+(and, if necessary, @code{initial-frame-alist}) to apply the same
+parameter values to frames that will be created henceforth.
 @end defun
 
 @node Initial Parameters
@@ -285,9 +294,12 @@
 Emacs frames---the first frame, and subsequent frames.  When using the X
 Window System, you can get the same results by means of X resources
 in many cases.
+
+Setting this variable does not affect existing frames.
 @end defvar
 
-See also @code{special-display-frame-alist}, in @ref{Choosing Window}.
+See also @code{special-display-frame-alist}.  @xref{Definition of
+special-display-frame-alist}.
 
 If you use options that specify window appearance when you invoke Emacs,
 they take effect by adding elements to @code{default-frame-alist}.  One
@@ -368,6 +380,10 @@
 pixels, counting from the left edge of the screen.  This takes effect if
 and when the frame is iconified.
 
+If you specify a value for this parameter, then you must also specify
+a value for @code{icon-top} and vice versa.  The window manager may
+ignore these two parameters.
+
 @item icon-top
 The screen position of the top edge @emph{of the frame's icon}, in
 pixels, counting from the top edge of the screen.  This takes effect if
@@ -528,8 +544,8 @@
 columns, so the actual default fringe widths for the frame may be
 larger than the specified values.  The extra width needed to reach an
 acceptable total is distributed evenly between the left and right
-fringe.  However, you can force one frame or the other to a precise
-width by specifying that width a negative integer.  If both widths are
+fringe.  However, you can force one fringe or the other to a precise
+width by specifying that width as a negative integer.  If both widths are
 negative, only the left fringe gets the specified width.
 
 @item unsplittable
@@ -541,10 +557,15 @@
 iconified.  @xref{Visibility of Frames}.
 
 @item menu-bar-lines
-The number of lines to allocate at the top of the frame for a menu bar.
-The default is 1.  @xref{Menu Bar}.  (In Emacs versions that use the X
-toolkit or GTK, there is only one menu bar line; all that matters about the
-number you specify is whether it is greater than zero.)
+The number of lines to allocate at the top of the frame for a menu
+bar.  The default is 1.  A value of @code{nil} means don't display a
+menu bar.  @xref{Menu Bar}.  (The X toolkit and GTK allow at most one
+menu bar line; they treat larger values as 1.)
+
+@item tool-bar-lines
+The number of lines to use for the toolbar.  A value of @code{nil} means
+don't display a tool bar.  (GTK allows at most one tool bar line; it
+treats larger values as 1.)
 
 @item screen-gamma
 @cindex gamma correction
@@ -557,7 +578,7 @@
 on a monitor with that gamma value.  If you specify 2.2 for
 @code{screen-gamma}, that means no correction is needed.  Other values
 request correction, designed to make the corrected colors appear on
-your screen they way they would have appeared without correction on an
+your screen the way they would have appeared without correction on an
 ordinary monitor with a gamma value of 2.2.
 
 If your monitor displays colors too light, you should specify a
@@ -565,14 +586,14 @@
 that makes colors darker.  A screen gamma value of 1.5 may give good
 results for LCD color displays.
 
-@item tool-bar-lines
-The number of lines to use for the toolbar.  A value of @code{nil} means
-don't display a tool bar.  (In Emacs versions that use GTK, there is
-only one tool bar line; all that matters about the number you specify
-is whether it is greater than zero.)
+@item line-spacing
+Additional space put below text lines, in pixels (a positive integer)
 
-@item line-spacing
-Additional space put below text lines in pixels (a positive integer).
+@item wait-for-wm
+If non-@code{nil}, tell Xt to wait for the window manager to confirm
+geometry changes.  Some window managers, including versions of Fvwm2
+and KDE, fail to confirm, so Xt hangs.  Set this to @code{nil} to
+prevent hanging with those window managers.
 
 @ignore
 @item parent-id
@@ -637,12 +658,6 @@
 If non-@code{nil}, the color for the background of scroll bars.  It is
 equivalent to the @code{:background} attribute of the
 @code{scroll-bar} face.
-
-@item wait-for-wm
-If non-@code{nil}, tell Xt to wait for the window manager to confirm
-geometry changes.  Some window managers, including versions of Fvwm2
-and KDE, fail to confirm, so Xt hangs.  Set this to @code{nil} to
-prevent hanging with those window managers.
 @end table
 
 @node Size and Position
@@ -818,6 +833,10 @@
 invisible frames).  The default value of @code{frame-title-format} uses
 @code{multiple-frames} so as to put the buffer name in the frame title
 only when there is more than one frame.
+
+The value of this variable is not guaranteed to be accurate except
+while processing @code{frame-title-format} or
+@code{icon-title-format}.
 @end defvar
 
 @node Deleting Frames
@@ -826,16 +845,14 @@
 
 Frames remain potentially visible until you explicitly @dfn{delete}
 them.  A deleted frame cannot appear on the screen, but continues to
-exist as a Lisp object until there are no references to it.  There is no
-way to cancel the deletion of a frame aside from restoring a saved frame
-configuration (@pxref{Frame Configurations}); this is similar to the
-way windows behave.
+exist as a Lisp object until there are no references to it.
 
 @deffn Command delete-frame &optional frame force
 @vindex delete-frame-functions
-This function deletes the frame @var{frame} after running the hook
-@code{delete-frame-functions} (each function gets one argument,
-@var{frame}).  By default, @var{frame} is the selected frame.
+This function deletes the frame @var{frame}.  Unless @var{frame} is a
+tooltip, it first runs the hook @code{delete-frame-functions} (each
+function gets one argument, @var{frame}).  By default, @var{frame} is
+the selected frame.
 
 A frame cannot be deleted if its minibuffer is used by other frames.
 Normally, you cannot delete a frame if all other frames are invisible,
@@ -844,7 +861,8 @@
 
 @defun frame-live-p frame
 The function @code{frame-live-p} returns non-@code{nil} if the frame
-@var{frame} has not been deleted.
+@var{frame} has not been deleted.  The possible non-@code{nil} return
+values are like those of @code{framep}.  @xref{Frames}.
 @end defun
 
   Some window managers provide a command to delete a window.  These work
@@ -929,29 +947,31 @@
 selected window with @code{frame-selected-window}.
 
 @defun frame-selected-window  &optional frame
-This function returns the window on @var{frame} that is selected within
-@var{frame}.  If omitted or @code{nil}, @var{frame} defaults to the selected frame.
+This function returns the window on @var{frame} that is selected
+within @var{frame}.  If omitted or @code{nil}, @var{frame} defaults to
+the selected frame.
 @end defun
 
 @defun set-frame-selected-window frame window
 This sets the selected window of frame @var{frame} to @var{window}.
 If @var{frame} is @code{nil}, it operates on the selected frame.  If
 @var{frame} is the selected frame, this makes @var{window} the
-selected window.
+selected window.  This function returns @var{window}.
 @end defun
 
   Conversely, selecting a window for Emacs with @code{select-window} also
 makes that window selected within its frame.  @xref{Selecting Windows}.
 
   Another function that (usually) returns one of the windows in a given
-frame is @code{minibuffer-window}.  @xref{Minibuffer Misc}.
+frame is @code{minibuffer-window}.  @xref{Definition of minibuffer-window}.
 
 @node Minibuffers and Frames
 @section Minibuffers and Frames
 
 Normally, each frame has its own minibuffer window at the bottom, which
 is used whenever that frame is selected.  If the frame has a minibuffer,
-you can get it with @code{minibuffer-window} (@pxref{Minibuffer Misc}).
+you can get it with @code{minibuffer-window} (@pxref{Definition of
+minibuffer-window}).
 
 However, you can also create a frame with no minibuffer.  Such a frame
 must use the minibuffer window of some other frame.  When you create the
@@ -966,8 +986,9 @@
 
 @defvar default-minibuffer-frame
 This variable specifies the frame to use for the minibuffer window, by
-default.  It is always local to the current terminal and cannot be
-buffer-local.  @xref{Multiple Displays}.
+default.  It does not affect existing frames.  It is always local to
+the current terminal and cannot be buffer-local.  @xref{Multiple
+Displays}.
 @end defvar
 
 @node Input Focus
@@ -1026,7 +1047,10 @@
 This function selects frame @var{frame}, temporarily disregarding the
 focus of the X server if any.  The selection of @var{frame} lasts until
 the next time the user does something to select a different frame, or
-until the next time this function is called.  The specified @var{frame}
+until the next time this function is called.  (If you are using a
+window system, the previously selected frame may be restored as the
+selected frame after return to the command loop, because it still may
+have the window system's input focus.)  The specified @var{frame}
 becomes the selected frame, as explained above, and the terminal that
 @var{frame} is on becomes the selected terminal.  This function
 returns @var{frame}, or @code{nil} if @var{frame} has been deleted.
@@ -1107,9 +1131,12 @@
 it makes the selected frame visible.
 @end deffn
 
-@deffn Command make-frame-invisible &optional frame
+@deffn Command make-frame-invisible &optional frame force
 This function makes frame @var{frame} invisible.  If you omit
 @var{frame}, it makes the selected frame invisible.
+
+Unless @var{force} is non-@code{nil}, this function refuses to make
+@var{frame} invisible if all other frames are invisible..
 @end deffn
 
 @deffn Command iconify-frame &optional frame
@@ -1121,6 +1148,10 @@
 This returns the visibility status of frame @var{frame}.  The value is
 @code{t} if @var{frame} is visible, @code{nil} if it is invisible, and
 @code{icon} if it is iconified.
+
+On a text-only terminal, all frames are considered visible, whether
+they are currently being displayed or not, and this function returns
+@code{t} for all frames.
 @end defun
 
   The visibility status of a frame is also available as a frame
@@ -1155,6 +1186,7 @@
 
 @deffn Command raise-frame &optional frame
 This function raises frame @var{frame} (default, the selected frame).
+If @var{frame} is invisible or iconified, this makes it visible.
 @end deffn
 
 @deffn Command lower-frame &optional frame
@@ -1185,7 +1217,8 @@
 
 @defun set-frame-configuration configuration &optional nodelete
 This function restores the state of frames described in
-@var{configuration}.
+@var{configuration}.  However, this function does not restore deleted
+frames.
 
 Ordinarily, this function deletes all existing frames not listed in
 @var{configuration}.  But if @var{nodelete} is non-@code{nil}, the
@@ -1467,7 +1500,7 @@
 symbols.  X clients including Emacs can read or set the selection for
 any given type.
 
-@defun x-set-selection type data
+@deffn Command x-set-selection type data
 This function sets a ``selection'' in the X server.  It takes two
 arguments: a selection type @var{type}, and the value to assign to it,
 @var{data}.  If @var{data} is @code{nil}, it means to clear out the
@@ -1482,9 +1515,11 @@
 Each possible @var{type} has its own selection value, which changes
 independently.  The usual values of @var{type} are @code{PRIMARY},
 @code{SECONDARY} and @code{CLIPBOARD}; these are symbols with upper-case
-names, in accord with X Window System conventions.  The default is
-@code{PRIMARY}.
-@end defun
+names, in accord with X Window System conventions.  If @var{type} is
+@code{nil}, that stands for @code{PRIMARY}.
+
+This function returns @var{data}.
+@end deffn
 
 @defun x-get-selection &optional type data-type
 This function accesses selections set up by Emacs or by other X
@@ -1578,6 +1613,7 @@
 @tindex defined-colors
 This function returns a list of the color names that are defined
 and supported on frame @var{frame} (default, the selected frame).
+If @var{frame} does not support colors, the value is @code{nil}.
 
 @findex x-defined-colors
 This function used to be called @code{x-defined-colors},
@@ -1602,18 +1638,18 @@
 @tindex color-gray-p
 This returns @code{t} if @var{color} is a shade of gray, as defined on
 @var{frame}'s display.  If @var{frame} is omitted or @code{nil}, the
-question applies to the selected frame.  The argument @var{color} must
-be a valid color name.
+question applies to the selected frame.  If @var{color} is not a valid
+color name, this function returns @code{nil}.
 @end defun
 
 @defun color-values color &optional frame
 @tindex color-values
 This function returns a value that describes what @var{color} should
-ideally look like.  If @var{color} is defined, the value is a list of
-three integers, which give the amount of red, the amount of green, and
-the amount of blue.  Each integer ranges in principle from 0 to 65535,
-but in practice no value seems to be above 65280.  This kind
-of three-element list is called an @dfn{rgb value}.
+ideally look like on @var{frame}.  If @var{color} is defined, the
+value is a list of three integers, which give the amount of red, the
+amount of green, and the amount of blue.  Each integer ranges in
+principle from 0 to 65535, but some displays may not use the full
+range.  This kind of three-element list is called an @dfn{rgb value}.
 
 If @var{color} is not defined, the value is @code{nil}.
 
@@ -1658,8 +1694,7 @@
   Several of these functions use or return @dfn{rgb values}.  An rgb
 value is a list of three integers, which give the amount of red, the
 amount of green, and the amount of blue.  Each integer ranges in
-principle from 0 to 65535, but in practice the largest value used is
-65280.
+principle from 0 to 65535, but some displays may not use the full range.  .
 
   These functions accept a display (either a frame or the name of a
 terminal) as an optional argument.  We hope in the future to make Emacs
@@ -1701,13 +1736,14 @@
 @tindex tty-color-approximate
 This function finds the closest color, among the known colors supported
 for @var{display}, to that described by the rgb value @var{rgb}.
+The return value is an element of @code{tty-color-alist}.
 @end defun
 
 @defun tty-color-translate color &optional display
 @tindex tty-color-translate
 This function finds the closest color to @var{color} among the known
-colors supported for @var{display}.  If the name @var{color} is not
-defined, the value is @code{nil}.
+colors supported for @var{display} and returns its index (an integer).
+If the name @var{color} is not defined, the value is @code{nil}.
 
 @var{color} can be an X-style @code{"#@var{xxxyyyzzz}"} specification
 instead of an actual name.  The format
@@ -1747,6 +1783,29 @@
 or the value specified with the @samp{-name} or @samp{-rn} switches.
 @end defvar
 
+To illustrate some of the above, suppose that you have the line:
+
+@example
+xterm.vt100.background: yellow
+@end example
+
+@noindent
+in in your X resources file (usually named @file{~/.Xdefaults} or
+@file{~/.Xresources}).  Then:
+
+@example
+@group
+(let ((x-resource-class "XTerm") (x-resource-name "xterm"))
+  (x-get-resource "vt100.background" "VT100.Background"))
+     @result{} "yellow"
+@end group
+@group
+(let ((x-resource-class "XTerm") (x-resource-name "xterm"))
+  (x-get-resource "background" "VT100" "vt100" "Background"))
+     @result{} "yellow"
+@end group
+@end example
+
   @xref{X Resources,, X Resources, emacs, The GNU Emacs Manual}.
 
 @node Display Feature Testing
@@ -1854,6 +1913,7 @@
 @defun display-pixel-height &optional display
 @tindex display-pixel-height
 This function returns the height of the screen in pixels.
+On a character terminal, it gives the height in characters.
 @end defun
 
 @defun display-mm-height &optional display
@@ -1865,6 +1925,7 @@
 @defun display-pixel-width &optional display
 @tindex display-pixel-width
 This function returns the width of the screen in pixels.
+On a character terminal, it gives the width in characters.
 @end defun
 
 @defun display-mm-width &optional display
@@ -1918,11 +1979,13 @@
 
 @defun x-server-version &optional display
 This function returns the list of version numbers of the X server
-running the display.
+running the display.  The value is a list of three integers: the major
+and minor version numbers, and the vendor-specific release number.
 @end defun
 
 @defun x-server-vendor &optional display
-This function returns the vendor that provided the X server software.
+This function returns the ``vendor'' that provided the X server software
+(as a string).
 @end defun
 
 @ignore
--- a/lispref/macros.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/lispref/macros.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -239,7 +239,7 @@
 currently supported:
 
 @table @code
-@item (edebug @var{edebug-form-spec})
+@item (debug @var{edebug-form-spec})
 Specify how to step through macro calls for Edebug.
 @xref{Instrumenting Macro Calls}, for more details.
 
--- a/lispref/minibuf.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/lispref/minibuf.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -1773,6 +1773,7 @@
 @end defun
 
 @defun minibuffer-window &optional frame
+@anchor{Definition of minibuffer-window}
 This function returns the minibuffer window used for frame @var{frame}.
 If @var{frame} is @code{nil}, that stands for the current frame.  Note
 that the minibuffer window used by a frame need not be part of that
--- a/lispref/windows.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/lispref/windows.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/windows
@@ -1089,6 +1089,7 @@
 @end defun
 
 @defopt special-display-frame-alist
+@anchor{Definition of special-display-frame-alist}
 This variable holds frame parameters for
 @code{special-display-popup-frame} to use when it creates a frame.
 @end defopt
--- a/man/ChangeLog	Fri Jul 23 04:30:44 2004 +0000
+++ b/man/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
@@ -1,3 +1,11 @@
+2004-07-24  Richard M. Stallman  <rms@gnu.org>
+
+	* text.texi (Paragraphs): Update how paragraphs are separated
+	and the default for paragraph-separate.
+
+	* search.texi (Regexp Replace): Further update text for new
+	replacement operators.
+
 2004-07-18  Luc Teirlinck  <teirllm@auburn.edu>
 
 	* emacs-xtra.texi (Subdir switches): Dired does not remember the
--- a/man/search.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/man/search.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -1038,20 +1038,21 @@
   You can also use Lisp expressions to calculate parts of the
 replacement string.  To do this, write @samp{\,} followed by the
 expression in the replacement string.  Each replacement calculates the
-value of the expression, which ought to be a string, and uses it in
+value of the expression and converts it to text without quoting (if
+it's a string, this means using the string's contents), and uses it in
 the replacement string in place of the expression itself.  If the
 expression is a symbol, one space in the replacement string after the
-symbol name counts as part of the symbol name, so the value replaces
-them both.
+symbol name goes with the symbol name, so the value replaces them
+both.
 
-  Inside such an expression, @samp{\&} and @samp{\@var{n}} used as
-subexpressions refer respectively to the entire match as a string, and
-to a submatch as a string.  @var{n} may exceed 9 here, and the value
-of @samp{\@var{n}} is @code{nil} if subexpression @var{n} did not
-match.  You can also use @samp{\#&} and @samp{\#@var{n}} refer to
-those matches converted to numbers (this is valid when the match or
-submatch has the form of a number).  @samp{\#} stands for the number
-of already-completed replacements.
+  Inside such an expression, you can use some special sequences.
+@samp{\&} and @samp{\@var{n}} refer here, as usual, to the entire
+match as a string, and to a submatch as a string.  @var{n} may be
+multiple digits, and the value of @samp{\@var{n}} is @code{nil} if
+subexpression @var{n} did not match.  You can also use @samp{\#&} and
+@samp{\#@var{n}} to refer to those matches as numbers (this is valid
+when the match or submatch has the form of a numeral).  @samp{\#} here
+too stands for the number of already-completed replacements.
 
   Repeating our example to exchange @samp{x} and @samp{y}, we can thus
 do it also this way:
@@ -1061,9 +1062,9 @@
 \,(if \1 "y" "x") @key{RET}
 @end example
 
-  The @code{format} function (@pxref{Formatting Strings,,,elisp, GNU
-Emacs Lisp Reference Manual}) comes in handy for computing replacement
-strings for @samp{\,}.  For example, to add consecutively numbered
+  For computing replacement strings for @samp{\,}, the @code{format}
+function is often useful (@pxref{Formatting Strings,,,elisp, GNU Emacs
+Lisp Reference Manual}).  For example, to add consecutively numbered
 strings like @samp{ABC00042} to columns 73 @w{to 80} (unless they are
 already occupied), you can use
 
@@ -1074,8 +1075,8 @@
 
   If you want to enter part of the replacement string by hand each
 time, use @samp{\?} in the replacement string.  Each replacement will
-enter a recursive edit, with point at the position where the @samp{\?}
-was.  For example,
+ask you to edit the replacement string in the minibuffer, putting
+point where the @samp{\?} was.  For example,
 
 @example
 M-x replace-regexp @key{RET} \footnote@{ @key{RET}
--- a/man/text.texi	Fri Jul 23 04:30:44 2004 +0000
+++ b/man/text.texi	Wed Jul 28 07:05:52 2004 +0000
@@ -264,10 +264,10 @@
   @kbd{M-@{} moves to the beginning of the current or previous
 paragraph, while @kbd{M-@}} moves to the end of the current or next
 paragraph.  Blank lines and text-formatter command lines separate
-paragraphs and are not considered part of any paragraph.  In Fundamental
-mode, but not in Text mode, an indented line also starts a new
-paragraph.  (If a paragraph is preceded by a blank line, these commands
-treat that blank line as the beginning of the paragraph.)
+paragraphs and are not considered part of any paragraph.  In Indented
+Text mode, but not in Text mode, an indented line also starts a new
+paragraph.  (If a paragraph is preceded by a blank line, these
+commands treat that blank line as the beginning of the paragraph.)
 
   In major modes for programs, paragraphs begin and end only at blank
 lines.  This makes the paragraph commands continue to be useful even
@@ -300,7 +300,7 @@
 contained in it must match only @code{paragraph-start}, not
 @code{paragraph-separate}.  For example, in Fundamental mode,
 @code{paragraph-start} is @w{@code{"[ \t\n\f]"}}, and
-@code{paragraph-separate} is @w{@code{"[ \t\f]*$"}}.
+@code{paragraph-separate} is @w{@code{"\f\\|[ \t]*$"}}.
 
   Normally it is desirable for page boundaries to separate paragraphs.
 The default values of these variables recognize the usual separator for
--- a/nt/makefile.w32-in	Fri Jul 23 04:30:44 2004 +0000
+++ b/nt/makefile.w32-in	Wed Jul 28 07:05:52 2004 +0000
@@ -111,10 +111,10 @@
 doit:
 
 maybe-bootstrap-CMD:	doit
-	@echo.
+	@echo .
 	@if not EXIST ..\lisp\abbrev.elc echo Essential Lisp files seem to be missing.  You should either
 	@if not EXIST ..\lisp\abbrev.elc echo do 'make bootstrap' or create 'lisp/abbrev.elc' somehow
-	@echo.
+	@echo .
 	@if not EXIST ..\lisp\abbrev.elc exit -1
 
 maybe-bootstrap-SH: doit
--- a/src/ChangeLog	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/ChangeLog	Wed Jul 28 07:05:52 2004 +0000
@@ -1,3 +1,49 @@
+2004-07-27  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (move_it_in_display_line_to): Check BUFFER_POS_REACHED_P after
+	we have ensured that the glyph fits on the current line (or returned
+	MOVE_LINE_CONTINUED otherwise).
+
+2004-07-26  Kim F. Storm  <storm@cua.dk>
+
+	* xdisp.c (move_it_in_display_line_to): If overflow-newline-into-fringe
+	is enabled, return MOVE_LINE_CONTINUED rather than MOVE_POS_MATCH_OR_ZV
+	if target position is at end of display line but char is not a newline.
+
+2004-07-25  Richard M. Stallman  <rms@gnu.org>
+
+	* window.c (coordinates_in_window): Return ON_SCROLL_BAR
+	instead of ON_VERTICAL_BORDER, when on scroll bar.
+	(Fcoordinates_in_window_p): Handle ON_SCROLL_BAR--return nil.
+
+	* dispextern.h (enum window_part): Add ON_SCROLL_BAR.
+
+	* window.c (Fcoordinates_in_window_p):
+	Take account of FRAME_INTERNAL_BORDER_WIDTH.
+
+	* alloc.c (check_cons_list): New function (contents commented out).
+
+2004-07-24  Luc Teirlinck  <teirllm@auburn.edu>
+
+	* xfaces.c (Fcolor_supported_p): Doc fix.
+
+	* frame.c (Fselect_frame, Fset_frame_selected_window)
+	(Fframe_visible_p, Fraise_frame): Doc fixes.
+
+2004-07-24  Richard M. Stallman  <rms@gnu.org>
+
+	* keyboard.h (not_single_kboard_state): Declared.
+
+	* fileio.c (Fwrite_region): Doc fix.
+
+	* window.c (Fwindow_at): Take account of FRAME_INTERNAL_BORDER_WIDTH.
+
+	* abbrev.c (Fexpand_abbrev): Run Qpre_abbrev_expand_hook
+	only when a real abbrev is present.
+
+	* xfns.c (x_icon_verify): New function.
+	(Fx_create_frame): Use it.
+
 2004-07-22  Barry Fishman <barry_fishman@att.net>  (tiny change)
 
 	* s/gnu-linux.h: Use GC_MARK_STACK if __amd64__ is defined.
--- a/src/abbrev.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/abbrev.c	Wed Jul 28 07:05:52 2004 +0000
@@ -248,8 +248,6 @@
 
   value = Qnil;
 
-  Frun_hooks (1, &Qpre_abbrev_expand_hook);
-
   wordstart = 0;
   if (!(BUFFERP (Vabbrev_start_location_buffer)
 	&& XBUFFER (Vabbrev_start_location_buffer) == current_buffer))
@@ -326,6 +324,8 @@
   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/alloc.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/alloc.c	Wed Jul 28 07:05:52 2004 +0000
@@ -2395,6 +2395,17 @@
   return val;
 }
 
+/* Get an error now if there's any junk in the cons free list.  */
+void
+check_cons_list ()
+{
+  struct Lisp_Cons *tail = cons_free_list;
+
+#if 0
+  while (tail)
+    tail = *(struct Lisp_Cons **)&tail->cdr;
+#endif
+}
 
 /* Make a list of 2, 3, 4 or 5 specified objects.  */
 
--- a/src/dispextern.h	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/dispextern.h	Wed Jul 28 07:05:52 2004 +0000
@@ -99,7 +99,8 @@
   ON_LEFT_FRINGE,
   ON_RIGHT_FRINGE,
   ON_LEFT_MARGIN,
-  ON_RIGHT_MARGIN
+  ON_RIGHT_MARGIN,
+  ON_SCROLL_BAR
 };
 
 /* Number of bits allocated to store fringe bitmap numbers.  */
--- a/src/fileio.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/fileio.c	Wed Jul 28 07:05:52 2004 +0000
@@ -4829,7 +4829,7 @@
 Optional fourth argument APPEND if non-nil means
   append to existing file contents (if any).  If it is an integer,
   seek to that offset in the file before writing.
-Optional fifth argument VISIT if t means
+Optional fifth argument VISIT, if t or a string, means
   set the last-save-file-modtime of buffer to this file's modtime
   and mark buffer not modified.
 If VISIT is a string, it is a second file name;
--- a/src/frame.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/frame.c	Wed Jul 28 07:05:52 2004 +0000
@@ -1,5 +1,5 @@
 /* Generic frame functions.
-   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003
+   Copyright (C) 1993, 1994, 1995, 1997, 1999, 2000, 2001, 2003, 2004
    Free Software Foundation.
 
 This file is part of GNU Emacs.
@@ -733,7 +733,12 @@
 Subsequent editing commands apply to its selected window.
 The selection of FRAME lasts until the next time the user does
 something to select a different frame, or until the next time this
-function is called.  */)
+function is called.  If you are using a window system, the previously
+selected frame may be restored as the selected frame after return to
+the command loop, because it still may have the window system's input
+focus.  On a text-only terminal, the next redisplay will display FRAME.
+
+This function returns FRAME, or nil if FRAME has been deleted.  */)
   (frame, no_enter)
     Lisp_Object frame, no_enter;
 {
@@ -861,6 +866,7 @@
 DEFUN ("set-frame-selected-window", Fset_frame_selected_window,
        Sset_frame_selected_window, 2, 2, 0,
        doc: /* Set the selected window of frame object FRAME to WINDOW.
+Return WINDOW.
 If FRAME is nil, the selected frame is used.
 If FRAME is the selected frame, this makes WINDOW the selected window.  */)
      (frame, window)
@@ -1711,7 +1717,11 @@
        doc: /* Return t if FRAME is now \"visible\" (actually in use for display).
 A frame that is not \"visible\" is not updated and, if it works through
 a window system, it may not show at all.
-Return the symbol `icon' if frame is visible only as an icon.  */)
+Return the symbol `icon' if frame is visible only as an icon.
+
+On a text-only terminal, all frames are considered visible, whether
+they are currently being displayed or not, and this function returns t
+for all frames.  */)
      (frame)
      Lisp_Object frame;
 {
@@ -1751,7 +1761,7 @@
 
 DEFUN ("raise-frame", Fraise_frame, Sraise_frame, 0, 1, "",
        doc: /* Bring FRAME to the front, so it occludes any frames it overlaps.
-If FRAME is invisible, make it visible.
+If FRAME is invisible or iconified, make it visible.
 If you don't specify a frame, the selected frame is used.
 If Emacs is displaying on an ordinary terminal or some other device which
 doesn't support multiple overlapping frames, this function does nothing.  */)
--- a/src/keyboard.h	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/keyboard.h	Wed Jul 28 07:05:52 2004 +0000
@@ -307,6 +307,7 @@
 extern void init_kboard P_ ((KBOARD *));
 extern void delete_kboard P_ ((KBOARD *));
 extern void single_kboard_state P_ ((void));
+extern void not_single_kboard_state P_ ((KBOARD *));
 extern void push_frame_kboard P_ ((struct frame *));
 extern void pop_frame_kboard P_ ((void));
 extern void record_asynch_buffer_change P_ ((void));
--- a/src/window.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/window.c	Wed Jul 28 07:05:52 2004 +0000
@@ -579,6 +579,8 @@
    if it is on the window's modeline, return ON_MODE_LINE;
    if it is on the border between the window and its right sibling,
       return ON_VERTICAL_BORDER.
+   if it is on a scroll bar,
+      return ON_SCROLL_BAR.
    if it is on the window's top line, return ON_HEADER_LINE;
    if it is in left or right fringe of the window,
       return ON_LEFT_FRINGE or ON_RIGHT_FRINGE, and convert *X and *Y
@@ -673,7 +675,7 @@
 
   /* Outside any interesting column?  */
   if (*x < left_x || *x > right_x)
-    return ON_VERTICAL_BORDER;
+    return ON_SCROLL_BAR;
 
   lmargin_width = window_box_width (w, LEFT_MARGIN_AREA);
   rmargin_width = window_box_width (w, RIGHT_MARGIN_AREA);
@@ -783,8 +785,8 @@
   ly = Fcdr (coordinates);
   CHECK_NUMBER_OR_FLOAT (lx);
   CHECK_NUMBER_OR_FLOAT (ly);
-  x = FRAME_PIXEL_X_FROM_CANON_X (f, lx);
-  y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly);
+  x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f);
+  y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f);
 
   switch (coordinates_in_window (w, &x, &y))
     {
@@ -818,6 +820,10 @@
     case ON_RIGHT_MARGIN:
       return Qright_margin;
 
+    case ON_SCROLL_BAR:
+      /* Historically we are supposed to return nil in this case.  */
+      return Qnil;
+
     default:
       abort ();
     }
@@ -938,8 +944,10 @@
   CHECK_NUMBER_OR_FLOAT (y);
 
   return window_from_coordinates (f,
-				  FRAME_PIXEL_X_FROM_CANON_X (f, x),
-				  FRAME_PIXEL_Y_FROM_CANON_Y (f, y),
+				  (FRAME_PIXEL_X_FROM_CANON_X (f, x)
+				   + FRAME_INTERNAL_BORDER_WIDTH (f)),
+				  (FRAME_PIXEL_Y_FROM_CANON_Y (f, y)
+				   + FRAME_INTERNAL_BORDER_WIDTH (f)),
 				  0, 0, 0, 0);
 }
 
--- a/src/xdisp.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/xdisp.c	Wed Jul 28 07:05:52 2004 +0000
@@ -5750,9 +5750,13 @@
     {
       int x, i, ascent = 0, descent = 0;
 
-      /* Stop when ZV or TO_CHARPOS reached.  */
+      /* Stop when ZV reached.
+         We used to stop here when TO_CHARPOS reached as well, but that is
+         too soon if this glyph does not fit on this line.  So we handle it
+         explicitly below.  */
       if (!get_next_display_element (it)
-	  || BUFFER_POS_REACHED_P ())
+	  || (it->truncate_lines_p
+	      && BUFFER_POS_REACHED_P ()))
 	{
 	  result = MOVE_POS_MATCH_OR_ZV;
 	  break;
@@ -5812,6 +5816,8 @@
 	      /* We want to leave anything reaching TO_X to the caller.  */
 	      if ((op & MOVE_TO_X) && new_x > to_x)
 		{
+		  if (BUFFER_POS_REACHED_P ())
+		    goto buffer_pos_reached;
 		  it->current_x = x;
 		  result = MOVE_X_REACHED;
 		  break;
@@ -5839,12 +5845,19 @@
 #ifdef HAVE_WINDOW_SYSTEM
 			  if (IT_OVERFLOW_NEWLINE_INTO_FRINGE (it))
 			    {
-			      if (!get_next_display_element (it)
-				  || BUFFER_POS_REACHED_P ())
+			      if (!get_next_display_element (it))
 				{
 				  result = MOVE_POS_MATCH_OR_ZV;
 				  break;
 				}
+			      if (BUFFER_POS_REACHED_P ())
+				{
+				  if (ITERATOR_AT_END_OF_LINE_P (it))
+				    result = MOVE_POS_MATCH_OR_ZV;
+				  else
+				    result = MOVE_LINE_CONTINUED;
+				  break;
+				}
 			      if (ITERATOR_AT_END_OF_LINE_P (it))
 				{
 				  result = MOVE_NEWLINE_OR_CR;
@@ -5866,6 +5879,8 @@
 		  result = MOVE_LINE_CONTINUED;
 		  break;
 		}
+	      else if (BUFFER_POS_REACHED_P ())
+		goto buffer_pos_reached;
 	      else if (new_x > it->first_visible_x)
 		{
 		  /* Glyph is visible.  Increment number of glyphs that
@@ -5882,6 +5897,15 @@
 	  if (result != MOVE_UNDEFINED)
 	    break;
 	}
+      else if (BUFFER_POS_REACHED_P ())
+	{
+	buffer_pos_reached:
+	  it->current_x = x;
+	  it->max_ascent = ascent;
+	  it->max_descent = descent;
+	  result = MOVE_POS_MATCH_OR_ZV;
+	  break;
+	}
       else if ((op & MOVE_TO_X) && it->current_x >= to_x)
 	{
 	  /* Stop when TO_X specified and reached.  This check is
--- a/src/xfaces.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/xfaces.c	Wed Jul 28 07:05:52 2004 +0000
@@ -1542,6 +1542,7 @@
        Scolor_supported_p, 1, 3, 0,
        doc: /* Return non-nil if COLOR can be displayed on FRAME.
 BACKGROUND-P non-nil means COLOR is used as a background.
+Otherwise, this function tells whether it can be used as a foreground.
 If FRAME is nil or omitted, use the selected frame.
 COLOR must be a valid color name.  */)
      (color, frame, background_p)
--- a/src/xfns.c	Fri Jul 23 04:30:44 2004 +0000
+++ b/src/xfns.c	Wed Jul 28 07:05:52 2004 +0000
@@ -2613,6 +2613,28 @@
 #endif /* not USE_GTK */
 #endif /* not USE_X_TOOLKIT */
 
+/* Verify that the icon position args for this window are valid.  */
+
+static void
+x_icon_verify (f, parms)
+     struct frame *f;
+     Lisp_Object parms;
+{
+  Lisp_Object icon_x, icon_y;
+
+  /* Set the position of the icon.  Note that twm groups all
+     icons in an icon window.  */
+  icon_x = x_frame_get_and_record_arg (f, parms, Qicon_left, 0, 0, RES_TYPE_NUMBER);
+  icon_y = x_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
+  if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
+    {
+      CHECK_NUMBER (icon_x);
+      CHECK_NUMBER (icon_y);
+    }
+  else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
+    error ("Both left and top icon corners of icon must be specified");
+}
+
 /* Handle the icon stuff for this window.  Perhaps later we might
    want an x_set_icon_position which can be called interactively as
    well.  */
@@ -3101,6 +3123,8 @@
   tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
   f->no_split = minibuffer_only || EQ (tem, Qt);
 
+  x_icon_verify (f, parms);
+
   /* Create the X widget or window.  */
 #ifdef USE_X_TOOLKIT
   x_window (f, window_prompting, minibuffer_only);