Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 101073. ------------------------------------------------------------ revno: 101073 committer: Glenn Morris branch nick: trunk timestamp: Fri 2010-08-13 19:02:31 -0700 message: * lisp/gnus/gnus-sync.el (gnus-sync): Fix defgroup version. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 11:03:19 +0000 +++ lisp/gnus/ChangeLog 2010-08-14 02:02:31 +0000 @@ -1,3 +1,7 @@ +2010-08-14 Glenn Morris + + * gnus-sync.el (gnus-sync): Fix defgroup version. + 2010-08-12 Teodor Zlatanov Optimizations for gnus-sync.el. === modified file 'lisp/gnus/gnus-sync.el' --- lisp/gnus/gnus-sync.el 2010-08-13 11:03:19 +0000 +++ lisp/gnus/gnus-sync.el 2010-08-14 02:02:31 +0000 @@ -1,7 +1,6 @@ ;;; gnus-sync.el --- synchronization facility for Gnus -;;; Copyright (C) 2010 -;;; Free Software Foundation, Inc. +;; Copyright (C) 2010 Free Software Foundation, Inc. ;; Author: Ted Zlatanov ;; Keywords: news synchronization nntp nnrss @@ -48,7 +47,7 @@ (defgroup gnus-sync nil "The Gnus synchronization facility." - :version "23.1" + :version "24.1" :group 'gnus) (defcustom gnus-sync-newsrc-groups `("nntp" "nnrss") ------------------------------------------------------------ revno: 101072 committer: Chong Yidong branch nick: trunk timestamp: Fri 2010-08-13 20:39:08 -0400 message: * fns.c (Fmake_hash_table): Doc fix (Bug#6851). diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-13 14:54:32 +0000 +++ src/ChangeLog 2010-08-14 00:39:08 +0000 @@ -1,3 +1,7 @@ +2010-08-14 Chong Yidong + + * fns.c (Fmake_hash_table): Doc fix (Bug#6851). + 2010-08-13 Jason Rumney * w32menu.c (simple_dialog_show): Use unicode message box if available. === modified file 'src/fns.c' --- src/fns.c 2010-08-08 21:12:29 +0000 +++ src/fns.c 2010-08-14 00:39:08 +0000 @@ -4419,9 +4419,9 @@ Default is 65. :rehash-size REHASH-SIZE - Indicates how to expand the table when it -fills up. If REHASH-SIZE is an integer, add that many space. If it -is a float, it must be > 1.0, and the new size is computed by -multiplying the old size with that factor. Default is 1.5. +fills up. If REHASH-SIZE is an integer, increase the size by that +amount. If it is a float, it must be > 1.0, and the new size is the +old size multiplied by that factor. Default is 1.5. :rehash-threshold THRESHOLD -- THRESHOLD must a float > 0, and <= 1.0. Resize the hash table when the ratio (number of entries / table size) ------------------------------------------------------------ revno: 101071 committer: Jason Rumney branch nick: trunk timestamp: Fri 2010-08-13 22:54:32 +0800 message: Fix for bug#5629: Use unicode message box if available. * w32menu.c (simple_dialog_show): Use unicode message box if available. (MessageBoxW_Proc): New function typedef. (unicode-message-box): New function pointer. (globals_of_w32menu): Import it from user32.dll. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-13 13:26:13 +0000 +++ src/ChangeLog 2010-08-13 14:54:32 +0000 @@ -1,3 +1,10 @@ +2010-08-13 Jason Rumney + + * w32menu.c (simple_dialog_show): Use unicode message box if available. + (MessageBoxW_Proc): New function typedef. + (unicode-message-box): New function pointer. + (globals_of_w32menu): Import it from user32.dll. (Bug#5629) + 2010-08-13 Jan Djärv * frame.h (Qtool_bar_position): Declare. === modified file 'src/w32menu.c' --- src/w32menu.c 2010-08-13 08:10:05 +0000 +++ src/w32menu.c 2010-08-13 14:54:32 +0000 @@ -72,10 +72,16 @@ IN UINT, IN BOOL, IN LPCMENUITEMINFOA); +typedef int (WINAPI * MessageBoxW_Proc) ( + IN HWND window, + IN WCHAR *text, + IN WCHAR *caption, + IN UINT type); GetMenuItemInfoA_Proc get_menu_item_info = NULL; SetMenuItemInfoA_Proc set_menu_item_info = NULL; AppendMenuW_Proc unicode_append_menu = NULL; +MessageBoxW_Proc unicode_message_box = NULL; Lisp_Object Qdebug_on_next_call; @@ -99,6 +105,8 @@ static Lisp_Object simple_dialog_show (FRAME_PTR, Lisp_Object, Lisp_Object); #endif +static void utf8to16 (unsigned char *, int, WCHAR *); + void w32_free_menu_strings (HWND); @@ -1220,30 +1228,73 @@ { int answer; UINT type; - char *text, *title; Lisp_Object lispy_answer = Qnil, temp = XCAR (contents); - if (STRINGP (temp)) - text = SDATA (temp); - else - text = ""; - - if (NILP (header)) - { - title = "Question"; - type = MB_ICONQUESTION; - } - else - { - title = "Information"; - type = MB_ICONINFORMATION; - } - type |= MB_YESNO; + type = MB_YESNO; /* Since we only handle Yes/No dialogs, and we already checked is_simple_dialog, we don't need to worry about checking contents to see what type of dialog to use. */ - answer = MessageBox (FRAME_W32_WINDOW (f), text, title, type); + + /* Use unicode if possible, so any language can be displayed. */ + if (unicode_message_box) + { + WCHAR *text, *title; + + if (STRINGP (temp)) + { + char *utf8_text = SDATA (ENCODE_UTF_8 (temp)); + /* Be pessimistic about the number of characters needed. + Remember characters outside the BMP will take more than + one utf16 word, so we cannot simply use the character + length of temp. */ + int utf8_len = strlen (utf8_text); + text = alloca ((utf8_len + 1) * sizeof (WCHAR)); + utf8to16 (utf8_text, utf8_len, text); + } + else + { + text = L""; + } + + if (NILP (header)) + { + title = L"Question"; + type |= MB_ICONQUESTION; + } + else + { + title = L"Information"; + type |= MB_ICONINFORMATION; + } + + answer = unicode_message_box (FRAME_W32_WINDOW (f), text, title, type); + } + else + { + char *text, *title; + + /* Fall back on ANSI message box, but at least use system + encoding so questions representable by the system codepage + are encoded properly. */ + if (STRINGP (temp)) + text = SDATA (ENCODE_SYSTEM (temp)); + else + text = ""; + + if (NILP (header)) + { + title = "Question"; + type |= MB_ICONQUESTION; + } + else + { + title = "Information"; + type |= MB_ICONINFORMATION; + } + + answer = MessageBox (FRAME_W32_WINDOW (f), text, title, type); + } if (answer == IDYES) lispy_answer = build_string ("Yes"); @@ -1697,6 +1748,7 @@ get_menu_item_info = (GetMenuItemInfoA_Proc) GetProcAddress (user32, "GetMenuItemInfoA"); set_menu_item_info = (SetMenuItemInfoA_Proc) GetProcAddress (user32, "SetMenuItemInfoA"); unicode_append_menu = (AppendMenuW_Proc) GetProcAddress (user32, "AppendMenuW"); + unicode_message_box = (MessageBoxW_Proc) GetProcAddress (user32, "MessageBoxW"); } /* arch-tag: 0eaed431-bb4e-4aac-a527-95a1b4f1fed0 ------------------------------------------------------------ revno: 101070 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-13 15:26:13 +0200 message: Fix handling of tool-bar-position, also put into default-frame-alist. * lisp/menu-bar.el (menu-bar-set-tool-bar-position): New function. (menu-bar-showhide-tool-bar-menu-customize-enable-left) (menu-bar-showhide-tool-bar-menu-customize-enable-right) (menu-bar-showhide-tool-bar-menu-customize-enable-top) (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): Call menu-bar-set-tool-bar-position. * src/frame.h (Qtool_bar_position): Declare. * src/xfns.c (Fx_create_frame): Call x_default_parameter for Qtool_bar_position. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-08-12 14:44:16 +0000 +++ lisp/ChangeLog 2010-08-13 13:26:13 +0000 @@ -1,3 +1,12 @@ +2010-08-13 Jan Djärv + + * menu-bar.el (menu-bar-set-tool-bar-position): New function. + (menu-bar-showhide-tool-bar-menu-customize-enable-left) + (menu-bar-showhide-tool-bar-menu-customize-enable-right) + (menu-bar-showhide-tool-bar-menu-customize-enable-top) + (menu-bar-showhide-tool-bar-menu-customize-enable-bottom): Call + menu-bar-set-tool-bar-position. + 2010-08-12 Stefan Monnier * progmodes/octave-mod.el (octave-mode-syntax-table): Use the new "c" === modified file 'lisp/menu-bar.el' --- lisp/menu-bar.el 2010-07-29 16:49:59 +0000 +++ lisp/menu-bar.el 2010-08-13 13:26:13 +0000 @@ -968,6 +968,14 @@ :help ,(purecopy "Turn menu-bar on/off") :button (:toggle . (> (frame-parameter nil 'menu-bar-lines) 0)))) +(defun menu-bar-set-tool-bar-position (position) + (customize-set-variable 'tool-bar-mode t) + (set-frame-parameter nil 'tool-bar-position position) + (customize-set-variable 'default-frame-alist + (cons (cons 'tool-bar-position position) + (assq-delete-all 'tool-bar-position + default-frame-alist)))) + (defun menu-bar-showhide-tool-bar-menu-customize-disable () "Do not display tool bars." (interactive) @@ -975,24 +983,20 @@ (defun menu-bar-showhide-tool-bar-menu-customize-enable-left () "Display tool bars on the left side." (interactive) - (customize-set-variable 'tool-bar-mode t) - (set-frame-parameter nil 'tool-bar-position 'left)) + (menu-bar-set-tool-bar-position 'left)) (defun menu-bar-showhide-tool-bar-menu-customize-enable-right () "Display tool bars on the right side." (interactive) - (customize-set-variable 'tool-bar-mode t) - (set-frame-parameter nil 'tool-bar-position 'right)) + (menu-bar-set-tool-bar-position 'right)) (defun menu-bar-showhide-tool-bar-menu-customize-enable-top () "Display tool bars on the top side." (interactive) - (customize-set-variable 'tool-bar-mode t) - (set-frame-parameter nil 'tool-bar-position 'top)) + (menu-bar-set-tool-bar-position 'top)) (defun menu-bar-showhide-tool-bar-menu-customize-enable-bottom () "Display tool bars on the bottom side." (interactive) - (customize-set-variable 'tool-bar-mode t) - (set-frame-parameter nil 'tool-bar-position 'bottom)) + (menu-bar-set-tool-bar-position 'bottom)) (if (featurep 'move-toolbar) (progn === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-13 10:29:48 +0000 +++ src/ChangeLog 2010-08-13 13:26:13 +0000 @@ -1,3 +1,10 @@ +2010-08-13 Jan Djärv + + * frame.h (Qtool_bar_position): Declare. + + * xfns.c (Fx_create_frame): Call x_default_parameter for + Qtool_bar_position. + 2010-08-13 Eli Zaretskii * unexcoff.c: Remove the parts used when "emacs" is not defined. === modified file 'src/frame.h' --- src/frame.h 2010-08-05 23:15:24 +0000 +++ src/frame.h 2010-08-13 13:26:13 +0000 @@ -1050,7 +1050,7 @@ extern Lisp_Object Qicon, Qicon_name, Qicon_type, Qicon_left, Qicon_top; extern Lisp_Object Qinternal_border_width; extern Lisp_Object Qtooltip; -extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines; +extern Lisp_Object Qmenu_bar_lines, Qtool_bar_lines, Qtool_bar_position; extern Lisp_Object Qmouse_color; extern Lisp_Object Qname, Qtitle; extern Lisp_Object Qparent_id; === modified file 'src/xfns.c' --- src/xfns.c 2010-08-11 18:47:34 +0000 +++ src/xfns.c 2010-08-13 13:26:13 +0000 @@ -3392,6 +3392,8 @@ "waitForWM", "WaitForWM", RES_TYPE_BOOLEAN); x_default_parameter (f, parms, Qfullscreen, Qnil, "fullscreen", "Fullscreen", RES_TYPE_SYMBOL); + x_default_parameter (f, parms, Qtool_bar_position, + f->tool_bar_position, 0, 0, RES_TYPE_SYMBOL); /* Compute the size of the X window. */ window_prompting = x_figure_window_size (f, parms, 1); ------------------------------------------------------------ revno: 101069 [merge] committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-08-13 14:09:51 +0300 message: Fix compilation of xmenu.c and unexcoff.c, clean up MSDOS source files. unexcoff.c: Remove the parts used when "emacs" is not defined. (report_error, report_error_1): Ditto. (write_segment): Remove "#if 0" unused code. (make_hdr): Remove code that was "#ifndef NO_REMAP" before NO_REMAP was removed (in revno 100928). (start_of_text): Remove unused function (was used only if NO_REMAP was NOT defined). msdos.c (IT_set_face): Fix format string to match argument types. (IT_write_glyphs, IT_note_mode_line_highlight) (IT_set_frame_parameters): Remove unused variables. (x_set_menu_bar_lines): Declare set_menu_bar_lines. (IT_set_terminal_modes): Disambiguate expression in if clause. (Fmsdos_remember_default_colors): Return Qnil. (IT_set_frame_parameters): Add parens to disambiguate boolean expression for logging the cursor type to termscript. (keyboard_layout_list, keypad_translate_map) (grey_key_translate_map): Add braces in inner initializers. (dos_rawgetc): Add parens in condition for mouse-3 button-press. (dos_rawgetc): Remove unused label. (XMenuActivate): Add braces to remove ambiguous `else'. (dos_ttraw): Always return a value. (spawnve): Declare. (run_msdos_command): Cast 3rd arg of spawnve to "char **". dosfns.h (x_set_title): Declare. w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data): Remove unused variables. dosfns.c (Fint86, Fdos_memget, Fdos_memput): Remove unused variables. (init_dosfns): Declare get_lim_data. (system_process_attributes): Declare Fget_internal_run_time. xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Fix argument list to be consistent with menu.h. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-13 08:10:05 +0000 +++ src/ChangeLog 2010-08-13 10:29:48 +0000 @@ -1,5 +1,44 @@ 2010-08-13 Eli Zaretskii + * unexcoff.c: Remove the parts used when "emacs" is not defined. + (report_error, report_error_1): Ditto. + (write_segment): Remove "#if 0" unused code. + (make_hdr): Remove code that was "#ifndef NO_REMAP" before + NO_REMAP was removed (in revno 100928). + (start_of_text): Remove unused function (was used only if NO_REMAP + was NOT defined). + + * msdos.c (IT_set_face): Fix format string to match argument + types. + (IT_write_glyphs, IT_note_mode_line_highlight) + (IT_set_frame_parameters): Remove unused variables. + (x_set_menu_bar_lines): Declare set_menu_bar_lines. + (IT_set_terminal_modes): Disambiguate expression in if clause. + (Fmsdos_remember_default_colors): Return Qnil. + (IT_set_frame_parameters): Add parens to disambiguate boolean + expression for logging the cursor type to termscript. + (keyboard_layout_list, keypad_translate_map) + (grey_key_translate_map): Add braces in inner initializers. + (dos_rawgetc): Add parens in condition for mouse-3 button-press. + (dos_rawgetc): Remove unused label. + (XMenuActivate): Add braces to remove ambiguous `else'. + (dos_ttraw): Always return a value. + (spawnve): Declare. + (run_msdos_command): Cast 3rd arg of spawnve to "char **". + + * dosfns.h (x_set_title): Declare. + + * w16select.c (Fw16_set_clipboard_data, Fw16_get_clipboard_data): + Remove unused variables. + + * dosfns.c (Fint86, Fdos_memget, Fdos_memput): Remove unused + variables. + (init_dosfns): Declare get_lim_data. + (system_process_attributes): Declare Fget_internal_run_time. + + * xmenu.c (xmenu_show) [!USE_X_TOOLKIT && !USE_GTK]: Fix argument + list to be consistent with menu.h. + * w32menu.c (add_menu_item, name_is_separator): Shut up compiler warnings due to mixing of "char *" and "const char *". === modified file 'src/dosfns.c' --- src/dosfns.c 2010-07-08 21:25:08 +0000 +++ src/dosfns.c 2010-08-13 09:21:31 +0000 @@ -60,7 +60,6 @@ register int i; int no; union REGS inregs, outregs; - Lisp_Object val; CHECK_NUMBER (interrupt); no = (unsigned long) XINT (interrupt); @@ -101,7 +100,6 @@ register int i; int offs, len; char *buf; - Lisp_Object val; CHECK_NUMBER (address); offs = (unsigned long) XINT (address); @@ -125,7 +123,6 @@ register int i; int offs, len; char *buf; - Lisp_Object val; CHECK_NUMBER (address); offs = (unsigned long) XINT (address); @@ -286,6 +283,8 @@ unsigned long xbuf = _go32_info_block.linear_address_of_transfer_buffer; #ifndef SYSTEM_MALLOC + extern void get_lim_data (void); + get_lim_data (); /* why the hell isn't this called elsewhere? */ #endif @@ -558,6 +557,7 @@ int i; Lisp_Object cmd_str, decoded_cmd, tem; double pmem; + EXFUN (Fget_internal_run_time, 0); #ifndef SYSTEM_MALLOC extern unsigned long ret_lim_data (); #endif === modified file 'src/dosfns.h' --- src/dosfns.h 2010-07-02 13:10:00 +0000 +++ src/dosfns.h 2010-08-13 09:21:31 +0000 @@ -40,6 +40,7 @@ extern int msdos_stdcolor_idx (const char *); extern Lisp_Object msdos_stdcolor_name (int); +extern void x_set_title (struct frame *, Lisp_Object); #endif /* arch-tag: a83b8c4c-63c8-451e-9e94-bc72e3e2f8bc === modified file 'src/msdos.c' --- src/msdos.c 2010-08-06 19:07:16 +0000 +++ src/msdos.c 2010-08-13 09:21:31 +0000 @@ -68,8 +68,10 @@ #include #include /* #include */ -/* Damn that local process.h! Instead we can define P_WAIT ourselves. */ +/* Damn that local process.h! Instead we can define P_WAIT and + spawnve ourselves. */ #define P_WAIT 1 +extern int spawnve (int, const char *, char *const [], char *const []); #ifndef _USE_LFN #define _USE_LFN 0 @@ -827,7 +829,7 @@ bg = tem2; } if (tty->termscript) - fprintf (tty->termscript, "", face, + fprintf (tty->termscript, "", face, fp->foreground, fp->background, fg, bg); if (fg >= 0 && fg < 16) { @@ -859,12 +861,6 @@ struct frame *sf; unsigned char *conversion_buffer; - /* Do we need to consider conversion of unibyte characters to - multibyte? */ - int convert_unibyte_characters - = (NILP (current_buffer->enable_multibyte_characters) - && unibyte_display_via_language_environment); - /* If terminal_coding does any conversion, use it, otherwise use safe_terminal_coding. We can't use CODING_REQUIRE_ENCODING here because it always returns 1 if terminal_coding.src_multibyte is 1. */ @@ -1180,8 +1176,6 @@ static void IT_note_mode_line_highlight (struct window *w, int x, int mode_line_p) { - struct frame *f = XFRAME (w->frame); - struct tty_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); struct glyph_row *row; if (mode_line_p) @@ -1192,7 +1186,7 @@ if (row->enabled_p) { struct glyph *glyph, *end; - Lisp_Object help, map; + Lisp_Object help; /* Find the glyph under X. */ glyph = (row->glyphs[TEXT_AREA] @@ -1873,6 +1867,8 @@ void x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval) { + extern void set_menu_bar_lines (struct frame *, Lisp_Object, Lisp_Object); + set_menu_bar_lines (f, value, oldval); } @@ -1939,7 +1935,7 @@ already point to the relocated buffer address returned by the Int 10h/AX=FEh call above. DJGPP v2.02 and later sets ScreenPrimary to that address at startup under DOS/V. */ - if (regs.x.es != (ScreenPrimary >> 4) & 0xffff) + if (regs.x.es != ((ScreenPrimary >> 4) & 0xffff)) screen_old_address = ScreenPrimary; screen_virtual_segment = regs.x.es; screen_virtual_offset = regs.x.di; @@ -2056,6 +2052,8 @@ frame colors are reversed. */ initial_screen_colors[0] = FRAME_FOREGROUND_PIXEL (f); initial_screen_colors[1] = FRAME_BACKGROUND_PIXEL (f); + + return Qnil; } void @@ -2071,7 +2069,6 @@ int reverse = EQ (Fcdr (Fassq (Qreverse, f->param_alist)), Qt); int redraw = 0, fg_set = 0, bg_set = 0; unsigned long orig_fg, orig_bg; - Lisp_Object frame_bg, frame_fg; struct tty_display_info *tty = FRAME_TTY (f); /* If we are creating a new frame, begin with the original screen colors @@ -2195,9 +2192,10 @@ IT_set_cursor_type (f, val); if (tty->termscript) fprintf (tty->termscript, "\n", - EQ (val, Qbar) || EQ (val, Qhbar) - || CONSP (val) && (EQ (XCAR (val), Qbar) - || EQ (XCAR (val), Qhbar)) + EQ (val, Qbar) + || EQ (val, Qhbar) + || (CONSP (val) && (EQ (XCAR (val), Qbar) + || EQ (XCAR (val), Qhbar))) ? "bar" : "box"); } else if (EQ (prop, Qtty_type)) @@ -2214,8 +2212,6 @@ the current frame colors. */ if (reverse) { - Lisp_Object frame; - if (!fg_set) { FRAME_FOREGROUND_PIXEL (f) = orig_bg; @@ -2532,11 +2528,11 @@ struct dos_keyboard_map *keyboard_map; } keyboard_layout_list[] = { - 1, &us_keyboard, - 33, &fr_keyboard, - 39, &it_keyboard, - 45, &dk_keyboard, - 81, &jp_keyboard + { 1, &us_keyboard }, + { 33, &fr_keyboard }, + { 39, &it_keyboard }, + { 45, &dk_keyboard }, + { 81, &jp_keyboard } }; static struct dos_keyboard_map *keyboard; @@ -2581,17 +2577,17 @@ unsigned char keypad_code; /* keypad code */ unsigned char editkey_code; /* edit key */ } keypad_translate_map[] = { - '0', '0', 0xb0, /* kp-0 */ 0x63, /* insert */ - '1', '1', 0xb1, /* kp-1 */ 0x57, /* end */ - '2', '2', 0xb2, /* kp-2 */ 0x54, /* down */ - '3', '3', 0xb3, /* kp-3 */ 0x56, /* next */ - '4', '4', 0xb4, /* kp-4 */ 0x51, /* left */ - '5', '5', 0xb5, /* kp-5 */ 0xb5, /* kp-5 */ - '6', '6', 0xb6, /* kp-6 */ 0x53, /* right */ - '7', '7', 0xb7, /* kp-7 */ 0x50, /* home */ - '8', '8', 0xb8, /* kp-8 */ 0x52, /* up */ - '9', '9', 0xb9, /* kp-9 */ 0x55, /* prior */ - '.', '-', 0xae, /* kp-decimal */ 0xff /* delete */ + { '0', '0', 0xb0, /* kp-0 */ 0x63 /* insert */ }, + { '1', '1', 0xb1, /* kp-1 */ 0x57 /* end */ }, + { '2', '2', 0xb2, /* kp-2 */ 0x54 /* down */ }, + { '3', '3', 0xb3, /* kp-3 */ 0x56 /* next */ }, + { '4', '4', 0xb4, /* kp-4 */ 0x51 /* left */ }, + { '5', '5', 0xb5, /* kp-5 */ 0xb5 /* kp-5 */ }, + { '6', '6', 0xb6, /* kp-6 */ 0x53 /* right */ }, + { '7', '7', 0xb7, /* kp-7 */ 0x50 /* home */ }, + { '8', '8', 0xb8, /* kp-8 */ 0x52 /* up */ }, + { '9', '9', 0xb9, /* kp-9 */ 0x55 /* prior */ }, + { '.', '-', 0xae, /* kp-decimal */ 0xff /* delete */} }; static struct @@ -2599,11 +2595,11 @@ unsigned char char_code; /* normal code */ unsigned char keypad_code; /* keypad code */ } grey_key_translate_map[] = { - '/', 0xaf, /* kp-decimal */ - '*', 0xaa, /* kp-multiply */ - '-', 0xad, /* kp-subtract */ - '+', 0xab, /* kp-add */ - '\r', 0x8d /* kp-enter */ + { '/', 0xaf /* kp-decimal */ }, + { '*', 0xaa /* kp-multiply */ }, + { '-', 0xad /* kp-subtract */ }, + { '+', 0xab /* kp-add */ }, + { '\r', 0x8d /* kp-enter */ } }; static unsigned short @@ -3129,7 +3125,6 @@ break; } - make_event: if (code == 0) continue; @@ -3237,14 +3232,14 @@ /* If only one button is pressed, wait 100 msec and check again. This way, Speedy Gonzales isn't punished, while the slow get their chance. */ - if (press && mouse_pressed (1-but, &x2, &y2) - || !press && mouse_released (1-but, &x2, &y2)) + if ((press && mouse_pressed (1-but, &x2, &y2)) + || (!press && mouse_released (1-but, &x2, &y2))) button_num = 2; else { delay (100); - if (press && mouse_pressed (1-but, &x2, &y2) - || !press && mouse_released (1-but, &x2, &y2)) + if ((press && mouse_pressed (1-but, &x2, &y2)) + || (!press && mouse_released (1-but, &x2, &y2))) button_num = 2; } } @@ -3680,10 +3675,12 @@ if (0 <= dy && dy < state[i].menu->count) { if (!state[i].menu->submenu[dy]) - if (state[i].menu->panenumber[dy]) - result = XM_SUCCESS; - else - result = XM_IA_SELECT; + { + if (state[i].menu->panenumber[dy]) + result = XM_SUCCESS; + else + result = XM_IA_SELECT; + } *pane = state[i].pane - 1; *selidx = dy; /* We hit some part of a menu, so drop extra menus that @@ -4181,7 +4178,7 @@ /* If we are called for the initial terminal, it's too early to do anything, and termscript isn't set up. */ if (tty->terminal->type == output_initial) - return; + return 2; break_stat = getcbrk (); setcbrk (0); @@ -4367,7 +4364,7 @@ result = 0; /* emulate Unixy shell behavior with empty cmd line */ } else - result = spawnve (P_WAIT, argv[0], argv, envv); + result = spawnve (P_WAIT, argv[0], (char **)argv, envv); dup2 (inbak, 0); dup2 (outbak, 1); === modified file 'src/unexcoff.c' --- src/unexcoff.c 2010-08-05 17:11:32 +0000 +++ src/unexcoff.c 2010-08-13 10:29:48 +0000 @@ -74,12 +74,8 @@ * of Dell Computer Corporation. james@bigtex.cactus.org. */ -#ifndef emacs -#define PERROR(arg) perror (arg); return -1 -#else #include #define PERROR(file) report_error (file, new) -#endif #ifndef CANNOT_DUMP /* all rest of file! */ @@ -132,7 +128,6 @@ #endif -extern char *start_of_text (); /* Start of text */ extern char *start_of_data (); /* Start of initialized data */ static long block_copy_start; /* Old executable start point */ @@ -155,8 +150,6 @@ #define ADDR_CORRECT(x) ((char *)(x) - (char*)0) -#ifdef emacs - #include #include "lisp.h" @@ -169,7 +162,6 @@ close (fd); report_file_error ("Cannot unexec", Fcons (build_string (file), Qnil)); } -#endif /* emacs */ #define ERROR0(msg) report_error_1 (new, msg, 0, 0); return -1 #define ERROR1(msg,x) report_error_1 (new, msg, x, 0); return -1 @@ -182,12 +174,7 @@ int a1, a2; { close (fd); -#ifdef emacs error (msg, a1, a2); -#else - fprintf (stderr, msg, a1, a2); - fprintf (stderr, "\n"); -#endif } static int make_hdr (); @@ -319,9 +306,6 @@ to correspond to what we want to dump. */ f_hdr.f_flags |= (F_RELFLG | F_EXEC); - f_ohdr.text_start = (long) start_of_text (); - f_ohdr.tsize = data_start - f_ohdr.text_start; - f_ohdr.data_start = data_start; f_ohdr.dsize = bss_start - f_ohdr.data_start; f_ohdr.bsize = bss_end - bss_start; f_thdr.s_size = f_ohdr.tsize; @@ -417,16 +401,6 @@ nwrite = pagesize; write (new, zeros, nwrite); } -#if 0 /* Now that we have can ask `write' to write more than a page, - it is legit for write do less than the whole amount specified. */ - else if (nwrite != ret) - { - sprintf (buf, - "unexec write failure: addr 0x%x, fileno %d, size 0x%x, wrote 0x%x, errno %d", - ptr, new, nwrite, ret, errno); - PERROR (buf); - } -#endif i += nwrite; ptr += nwrite; } @@ -606,21 +580,6 @@ return 0; } -extern unsigned start __asm__ ("start"); - -/* - * Return the address of the start of the text segment prior to - * doing an unexec. After unexec the return value is undefined. - * See crt0.c for further explanation and _start. - * - */ - -char * -start_of_text (void) -{ - return ((char *) &start); -} - /* **************************************************************** * unexec * === modified file 'src/w16select.c' --- src/w16select.c 2010-07-08 21:25:08 +0000 +++ src/w16select.c 2010-08-13 09:21:31 +0000 @@ -456,7 +456,7 @@ (Lisp_Object string, Lisp_Object frame) { unsigned ok = 1, put_status = 0; - int nbytes, charset_info, no_crlf_conversion; + int nbytes, no_crlf_conversion; unsigned char *src, *dst = NULL; CHECK_STRING (string); @@ -494,9 +494,7 @@ { /* We must encode contents of STRING according to what clipboard-coding-system specifies. */ - int bufsize; struct coding_system coding; - unsigned char *htext2; Lisp_Object coding_system = NILP (Vnext_selection_coding_system) ? Vselection_coding_system : Vnext_selection_coding_system; @@ -567,7 +565,7 @@ unsigned data_size, truelen; unsigned char *htext = NULL; Lisp_Object ret = Qnil; - int no_crlf_conversion, require_decoding = 0; + int require_decoding = 0; if (NILP (frame)) frame = Fselected_frame (); @@ -608,8 +606,6 @@ } if (require_decoding) { - int bufsize; - unsigned char *buf; struct coding_system coding; Lisp_Object coding_system = Vnext_selection_coding_system; === modified file 'src/xmenu.c' --- src/xmenu.c 2010-08-11 12:34:46 +0000 +++ src/xmenu.c 2010-08-13 08:32:13 +0000 @@ -2243,7 +2243,7 @@ Lisp_Object xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps, - Lisp_Object title, char **error, EMACS_UINT timestamp) + Lisp_Object title, const char **error, EMACS_UINT timestamp) { Window root; XMenu *menu; ------------------------------------------------------------ revno: 101068 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 11:03:19 +0000 message: Optimizations for gnus-sync.el. From Ted Zlatanov . * gnus-sync.el: Add docs about gnus-sync-backend possibilities. (gnus-sync-save): Remove unnecessary message. (gnus-sync-read): Optimize and show what groups were skipped. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 10:58:21 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 11:03:19 +0000 @@ -1,5 +1,14 @@ 2010-08-12 Teodor Zlatanov + Optimizations for gnus-sync.el. + + * gnus-sync.el: Add docs about gnus-sync-backend + possibilities. + (gnus-sync-save): Remove unnecessary message. + (gnus-sync-read): Optimize and show what groups were skipped. + +2010-08-12 Teodor Zlatanov + Minor bug fixes for gnus-sync.el. * gnus-sync.el (gnus-sync-unload-hook, gnus-sync-install-hooks): Don't === modified file 'lisp/gnus/gnus-sync.el' --- lisp/gnus/gnus-sync.el 2010-08-13 10:58:21 +0000 +++ lisp/gnus/gnus-sync.el 2010-08-13 11:03:19 +0000 @@ -27,6 +27,11 @@ ;; Put this in your startup file (~/.gnus.el for instance) +;; possibilities for gnus-sync-backend: +;; Tramp over SSH: /ssh:user@host:/path/to/filename +;; Tramp over IMAP: /imaps:user@yourhosthere.com:/INBOX.test/filename +;; ...or any other file Tramp and Emacs can handle... + ;; (setq gnus-sync-backend `("/remote:/path.gpg") ; will use Tramp+EPA if loaded ;; gnus-sync-global-vars `(gnus-newsrc-last-checked-date) ;; gnus-sync-newsrc-groups `("nntp" "nnrss") @@ -85,7 +90,6 @@ (defun gnus-sync-save () "Save the Gnus sync data to the backend." (interactive) - (gnus-message 6 "Saving the Gnus sync data") (cond ((stringp gnus-sync-backend) (gnus-message 7 "gnus-sync: saving to backend %s" gnus-sync-backend) @@ -162,21 +166,31 @@ (load gnus-sync-backend nil t) (error (error "Error in %s: %s" gnus-sync-backend (cadr var))))) - (let ((valid-nodes - (loop for node in gnus-sync-newsrc-loader - if (gnus-gethash (car node) gnus-newsrc-hashtb) - collect node))) - (dolist (node valid-nodes) - (loop for store in (cdr node) - do (setf (nth (car store) - (assoc (car node) gnus-newsrc-alist)) + (let ((valid-count 0) + invalid-groups) + (dolist (node gnus-sync-newsrc-loader) + (if (gnus-gethash (car node) gnus-newsrc-hashtb) + (progn + (incf valid-count) + (loop for store in (cdr node) + do (setf (nth (car store) + (assoc (car node) gnus-newsrc-alist)) (cdr store)))) + (push (car node) invalid-groups))) (gnus-message 7 "gnus-sync: loaded %d groups (out of %d) from %s" - (length valid-nodes) - (length gnus-sync-newsrc-loader) + valid-count (length gnus-sync-newsrc-loader) gnus-sync-backend) + (when invalid-groups + (gnus-message + 7 + "gnus-sync: skipped %d groups (out of %d) from %s" + (length invalid-groups) + (length gnus-sync-newsrc-loader) + gnus-sync-backend) + (gnus-message 9 "gnus-sync: skipped groups: %s" + (mapconcat 'identity invalid-groups ", "))) (setq gnus-sync-newsrc-loader nil))) (nil)) ;; make the hashtable again because the newsrc-alist may have been modified ------------------------------------------------------------ revno: 101067 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:58:21 +0000 message: Minor bug fixes for gnus-sync.el. From Ted Zlatanov . * gnus-sync.el (gnus-sync-unload-hook, gnus-sync-install-hooks): Don't read the sync on get-new-news. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 10:54:05 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 10:58:21 +0000 @@ -2,6 +2,9 @@ Minor bug fixes for gnus-sync.el. + * gnus-sync.el (gnus-sync-unload-hook, gnus-sync-install-hooks): Don't + read the sync on get-new-news. + * gnus-sync.el (gnus-sync-save): Define `variable' so the compiler is quiet. === modified file 'lisp/gnus/gnus-sync.el' --- lisp/gnus/gnus-sync.el 2010-08-13 10:54:05 +0000 +++ lisp/gnus/gnus-sync.el 2010-08-13 10:58:21 +0000 @@ -195,14 +195,14 @@ (defun gnus-sync-install-hooks () "Install the sync hooks." (interactive) - (add-hook 'gnus-get-new-news-hook 'gnus-sync-read) + ;; (add-hook 'gnus-get-new-news-hook 'gnus-sync-read) (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save) - (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) + (add-hook 'gnus-read-newsrc-el-hoo4a 'gnus-sync-read)) (defun gnus-sync-unload-hook () "Uninstall the sync hooks." (interactive) - (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) + ;; (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) (remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save) (remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) ------------------------------------------------------------ revno: 101066 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:54:05 +0000 message: Minor bug fixes for gnus-sync.el. From Ted Zlatanov . * gnus-sync.el (gnus-sync-save): Define `variable' so the compiler is quiet. * gnus-sync.el (gnus-sync-read): Use `gnus-sync-newsrc-offsets' (fix typo). diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 10:44:22 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 10:54:05 +0000 @@ -1,3 +1,12 @@ +2010-08-12 Teodor Zlatanov + + Minor bug fixes for gnus-sync.el. + + * gnus-sync.el (gnus-sync-save): Define `variable' so the compiler is + quiet. + + * gnus-sync.el (gnus-sync-read): Use `gnus-sync-newsrc-offsets' (fix typo). + 2010-07-30 Lawrence Mitchell Make saving and restoring of hidden threads work with overlays. === modified file 'lisp/gnus/gnus-sync.el' --- lisp/gnus/gnus-sync.el 2010-08-13 10:50:01 +0000 +++ lisp/gnus/gnus-sync.el 2010-08-13 10:54:05 +0000 @@ -118,7 +118,8 @@ (print-circle nil) (print-escape-newlines t) (variables (cons 'gnus-sync-newsrc-loader - gnus-sync-global-vars))) + gnus-sync-global-vars)) + variable) (while variables (when (and (boundp (setq variable (pop variables))) (symbol-value variable)) @@ -179,7 +180,7 @@ (setq gnus-sync-newsrc-loader nil))) (nil)) ;; make the hashtable again because the newsrc-alist may have been modified - (when gnus-sync-newsrc-vars + (when gnus-sync-newsrc-offsets (gnus-message 9 "gnus-sync: remaking the newsrc hashtable") (gnus-make-hashtable-from-newsrc-alist)))) ------------------------------------------------------------ revno: 101065 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:50:01 +0000 message: add lisp/gnus/gnus-sync.el diff: === added file 'lisp/gnus/gnus-sync.el' --- lisp/gnus/gnus-sync.el 1970-01-01 00:00:00 +0000 +++ lisp/gnus/gnus-sync.el 2010-08-13 10:50:01 +0000 @@ -0,0 +1,215 @@ +;;; gnus-sync.el --- synchronization facility for Gnus + +;;; Copyright (C) 2010 +;;; Free Software Foundation, Inc. + +;; Author: Ted Zlatanov +;; Keywords: news synchronization nntp nnrss + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This is the gnus-sync.el package. + +;; Put this in your startup file (~/.gnus.el for instance) + +;; (setq gnus-sync-backend `("/remote:/path.gpg") ; will use Tramp+EPA if loaded +;; gnus-sync-global-vars `(gnus-newsrc-last-checked-date) +;; gnus-sync-newsrc-groups `("nntp" "nnrss") +;; gnus-sync-newsrc-vars `(read marks)) + +;; TODO: + +;; - after gnus-sync-read, the message counts are wrong + +;;; Code: + +(eval-when-compile (require 'cl)) +(require 'gnus-util) + +(defgroup gnus-sync nil + "The Gnus synchronization facility." + :version "23.1" + :group 'gnus) + +(defcustom gnus-sync-newsrc-groups `("nntp" "nnrss") + "List of groups to be synchronized in the gnus-newsrc-alist. +The group names are matched, they don't have to be fully +qualified. Typically you would choose all of these. That's the +default because there is no active sync backend by default, so +this setting is harmless until the user chooses a sync backend." + :group 'gnus-sync + :type '(repeat regexp)) + +(defcustom gnus-sync-newsrc-offsets '(2 3) + "List of per-group data to be synchronized." + :group 'gnus-sync + :type '(set (const :tag "Read ranges" 2) + (const :tag "Marks" 3))) + +(defcustom gnus-sync-global-vars nil + "List of global variables to be synchronized. +You may want to sync `gnus-newsrc-last-checked-date' but pretty +much any symbol is fair game. You could additionally sync +`gnus-newsrc-alist', `gnus-server-alist', `gnus-topic-topology', +and `gnus-topic-alist' to cover all the variables in +newsrc.eld (except for `gnus-format-specs' which should not be +synchronized, I believe). Also see `gnus-variable-list'." + :group 'gnus-sync + :type '(repeat (choice (variable :tag "A known variable") + (symbol :tag "Any symbol")))) + +(defcustom gnus-sync-backend nil + "The synchronization backend." + :group 'gnus-sync + :type '(radio (const :format "None" nil) + (string :tag "Sync to a file"))) + +(defvar gnus-sync-newsrc-loader nil + "Carrier for newsrc data") + +(defun gnus-sync-save () +"Save the Gnus sync data to the backend." + (interactive) + (gnus-message 6 "Saving the Gnus sync data") + (cond + ((stringp gnus-sync-backend) + (gnus-message 7 "gnus-sync: saving to backend %s" gnus-sync-backend) + ;; populate gnus-sync-newsrc-loader from all but the first dummy + ;; entry in gnus-newsrc-alist whose group matches any of the + ;; gnus-sync-newsrc-groups + (let ((gnus-sync-newsrc-loader + (loop for entry in (cdr gnus-newsrc-alist) + when (gnus-grep-in-list + (car entry) ;the group name + gnus-sync-newsrc-groups) + collect (cons (car entry) + (mapcar (lambda (offset) + (cons offset (nth offset entry))) + gnus-sync-newsrc-offsets))))) + + (with-temp-file gnus-sync-backend + (progn + (let ((coding-system-for-write gnus-ding-file-coding-system) + (standard-output (current-buffer))) + (princ (format ";; -*- mode:emacs-lisp; coding: %s; -*-\n" + gnus-ding-file-coding-system)) + (princ ";; Gnus sync data v. 0.0.1\n") + (let* ((print-quoted t) + (print-readably t) + (print-escape-multibyte nil) + (print-escape-nonascii t) + (print-length nil) + (print-level nil) + (print-circle nil) + (print-escape-newlines t) + (variables (cons 'gnus-sync-newsrc-loader + gnus-sync-global-vars))) + (while variables + (when (and (boundp (setq variable (pop variables))) + (symbol-value variable)) + (princ "\n(setq ") + (princ (symbol-name variable)) + (princ " '") + (prin1 (symbol-value variable)) + (princ ")\n")))) + (gnus-message + 7 + "gnus-sync: stored variables %s and %d groups in %s" + gnus-sync-global-vars + (length gnus-sync-newsrc-loader) + gnus-sync-backend) + + ;; Idea from Dan Christensen + ;; Save the .eld file with extra line breaks. + (gnus-message 8 "gnus-sync: adding whitespace to %s" + gnus-sync-backend) + (save-excursion + (goto-char (point-min)) + (while (re-search-forward "^(\\|(\\\"" nil t) + (replace-match "\n\\&" t)) + (goto-char (point-min)) + (while (re-search-forward " $" nil t) + (replace-match "" t t)))))))) + ;; the pass-through case: gnus-sync-backend is not a known choice + (nil))) + +(defun gnus-sync-read () +"Load the Gnus sync data from the backend." + (interactive) + (when gnus-sync-backend + (gnus-message 7 "gnus-sync: loading from backend %s" gnus-sync-backend) + (cond ((stringp gnus-sync-backend) + ;; read data here... + (if (or debug-on-error debug-on-quit) + (load gnus-sync-backend nil t) + (condition-case var + (load gnus-sync-backend nil t) + (error + (error "Error in %s: %s" gnus-sync-backend (cadr var))))) + (let ((valid-nodes + (loop for node in gnus-sync-newsrc-loader + if (gnus-gethash (car node) gnus-newsrc-hashtb) + collect node))) + (dolist (node valid-nodes) + (loop for store in (cdr node) + do (setf (nth (car store) + (assoc (car node) gnus-newsrc-alist)) + (cdr store)))) + (gnus-message + 7 + "gnus-sync: loaded %d groups (out of %d) from %s" + (length valid-nodes) + (length gnus-sync-newsrc-loader) + gnus-sync-backend) + (setq gnus-sync-newsrc-loader nil))) + (nil)) + ;; make the hashtable again because the newsrc-alist may have been modified + (when gnus-sync-newsrc-vars + (gnus-message 9 "gnus-sync: remaking the newsrc hashtable") + (gnus-make-hashtable-from-newsrc-alist)))) + +;;;###autoload +(defun gnus-sync-initialize () +"Initialize the Gnus sync facility." + (interactive) + (gnus-message 5 "Initializing the sync facility") + (gnus-sync-install-hooks)) + +;;;###autoload +(defun gnus-sync-install-hooks () + "Install the sync hooks." + (interactive) + (add-hook 'gnus-get-new-news-hook 'gnus-sync-read) + (add-hook 'gnus-save-newsrc-hook 'gnus-sync-save) + (add-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) + +(defun gnus-sync-unload-hook () + "Uninstall the sync hooks." + (interactive) + (remove-hook 'gnus-get-new-news-hook 'gnus-sync-read) + (remove-hook 'gnus-save-newsrc-hook 'gnus-sync-save) + (remove-hook 'gnus-read-newsrc-el-hook 'gnus-sync-read)) + +(add-hook 'gnus-sync-unload-hook 'gnus-sync-unload-hook) + +;; this is harmless by default, until the gnus-sync-backend is set +(gnus-sync-initialize) + +(provide 'gnus-sync) + +;;; gnus-sync.el ends here ------------------------------------------------------------ revno: 101064 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:44:22 +0000 message: Make saving and restoring of hidden threads work with overlays. Patch applied by Ted Zlatanov. * gnus-sum.el (gnus-hidden-threads-configuration) (gnus-restore-hidden-threads-configuration): Update to deal with text properties, rather than searching for a magic character. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 10:39:16 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 10:44:22 +0000 @@ -1,5 +1,16 @@ +2010-07-30 Lawrence Mitchell + + Make saving and restoring of hidden threads work with overlays. + Patch applied by Ted Zlatanov. + + * gnus-sum.el (gnus-hidden-threads-configuration) + (gnus-restore-hidden-threads-configuration): Update to deal with text + properties, rather than searching for a magic character. + 2010-08-12 Teodor Zlatanov + New gnus-sync.el library for synchronization of marks. + * gnus-sync.el: New library for synchronization of marks. * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-07-20 01:19:04 +0000 +++ lisp/gnus/gnus-sum.el 2010-08-13 10:44:22 +0000 @@ -3406,8 +3406,10 @@ (save-excursion (let (config) (goto-char (point-min)) - (while (search-forward "\r" nil t) - (push (1- (point)) config)) + (while (not (eobp)) + (when (eq (get-char-property (point-at-eol) 'invisible) 'gnus-sum) + (push (save-excursion (forward-line 0) (point)) config)) + (forward-line 1)) config))) (defun gnus-restore-hidden-threads-configuration (config) @@ -3415,10 +3417,8 @@ (save-excursion (let (point (inhibit-read-only t)) (while (setq point (pop config)) - (when (and (< point (point-max)) - (goto-char point) - (eq (char-after) ?\n)) - (subst-char-in-region point (1+ point) ?\n ?\r)))))) + (goto-char point) + (gnus-summary-hide-thread))))) ;; Various summary mode internalish functions. ------------------------------------------------------------ revno: 101063 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:39:16 +0000 message: Add new gnus-sync.el library. From Ted Zlatanov . * gnus-registry.el (gnus-registry-follow-group-p): Use `gnus-grep-in-list'. * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and renamed from `gnus-registry-grep-in-list'. * gnus-sync.el: New library for synchronization of marks. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-13 10:32:35 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 10:39:16 +0000 @@ -1,5 +1,12 @@ 2010-08-12 Teodor Zlatanov + * gnus-sync.el: New library for synchronization of marks. + + * gnus-util.el (gnus-grep-in-list): Moved from gnus-registry.el and + renamed from `gnus-registry-grep-in-list'. + + * gnus-registry.el (gnus-registry-follow-group-p): Use `gnus-grep-in-list'. + * gnus-start.el (gnus-start-draft-setup): Make it interactive. 2010-08-06 Katsumi Yamaoka === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2010-03-23 07:37:09 +0000 +++ lisp/gnus/gnus-registry.el 2010-08-13 10:39:16 +0000 @@ -661,10 +661,10 @@ "Determines if a group name should be followed. Consults `gnus-registry-unfollowed-groups' and `nnmail-split-fancy-with-parent-ignore-groups'." - (not (or (gnus-registry-grep-in-list + (not (or (gnus-grep-in-list group gnus-registry-unfollowed-groups) - (gnus-registry-grep-in-list + (gnus-grep-in-list group nnmail-split-fancy-with-parent-ignore-groups)))) @@ -745,14 +745,6 @@ (assoc article (gnus-data-list nil))))) nil)) -(defun gnus-registry-grep-in-list (word list) -"Find if a WORD matches any regular expression in the given LIST." - (when (and word list) - (catch 'found - (dolist (r list) - (when (string-match r word) - (throw 'found r)))))) - (defun gnus-registry-do-marks (type function) "For each known mark, call FUNCTION for each cell of type TYPE. === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2010-06-12 17:26:40 +0000 +++ lisp/gnus/gnus-util.el 2010-08-13 10:39:16 +0000 @@ -1297,6 +1297,14 @@ (setq alist (delq entry alist))) alist))) +(defun gnus-grep-in-list (word list) + "Find if a WORD matches any regular expression in the given LIST." + (when (and word list) + (catch 'found + (dolist (r list) + (when (string-match r word) + (throw 'found r)))))) + (defmacro gnus-pull (key alist &optional assoc-p) "Modify ALIST to be without KEY." (unless (symbolp alist) ------------------------------------------------------------ revno: 101062 committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-08-13 10:32:35 +0000 message: Make gnus-start-draft-setup interactive. From Ted Zlatanov . * gnus-start.el (gnus-start-draft-setup): Make it interactive. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-08-06 03:43:29 +0000 +++ lisp/gnus/ChangeLog 2010-08-13 10:32:35 +0000 @@ -1,3 +1,7 @@ +2010-08-12 Teodor Zlatanov + + * gnus-start.el (gnus-start-draft-setup): Make it interactive. + 2010-08-06 Katsumi Yamaoka * rfc2047.el (rfc2047-encode): Use utf-8 as a last resort if === modified file 'lisp/gnus/gnus-start.el' --- lisp/gnus/gnus-start.el 2010-05-20 23:43:54 +0000 +++ lisp/gnus/gnus-start.el 2010-08-13 10:32:35 +0000 @@ -813,6 +813,7 @@ (gnus-run-hooks 'gnus-started-hook)))))) (defun gnus-start-draft-setup () + (interactive) "Make sure the draft group exists." (gnus-request-create-group "drafts" '(nndraft "")) (unless (gnus-group-entry "nndraft:drafts") ------------------------------------------------------------ revno: 101061 committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2010-08-13 11:10:05 +0300 message: Shut up compiler warnings due to "char *" and "const char *". w32menu.c (add_menu_item): Use explicit cast to "char *". (name_is_separator): Make `name' and `start' be "const char *". diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-08-12 14:44:16 +0000 +++ src/ChangeLog 2010-08-13 08:10:05 +0000 @@ -1,3 +1,8 @@ +2010-08-13 Eli Zaretskii + + * w32menu.c (add_menu_item, name_is_separator): Shut up compiler + warnings due to mixing of "char *" and "const char *". + 2010-08-12 Stefan Monnier Introduce a new comment style "c" flag. === modified file 'src/w32menu.c' --- src/w32menu.c 2010-08-11 12:34:46 +0000 +++ src/w32menu.c 2010-08-13 08:10:05 +0000 @@ -1280,9 +1280,9 @@ /* Is this item a separator? */ static int -name_is_separator (char *name) +name_is_separator (const char *name) { - char *start = name; + const char *start = name; /* Check if name string consists of only dashes ('-'). */ while (*name == '-') name++; @@ -1360,7 +1360,7 @@ strcat (out_string, wv->key); } else - out_string = wv->name; + out_string = (char *)wv->name; /* Quote any special characters within the menu item's text and key binding. */ ------------------------------------------------------------ revno: 101060 committer: Jan D branch nick: trunk timestamp: Fri 2010-08-13 08:57:12 +0200 message: Fix typo. diff: === modified file 'etc/NEWS' --- etc/NEWS 2010-08-12 14:44:16 +0000 +++ etc/NEWS 2010-08-13 06:57:12 +0000 @@ -106,7 +106,7 @@ ** GTK tool bars can be placed on the left/right or top/bottom of the frame. The frame-parameter tool-bar-position controls this. It takes the values -top, left, tight or bottom. The Options => Show/Hide menu has entries +top, left, right or bottom. The Options => Show/Hide menu has entries for this. ** The colors for selected text (the region face) are taken from the GTK ------------------------------------------------------------ Use --include-merges or -n0 to see merged revisions.