changeset 109387:2bc66123f2c6

merge trunk
author Kenichi Handa <handa@etlken>
date Wed, 14 Jul 2010 12:52:10 +0900
parents 1cbe0a6dbbc2 (current diff) 32e3de61d8a0 (diff)
children 64d1dc916ed8
files src/ChangeLog
diffstat 13 files changed, 201 insertions(+), 76 deletions(-) [+]
line wrap: on
line diff
--- a/etc/compilation.txt	Wed Jul 14 12:40:47 2010 +0900
+++ b/etc/compilation.txt	Wed Jul 14 12:52:10 2010 +0900
@@ -93,6 +93,55 @@
 "foo.adb", line 2(11): warning: file name does not match ...
 "src/swapping.c", line 30.34: 1506-342 (W) "/*" detected in comment.
 
+* Cucumber
+
+symbol: cucumber
+
+Feature: This is an example for backtrace.
+
+  Scenario: undefined step  # features/cucumber.feature:3
+    Given this is undefined # features/cucumber.feature:4
+
+  Scenario: assertion false (Test::Unit)    # features/cucumber.feature:6
+    Given this will generate 'assert false' # features/step_definitions/default_steps.rb:1
+      <false> is not true. (Test::Unit::AssertionFailedError)
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:48:in `assert_block'
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:500:in `_wrap_assertion'
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:46:in `assert_block'
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:63:in `assert'
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:495:in `_wrap_assertion'
+      /home/gusev/.rvm/rubies/ruby-1.8.7-p249/lib/ruby/1.8/test/unit/assertions.rb:61:in `assert'
+      ./features/step_definitions/default_steps.rb:2:in `/^this will generate 'assert false'$/'
+      features/cucumber.feature:7:in `Given this will generate 'assert false''
+
+  Scenario: assertion false (RSpec)           # features/cucumber.feature:9
+    Given this will generate 'should be_true' # features/step_definitions/default_steps.rb:5
+      expected true to be false (Spec::Expectations::ExpectationNotMetError)
+      ./features/step_definitions/default_steps.rb:6:in `/^this will generate 'should be_true'$/'
+      features/cucumber.feature:10:in `Given this will generate 'should be_true''
+
+  Scenario: backtrace in step definition # features/cucumber.feature:12
+    Given this will generate backtrace   # features/step_definitions/default_steps.rb:9
+       (RuntimeError)
+      ./features/step_definitions/default_steps.rb:10:in `/^this will generate backtrace$/'
+      features/cucumber.feature:13:in `Given this will generate backtrace'
+
+  Scenario: deeep backtrace in step definition # features/cucumber.feature:15
+    Given this will generate deep backtrace    # features/step_definitions/default_steps.rb:13
+       (RuntimeError)
+      ./features/step_definitions/default_steps.rb:18:in `deep'
+      ./features/step_definitions/default_steps.rb:14:in `/^this will generate deep backtrace$/'
+      features/cucumber.feature:16:in `Given this will generate deep backtrace'
+
+Failing Scenarios:
+cucumber features/cucumber.feature:6 # Scenario: assertion false (Test::Unit)
+cucumber features/cucumber.feature:9 # Scenario: assertion false (RSpec)
+cucumber features/cucumber.feature:12 # Scenario: backtrace in step definition
+cucumber features/cucumber.feature:15 # Scenario: deeep backtrace in step definition
+
+5 scenarios (4 failed, 1 undefined)
+5 steps (4 failed, 1 undefined)
+0m0.007s
 
 * EDG C/C++
 
@@ -318,6 +367,51 @@
 Parse error: parse error, unexpected $ in main.php on line 59
 Fatal error: Call to undefined function: mysql_pconnect() in db.inc on line 66
 
+* Ruby
+
+symbol: ruby
+
+plain-exception.rb:7:in `fun': unhandled exception
+	from plain-exception.rb:3:in `proxy'
+	from plain-exception.rb:12
+
+* Ruby (Test::Unit)
+
+symbol: ruby-Test::Unit
+
+Loaded suite examples/test-unit
+Started
+FFFE
+Finished in 0.023173 seconds.
+
+  1) Failure:
+test_a_deep_assert(BacktracesTest)
+    [examples/test-unit.rb:28:in `here_is_a_deep_assert'
+     examples/test-unit.rb:19:in `test_a_deep_assert']:
+<false> is not true.
+
+  2) Failure:
+test_assert(BacktracesTest) [examples/test-unit.rb:5]:
+<false> is not true.
+
+  3) Failure:
+test_assert_raise(BacktracesTest) [examples/test-unit.rb:9]:
+Exception raised:
+Class: <RuntimeError>
+Message: <"">
+---Backtrace---
+examples/test-unit.rb:10:in `test_assert_raise'
+examples/test-unit.rb:9:in `test_assert_raise'
+---------------
+
+  4) Error:
+test_backtrace(BacktracesTest):
+NoMethodError: undefined method `not_exists' for nil:NilClass
+    examples/test-unit.rb:24:in `some_function_call_from_nil'
+    examples/test-unit.rb:15:in `test_backtrace'
+
+4 tests, 3 assertions, 3 failures, 1 errors
+
 * RXP
 
 symbol: rxp
