changeset 107577:df4f6d6be3b3

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Tue, 30 Mar 2010 04:00:46 +0000
parents 54562a7c10fb (current diff) dbd787c249c5 (diff)
children 3ca642fe505f
files
diffstat 18 files changed, 140 insertions(+), 141 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Mar 29 10:23:03 2010 +0000
+++ b/ChangeLog	Tue Mar 30 04:00:46 2010 +0000
@@ -1,6 +1,6 @@
-2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
-
-	* Restore GDB/MI fuctionality removed by r99212.
+2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	* configure.in: Remove all references to C_DEBUG_SWITCH.
 
 2010-03-27  Eli Zaretskii  <eliz@gnu.org>
 
--- a/admin/CPP-DEFINES	Mon Mar 29 10:23:03 2010 +0000
+++ b/admin/CPP-DEFINES	Tue Mar 30 04:00:46 2010 +0000
@@ -106,7 +106,6 @@
 CLASH_DETECTION
 COFF_BSD_SYMBOLS
 CRT0_DUMMIES
-C_DEBUG_SWITCH
 C_SWITCH_MACHINE
 C_SWITCH_SYSTEM
 C_SWITCH_SYSTEM_TEMACS
@@ -234,7 +233,6 @@
 LD_SWITCH_SYSTEM_TEMACS
 LD_SWITCH_SYSTEM_tmp
 LD_SWITCH_X_DEFAULT
-LIBS_DEBUG
 LIBS_MACHINE
 LIBS_SYSTEM
 LIBS_TERMCAP
--- a/configure.in	Mon Mar 29 10:23:03 2010 +0000
+++ b/configure.in	Tue Mar 30 04:00:46 2010 +0000
@@ -888,10 +888,6 @@
 configure___ use_mmap_for_buffers=no
 #endif
 
-#ifndef C_DEBUG_SWITCH
-#define C_DEBUG_SWITCH -g
-#endif
-
 #ifndef C_OPTIMIZE_SWITCH
 #ifdef __GNUC__
 #define C_OPTIMIZE_SWITCH -O2
@@ -923,18 +919,18 @@
 
 /* Get the CFLAGS for tests in configure.  */
 #ifdef __GNUC__
-configure___ CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ CFLAGS=C_OPTIMIZE_SWITCH '${SPECIFIED_CFLAGS}'
 #else
-configure___ CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ CFLAGS='${SPECIFIED_CFLAGS}'
 #endif
 
 #else /* not THIS_IS_CONFIGURE */
 
 /* Get the CFLAGS for real compilation.  */
 #ifdef __GNUC__
-configure___ REAL_CFLAGS=C_DEBUG_SWITCH C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
+configure___ REAL_CFLAGS=C_OPTIMIZE_SWITCH C_WARNINGS_SWITCH ${PROFILING_CFLAGS} '${SPECIFIED_CFLAGS}'
 #else
-configure___ REAL_CFLAGS=C_DEBUG_SWITCH '${SPECIFIED_CFLAGS}'
+configure___ REAL_CFLAGS='${SPECIFIED_CFLAGS}'
 #endif
 
 #endif /* not THIS_IS_CONFIGURE */
--- a/doc/emacs/ChangeLog	Mon Mar 29 10:23:03 2010 +0000
+++ b/doc/emacs/ChangeLog	Tue Mar 30 04:00:46 2010 +0000
@@ -2,6 +2,11 @@
 
 	* emacs.texi (Top): Update node names to those in building.texi.
 
+2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
+
+	doc/emacs/building.texi: Describe restored GDB/MI fuctionality removed by r99212.
+	doc/emacs/emacs.texi: Update node names for building.texi.
+
 2010-03-24  Glenn Morris  <rgm@gnu.org>
 
 	* ack.texi (Acknowledgments):
