changeset 83183:bc1eb76e4766

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-470 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-471 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-472 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-223
author Karoly Lorentey <lorentey@elte.hu>
date Fri, 30 Jul 2004 16:33:42 +0000
parents 4e92102a0172 (current diff) ac573231cc6d (diff)
children 7aa4bb74fe30
files lisp/ChangeLog lisp/font-lock.el src/xdisp.c
diffstat 10 files changed, 146 insertions(+), 79 deletions(-) [+]
line wrap: on
line diff
--- a/etc/ChangeLog	Tue Jul 27 07:43:21 2004 +0000
+++ b/etc/ChangeLog	Fri Jul 30 16:33:42 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	Tue Jul 27 07:43:21 2004 +0000
+++ b/etc/NEWS	Fri Jul 30 16:33:42 2004 +0000
@@ -22,7 +22,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
@@ -88,7 +92,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.
 
--- a/lisp/ChangeLog	Tue Jul 27 07:43:21 2004 +0000
+++ b/lisp/ChangeLog	Fri Jul 30 16:33:42 2004 +0000
@@ -1,3 +1,11 @@
+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)
@@ -42,12 +50,17 @@
 
 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>
 
--- a/lisp/custom.el	Tue Jul 27 07:43:21 2004 +0000
+++ b/lisp/custom.el	Fri Jul 30 16:33:42 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/font-lock.el	Tue Jul 27 07:43:21 2004 +0000
+++ b/lisp/font-lock.el	Fri Jul 30 16:33:42 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/progmodes/etags.el	Tue Jul 27 07:43:21 2004 +0000
+++ b/lisp/progmodes/etags.el	Fri Jul 30 16:33:42 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/ps-print.el	Tue Jul 27 07:43:21 2004 +0000
+++ b/lisp/ps-print.el	Fri Jul 30 16:33:42 2004 +0000
@@ -5576,17 +5576,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)
@@ -5595,22 +5593,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/src/ChangeLog	Tue Jul 27 07:43:21 2004 +0000
+++ b/src/ChangeLog	Fri Jul 30 16:33:42 2004 +0000
@@ -1,3 +1,13 @@
+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
+	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
--- a/src/eval.c	Tue Jul 27 07:43:21 2004 +0000
+++ b/src/eval.c	Fri Jul 30 16:33:42 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/xdisp.c	Tue Jul 27 07:43:21 2004 +0000
+++ b/src/xdisp.c	Fri Jul 30 16:33:42 2004 +0000
@@ -5645,9 +5645,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;
@@ -5707,6 +5711,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;
@@ -5768,6 +5774,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
@@ -5784,6 +5792,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