@@ -375,11 +469,11 @@
 
 * GCOV (test coverage program)
 
-symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line 
+symbol: gcov-file gcov-bb-file gcov-never-called-line gcov-called-line
 
         -:    0:Source:foo.c
         -:    0:Object:foo.bb
-        -:    1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c 
+        -:    1:/* $ gcc -fprofile-arcs -ftest-coverage foo.c
         -:    2:   $ ./a.out
         -:    3:   $ gcov foo.c
         -:    4:   LANG=C gcov foo.c
@@ -393,10 +487,10 @@
         1:   12:    r = 1;
     #####:   13:  else if (argc == 2)
     #####:   14:    r = 2;
-        -:   15:  else 
+        -:   15:  else
     #####:   16:    r = 0;
         1:   17:  return r;
-        -:   18:} 
+        -:   18:}
 
 
 * Podchecker error messages, per Pod::Checker
--- a/lisp/ChangeLog	Wed Jul 14 12:40:47 2010 +0900
+++ b/lisp/ChangeLog	Wed Jul 14 12:52:10 2010 +0900
@@ -1,3 +1,30 @@
+2010-07-13  Karl Fogel  <kfogel@red-bean.com>
+
+	* bookmark.el (bookmark-show-annotation): Use `when' instead of `if'.
+	This is also from Thierry Volpiatto's patch in bug #6444.  However,
+	because it was extraneous to the functional change in that patch,
+	and causes a re-indendation, I am committing it separately.
+
+2010-07-13  Karl Fogel  <kfogel@red-bean.com>
+
+	* bookmark.el (bookmark-show-annotation): Ensure annotations show,
+	e.g. in Info bookmarks, by using `switch-to-buffer-other-window'.
+	Patch by Thierry Volpiatto (Bug#6444).
+
+2010-07-13  Chong Yidong  <cyd@stupidchicken.com>
+
+	* frame.el (make-frame): Fix typo in 2010-06-30 change (Bug#6625).
+
+2010-07-13  Adrian Robert  <Adrian.B.Robert@gmail.com>
+
+	* term/ns-win.el: Bind M-~ to 'ns-prev-frame (due to Matthew
+	Dempsky; bug#5084).  Remove incorrect binding for S-tab.
+	(ns-alternatives-map): Change S-tab binding to backtab
+	(bug#6616).
+
+	* simple.el (normal-erase-is-backspace-setup-frame): Set mode on
+	under ns.
+
 2010-07-12  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* language/tai-viet.el ("TaiViet"): Try to fix re-encoding
--- a/lisp/bookmark.el	Wed Jul 14 12:40:47 2010 +0900
+++ b/lisp/bookmark.el	Wed Jul 14 12:52:10 2010 +0900
@@ -1733,15 +1733,15 @@
   "Display the annotation for bookmark named BOOKMARK in a buffer,
 if an annotation exists."
   (let ((annotation (bookmark-get-annotation bookmark)))
-    (if (and annotation (not (string-equal annotation "")))
-        (save-excursion
-          (let ((old-buf (current-buffer)))
-            (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t)
-            (delete-region (point-min) (point-max))
-            ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n"))
-            (insert annotation)
-            (goto-char (point-min))
-            (pop-to-buffer old-buf))))))
+    (when (and annotation (not (string-equal annotation "")))
+      (save-excursion
+        (let ((old-buf (current-buffer)))
+          (pop-to-buffer (get-buffer-create "*Bookmark Annotation*") t)
+          (delete-region (point-min) (point-max))
+          ;; (insert (concat "Annotation for bookmark '" bookmark "':\n\n"))
+          (insert annotation)
+          (goto-char (point-min))
+          (switch-to-buffer-other-window old-buf))))))
 
 
 (defun bookmark-show-all-annotations ()
--- a/lisp/frame.el	Wed Jul 14 12:40:47 2010 +0900
+++ b/lisp/frame.el	Wed Jul 14 12:52:10 2010 +0900
@@ -736,11 +736,11 @@
       (error "Don't know how to create a frame on window system %s" w))
     ;; Add parameters from `window-system-default-frame-alist'.
     (dolist (p (cdr (assq w window-system-default-frame-alist)))
-      (unless (memq (car p) params)
+      (unless (assq (car p) params)
 	(push p params)))
     ;; Add parameters from `default-frame-alist'.
     (dolist (p default-frame-alist)
-      (unless (memq (car p) params)
+      (unless (assq (car p) params)
 	(push p params)))
     ;; Now make the frame.
     (run-hooks 'before-make-frame-hook)
--- a/lisp/simple.el	Wed Jul 14 12:40:47 2010 +0900
+++ b/lisp/simple.el	Wed Jul 14 12:52:10 2010 +0900
@@ -6522,6 +6522,7 @@
        (if (if (eq normal-erase-is-backspace 'maybe)
                (and (not noninteractive)
                     (or (memq system-type '(ms-dos windows-nt))
+			(memq window-system '(ns))
                         (and (memq window-system '(x))
                              (fboundp 'x-backspace-delete-keys-p)
                              (x-backspace-delete-keys-p))
--- a/lisp/term/ns-win.el	Wed Jul 14 12:40:47 2010 +0900
+++ b/lisp/term/ns-win.el	Wed Jul 14 12:52:10 2010 +0900
@@ -186,14 +186,11 @@
 
 ;;;; Keyboard mapping.
 
-;; These tell read-char how to convert these special chars to ASCII.
-(put 'S-tab 'ascii-character (logior 16 ?\t))
-
 (defvar ns-alternatives-map
   (let ((map (make-sparse-keymap)))
     ;; Map certain keypad keys into ASCII characters
     ;; that people usually expect.
-    (define-key map [S-tab] [25])
+    (define-key map [S-tab] [backtab])
     (define-key map [M-backspace] [?\M-\d])
     (define-key map [M-delete] [?\M-\d])
     (define-key map [M-tab] [?\M-\t])
@@ -208,6 +205,7 @@
 (define-key global-map [?\s-,] 'customize)
 (define-key global-map [?\s-'] 'next-multiframe-window)
 (define-key global-map [?\s-`] 'other-frame)
+(define-key global-map [?\s-~] 'ns-prev-frame)
 (define-key global-map [?\s--] 'center-line)
 (define-key global-map [?\s-:] 'ispell)
 (define-key global-map [?\s-\;] 'ispell-next)
--- a/src/ChangeLog	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/ChangeLog	Wed Jul 14 12:52:10 2010 +0900
@@ -3,6 +3,37 @@
 	* font.c (font_open_entity): Cancel previous change.
 	(Ffont_get): Don't check FONT_ENTITY_INDEX of a font-object.
 
+2010-07-13  Eli Zaretskii  <eliz@gnu.org>
+
+	Remove subprocesses #ifdefs.
+	* process.c <inhibit_sentinels>: Move to the common part.
+	(Fwaiting_for_user_input_p): Move to the common part; return nil
+	if async subprocesses aren't supported.
+	* sysdep.c (wait_for_termination) [!MSDOS]: Don't compile on
+	MS-DOS.  Remove "#ifdef subprocesses".
+	(sys_subshell, sys_select): Remove "#ifdef subprocesses".
+	(gettimeofday): Remove "#ifdef subprocesses".
+	(wait_without_blocking): Remove function.
+	(flush_pending_output, child_setup_tty): Don't compile on MS-DOS.
+	Remove "#ifdef subprocesses".
+	(child_setup_tty): Use WINDOWSNT instead of DOS_NT, since not
+	compiled on MS-DOS.
+	* callproc.c (Fcall_process) [!MSDOS]: Don't call
+	wait_for_termination on MS-DOS.
+	* emacs.c (shut_down_emacs): Remove "#ifndef subprocesses" from
+	initialization of inhibit_sentinels.
+	* keyboard.c (record_asynch_buffer_change): Remove "#ifdef
+	subprocesses" conditional.
+	* callproc.c (Fcall_process) [!subprocesses]: Don't call
+	wait_for_termination, since `buffer' cannot be an integer when
+	async subprocesses are not supported
+	* xdisp.c (decode_mode_spec): Use `MSDOS' instead of `subprocesses'
+	for ifdefing away the call to Fprocess_status.
+
+	* process.c (add_keyboard_wait_descriptor) [!subprocesses]: Ifdef
+	away the entire body of the function.
+>>>>>>> MERGE-SOURCE
+
 2010-07-13  Dan Nicolaescu  <dann@ics.uci.edu>
 
 	Remove subprocesses #ifdefs from term.c.
--- a/src/callproc.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/callproc.c	Wed Jul 14 12:52:10 2010 +0900
@@ -612,12 +612,6 @@
     {
       if (fd[0] >= 0)
 	emacs_close (fd[0]);
-#ifndef subprocesses
-      /* If Emacs has been built with asynchronous subprocess support,
-	 we don't need to do this, I think because it will then have
-	 the facilities for handling SIGCHLD.  */
-      wait_without_blocking ();
-#endif /* subprocesses */
       return Qnil;
     }
 