--- a/etc/NEWS	Mon Mar 29 10:23:03 2010 +0000
+++ b/etc/NEWS	Tue Mar 30 04:00:46 2010 +0000
@@ -112,6 +112,13 @@
 `image-animate-max-time' and the delay between sub-images defined
 by the Graphic Control Extension of the image.
 
+** Progress reporters can now "spin".
+The MIN-VALUE and MAX-VALUE arguments of `make-progress-reporter' can
+now be nil, or omitted.  This makes a "non-numeric" reporter.  Each
+time you call `progress-reporter-update' on that progress reporter,
+with a nil or omitted VALUE argument, the reporter message is
+displayed with a "spinning bar".
+
 
 * Changes in Emacs 24.1 on non-free operating systems
 
--- a/lisp/ChangeLog	Mon Mar 29 10:23:03 2010 +0000
+++ b/lisp/ChangeLog	Tue Mar 30 04:00:46 2010 +0000
@@ -1,3 +1,11 @@
+2010-03-29  Phil Hagelberg  <phil@evri.com>
+	    Chong Yidong  <cyd@stupidchicken.com>
+
+	* subr.el: Extend progress reporters to perform "spinning".
+	(progress-reporter-update, progress-reporter-do-update): Handle
+	non-numeric value arguments.
+	(progress-reporter--pulse-characters): New var.
+
 2010-03-28  Chong Yidong  <cyd@stupidchicken.com>
 
 	* progmodes/compile.el (compilation-start): Fix regexp detection
@@ -7,6 +15,13 @@
 
 	* find-dired.el (find-dired): Use read-directory-name (Bug#5777).
 
+2010-03-27  Nick Roberts  <nickrob@snap.net.nz>
+
+	Restore GDB/MI fuctionality removed by r99212.
+        * lisp/progmodes/gdb-mi.el: Restored.
+	* lisp/progmodes/gdb-ui.el: Removed.
+	* lisp/progmodes/gud.el: Re-accommodated for gdb-mi.el.
+
 2010-03-25  Glenn Morris  <rgm@gnu.org>
 
 	* desktop.el (desktop-save-buffer-p): Don't mistakenly include
--- a/lisp/subr.el	Mon Mar 29 10:23:03 2010 +0000
+++ b/lisp/subr.el	Tue Mar 30 04:00:46 2010 +0000
@@ -3421,51 +3421,59 @@
 ;; digits of precision, it doesn't really matter here.  On the other
 ;; hand, it greatly simplifies the code.
 
-(defsubst progress-reporter-update (reporter value)
+(defsubst progress-reporter-update (reporter &optional value)
   "Report progress of an operation in the echo area.
-However, if the change since last echo area update is too small
-or not enough time has passed, then do nothing (see
-`make-progress-reporter' for details).
-
-First parameter, REPORTER, should be the result of a call to
-`make-progress-reporter'.  Second, VALUE, determines the actual
-progress of operation; it must be between MIN-VALUE and MAX-VALUE
-as passed to `make-progress-reporter'.
-
-This function is very inexpensive, you may not bother how often
-you call it."
-  (when (>= value (car reporter))
+REPORTER should be the result of a call to `make-progress-reporter'.
+
+If REPORTER is a numerical progress reporter---i.e. if it was
+ made using non-nil MIN-VALUE and MAX-VALUE arguments to
+ `make-progress-reporter'---then VALUE should be a number between
+ MIN-VALUE and MAX-VALUE.
+
+If REPORTER is a non-numerical reporter, VALUE should be nil.
+
+This function is relatively inexpensive.  If the change since
+last update is too small or insufficient time has passed, it does
+nothing."
+  (when (or (not (numberp value))      ; For pulsing reporter
+	    (>= value (car reporter))) ; For numerical reporter
     (progress-reporter-do-update reporter value)))
 
