Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 102688. ------------------------------------------------------------ revno: 102688 committer: Stefan Monnier branch nick: trunk timestamp: Sun 2010-12-19 00:43:42 -0500 message: Minor clean up to silence some gcc warnings. * src/window.c (Fset_window_buffer): * src/xterm.c (x_set_frame_alpha): Restructure code to silence compiler warning. (handle_one_xevent): Remove unused var `p'. (do_ewmh_fullscreen): Remove unused var `lval'. (xembed_set_info): Remove unused var `atom'. * src/textprop.c (Fremove_list_of_text_properties): Add braces to silence compiler warning. * src/fontset.c (fontset_id_valid_p, dump_fontset): * src/ftfont.c (ftfont_drive_otf): Modernize k&r declaration. * src/eval.c (Feval, Ffuncall): Avoid unneeded gotos. * src/dispnew.c (update_frame, update_frame_1): Compile the `do_pause' label only when it's used. * src/image.c (x_create_bitmap_from_xpm_data): * src/dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like its callers. * src/coding.c (detect_coding_utf_16): Remove unused vars `src_base' and `consumed_chars'. (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. (decode_coding_emacs_mule): Remove unused label `retry'. (detect_eol): Add parens to silence compiler warning. * src/alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where it's used to silence the compiler. (make_number): Modernize k&r declaration. (mark_char_table): Add parens to silence compiler warning. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2010-12-17 04:04:06 +0000 +++ src/ChangeLog 2010-12-19 05:43:42 +0000 @@ -1,3 +1,32 @@ +2010-12-19 Stefan Monnier + + Minor clean up to silence some gcc warnings. + * window.c (Fset_window_buffer): + * xterm.c (x_set_frame_alpha): Restructure code to silence + compiler warning. + (handle_one_xevent): Remove unused var `p'. + (do_ewmh_fullscreen): Remove unused var `lval'. + (xembed_set_info): Remove unused var `atom'. + * textprop.c (Fremove_list_of_text_properties): Add braces to silence + compiler warning. + * fontset.c (fontset_id_valid_p, dump_fontset): + * ftfont.c (ftfont_drive_otf): Modernize k&r declaration. + * eval.c (Feval, Ffuncall): Avoid unneeded gotos. + * dispnew.c (update_frame, update_frame_1): Compile the `do_pause' + label only when it's used. + * image.c (x_create_bitmap_from_xpm_data): + * dispextern.h (x_create_bitmap_from_xpm_data): Use const char** like + its callers. + * coding.c (detect_coding_utf_16): Remove unused vars `src_base' and + `consumed_chars'. + (DECODE_EMACS_MULE_21_COMPOSITION): Remove unused var `charbuf_base'. + (decode_coding_emacs_mule): Remove unused label `retry'. + (detect_eol): Add parens to silence compiler warning. + * alloc.c (bytes_used_when_reconsidered): Move to the #ifdef where + it's used to silence the compiler. + (make_number): Modernize k&r declaration. + (mark_char_table): Add parens to silence compiler warning. + 2010-12-17 Chong Yidong * keyboard.c (parse_tool_bar_item): Allow menu separators in @@ -12,8 +41,8 @@ (xg_update_menu_item, xg_tool_bar_menu_proxy) (xg_show_toolbar_item, update_frame_tool_bar): Use it. (separator_names, xg_separator_p): Move to keyboard.c. - (create_menus, xg_update_submenu, update_frame_tool_bar): Use - menu_separator_name_p. + (create_menus, xg_update_submenu, update_frame_tool_bar): + Use menu_separator_name_p. * nsmenu.m (name_is_separator): Function deleted. (addItemWithWidgetValue): Use menu_separator_name_p. @@ -947,8 +976,8 @@ strings and R2L glyph rows. Fix comments. (note_mouse_highlight): When bidi reordering is turned on in a buffer, call next-single-property-change and - previous-single-property-change with last argument nil. Clear - mouse highlight when mouse pointer is in a R2L row on the stretch + previous-single-property-change with last argument nil. + Clear mouse highlight when mouse pointer is in a R2L row on the stretch glyph that stands for no text beyond the line end. (row_containing_pos): Don't return too early when CHARPOS is in a bidi-reordered continued line. Return immediately when the first @@ -1391,8 +1420,8 @@ 2010-09-30 Lars Magne Ingebrigtsen - * eval.c (Fbacktrace): Don't overwrite print-level on exit. Also - only override Vprint_level if it isn't already bound, and increase + * eval.c (Fbacktrace): Don't overwrite print-level on exit. + Also only override Vprint_level if it isn't already bound, and increase the level to 8 to produce more useful backtraces for bug reports. 2010-09-30 Dan Nicolaescu @@ -1531,7 +1560,7 @@ 2010-09-27 Lars Magne Ingebrigtsen - * gnutls.c (gnutls_log_function): Added more debugging. + * gnutls.c (gnutls_log_function): Add more debugging. (emacs_gnutls_read): Don't infloop while reading. 2010-09-27 Kenichi Handa @@ -1573,7 +1602,7 @@ * process.c (gpm_wait_mask, max_gpm_desc): Remove. (write_mask): New variable. - (max_input_desc): Renamed from max_keyboard_desc. + (max_input_desc): Rename from max_keyboard_desc. (fd_callback_info): New variable. (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): New functions. @@ -2192,7 +2221,7 @@ 2010-09-14 Lars Magne Ingebrigtsen - * xml.c (parse_buffer): Renamed to parse_string(), since that's + * xml.c (parse_buffer): Rename to parse_string(), since that's what it does. (parse_string): Return nil when the document can't be parsed. @@ -3350,7 +3379,7 @@ (xg_height_or_width_changed): Use FRAME_TOTAL_PIXEL_WIDTH. (xg_create_frame_widgets): Create a hobox for placing widgets vertically. Use gtk_box_pack_start. - (xg_height_or_width_changed): Renamed from xg_height_changed. + (xg_height_or_width_changed): Rename from xg_height_changed. (x_wm_set_size_hint): Add FRAME_TOOLBAR_WIDTH to base_width. (xg_update_frame_menubar, free_frame_menubar): Change to xg_height_or_width_changed. @@ -3990,7 +4019,7 @@ (Ffont_get): If KEY is :otf and the font-object doesn't have the property, get the property value dynamically. (Ffont_put): Accept font-entity and font-object too. - (Ffont_get_glyhphs): Renamed from Fget_font_glyphs. Arguments and + (Ffont_get_glyhphs): Rename from Fget_font_glyphs. Arguments and return value changed. (syms_of_font): Adjust for the above change. @@ -4063,7 +4092,7 @@ * doprnt.c (doprnt): Take a va_list argument instead of count and pointer. * eval.c (error): Change to a standard-C variadic function. - * xdisp.c (vmessage): Renamed from message, made static, and + * xdisp.c (vmessage): Rename from message, made static, and changed to take a va_list argument. (message): New variadic wrapper. (message_nolog): Now a variadic function, calling vmessage. @@ -5076,8 +5105,8 @@ * xdisp.c (try_scrolling): Compute the limit for searching point in forward scroll from scroll_max, instead of an arbitrary limit - of 10 screen lines. See - http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html + of 10 screen lines. + See http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00766.html and http://lists.gnu.org/archive/html/emacs-devel/2010-06/msg00773.html for details. @@ -5325,8 +5354,8 @@ Fix cursor motion in bidi-reordered continued lines. * xdisp.c (try_cursor_movement): Backup to non-continuation line only after finding point's row. Fix the logic. Rewrite the loop - over continuation lines in bidi-reordered buffers. Return - CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, + over continuation lines in bidi-reordered buffers. + Return CURSOR_MOVEMENT_MUST_SCROLL upon failure to find a suitable row, rather than CURSOR_MOVEMENT_CANNOT_BE_USED. 2010-05-28 Michael Albinus @@ -6445,13 +6474,13 @@ store_config_changed_event. (parse_settings): Rename from parse_xft_settings. Read non-xft xsettings outside #ifdef HAVE_XFT. - (read_settings): Renamed from read_xft_settings. + (read_settings): Rename from read_xft_settings. (apply_xft_settings): Take current settings as parameter. Do not call read_(xft)_settings. (read_and_apply_settings): New function. (xft_settings_event): Do non-xft stuff out of HAVE_XFT. Call read_and_apply_settings if there are settings to be read. - (init_xsettings): Renamed from init_xfd_settings. + (init_xsettings): Rename from init_xfd_settings. Call read_and_apply_settings unconditionally. (xsettings_initialize): Call init_xsettings. (Ftool_bar_get_system_style): New function. @@ -9607,7 +9636,7 @@ * makefile.w32-in ($(BLD)/doc.$(O)): Depend on buildobj.h, not on $(SRC)/buildobj.h. - (buildobj.h): Renamed from $(SRC)/buildobj.h. + (buildobj.h): Rename from $(SRC)/buildobj.h. (make-buildobj-CMD, make-buildobj-SH): Create buildobj.h, not $(SRC)/buildobj.h. (clean): Add buildobj.h. @@ -12651,12 +12680,12 @@ 2008-12-13 Kenichi Handa - * font.c (font_rescale_ratio): Moved from xfaces.c. + * font.c (font_rescale_ratio): Move from xfaces.c. Argument type changed. Handle a font-spec too. (font_score): Check Vface_font_rescale_alist. (font_open_entity): Likewise. (Bug#1547) - * xfaces.c (font_rescale_ratio): Moved to font.c. + * xfaces.c (font_rescale_ratio): Move to font.c. 2008-12-13 Chong Yidong @@ -12674,7 +12703,7 @@ 2008-12-11 Chong Yidong - * term.c (tty_free_frame_resources): Renamed from delete_tty_output; + * term.c (tty_free_frame_resources): Rename from delete_tty_output; all callers changed. Call free_frame_faces to free the face cache. 2008-12-11 Jason Rumney @@ -18004,7 +18033,7 @@ (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC) (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros. (struct font_spec, struct font_entity): New structs. - (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h. + (FONT_ENCODING_NOT_DECIDED): Move from fontset.h. (struct font): Many members from old "struct font_info" moved to here. Members font and entity deleted. (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for @@ -18012,7 +18041,7 @@ (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT) (CHECK_FONT_GET_OBJECT): Likewise. (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros. - (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h. + (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move from font.h. (struct font_driver): New members case_sensitive anc check. Type of the member list and open changed. (enable_font_backend, font_symbolic_weight, font_symbolic_slant) @@ -18024,7 +18053,7 @@ (enable_font_backend): Delete it. (Qfont_spec, Qfont_entity, Qfont_object): New variables. (CHECK_VALIDATE_FONT_SPEC): Delete it. - (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved to font.h. + (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Move to font.h. (null_string): Delete it. (null_vector): Make it static. (font_family_alist): Delete it. @@ -18032,7 +18061,7 @@ (QCextra, QClanguage): Delete it. (QClang, QCavgwidth, QCfont_entity, QCfc_unknown_spec): New variables. (font_make_spec, font_make_entity, font_make_object) - (font_intern_prop): Renamed from intern_downcase. Don't downcase + (font_intern_prop): Rename from intern_downcase. Don't downcase the string. Callers changed. (font_pixel_size): Adjust for the format change of font-related objects. @@ -18052,7 +18081,7 @@ (font_expand_wildcards, font_parse_xlfd, font_unparse_xlfd) (font_parse_fcname, font_unparse_fcname) (font_prepare_composition): Likewise. - (font_parse_family_registry): Renamed from font_merge_old_spec. + (font_parse_family_registry): Rename from font_merge_old_spec. (otf_open): Delete the 1st arg entity. (font_otf_capability): Adjust for the above change. (font_score): New arg alternate_families. Adjusted for the change @@ -18080,7 +18109,7 @@ (Ffontp, Ffont_spec, Ffont_get, Ffont_put, Flist_fonts) (Ffont_xlfd_name): Adjust for the change of font-related objects. (Fcopy_font_spec, Fmerge_font_spec): New function. - (Ffont_family_list): Renamed from list-families. + (Ffont_family_list): Rename from list-families. (Finternal_set_font_style_table): Arguments changed. (Ffont_fill_gstring, Ffont_shape_text, Fopen_font) (Ffont_drive_otf, Fquery_font, Ffont_match_p): Adjust for the @@ -18089,7 +18118,7 @@ * fontset.h (struct font_info): Delete it. Most members go to struct font. - (FONT_ENCODING_NOT_DECIDED): Moved to font.h. + (FONT_ENCODING_NOT_DECIDED): Move to font.h. (enum FONT_SPEC_INDEX): Delete it. (font_info, list_fonts_func, load_font_func, query_font_func) (set_frame_fontset_func, find_ccl_program_func) @@ -18131,7 +18160,7 @@ (Fnew_fontset): Use font_unparse_xlfd to generate FONTSET_ASCII (fontset). (new_fontset_from_font_name): Deleted. - (fontset_from_font): Renamed from new_fontset_from_font. Check if + (fontset_from_font): Rename from new_fontset_from_font. Check if a fontset is already created for the font. FIx updating of Vfontset_alias_alist. (fontset_ascii_font): Deleted. @@ -18240,7 +18269,7 @@ by FONTP. (lface_fully_specified_p): Don't check LFACE_AVGWIDTH. (set_lface_from_font_name): Delete it. - (set_lface_from_font): Renamed from + (set_lface_from_font): Rename from set_lface_from_font_and_fontset. Caller changed. Don't set LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable for face. @@ -18281,12 +18310,12 @@ * xfont.c: Include and "ccl.h". (struct xfont_info): New structure. (xfont_query_font): Deleted. - (xfont_find_ccl_program): Renamed from x_find_ccl_program and + (xfont_find_ccl_program): Rename from x_find_ccl_program and moved from xterm.c. (xfont_driver): Adjust for the change of struct font_driver. (compare_font_names): New function. - (xfont_list_pattern): Sort font names case insensitively. Make - font_entity by calling font_make_entity. Avoid auto-scaled fonts. + (xfont_list_pattern): Sort font names case insensitively. + Make font_entity by calling font_make_entity. Avoid auto-scaled fonts. (xfont_list): Return a list, not vector. (xfont_match): If the font doesn't have QCname property, generate a name from the other font properties. @@ -18334,12 +18363,12 @@ (x_draw_composite_glyph_string_foreground): Likewise. (x_draw_glyph_string): Likewise. Use font->underline_position and font->underline_thickness. - (x_new_font): Renamed from x_new_fontset2. + (x_new_font): Rename from x_new_fontset2. (x_new_fontset, x_get_font_info, x_list_fonts): Deleted. (x_check_font): Call `check' method of a font driver. (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font) (x_query_font, x_get_font_repertory): Deleted. - (x_find_ccl_program): Renamed and moved to xfont.c. + (x_find_ccl_program): Rename and moved to xfont.c. (x_redisplay_interface): Adjust for the change of `struct redisplay_interface'. @@ -18364,7 +18393,7 @@ (w32font_close): Don't free struct font. Adjusted for the change of struct w32font_info. (w32font_encode_char, w32font_text_extents, w32font_draw): - Adjusted for the change of struct w32font_info. + Adjust for the change of struct w32font_info. (w32font_draw): Likewise. (w32font_list_internal): Return a list, not vector. (w32font_open_internal): Change the 4th arg to font-object. @@ -19766,11 +19795,11 @@ * xterm.c (handle_one_xevent): For Gtk+ and ConfigureNotify, call xg_frame_resized when the event is for the edit widget. - * gtkutil.h (xg_frame_resized): Renamed from xg_resize_widgets. + * gtkutil.h (xg_frame_resized): Rename from xg_resize_widgets. * gtkutil.c (xg_resize_outer_widget): Only do one of set_geometry or set_char_size. - (xg_frame_resized): Renamed from xg_resize_widgets. Remove all + (xg_frame_resized): Rename from xg_resize_widgets. Remove all operations on widgets here. Just set frame size if needed. (flush_and_sync, x_wm_size_hint_off, xg_pack_tool_bar): New functions. (xg_frame_set_char_size): Call x_wm_size_hint_off before resizing. @@ -22166,7 +22195,7 @@ * font.c (enum xlfd_field_index): Rename XLFD_XXX_SIZE_INDEX to XLFD_XXX_INDEX. (enum xlfd_field_mask): New enum. - (intern_font_field): Changed argument. Change caller. If digits + (intern_font_field): Change argument. Change caller. If digits are followed by non-digits, return a symbol. (font_expand_wildcards): New function. (font_parse_xlfd): Fix wildcard handling. @@ -24906,8 +24935,8 @@ (DECODE_EMACS_MULE_COMPOSITION_RULE_20): Rename from DECODE_EMACS_MULE_COMPOSITION_RULE. Change caller. (DECODE_EMACS_MULE_COMPOSITION_RULE_21): New macro. - (DECODE_EMACS_MULE_21_COMPOSITION): Call - DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation + (DECODE_EMACS_MULE_21_COMPOSITION): + Call DECODE_EMACS_MULE_COMPOSITION_RULE_21. Produce correct annotation sequence. (decode_coding_emacs_mule): Handle composition correctly. Rewind `src' and `consumed_chars' correctly before calling emacs_mule_char. @@ -25328,7 +25357,7 @@ (SUB_CHAR_TABLE_P): Check PVEC_CHAR_TABLE. (GC_SUB_CHAR_TABLE_P): New macro. (Fencode_coding_string, Fdecode_coding_string): Update EXFUN. - (code_convert_string_norecord): Deleted extern. + (code_convert_string_norecord): Delete extern. (init_character_once, syms_of_character, init_charset) (syms_of_composite, Qeq, Fmakehash, insert_from_gap): Extern them. === modified file 'src/alloc.c' --- src/alloc.c 2010-11-27 20:04:57 +0000 +++ src/alloc.c 2010-12-19 05:43:42 +0000 @@ -143,8 +143,6 @@ static __malloc_size_t bytes_used_when_full; -static __malloc_size_t bytes_used_when_reconsidered; - /* Mark, unmark, query mark bit of a Lisp string. S must be a pointer to a struct Lisp_String. */ @@ -1140,6 +1138,8 @@ static void * (*old_realloc_hook) (void *, size_t, const void*); static void (*old_free_hook) (void*, const void*); +static __malloc_size_t bytes_used_when_reconsidered; + /* This function is used as the hook for free to call. */ static void @@ -1491,8 +1491,7 @@ can't create number objects in macros. */ #ifndef make_number Lisp_Object -make_number (n) - EMACS_INT n; +make_number (EMACS_INT n) { Lisp_Object obj; obj.s.val = n; @@ -5270,7 +5269,7 @@ { Lisp_Object val = ptr->contents[i]; - if (INTEGERP (val) || SYMBOLP (val) && XSYMBOL (val)->gcmarkbit) + if (INTEGERP (val) || (SYMBOLP (val) && XSYMBOL (val)->gcmarkbit)) continue; if (SUB_CHAR_TABLE_P (val)) { === modified file 'src/coding.c' --- src/coding.c 2010-11-27 20:04:57 +0000 +++ src/coding.c 2010-12-19 05:43:42 +0000 @@ -1607,10 +1607,9 @@ detect_coding_utf_16 (struct coding_system *coding, struct coding_detection_info *detect_info) { - const unsigned char *src = coding->source, *src_base = src; + const unsigned char *src = coding->source; const unsigned char *src_end = coding->source + coding->src_bytes; int multibytep = coding->src_multibyte; - int consumed_chars = 0; int c1, c2; detect_info->checked |= CATEGORY_MASK_UTF_16; @@ -2277,7 +2276,6 @@ #define DECODE_EMACS_MULE_21_COMPOSITION() \ do { \ enum composition_method method = c - 0xF2; \ - int *charbuf_base = charbuf; \ int nbytes, nchars; \ \ ONE_MORE_BYTE (c); \ @@ -2633,7 +2631,6 @@ } continue; - retry: src = src_base; consumed_chars = consumed_chars_base; continue; @@ -6260,8 +6257,9 @@ { /* The found type is different from what found before. Allow for stray ^M characters in DOS EOL files. */ - if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF - || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) + if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF) + || (eol_seen == EOL_SEEN_CRLF + && this_eol == EOL_SEEN_CR)) eol_seen = EOL_SEEN_CRLF; else { @@ -6276,42 +6274,40 @@ } } else - { - while (src < src_end) - { - c = *src++; - if (c == '\n' || c == '\r') - { - int this_eol; - - if (c == '\n') - this_eol = EOL_SEEN_LF; - else if (src >= src_end || *src != '\n') - this_eol = EOL_SEEN_CR; - else - this_eol = EOL_SEEN_CRLF, src++; - - if (eol_seen == EOL_SEEN_NONE) - /* This is the first end-of-line. */ - eol_seen = this_eol; - else if (eol_seen != this_eol) - { - /* The found type is different from what found before. - Allow for stray ^M characters in DOS EOL files. */ - if (eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF - || eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR) - eol_seen = EOL_SEEN_CRLF; - else - { - eol_seen = EOL_SEEN_LF; - break; - } - } - if (++total == MAX_EOL_CHECK_COUNT) - break; - } - } - } + while (src < src_end) + { + c = *src++; + if (c == '\n' || c == '\r') + { + int this_eol; + + if (c == '\n') + this_eol = EOL_SEEN_LF; + else if (src >= src_end || *src != '\n') + this_eol = EOL_SEEN_CR; + else + this_eol = EOL_SEEN_CRLF, src++; + + if (eol_seen == EOL_SEEN_NONE) + /* This is the first end-of-line. */ + eol_seen = this_eol; + else if (eol_seen != this_eol) + { + /* The found type is different from what found before. + Allow for stray ^M characters in DOS EOL files. */ + if ((eol_seen == EOL_SEEN_CR && this_eol == EOL_SEEN_CRLF) + || (eol_seen == EOL_SEEN_CRLF && this_eol == EOL_SEEN_CR)) + eol_seen = EOL_SEEN_CRLF; + else + { + eol_seen = EOL_SEEN_LF; + break; + } + } + if (++total == MAX_EOL_CHECK_COUNT) + break; + } + } return eol_seen; } === modified file 'src/dispextern.h' --- src/dispextern.h 2010-12-17 04:04:06 +0000 +++ src/dispextern.h 2010-12-19 05:43:42 +0000 @@ -3131,7 +3131,7 @@ unsigned int, unsigned int); extern int x_create_bitmap_from_file (struct frame *, Lisp_Object); #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) -extern int x_create_bitmap_from_xpm_data (struct frame *f, char **bits); +extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits); #endif #ifndef x_destroy_bitmap extern void x_destroy_bitmap (struct frame *, int); === modified file 'src/dispnew.c' --- src/dispnew.c 2010-11-20 10:07:00 +0000 +++ src/dispnew.c 2010-12-19 05:43:42 +0000 @@ -3447,7 +3447,9 @@ #endif } +#if PERIODIC_PREEMPTION_CHECKING do_pause: +#endif /* Reset flags indicating that a window should be updated. */ set_window_update_flags (root_window, 0); @@ -4908,7 +4910,9 @@ } } +#if !PERIODIC_PREEMPTION_CHECKING do_pause: +#endif clear_desired_matrices (f); return pause; === modified file 'src/eval.c' --- src/eval.c 2010-10-26 22:23:09 +0000 +++ src/eval.c 2010-12-19 05:43:42 +0000 @@ -2291,14 +2291,12 @@ (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < XINT (numargs))) xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); - if (XSUBR (fun)->max_args == UNEVALLED) + else if (XSUBR (fun)->max_args == UNEVALLED) { backtrace.evalargs = 0; val = (XSUBR (fun)->function.aUNEVALLED) (args_left); - goto done; } - - if (XSUBR (fun)->max_args == MANY) + else if (XSUBR (fun)->max_args == MANY) { /* Pass a vector of evaluated arguments */ Lisp_Object *vals; @@ -2324,73 +2322,76 @@ val = (XSUBR (fun)->function.aMANY) (XINT (numargs), vals); UNGCPRO; SAFE_FREE (); - goto done; - } - - GCPRO3 (args_left, fun, fun); - gcpro3.var = argvals; - gcpro3.nvars = 0; - - maxargs = XSUBR (fun)->max_args; - for (i = 0; i < maxargs; args_left = Fcdr (args_left)) - { - argvals[i] = Feval (Fcar (args_left)); - gcpro3.nvars = ++i; - } - - UNGCPRO; - - backtrace.args = argvals; - backtrace.nargs = XINT (numargs); - - switch (i) - { - case 0: - val = (XSUBR (fun)->function.a0) (); - goto done; - case 1: - val = (XSUBR (fun)->function.a1) (argvals[0]); - goto done; - case 2: - val = (XSUBR (fun)->function.a2) (argvals[0], argvals[1]); - goto done; - case 3: - val = (XSUBR (fun)->function.a3) (argvals[0], argvals[1], - argvals[2]); - goto done; - case 4: - val = (XSUBR (fun)->function.a4) (argvals[0], argvals[1], - argvals[2], argvals[3]); - goto done; - case 5: - val = (XSUBR (fun)->function.a5) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4]); - goto done; - case 6: - val = (XSUBR (fun)->function.a6) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5]); - goto done; - case 7: - val = (XSUBR (fun)->function.a7) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5], - argvals[6]); - goto done; - - case 8: - val = (XSUBR (fun)->function.a8) (argvals[0], argvals[1], argvals[2], - argvals[3], argvals[4], argvals[5], - argvals[6], argvals[7]); - goto done; - - default: - /* Someone has created a subr that takes more arguments than - is supported by this code. We need to either rewrite the - subr to use a different argument protocol, or add more - cases to this switch. */ - abort (); + } + else + { + GCPRO3 (args_left, fun, fun); + gcpro3.var = argvals; + gcpro3.nvars = 0; + + maxargs = XSUBR (fun)->max_args; + for (i = 0; i < maxargs; args_left = Fcdr (args_left)) + { + argvals[i] = Feval (Fcar (args_left)); + gcpro3.nvars = ++i; + } + + UNGCPRO; + + backtrace.args = argvals; + backtrace.nargs = XINT (numargs); + + switch (i) + { + case 0: + val = (XSUBR (fun)->function.a0 ()); + break; + case 1: + val = (XSUBR (fun)->function.a1 (argvals[0])); + break; + case 2: + val = (XSUBR (fun)->function.a2 (argvals[0], argvals[1])); + break; + case 3: + val = (XSUBR (fun)->function.a3 + (argvals[0], argvals[1], argvals[2])); + break; + case 4: + val = (XSUBR (fun)->function.a4 + (argvals[0], argvals[1], argvals[2], argvals[3])); + break; + case 5: + val = (XSUBR (fun)->function.a5 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4])); + break; + case 6: + val = (XSUBR (fun)->function.a6 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5])); + break; + case 7: + val = (XSUBR (fun)->function.a7 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5], argvals[6])); + break; + + case 8: + val = (XSUBR (fun)->function.a8 + (argvals[0], argvals[1], argvals[2], argvals[3], + argvals[4], argvals[5], argvals[6], argvals[7])); + break; + + default: + /* Someone has created a subr that takes more arguments than + is supported by this code. We need to either rewrite the + subr to use a different argument protocol, or add more + cases to this switch. */ + abort (); + } } } - if (COMPILEDP (fun)) + else if (COMPILEDP (fun)) val = apply_lambda (fun, original_args, 1); else { @@ -2413,7 +2414,6 @@ else xsignal1 (Qinvalid_function, original_fun); } - done: CHECK_CONS_LIST (); lisp_eval_depth--; @@ -2956,83 +2956,84 @@ if (SUBRP (fun)) { - if (numargs < XSUBR (fun)->min_args + if (numargs < XSUBR (fun)->min_args || (XSUBR (fun)->max_args >= 0 && XSUBR (fun)->max_args < numargs)) { XSETFASTINT (lisp_numargs, numargs); xsignal2 (Qwrong_number_of_arguments, original_fun, lisp_numargs); } - if (XSUBR (fun)->max_args == UNEVALLED) + else if (XSUBR (fun)->max_args == UNEVALLED) xsignal1 (Qinvalid_function, original_fun); - if (XSUBR (fun)->max_args == MANY) - { - val = (XSUBR (fun)->function.aMANY) (numargs, args + 1); - goto done; - } - - if (XSUBR (fun)->max_args > numargs) - { - internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object)); - memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object)); - for (i = numargs; i < XSUBR (fun)->max_args; i++) - internal_args[i] = Qnil; - } + else if (XSUBR (fun)->max_args == MANY) + val = (XSUBR (fun)->function.aMANY) (numargs, args + 1); else - internal_args = args + 1; - switch (XSUBR (fun)->max_args) { - case 0: - val = (XSUBR (fun)->function.a0) (); - goto done; - case 1: - val = (XSUBR (fun)->function.a1) (internal_args[0]); - goto done; - case 2: - val = (XSUBR (fun)->function.a2) (internal_args[0], internal_args[1]); - goto done; - case 3: - val = (XSUBR (fun)->function.a3) (internal_args[0], internal_args[1], - internal_args[2]); - goto done; - case 4: - val = (XSUBR (fun)->function.a4) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3]); - goto done; - case 5: - val = (XSUBR (fun)->function.a5) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4]); - goto done; - case 6: - val = (XSUBR (fun)->function.a6) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5]); - goto done; - case 7: - val = (XSUBR (fun)->function.a7) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5], - internal_args[6]); - goto done; - - case 8: - val = (XSUBR (fun)->function.a8) (internal_args[0], internal_args[1], - internal_args[2], internal_args[3], - internal_args[4], internal_args[5], - internal_args[6], internal_args[7]); - goto done; - - default: - - /* If a subr takes more than 8 arguments without using MANY - or UNEVALLED, we need to extend this function to support it. - Until this is done, there is no way to call the function. */ - abort (); + if (XSUBR (fun)->max_args > numargs) + { + internal_args = (Lisp_Object *) alloca (XSUBR (fun)->max_args * sizeof (Lisp_Object)); + memcpy (internal_args, args + 1, numargs * sizeof (Lisp_Object)); + for (i = numargs; i < XSUBR (fun)->max_args; i++) + internal_args[i] = Qnil; + } + else + internal_args = args + 1; + switch (XSUBR (fun)->max_args) + { + case 0: + val = (XSUBR (fun)->function.a0 ()); + break; + case 1: + val = (XSUBR (fun)->function.a1 (internal_args[0])); + break; + case 2: + val = (XSUBR (fun)->function.a2 + (internal_args[0], internal_args[1])); + break; + case 3: + val = (XSUBR (fun)->function.a3 + (internal_args[0], internal_args[1], internal_args[2])); + break; + case 4: + val = (XSUBR (fun)->function.a4 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3])); + break; + case 5: + val = (XSUBR (fun)->function.a5 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4])); + break; + case 6: + val = (XSUBR (fun)->function.a6 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5])); + break; + case 7: + val = (XSUBR (fun)->function.a7 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5], + internal_args[6])); + break; + + case 8: + val = (XSUBR (fun)->function.a8 + (internal_args[0], internal_args[1], internal_args[2], + internal_args[3], internal_args[4], internal_args[5], + internal_args[6], internal_args[7])); + break; + + default: + + /* If a subr takes more than 8 arguments without using MANY + or UNEVALLED, we need to extend this function to support it. + Until this is done, there is no way to call the function. */ + abort (); + } } } - if (COMPILEDP (fun)) + else if (COMPILEDP (fun)) val = funcall_lambda (fun, numargs, args + 1); else { @@ -3054,7 +3055,6 @@ else xsignal1 (Qinvalid_function, original_fun); } - done: CHECK_CONS_LIST (); lisp_eval_depth--; if (backtrace.debug_on_exit) === modified file 'src/fontset.c' --- src/fontset.c 2010-08-25 05:58:15 +0000 +++ src/fontset.c 2010-12-19 05:43:42 +0000 @@ -225,8 +225,7 @@ /* Return 1 if ID is a valid fontset id, else return 0. */ static int -fontset_id_valid_p (id) - int id; +fontset_id_valid_p (int id) { return (id >= 0 && id < ASIZE (Vfontset_table) - 1); } @@ -2128,8 +2127,7 @@ #ifdef FONTSET_DEBUG Lisp_Object -dump_fontset (fontset) - Lisp_Object fontset; +dump_fontset (Lisp_Object fontset) { Lisp_Object vec; === modified file 'src/ftfont.c' --- src/ftfont.c 2010-11-10 09:02:54 +0000 +++ src/ftfont.c 2010-12-19 05:43:42 +0000 @@ -1767,13 +1767,13 @@ position adjustment information in ADJUSTMENT. */ static int -ftfont_drive_otf (font, spec, in, from, to, out, adjustment) - MFLTFont *font; - MFLTOtfSpec *spec; - MFLTGlyphString *in; - int from, to; - MFLTGlyphString *out; - MFLTGlyphAdjustment *adjustment; +ftfont_drive_otf (MFLTFont *font, + MFLTOtfSpec *spec, + MFLTGlyphString *in, + int from, + int to, + MFLTGlyphString *out, + MFLTGlyphAdjustment *adjustment) { struct MFLTFontFT *flt_font_ft = (struct MFLTFontFT *) font; FT_Face ft_face = flt_font_ft->ft_face; === modified file 'src/image.c' --- src/image.c 2010-11-09 20:07:10 +0000 +++ src/image.c 2010-12-19 05:43:42 +0000 @@ -3332,7 +3332,7 @@ #if defined (HAVE_XPM) && defined (HAVE_X_WINDOWS) int -x_create_bitmap_from_xpm_data (struct frame *f, char **bits) +x_create_bitmap_from_xpm_data (struct frame *f, const char **bits) { Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); int id, rc; === modified file 'src/lread.c' --- src/lread.c 2010-12-06 16:37:26 +0000 +++ src/lread.c 2010-12-19 05:43:42 +0000 @@ -2888,10 +2888,7 @@ { char *end = read_buffer + read_buffer_size; - while (c > 040 - && c != 0x8a0 /* NBSP */ - && (c >= 0200 - || !(strchr ("\"';()[]#`,", c)))) + do { if (end - p < MAX_MULTIBYTE_LENGTH) { @@ -2915,7 +2912,10 @@ else *p++ = c; c = READCHAR; - } + } while (c > 040 + && c != 0x8a0 /* NBSP */ + && (c >= 0200 + || !(strchr ("\"';()[]#`,", c)))); if (p == end) { === modified file 'src/textprop.c' --- src/textprop.c 2010-09-25 13:21:20 +0000 +++ src/textprop.c 2010-12-19 05:43:42 +0000 @@ -1604,40 +1604,42 @@ if (LENGTH (i) >= len) { if (! interval_has_some_properties_list (properties, i)) - if (modified) - { - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; - } - else - return Qnil; - - if (LENGTH (i) == len) - { - if (!modified && BUFFERP (object)) - modify_region (XBUFFER (object), XINT (start), XINT (end), 1); - remove_properties (Qnil, properties, i, object); - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; - } - - /* i has the properties, and goes past the change limit */ - unchanged = i; - i = split_interval_left (i, len); - copy_properties (unchanged, i); - if (!modified && BUFFERP (object)) - modify_region (XBUFFER (object), XINT (start), XINT (end), 1); - remove_properties (Qnil, properties, i, object); - if (BUFFERP (object)) - signal_after_change (XINT (start), XINT (end) - XINT (start), - XINT (end) - XINT (start)); - return Qt; + { + if (modified) + { + if (BUFFERP (object)) + signal_after_change (XINT (start), + XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + return Qnil; + } + else if (LENGTH (i) == len) + { + if (!modified && BUFFERP (object)) + modify_region (XBUFFER (object), XINT (start), XINT (end), 1); + remove_properties (Qnil, properties, i, object); + if (BUFFERP (object)) + signal_after_change (XINT (start), XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } + else + { /* i has the properties, and goes past the change limit. */ + unchanged = i; + i = split_interval_left (i, len); + copy_properties (unchanged, i); + if (!modified && BUFFERP (object)) + modify_region (XBUFFER (object), XINT (start), XINT (end), 1); + remove_properties (Qnil, properties, i, object); + if (BUFFERP (object)) + signal_after_change (XINT (start), XINT (end) - XINT (start), + XINT (end) - XINT (start)); + return Qt; + } } - if (interval_has_some_properties_list (properties, i)) { if (!modified && BUFFERP (object)) === modified file 'src/window.c' --- src/window.c 2010-11-17 02:37:45 +0000 +++ src/window.c 2010-12-19 05:43:42 +0000 @@ -3522,11 +3522,12 @@ else if (!EQ (tem, Qt)) /* w->buffer is t when the window is first being set up. */ { - if (!EQ (tem, buffer)) - if (EQ (w->dedicated, Qt)) - error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); - else - w->dedicated = Qnil; + if (EQ (tem, buffer)) + return Qnil; + else if (EQ (w->dedicated, Qt)) + error ("Window is dedicated to `%s'", SDATA (XBUFFER (tem)->name)); + else + w->dedicated = Qnil; unshow_buffer (w); } === modified file 'src/xterm.c' --- src/xterm.c 2010-11-23 18:09:55 +0000 +++ src/xterm.c 2010-12-19 05:43:42 +0000 @@ -489,14 +489,14 @@ &data); if (rc == Success && actual != None) - if (*(unsigned long *)data == opac) - { - XFree ((void *) data); - x_uncatch_errors (); - return; - } - else + { XFree ((void *) data); + if (*(unsigned long *)data == opac) + { + x_uncatch_errors (); + return; + } + } x_uncatch_errors (); } @@ -6498,7 +6498,6 @@ { /* Decode the input data. */ int require; - unsigned char *p; /* The input should be decoded with `coding_system' which depends on which X*LookupString function @@ -8469,7 +8468,6 @@ { struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); int have_net_atom = wm_supports (f, dpyinfo->Xatom_net_wm_state); - Lisp_Object lval = get_frame_param (f, Qfullscreen); int cur, dummy; get_current_wm_state (f, FRAME_OUTER_WINDOW (f), &cur, &dummy); @@ -8992,7 +8990,6 @@ void xembed_set_info (struct frame *f, enum xembed_info flags) { - Atom atom; unsigned long data[2]; struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); ------------------------------------------------------------ revno: 102687 committer: Glenn Morris branch nick: trunk timestamp: Sat 2010-12-18 12:39:05 -0800 message: Add missing ChangeLog entry for r102680. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2010-12-17 15:14:57 +0000 +++ lisp/ChangeLog 2010-12-18 20:39:05 +0000 @@ -13,6 +13,47 @@ * menu-bar.el (featurep): Use menu-bar-separator. +2010-12-16 Ken Manheimer + + Migrate allout encryption provisions from pgg to epg. + + * allout.el (allout-toggle-current-subtree-encryption) + (allout-toggle-subtree-encryption): Adjust docstrings to reflect + defaulting policy and other changes. Change fetch-pass to keymode-cue, + for simpler universal argument interpretation. + (allout-toggle-subtree-encryption): Adjust docstring to describe + changed encryption provisions. Change fetch-pass to keymode-cue, for + simpler universal argument interpretation. Remove provisions for + handling key type and identity - they'll all be within + allout-encrypt-string or epg/epg or even contained all the way in gpg. + (allout-encrypt-string): Include keymode-cue, for optionally prompting + for keypair recipients (universal argument > 1) and, in addition, + associating the specified recipients with the outline (universal + argument > 4) using a file local variable setting for + 'epa-file-encrypt-to'. + Require epa, for recipients handling. + Change how regexp filtering elements are named. + Describe the problem with caching of incorrect symmetric-decryption + keys. + Use the epa-passphrase-callback-function, in case the user is using + GnuPG v1. + Support saving of the selected keypair recipients when invoked with a + keymode-cue > 4. + Remove obsolete arguments 'fetch-pass', 'target-cache-id', 'retried'. + Require 'epa. + Establish epg-context with armoring and default epg-protocol. + Remove all passphrase cache, verification, and hinting code. + (allout-passphrase-verifier-handling, allout-passphrase-hint-handling): + No longer used, delete. + (allout-mode): Adjust docstring to describe changed encryption + provisions. Describe the problem with caching of incorrect + symmetric-decryption keys. + (allout-obtain-passphrase, allout-epg-passphrase-callback-function) + (allout-make-passphrase-state, allout-passphrase-state-passphrase) + (allout-encrypted-key-info, allout-update-passphrase-mnemonic-aids) + (allout-get-encryption-passphrase-verifier, allout-verify-passphrase): + Obsolete, remove. + 2010-12-16 Daiki Ueno * epa-file.el (epa-file-select-keys): Accept 'silent to inhibit ------------------------------------------------------------ revno: 102686 committer: Stefan Monnier branch nick: trunk timestamp: Sat 2010-12-18 11:28:15 -0500 message: * doc/lispref/keymaps.texi (Simple Menu Items, Extended Menu Items): Remove mention of the key-binding-data cache since we don't use it any more. * doc/lispref/modes.texi (Derived Modes): Mention prog-mode. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2010-12-13 17:19:58 +0000 +++ doc/lispref/ChangeLog 2010-12-18 16:28:15 +0000 @@ -1,3 +1,10 @@ +2010-12-18 Stefan Monnier + + * modes.texi (Derived Modes): Mention prog-mode. + + * keymaps.texi (Simple Menu Items, Extended Menu Items): Remove mention + of the key-binding-data cache since we don't use it any more. + 2010-12-13 Eli Zaretskii * processes.texi (Shell Arguments): === modified file 'doc/lispref/keymaps.texi' --- doc/lispref/keymaps.texi 2010-06-23 03:36:56 +0000 +++ doc/lispref/keymaps.texi 2010-12-18 16:28:15 +0000 @@ -2072,21 +2072,6 @@ of menus in advance. To force recalculation of the menu bar, call @code{force-mode-line-update} (@pxref{Mode Line Format}). - You've probably noticed that menu items show the equivalent keyboard key -sequence (if any) to invoke the same command. To save time on -recalculation, menu display caches this information in a sublist in the -binding, like this: - -@c This line is not too long--rms. -@example -(@var{item-string} @r{[}@var{help}@r{]} (@var{key-binding-data}) . @var{real-binding}) -@end example - -@noindent -Don't put these sublists in the menu item yourself; menu display -calculates them automatically. Don't mention keyboard equivalents in -the item strings themselves, since that is redundant. - @node Extended Menu Items @subsubsection Extended Menu Items @kindex menu-item @@ -2119,14 +2104,6 @@ @var{item-property-list}, has the form of a property list which contains other information. - When an equivalent keyboard key binding is cached, the extended menu -item binding looks like this: - -@example -(menu-item @var{item-name} @var{real-binding} (@var{key-binding-data}) - . @var{item-property-list}) -@end example - Here is a table of the properties that are supported: @table @code === modified file 'doc/lispref/modes.texi' --- doc/lispref/modes.texi 2010-12-13 15:27:36 +0000 +++ doc/lispref/modes.texi 2010-12-18 16:28:15 +0000 @@ -744,7 +744,8 @@ The recommended way to define a new major mode is to derive it from an existing one using @code{define-derived-mode}. If there is no closely related mode, you can inherit from @code{text-mode}, -@code{special-mode}, or in the worst case @code{fundamental-mode}. +@code{special-mode}, @code{prog-mode}, or in the worst case +@code{fundamental-mode}. @defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} This macro defines @var{variant} as a major mode command, using ------------------------------------------------------------ revno: 102685 author: Gnus developers committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2010-12-17 22:45:16 +0000 message: Merge changes made in Gnus trunk. nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore gnus-use-agent. (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. gravatar.el (gravatar-retrieve-synchronously): New function. (gravatar-get-data): Make more robust. gnus-util.el (gnus-rescale-image): Allow to resize images even if they are from file. Can also scale up. nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers. nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound. gnus-sum.el (gnus-get-newsgroup-headers): Revert the last change here, since it's up to the backends to do CRLF removal if their protocol has it. gnus-group.el (gnus-group-delete-articles): New command. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2010-12-16 23:18:57 +0000 +++ lisp/gnus/ChangeLog 2010-12-17 22:45:16 +0000 @@ -1,3 +1,37 @@ +2010-12-17 Lars Magne Ingebrigtsen + + * gnus-group.el (gnus-group-delete-articles): New command. + +2010-12-17 Andrew Cohen + + * nnir.el (nnir-mode): Make sure 'gnus-registry-install is bound. + +2010-12-17 Lars Magne Ingebrigtsen + + * gnus-sum.el (gnus-get-newsgroup-headers): Revert the last change + here, since it's up to the backends to do CRLF removal if their + protocol has it. + + * nnimap.el (nnimap-retrieve-headers): Remove CRLF from the headers. + +2010-12-17 Julien Danjou + + * gnus-util.el (gnus-rescale-image): Allow to resize images even if + they are from file. Can also scale up. + +2010-12-17 Andrew Cohen + + * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore + gnus-use-agent. + (gnus-get-newsgroup-headers): Avoid unwanted spaces at eol. + + * nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null. + +2010-12-17 Julien Danjou + + * gravatar.el (gravatar-retrieve-synchronously): New function. + (gravatar-get-data): Make more robust. + 2010-12-16 Lars Magne Ingebrigtsen * nnimap.el (nnimap-wait-for-response): Fix the end-point calculation === modified file 'lisp/gnus/gnus-gravatar.el' --- lisp/gnus/gnus-gravatar.el 2010-12-11 01:27:14 +0000 +++ lisp/gnus/gnus-gravatar.el 2010-12-17 22:45:16 +0000 @@ -56,7 +56,7 @@ (let* ((mail-extr-disable-voodoo t) (addresses (mail-extract-address-components (or (mail-fetch-field header) "") t)) - (gravatar-size gnus-gravatar-size) + (gravatar-size (or gnus-gravatar-size gravatar-size)) name) (dolist (address addresses) (when (and (setq name (car address)) === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2010-12-16 22:22:28 +0000 +++ lisp/gnus/gnus-group.el 2010-12-17 22:45:16 +0000 @@ -2734,6 +2734,15 @@ (lambda (group) (gnus-group-delete-group group nil t)))))) +(defun gnus-group-delete-articles (group) + "Delete all articles in the current group." + (interactive (list (gnus-group-group-name))) + (let ((articles (gnus-uncompress-range (gnus-active group)))) + (when (gnus-yes-or-no-p + (format "Do you really want to delete these %d articles forever? " + (length articles))) + (gnus-request-expire-articles articles group 'force)))) + (defun gnus-group-delete-group (group &optional force no-prompt) "Delete the current group. Only meaningful with editable groups. If FORCE (the prefix) is non-nil, all the articles in the group will === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2010-12-16 22:22:28 +0000 +++ lisp/gnus/gnus-sum.el 2010-12-17 22:45:16 +0000 @@ -8868,30 +8868,27 @@ variable." (interactive "P") (gnus-warp-to-article) - (let ((id (mail-header-id (gnus-summary-article-header))) - (gnus-inhibit-demon t) - (gnus-agent nil) - (gnus-summary-ignore-duplicates t) - (gnus-read-all-available-headers t) - (limit (if limit (prefix-numeric-value limit) - gnus-refer-thread-limit))) + (let* ((header (gnus-summary-article-header)) + (id (mail-header-id header)) + (gnus-inhibit-demon t) + (gnus-summary-ignore-duplicates t) + (gnus-read-all-available-headers t) + (limit (if limit (prefix-numeric-value limit) + gnus-refer-thread-limit))) (setq gnus-newsgroup-headers (gnus-merge 'list gnus-newsgroup-headers (if (gnus-check-backend-function 'request-thread gnus-newsgroup-name) - (gnus-request-thread (gnus-summary-article-header)) + (gnus-request-thread header) (let* ((last (if (numberp limit) - (min (+ (mail-header-number - (gnus-summary-article-header)) + (min (+ (mail-header-number header) limit) gnus-newsgroup-highest) gnus-newsgroup-highest)) (subject (gnus-simplify-subject - (mail-header-subject - (gnus-summary-article-header)))) - (refs (split-string (or (mail-header-references - (gnus-summary-article-header)) + (mail-header-subject header))) + (refs (split-string (or (mail-header-references header) ""))) (gnus-parse-headers-hook (lambda () (goto-char (point-min)) === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2010-12-05 23:29:50 +0000 +++ lisp/gnus/gnus-util.el 2010-12-17 22:45:16 +0000 @@ -1983,21 +1983,16 @@ "Rescale IMAGE to SIZE if possible. SIZE is in format (WIDTH . HEIGHT). Return a new image. Sizes are in pixels." - (if (or (not (fboundp 'imagemagick-types)) - (not (get-buffer-window (current-buffer)))) - image + (when (fboundp 'imagemagick-types) (let ((new-width (car size)) (new-height (cdr size))) - (when (> (cdr (image-size image t)) new-height) - (setq image (or (create-image (plist-get (cdr image) :data) 'imagemagick t - :height new-height) - image))) - (when (> (car (image-size image t)) new-width) - (setq image (or - (create-image (plist-get (cdr image) :data) 'imagemagick t - :width new-width) - image))) - image))) + (unless (= (cdr (image-size image t)) new-height) + (setcdr image (plist-put (cdr image) :type 'imagemagick)) + (setcdr image (plist-put (cdr image) :height new-height))) + (unless (= (car (image-size image t)) new-width) + (setcdr image (plist-put (cdr image) :type 'imagemagick)) + (setcdr image (plist-put (cdr image) :width new-width))))) + image) (defun gnus-list-memq-of-list (elements list) "Return non-nil if any of the members of ELEMENTS are in LIST." === modified file 'lisp/gnus/gravatar.el' --- lisp/gnus/gravatar.el 2010-10-04 22:26:51 +0000 +++ lisp/gnus/gravatar.el 2010-12-17 22:45:16 +0000 @@ -78,10 +78,11 @@ (defun gravatar-get-data () "Get data from current buffer." - (when (string-match "^HTTP/.+ 200 OK$" - (buffer-substring (point-min) (line-end-position))) - (when (search-forward "\n\n" nil t) - (buffer-substring (point) (point-max))))) + (save-excursion + (goto-char (point-min)) + (when (re-search-forward "^HTTP/.+ 200 OK$" nil (line-end-position)) + (when (search-forward "\n\n" nil t) + (buffer-substring (point) (point-max)))))) (eval-and-compile (cond ((featurep 'xemacs) @@ -98,7 +99,7 @@ If no image available, return 'error." (let ((data (gravatar-get-data))) (if data - (gravatar-create-image data nil t) + (gravatar-create-image data nil t) 'error))) ;;;###autoload @@ -117,6 +118,23 @@ (gravatar-data->image)) cbargs)))) +;;;###autoload +(defun gravatar-retrieve-synchronously (mail-address) + "Retrieve MAIL-ADDRESS gravatar and returns it." + (let ((url (gravatar-build-url mail-address))) + (if (gravatar-cache-expired url) + (with-current-buffer (url-retrieve-synchronously url) + (when gravatar-automatic-caching + (url-store-in-cache (current-buffer))) + (let ((data (gravatar-data->image))) + (kill-buffer (current-buffer)) + data)) + (with-temp-buffer + (mm-disable-multibyte) + (url-cache-extract (url-cache-create-filename url)) + (gravatar-data->image))))) + + (defun gravatar-retrieved (status cb &optional cbargs) "Callback function used by `gravatar-retrieve'." ;; Store gravatar? === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2010-12-16 23:18:57 +0000 +++ lisp/gnus/nnimap.el 2010-12-17 22:45:16 +0000 @@ -167,7 +167,8 @@ (nnimap-article-ranges (gnus-compress-sequence articles)) (nnimap-header-parameters)) t) - (nnimap-transform-headers)) + (nnimap-transform-headers) + (nnheader-remove-cr-followed-by-lf)) (insert-buffer-substring (nnimap-find-process-buffer (current-buffer)))) 'headers)) @@ -1568,7 +1569,7 @@ (min (- (point) 500) (save-excursion - (forward-line -1) + (forward-line -3) (point)))) (point-min)) t))) === modified file 'lisp/gnus/nnir.el' --- lisp/gnus/nnir.el 2010-12-16 22:22:28 +0000 +++ lisp/gnus/nnir.el 2010-12-17 22:45:16 +0000 @@ -1543,7 +1543,8 @@ (let ((cur (current-buffer)) name) (goto-char (point-min)) - (unless (string= nnir-ignored-newsgroups "") + (unless (or (null nnir-ignored-newsgroups) + (string= nnir-ignored-newsgroups "")) (delete-matching-lines nnir-ignored-newsgroups)) (if (eq (car method) 'nntp) (while (not (eobp)) @@ -1589,7 +1590,8 @@ (when (eq (car (gnus-find-method-for-group gnus-newsgroup-name)) 'nnir) (setq gnus-summary-line-format (or nnir-summary-line-format gnus-summary-line-format)) - (when (eq gnus-registry-install t) + (when (and (boundp 'gnus-registry-install) + (eq gnus-registry-install t)) (remove-hook 'gnus-summary-article-delete-hook 'gnus-registry-action t) (remove-hook 'gnus-summary-article-move-hook 'gnus-registry-action t) (remove-hook 'gnus-summary-article-expire-hook 'gnus-registry-action t)