@@ -811,8 +805,10 @@
 	     make_number (total_read));
   }
 
+#ifndef MSDOS
   /* Wait for it to terminate, unless it already has.  */
   wait_for_termination (pid);
+#endif
 
   immediate_quit = 0;
 
--- a/src/emacs.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/emacs.c	Wed Jul 14 12:52:10 2010 +0900
@@ -2130,9 +2130,7 @@
 
   stuff_buffered_input (stuff);
 
-#ifdef subprocesses
   inhibit_sentinels = 1;
-#endif
   kill_buffer_processes (Qnil);
   Fdo_auto_save (Qt, Qnil);
 
--- a/src/keyboard.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/keyboard.c	Wed Jul 14 12:52:10 2010 +0900
@@ -6901,18 +6901,15 @@
   event.frame_or_window = Qnil;
   event.arg = Qnil;
 
-#ifdef subprocesses
   /* We don't need a buffer-switch event unless Emacs is waiting for input.
      The purpose of the event is to make read_key_sequence look up the
      keymaps again.  If we aren't in read_key_sequence, we don't need one,
-     and the event could cause trouble by messing up (input-pending-p).  */
+     and the event could cause trouble by messing up (input-pending-p).
+     Note: Fwaiting_for_user_input_p always returns nil when async
+     subprocesses aren't supported.  */
   tem = Fwaiting_for_user_input_p ();
   if (NILP (tem))
     return;