-(defun make-progress-reporter (message min-value max-value
-				       &optional current-value
-				       min-change min-time)
-  "Return progress reporter object to be used with `progress-reporter-update'.
-
-MESSAGE is shown in the echo area.  When at least 1% of operation
-is complete, the exact percentage will be appended to the
-MESSAGE.  When you call `progress-reporter-done', word \"done\"
-is printed after the MESSAGE.  You can change MESSAGE of an
-existing progress reporter with `progress-reporter-force-update'.
-
-MIN-VALUE and MAX-VALUE designate starting (0% complete) and
-final (100% complete) states of operation.  The latter should be
-larger; if this is not the case, then simply negate all values.
-Optional CURRENT-VALUE specifies the progress by the moment you
-call this function.  You should omit it or set it to nil in most
-cases since it defaults to MIN-VALUE.
-
-Optional MIN-CHANGE determines the minimal change in percents to
-report (default is 1%.)  Optional MIN-TIME specifies the minimal
-time before echo area updates (default is 0.2 seconds.)  If
-`float-time' function is not present, then time is not tracked
-at all.  If OS is not capable of measuring fractions of seconds,
-then this parameter is effectively rounded up."
-
+(defun make-progress-reporter (message &optional min-value max-value
+				       current-value min-change min-time)
+  "Return progress reporter object for use with `progress-reporter-update'.
+
+MESSAGE is shown in the echo area, with a status indicator
+appended to the end.  When you call `progress-reporter-done', the
+word \"done\" is printed after the MESSAGE.  You can change the
+MESSAGE of an existing progress reporter by calling
+`progress-reporter-force-update'.
+
+MIN-VALUE and MAX-VALUE, if non-nil, are starting (0% complete)
+and final (100% complete) states of operation; the latter should
+be larger.  In this case, the status message shows the percentage
+progress.
+
+If MIN-VALUE and/or MAX-VALUE is omitted or nil, the status
+message shows a \"spinning\", non-numeric indicator.
+
+Optional CURRENT-VALUE is the initial progress; the default is
+MIN-VALUE.
+Optional MIN-CHANGE is the minimal change in percents to report;
+the default is 1%.
+CURRENT-VALUE and MIN-CHANGE do not have any effect if MIN-VALUE
+and/or MAX-VALUE are nil.
+
+Optional MIN-TIME specifies the minimum interval time between
+echo area updates (default is 0.2 seconds.)  If the function
+`float-time' is not present, time is not tracked at all.  If the
+OS is not capable of measuring fractions of seconds, this
+parameter is effectively rounded up."
   (unless min-time
     (setq min-time 0.2))
   (let ((reporter
-	 (cons min-value ;; Force a call to `message' now
+	 ;; Force a call to `message' now
+	 (cons (or min-value 0)
 	       (vector (if (and (fboundp 'float-time)
 				(>= min-time 0.02))
 			   (float-time) nil)
@@ -3477,12 +3485,11 @@
     (progress-reporter-update reporter (or current-value min-value))
     reporter))
 
-(defun progress-reporter-force-update (reporter value &optional new-message)
+(defun progress-reporter-force-update (reporter &optional value new-message)
   "Report progress of an operation in the echo area unconditionally.
 
-First two parameters are the same as for
-`progress-reporter-update'.  Optional NEW-MESSAGE allows you to
-change the displayed message."
+The first two arguments are the same as in `progress-reporter-update'.
+NEW-MESSAGE, if non-nil, sets a new message for the reporter."
   (let ((parameters (cdr reporter)))
     (when new-message
       (aset parameters 3 new-message))
@@ -3490,15 +3497,15 @@
       (aset parameters 0 (float-time)))
     (progress-reporter-do-update reporter value)))
 
+(defvar progress-reporter--pulse-characters ["-" "\\" "|" "/"]
+  "Characters to use for pulsing progress reporters.")
+
 (defun progress-reporter-do-update (reporter value)
   (let* ((parameters   (cdr reporter))
+	 (update-time  (aref parameters 0))
 	 (min-value    (aref parameters 1))
 	 (max-value    (aref parameters 2))
-	 (one-percent  (/ (- max-value min-value) 100.0))
-	 (percentage   (if (= max-value min-value)
-			   0
-			 (truncate (/ (- value min-value) one-percent))))
-	 (update-time  (aref parameters 0))
+	 (text         (aref parameters 3))
 	 (current-time (float-time))
 	 (enough-time-passed
 	  ;; See if enough time has passed since the last update.
@@ -3506,26 +3513,41 @@
 	      (when (>= current-time update-time)
 		;; Calculate time for the next update
 		(aset parameters 0 (+ update-time (aref parameters 5)))))))
-    ;;
-    ;; Calculate NEXT-UPDATE-VALUE.  If we are not going to print
-    ;; message this time because not enough time has passed, then use
-    ;; 1 instead of MIN-CHANGE.  This makes delays between echo area
-    ;; updates closer to MIN-TIME.
-    (setcar reporter
-	    (min (+ min-value (* (+ percentage
-				    (if enough-time-passed
-					(aref parameters 4) ;; MIN-CHANGE
-				      1))
-				 one-percent))
-		 max-value))
-    (when (integerp value)
-      (setcar reporter (ceiling (car reporter))))
-    ;;
-    ;; Only print message if enough time has passed
-    (when enough-time-passed
-      (if (> percentage 0)
-	  (message "%s%d%%" (aref parameters 3) percentage)
-	(message "%s" (aref parameters 3))))))
+    (cond ((and min-value max-value)
+	   ;; Numerical indicator
+	   (let* ((one-percent (/ (- max-value min-value) 100.0))
+		  (percentage  (if (= max-value min-value)
+				   0
+				 (truncate (/ (- value min-value)
+					      one-percent)))))
+	     ;; Calculate NEXT-UPDATE-VALUE.  If we are not printing
+	     ;; message because not enough time has passed, use 1
+	     ;; instead of MIN-CHANGE.  This makes delays between echo
+	     ;; area updates closer to MIN-TIME.
+	     (setcar reporter
+		     (min (+ min-value (* (+ percentage
+					     (if enough-time-passed
+						 ;; MIN-CHANGE
+						 (aref parameters 4)
+					       1))
+					  one-percent))
+			  max-value))
+	     (when (integerp value)
+	       (setcar reporter (ceiling (car reporter))))
+	     ;; Only print message if enough time has passed
+	     (when enough-time-passed
+	       (if (> percentage 0)
+		   (message "%s%d%%" text percentage)
+		 (message "%s" text)))))
+	  ;; Pulsing indicator
+	  (enough-time-passed
+	   (let ((index (mod (1+ (car reporter)) 4))
+		 (message-log-max nil))
+	     (setcar reporter index)
+	     (message "%s %s"
+		      text
+		      (aref progress-reporter--pulse-characters
+			    index)))))))
 
 (defun progress-reporter-done (reporter)
   "Print reporter's message followed by word \"done\" in echo area."
--- a/src/ChangeLog	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/ChangeLog	Tue Mar 30 04:00:46 2010 +0000
@@ -1,3 +1,18 @@
+2010-03-30  Dan Nicolaescu  <dann@ics.uci.edu>
+
+	Remove all uses of C_DEBUG_SWITCH and LIBS_DEBUG.
+	* s/usg5-4.h (LIBS_DEBUG):
+	* s/irix6-5.h (C_DEBUG_SWITCH):
+	* s/gnu-linux.h (LIBS_DEBUG):
+	* s/darwin.h (LIBS_DEBUG):
+	* s/bsd-common.h (LIBS_DEBUG):
+	* s/aix4-2.h (LIBS_DEBUG, C_DEBUG_SWITCH):
+	* m/iris4d.h (LIBS_DEBUG):
+	* m/hp800.h (LIBS_DEBUG): Remove definitions.
+
+	* Makefile.in (LIBES): Remove reference to LIBS_DEBUG.
+	(LIBS_DEBUG): Remove definition.
+
 2010-03-27  Chong Yidong  <cyd@stupidchicken.com>
 
 	* process.c (Fmake_network_process): Don't apply Bug#5173 fix for
--- a/src/Makefile.in	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/Makefile.in	Tue Mar 30 04:00:46 2010 +0000
@@ -127,11 +127,6 @@
 #define LIB_STANDARD
 #endif
 
-/* Unless inhibited or changed, use -lg to link for debugging.  */
-#ifndef LIBS_DEBUG
-#define LIBS_DEBUG -lg
-#endif
-
 /* Some s/SYSTEM.h files define this to request special libraries.  */
 #ifndef LIBS_SYSTEM
 #define LIBS_SYSTEM
@@ -850,7 +845,7 @@
 
 LIBES = $(LOADLIBES) $(LIBS) $(LIBX) $(LIBSOUND) $(RSVG_LIBS) $(DBUS_LIBS) \
    @LIBGPM@ @LIBRESOLV@ LIBS_SYSTEM LIBS_MACHINE LIBS_TERMCAP \
-   LIBS_DEBUG $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
+   $(GETLOADAVG_LIBS) ${GCONF_LIBS} \
    @FREETYPE_LIBS@ @FONTCONFIG_LIBS@ @LIBOTF_LIBS@ @M17N_FLT_LIBS@ \
    $(GNULIB_VAR) LIB_MATH LIB_STANDARD $(GNULIB_VAR)
 
--- a/src/m/hp800.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/m/hp800.h	Tue Mar 30 04:00:46 2010 +0000
@@ -93,8 +93,6 @@
 
 #define UNEXEC unexhp9k800.o
 
-#define LIBS_DEBUG
-
 /* Include the file bsdtty.h, since this machine has job control.  */
 #define NEED_BSDTTY
 
--- a/src/m/iris4d.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/m/iris4d.h	Tue Mar 30 04:00:46 2010 +0000
@@ -53,8 +53,6 @@
 #define DATA_START 0x10000000
 #define DATA_SEG_BITS	0x10000000
 
-#define LIBS_DEBUG
-
 /* Use terminfo instead of termcap.  */
 
 #define TERMINFO
--- a/src/s/aix4-2.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/aix4-2.h	Tue Mar 30 04:00:46 2010 +0000
@@ -87,10 +87,6 @@
 #define LINKER cc
 #endif
 
-/* Prevent -lg from being used for debugging.  Not needed.  */
-
-#define LIBS_DEBUG
-
 /* No need to specify -lc when linking.  */
 
 #define LIB_STANDARD
@@ -130,16 +126,6 @@
    It is just a guess which versions of AIX need this definition.  */
 #undef HAVE_STRING_H
 
-/* For AIX, it turns out compiling emacs under AIX 3.2.4 REQUIRES "cc -g"
-   because "cc -O" crashes. Under AIX 3.2.5, "cc -O" is required because
-   "cc -g" crashes. Go figure.  --floppy@merlin.mit.edu */
-/* The above isn't generally true.  If it occurs with some compiler
-   release, seek a fixed version, be it XLC or GCC.  The XLC version
-   isn't tied to the OS version on AIX any more than elsewhere.  XLC
-   (the IBM compiler) can use -g with -O.  (-O3 is also a possibility
-   for the optimization level.)  -- fx, after David Edelsohn.  */
-#define C_DEBUG_SWITCH -g -O
-
 /* Perry Smith <pedz@ddivt1.austin.ibm.com> says these are correct.  */
 #define SIGNALS_VIA_CHARACTERS
 #define MAIL_USE_LOCKF
--- a/src/s/bsd-common.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/bsd-common.h	Tue Mar 30 04:00:46 2010 +0000
@@ -46,8 +46,6 @@
 #define HAVE_TERMIOS
 #define NO_TERMIO
 
-#define LIBS_DEBUG
-
 #define SYSV_SYSTEM_DIR
 
 /* POSIX-style pgrp behavior.  */
--- a/src/s/darwin.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/darwin.h	Tue Mar 30 04:00:46 2010 +0000
@@ -189,9 +189,6 @@
 /* Link this program just by running cc.  */
 #define ORDINARY_LINK
 
-/* We don't have a g library, so override the -lg LIBS_DEBUG switch.  */
-#define LIBS_DEBUG
-
 /* Adding -lm confuses the dynamic linker, so omit it.  */
 #define LIB_MATH
 
--- a/src/s/gnu-linux.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/gnu-linux.h	Tue Mar 30 04:00:46 2010 +0000
@@ -194,19 +194,10 @@
 #define POSIX                 /* affects getpagesize.h and systty.h */
 #define POSIX_SIGNALS
 
-/* Best not to include -lg, unless it is last on the command line */
-#define LIBS_DEBUG
 #undef LIB_GCC
 #define LIB_GCC
 #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtn.o
 
-/* Don't use -g in test compiles in configure.
-   This is so we will use the same shared libs for that linking
-   that are used when linking temacs.  */
-#ifdef THIS_IS_CONFIGURE
-#define C_DEBUG_SWITCH
-#endif
-
 /* _BSD_SOURCE is redundant, at least in glibc2, since we define
    _GNU_SOURCE.  Left in in case it's relevant to libc5 systems and
    anyone's still using Emacs on those.  --fx 2002-12-14  */
--- a/src/s/irix6-5.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/irix6-5.h	Tue Mar 30 04:00:46 2010 +0000
@@ -101,19 +101,6 @@
 #define _LP64			/* lisp.h takes care of the rest */
 #endif /* _MIPS_SZLONG */
 
-/* The only supported 32-bit configuration of GCC under IRIX6.x produces
-   n32 MIPS ABI binaries and also supports -g. */
-#ifdef __GNUC__
-#define C_DEBUG_SWITCH -g
-#else
-/* Optimize, inaccurate debugging, increase limit on size of what's
-   optimized.
-
-   This should also be applicable other than on Irix 6.5, but I don't
-   know for which compiler versions.  -- fx */
-#define C_DEBUG_SWITCH -g3 -O -OPT:Olimit=3500
-#endif
-
 #undef SA_RESTART
 
 #undef TIOCSIGSEND		/* defined in usg5-4.h */
--- a/src/s/sol2-6.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/sol2-6.h	Tue Mar 30 04:00:46 2010 +0000
@@ -48,11 +48,6 @@
 #define LIBS_TERMCAP -ltermcap
 #endif
 
-#ifndef __GNUC__
-/* eggert thinks all versions of SunPro C allowed this.  */
-#define C_DEBUG_SWITCH -g -O
-#endif /* GCC */
-
 /* This is the same definition as in usg5-4.h, but with sigblock/sigunblock
    rather than sighold/sigrelse, which appear to be BSD4.1 specific and won't
    work if POSIX_SIGNALS is defined.  It may also be appropriate for SVR4.x
--- a/src/s/usg5-4.h	Mon Mar 29 10:23:03 2010 +0000
+++ b/src/s/usg5-4.h	Tue Mar 30 04:00:46 2010 +0000
@@ -103,10 +103,6 @@
 
 #define LIB_STANDARD
 
-/* there are no -lg libraries on this system, and no libPW */
-
-#define LIBS_DEBUG
-
 /* Undump with ELF */
 
 #undef COFF