Now on revision 106311. ------------------------------------------------------------ revno: 106311 fixes bug(s): http://debbugs.gnu.org/9926 committer: Paul Eggert branch nick: trunk timestamp: Sun 2011-11-06 21:37:49 -0800 message: * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926). This is also needed for porting to any host where GC_MARK_STACK is not GC_MAKE_GCPROS_NOOPS. (which_symbols): Use it. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-07 02:00:43 +0000 +++ src/ChangeLog 2011-11-07 05:37:49 +0000 @@ -1,3 +1,10 @@ +2011-11-07 Paul Eggert + + * alloc.c (DEADP): New macro, for porting to GNU/Hurd (Bug#9926). + This is also needed for porting to any host where GC_MARK_STACK is + not GC_MAKE_GCPROS_NOOPS. + (which_symbols): Use it. + 2011-11-07 Kenichi Handa * coding.c (coding_set_destination): Check coding->src_pos only === modified file 'src/alloc.c' --- src/alloc.c 2011-10-29 17:25:44 +0000 +++ src/alloc.c 2011-11-07 05:37:49 +0000 @@ -315,6 +315,7 @@ on free lists recognizable in O(1). */ static Lisp_Object Vdead; +#define DEADP(x) EQ (x, Vdead) #ifdef GC_MALLOC_CHECK @@ -411,6 +412,10 @@ #endif /* GC_MARK_STACK || GC_MALLOC_CHECK */ +#ifndef DEADP +# define DEADP(x) 0 +#endif + /* Recording what needs to be marked for gc. */ struct gcpro *gcprolist; @@ -6261,7 +6266,7 @@ int gc_count = inhibit_garbage_collection (); Lisp_Object found = Qnil; - if (!EQ (obj, Vdead)) + if (! DEADP (obj)) { for (sblk = symbol_block; sblk; sblk = sblk->next) { ------------------------------------------------------------ revno: 106310 fixes bug(s): http://debbugs.gnu.org/9974 author: Mark Lillibridge committer: Chong Yidong branch nick: trunk timestamp: Mon 2011-11-07 10:52:29 +0800 message: Fix rmail-mbox handling of terminating newlines. * lisp/mail/rmail.el (rmail-get-new-mail, rmail-insert-inbox-text): Ensure that mbox format messages end in two newlines. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-06 03:59:53 +0000 +++ lisp/ChangeLog 2011-11-07 02:52:29 +0000 @@ -1,3 +1,8 @@ +2011-11-07 Mark Lillibridge (tiny change) + + * mail/rmail.el (rmail-get-new-mail, rmail-insert-inbox-text): + Ensure that mbox format messages end in two newlines (Bug#9974). + 2011-11-06 Chong Yidong * window.el (window-combination-p): Function deleted; its === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2011-11-04 22:07:12 +0000 +++ lisp/mail/rmail.el 2011-11-07 02:52:29 +0000 @@ -1721,10 +1721,12 @@ (setq all-files (cdr all-files))) ;; Put them back in their original order. (setq files (nreverse files)) - ;; In case of brain damage caused by require-final-newline. (goto-char (point-max)) - (skip-chars-backward " \t\n") - (delete-region (point) (point-max)) + ;; Make sure we end with a blank line unless there are + ;; no messages, as required by mbox format (Bug#9974). + (unless (bobp) + (while (not (looking-back "\n\n")) + (insert "\n"))) (setq found (or (rmail-get-new-mail-1 file-name files delete-files) found)))) @@ -2024,22 +2026,12 @@ (rmail-unrmail-new-mail-maybe tofile (nth 1 (insert-file-contents tofile)))) - ;; Determine if a pair of newline message separators need - ;; to be added to the new collection of messages. This is - ;; the case for all new message collections added to a - ;; non-empty mail file. + (goto-char (point-max)) + ;; Make sure the read-in mbox data properly ends with a + ;; blank line unless it is of size 0. (unless (zerop size) - (save-restriction - (let ((start (point-min))) - (widen) - (unless (eq start (point-min)) - (goto-char start) - (insert "\n\n") - (setq size (+ 2 size)))))) - (goto-char (point-max)) - (or (= (preceding-char) ?\n) - (zerop size) - (insert ?\n)) + (while (not (looking-back "\n\n")) + (insert "\n"))) (if (not (and rmail-preserve-inbox (string= file tofile))) (setq delete-files (cons tofile delete-files))))) (message "") ------------------------------------------------------------ revno: 106309 [merge] committer: Kenichi Handa branch nick: trunk timestamp: Mon 2011-11-07 11:25:03 +0900 message: Set members of the struct coding_system before accessing them (bug#9910,9911,9912). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-06 23:38:01 +0000 +++ src/ChangeLog 2011-11-07 02:00:43 +0000 @@ -1,3 +1,14 @@ +2011-11-07 Kenichi Handa + + * coding.c (coding_set_destination): Check coding->src_pos only + when coding->src_object is a buffer (bug#9910). + + * process.c (send_process): Set the member src_multibyte of coding + to 0 (bug#9911) when sending a unibyte text. + + * callproc.c (Fcall_process): Set the member src_multibyte of + process_coding to 0 (bug#9912). + 2011-11-06 YAMAMOTO Mitsuharu * xmenu.c (cleanup_widget_value_tree): New function. === modified file 'src/callproc.c' --- src/callproc.c 2011-09-09 01:06:52 +0000 +++ src/callproc.c 2011-11-07 01:57:07 +0000 @@ -748,6 +748,7 @@ val = raw_text_coding_system (val); setup_coding_system (val, &process_coding); } + process_coding.src_multibyte = 0; immediate_quit = 1; QUIT; === modified file 'src/coding.c' --- src/coding.c 2011-07-28 20:31:29 +0000 +++ src/coding.c 2011-11-07 01:57:07 +0000 @@ -1043,7 +1043,7 @@ { if (BUFFERP (coding->dst_object)) { - if (coding->src_pos < 0) + if (BUFFERP (coding->src_object) && coding->src_pos < 0) { coding->destination = BEG_ADDR + coding->dst_pos_byte - BEG_BYTE; coding->dst_bytes = (GAP_END_ADDR === modified file 'src/process.c' --- src/process.c 2011-10-29 00:12:02 +0000 +++ src/process.c 2011-11-07 01:57:07 +0000 @@ -5387,6 +5387,7 @@ } else { + coding->src_multibyte = 0; /* For sending a unibyte text, character code conversion should not take place but EOL conversion should. So, setup raw-text or one of the subsidiary if we have not yet done it. */ ------------------------------------------------------------ revno: 106308 [merge] committer: Glenn Morris branch nick: trunk timestamp: Sun 2011-11-06 15:38:01 -0800 message: Merge from emacs-23; up to r100628 diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-06 21:12:10 +0000 +++ src/ChangeLog 2011-11-06 23:38:01 +0000 @@ -1,3 +1,9 @@ +2011-11-06 YAMAMOTO Mitsuharu + + * xmenu.c (cleanup_widget_value_tree): New function. + (xmenu_show, xdialog_show): Use it in record_unwind_protect instead of + calling free_menubar_widget_value_tree directly (Bug#9830). + 2011-11-06 Paul Eggert Fix some portability problems with 'inline'. === modified file 'src/xmenu.c' --- src/xmenu.c 2011-09-17 12:19:04 +0000 +++ src/xmenu.c 2011-11-06 23:38:01 +0000 @@ -1604,6 +1604,17 @@ #endif /* not USE_GTK */ +static Lisp_Object +cleanup_widget_value_tree (Lisp_Object arg) +{ + struct Lisp_Save_Value *p = XSAVE_VALUE (arg); + widget_value *wv = p->pointer; + + free_menubar_widget_value_tree (wv); + + return Qnil; +} + Lisp_Object xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, Lisp_Object title, const char **error_name, Time timestamp) @@ -1618,6 +1629,8 @@ int first_pane; + int specpdl_count = SPECPDL_INDEX (); + if (! FRAME_X_P (f)) abort (); @@ -1812,11 +1825,15 @@ /* No selection has been chosen yet. */ menu_item_selection = 0; + /* Make sure to free the widget_value objects we used to specify the + contents even with longjmp. */ + record_unwind_protect (cleanup_widget_value_tree, + make_save_value (first_wv, 0)); + /* Actually create and show the menu until popped down. */ create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp); - /* Free the widget_value objects we used to specify the contents. */ - free_menubar_widget_value_tree (first_wv); + unbind_to (specpdl_count, Qnil); /* Find the selected item, and its pane, to return the proper value. */ @@ -2003,6 +2020,8 @@ /* 1 means we've seen the boundary between left-hand elts and right-hand. */ int boundary_seen = 0; + int specpdl_count = SPECPDL_INDEX (); + if (! FRAME_X_P (f)) abort (); @@ -2116,11 +2135,15 @@ /* No selection has been chosen yet. */ menu_item_selection = 0; + /* Make sure to free the widget_value objects we used to specify the + contents even with longjmp. */ + record_unwind_protect (cleanup_widget_value_tree, + make_save_value (first_wv, 0)); + /* Actually create and show the dialog. */ create_and_show_dialog (f, first_wv); - /* Free the widget_value objects we used to specify the contents. */ - free_menubar_widget_value_tree (first_wv); + unbind_to (specpdl_count, Qnil); /* Find the selected item, and its pane, to return the proper value. */ ------------------------------------------------------------ revno: 106307 committer: Paul Eggert branch nick: trunk timestamp: Sun 2011-11-06 13:12:10 -0800 message: Fix some portability problems with 'inline'. * dispextern.h (window_box, window_box_height, window_text_bottom_y) (window_box_width, window_box_left, window_box_left_offset) (window_box_right, window_box_right_offset): Declare extern. Otherwise, these inline functions do not conform to C99 and are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in . * intervals.c (adjust_intervals_for_insertion) (adjust_intervals_for_deletion): Now extern, because otherwise the extern inline functions 'offset_intervals' couldn't refer to it. (static_offset_intervals): Remove. (offset_intervals): Rewrite using the old contents of static_offset_intervals. The old version didn't conform to C99 because an extern inline function contained a reference to an identifier with static linkage. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2011-11-06 19:42:14 +0000 +++ src/ChangeLog 2011-11-06 21:12:10 +0000 @@ -1,3 +1,21 @@ +2011-11-06 Paul Eggert + + Fix some portability problems with 'inline'. + * dispextern.h (window_box, window_box_height, window_text_bottom_y) + (window_box_width, window_box_left, window_box_left_offset) + (window_box_right, window_box_right_offset): Declare extern. + Otherwise, these inline functions do not conform to C99 and + are miscompiled by Microsoft compilers. Reported by Eli Zaretskii in + . + * intervals.c (adjust_intervals_for_insertion) + (adjust_intervals_for_deletion): Now extern, because otherwise the + extern inline functions 'offset_intervals' couldn't refer to it. + (static_offset_intervals): Remove. + (offset_intervals): Rewrite using the old contents of + static_offset_intervals. The old version didn't conform to C99 + because an extern inline function contained a reference to an + identifier with static linkage. + 2011-11-06 Andreas Schwab * keyboard.c (interrupt_signal): Don't call kill-emacs while in === modified file 'src/dispextern.h' --- src/dispextern.h 2011-10-25 16:36:20 +0000 +++ src/dispextern.h 2011-11-06 21:12:10 +0000 @@ -3006,14 +3006,14 @@ void set_vertical_scroll_bar (struct window *); #endif int try_window (Lisp_Object, struct text_pos, int); -void window_box (struct window *, int, int *, int *, int *, int *); -int window_box_height (struct window *); -int window_text_bottom_y (struct window *); -int window_box_width (struct window *, int); -int window_box_left (struct window *, int); -int window_box_left_offset (struct window *, int); -int window_box_right (struct window *, int); -int window_box_right_offset (struct window *, int); +extern void window_box (struct window *, int, int *, int *, int *, int *); +extern int window_box_height (struct window *); +extern int window_text_bottom_y (struct window *); +extern int window_box_width (struct window *, int); +extern int window_box_left (struct window *, int); +extern int window_box_left_offset (struct window *, int); +extern int window_box_right (struct window *, int); +extern int window_box_right_offset (struct window *, int); int estimate_mode_line_height (struct frame *, enum face_id); void pixel_to_glyph_coords (struct frame *, int, int, int *, int *, NativeRectangle *, int); === modified file 'src/intervals.c' --- src/intervals.c 2011-10-26 01:18:13 +0000 +++ src/intervals.c 2011-11-06 21:12:10 +0000 @@ -52,6 +52,11 @@ #define TMEM(sym, set) (CONSP (set) ? ! NILP (Fmemq (sym, set)) : ! NILP (set)) +extern INTERVAL adjust_intervals_for_insertion (INTERVAL, + EMACS_INT, EMACS_INT); +extern void adjust_intervals_for_deletion (struct buffer *, + EMACS_INT, EMACS_INT); + static Lisp_Object merge_properties_sticky (Lisp_Object, Lisp_Object); static INTERVAL merge_interval_right (INTERVAL); static INTERVAL reproduce_tree (INTERVAL, INTERVAL); @@ -798,7 +803,7 @@ and check the hungry bits of both. Then add the length going back up to the root. */ -static INTERVAL +INTERVAL adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, EMACS_INT length) { @@ -859,7 +864,7 @@ interval. Another possibility would be to create a new interval for this text, and make it have the merged properties of both ends. */ -static INTERVAL +INTERVAL adjust_intervals_for_insertion (INTERVAL tree, EMACS_INT position, EMACS_INT length) { @@ -1369,7 +1374,7 @@ text. The deletion is effected at position START (which is a buffer position, i.e. origin 1). */ -static void +void adjust_intervals_for_deletion (struct buffer *buffer, EMACS_INT start, EMACS_INT length) { @@ -1425,9 +1430,8 @@ compiler that does not allow calling a static function (here, adjust_intervals_for_deletion) from a non-static inline function. */ -static inline void -static_offset_intervals (struct buffer *buffer, EMACS_INT start, - EMACS_INT length) +inline void +offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) { if (NULL_INTERVAL_P (BUF_INTERVALS (buffer)) || length == 0) return; @@ -1440,12 +1444,6 @@ adjust_intervals_for_deletion (buffer, start, -length); } } - -inline void -offset_intervals (struct buffer *buffer, EMACS_INT start, EMACS_INT length) -{ - static_offset_intervals (buffer, start, length); -} /* Merge interval I with its lexicographic successor. The resulting interval is returned, and has the properties of the original ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.