-#else
-  /* We never need these events if we have no asynchronous subprocesses.  */
-  return;
-#endif
 
   /* Make sure no interrupt happens while storing the event.  */
 #ifdef SIGIO
--- a/src/process.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/process.c	Wed Jul 14 12:52:10 2010 +0900
@@ -304,6 +304,10 @@
 /* Nonzero means delete a process right away if it exits.  */
 static int delete_exited_processes;
 
+/* Nonzero means don't run process sentinels.  This is used
+   when exiting.  */
+int inhibit_sentinels;
+
 #ifdef subprocesses
 
 /* Mask of bits indicating the descriptors that we wait for input on.  */
@@ -381,10 +385,6 @@
 /* Maximum number of bytes to send to a pty without an eof.  */
 static int pty_max_bytes;
 
-/* Nonzero means don't run process sentinels.  This is used
-   when exiting.  */
-int inhibit_sentinels;
-
 #ifdef HAVE_PTYS
 #ifdef HAVE_PTY_H
 #include <pty.h>
@@ -5433,15 +5433,6 @@
   unbind_to (count, Qnil);
   return nbytes;
 }
-
-DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p,
-       0, 0, 0,
-       doc: /* Returns non-nil if Emacs is waiting for input from the user.
-This is intended for use by asynchronous process output filters and sentinels.  */)
-  (void)
-{
-  return (waiting_for_user_input_p ? Qt : Qnil);
-}
 
 /* Sending data to subprocess */
 
@@ -7122,10 +7113,12 @@
 void
 add_keyboard_wait_descriptor (int desc)
 {
+#ifdef subprocesses
   FD_SET (desc, &input_wait_mask);
   FD_SET (desc, &non_process_wait_mask);
   if (desc > max_keyboard_desc)
     max_keyboard_desc = desc;
+#endif
 }
 
 /* From now on, do not expect DESC to give keyboard input.  */
@@ -7277,6 +7270,19 @@
 #endif /* subprocesses */
 }
 
+DEFUN ("waiting-for-user-input-p", Fwaiting_for_user_input_p, Swaiting_for_user_input_p,
+       0, 0, 0,
+       doc: /* Returns non-nil if Emacs is waiting for input from the user.
+This is intended for use by asynchronous process output filters and sentinels.  */)
+  (void)
+{
+#ifdef subprocesses
+  return (waiting_for_user_input_p ? Qt : Qnil);
+#else
+  return Qnil;
+#endif
+}
+
 /* Stop reading input from keyboard sources.  */
 
 void
--- a/src/sysdep.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/sysdep.c	Wed Jul 14 12:52:10 2010 +0900
@@ -355,16 +355,6 @@
   /* Ok to do nothing if this feature does not exist */
 }
 
-#ifndef subprocesses
-
-void
-wait_without_blocking (void)
-{
-  croak ("wait_without_blocking");
-  synch_process_alive = 0;
-}
-
-#endif /* not subprocesses */
 
 int wait_debugging;   /* Set nonzero to make following function work under dbx
 			 (at least for bsd).  */
@@ -373,6 +363,7 @@
 wait_for_termination_signal (void)
 {}
 
+#ifndef MSDOS
 /* Wait for subprocess with process id `pid' to terminate and
    make sure it will get eliminated (not remain forever as a zombie) */
 
@@ -381,7 +372,6 @@
 {
   while (1)
     {
-#ifdef subprocesses
 #if defined (BSD_SYSTEM) || defined (HPUX)
       /* Note that kill returns -1 even if the process is just a zombie now.
 	 But inevitably a SIGCHLD interrupt should be generated
@@ -417,14 +407,9 @@
       sigsuspend (&empty_mask);
 #endif /* not WINDOWSNT */
 #endif /* not BSD_SYSTEM, and not HPUX version >= 6 */
-#else /* not subprocesses */
-      break;
-#endif /* not subprocesses */
     }
 }
 
-#ifdef subprocesses
-
 /*
  *	flush any pending output
  *      (may flush input as well; it does not matter the way we use it)
@@ -459,7 +444,7 @@
 void
 child_setup_tty (int out)
 {
-#ifndef DOS_NT
+#ifndef WINDOWSNT
   struct emacs_tty s;
 
   EMACS_GET_TTY (out, &s);
@@ -543,10 +528,10 @@
 
   EMACS_SET_TTY (out, &s, 0);
 
-#endif /* not DOS_NT */
+#endif /* not WINDOWSNT */
 }
-
-#endif /* subprocesses */
+#endif	/* MSDOS */
+
 
 /* Record a signal code and the handler for it.  */
 struct save_signal
@@ -650,9 +635,7 @@
       if (str)
 	chdir ((char *) str);
 
-#ifdef subprocesses
       close_process_descs ();	/* Close Emacs's pipes/ptys */
-#endif
 
 #ifdef SET_EMACS_PRIORITY
       {
@@ -1699,11 +1682,7 @@
   int timeoutval;
   int *local_timeout;
   extern int proc_buffered_char[];
-#ifndef subprocesses
-  int process_tick = 0, update_tick = 0;
-#else
   extern int process_tick, update_tick;
-#endif
   unsigned char buf;
 
 #if defined (HAVE_SELECT) && defined (HAVE_X_WINDOWS)
@@ -2433,7 +2412,6 @@
  *	Only needed when subprocesses are defined.
  */
 
-#ifdef subprocesses
 #ifndef HAVE_GETTIMEOFDAY
 #ifdef HAVE_TIMEVAL
 
@@ -2451,8 +2429,7 @@
 }
 
 #endif
-#endif
-#endif /* subprocess && !HAVE_GETTIMEOFDAY && HAVE_TIMEVAL */
+#endif /* !HAVE_GETTIMEOFDAY && HAVE_TIMEVAL */
 
 /*
  *	This function will go away as soon as all the stubs fixed. (fnf)
--- a/src/xdisp.c	Wed Jul 14 12:40:47 2010 +0900
+++ b/src/xdisp.c	Wed Jul 14 12:52:10 2010 +0900
@@ -19597,7 +19597,7 @@
       obj = Fget_buffer_process (Fcurrent_buffer ());
       if (NILP (obj))
 	return "no process";
-#ifdef subprocesses
+#ifndef MSDOS
       obj = Fsymbol_name (Fprocess_status (obj));
 #endif
       break;