Now on revision 113795. ------------------------------------------------------------ revno: 113795 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-11 05:09:21 +0200 message: lisp/frameset.el (frameset-valid-p): Fix check; STATES can indeed be nil. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-11 00:07:48 +0000 +++ lisp/ChangeLog 2013-08-11 03:09:21 +0000 @@ -1,3 +1,7 @@ +2013-08-11 Juanma Barranquero + + * frameset.el (frameset-valid-p): Fix check; STATES can indeed be nil. + 2013-08-10 Juanma Barranquero * tutorial.el (tutorial--describe-nonstandard-key): Use string-match-p. === modified file 'lisp/frameset.el' --- lisp/frameset.el 2013-08-09 00:30:24 +0000 +++ lisp/frameset.el 2013-08-11 03:09:21 +0000 @@ -156,7 +156,7 @@ (stringp (or (aref object 4) "")) ; NAME is a string or nil (stringp (or (aref object 5) "")) ; DESCRIPTION is a string or nil (listp (aref object 6)) ; PROPERTIES is a list - (consp (aref object 7)) ; and STATES is non-nil + (listp (aref object 7)) ; and STATES is, too (cl-every #'consp (aref object 7)) ; and an alist (aref object 1))) ; return VERSION ------------------------------------------------------------ revno: 113794 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-08-10 18:30:20 -0700 message: Omit some unnecessary casts. Many of these go back to the old pre-C89 days, when they may have been needed, but we've been assuming C89 or later for a while now. * alloc.c (live_string_p, live_cons_p, live_symbol_p) (live_float_p, live_misc_p, live_vector_p): * buffer.c (compare_overlays, cmp_for_strings, mmap_find) (mmap_alloc, alloc_buffer_text, enlarge_buffer_text) (defvar_per_buffer): * callint.c (Fcall_interactively): * doc.c (Fsubstitute_command_keys): * filelock.c (get_boot_time): * frame.c (xrdb_get_resource): * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb) (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer) (xg_get_file_name_from_selector, menuitem_destroy_callback) (menuitem_highlight_callback, menu_destroy_callback) (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb) (xg_tool_bar_callback, xg_get_tool_bar_widgets) (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback) (xg_tool_bar_help_callback, tb_size_cb): * image.c (xpm_alloc_color, png_read_from_memory) (png_read_from_file, png_load_body, our_memory_skip_input_data) (jpeg_memory_src, jpeg_file_src, imagemagick_load_image) (syms_of_image): * keymap.c (describe_map): * nsfns.m (Fns_display_monitor_attributes_list): * nsmenu.m (process_dialog:): * nsterm.m (hold_event): * process.c (wait_reading_process_output): * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec): * scroll.c (do_direct_scrolling, scrolling_1): * termcap.c (tgetent): * window.c (check_window_containing, add_window_to_list) (freeze_window_starts): * xdisp.c (compare_overlay_entries, vmessage): * xfns.c (x_window, x_get_monitor_attributes_xinerama) (x_get_monitor_attributes_xrandr) (Fx_display_monitor_attributes_list, x_display_info_for_name) (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb): * xfont.c (xfont_match, xfont_open): * xmenu.c (x_menu_wait_for_event, menu_highlight_callback) (menubar_selection_callback, menu_position_func) (popup_selection_callback, create_and_show_popup_menu) (dialog_selection_callback, create_and_show_dialog): * xrdb.c (x_get_string_resource): (main) [TESTRM]: * xsmfns.c (x_session_check_input): * xterm.c (x_draw_glyphless_glyph_string_foreground) (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback) (xaw_jump_callback, xaw_scroll_callback): Omit unnecessary casts. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-10 15:42:08 +0000 +++ src/ChangeLog 2013-08-11 01:30:20 +0000 @@ -1,3 +1,57 @@ +2013-08-11 Paul Eggert + + Omit some unnecessary casts. + Many of these go back to the old pre-C89 days, when they may have + been needed, but we've been assuming C89 or later for a while now. + * alloc.c (live_string_p, live_cons_p, live_symbol_p) + (live_float_p, live_misc_p, live_vector_p): + * buffer.c (compare_overlays, cmp_for_strings, mmap_find) + (mmap_alloc, alloc_buffer_text, enlarge_buffer_text) + (defvar_per_buffer): + * callint.c (Fcall_interactively): + * doc.c (Fsubstitute_command_keys): + * filelock.c (get_boot_time): + * frame.c (xrdb_get_resource): + * gtkutil.c (hierarchy_ch_cb, qttip_cb, style_changed_cb) + (delete_cb, xg_dialog_response_cb, xg_maybe_add_timer) + (xg_get_file_name_from_selector, menuitem_destroy_callback) + (menuitem_highlight_callback, menu_destroy_callback) + (xg_update_menu_item, xg_modify_menubar_widgets, menubar_map_cb) + (xg_tool_bar_callback, xg_get_tool_bar_widgets) + (xg_tool_bar_detach_callback, xg_tool_bar_attach_callback) + (xg_tool_bar_help_callback, tb_size_cb): + * image.c (xpm_alloc_color, png_read_from_memory) + (png_read_from_file, png_load_body, our_memory_skip_input_data) + (jpeg_memory_src, jpeg_file_src, imagemagick_load_image) + (syms_of_image): + * keymap.c (describe_map): + * nsfns.m (Fns_display_monitor_attributes_list): + * nsmenu.m (process_dialog:): + * nsterm.m (hold_event): + * process.c (wait_reading_process_output): + * regex.c (REGEX_REALLOCATE, re_set_registers, re_exec, regexec): + * scroll.c (do_direct_scrolling, scrolling_1): + * termcap.c (tgetent): + * window.c (check_window_containing, add_window_to_list) + (freeze_window_starts): + * xdisp.c (compare_overlay_entries, vmessage): + * xfns.c (x_window, x_get_monitor_attributes_xinerama) + (x_get_monitor_attributes_xrandr) + (Fx_display_monitor_attributes_list, x_display_info_for_name) + (Fx_open_connection, file_dialog_cb, file_dialog_unmap_cb): + * xfont.c (xfont_match, xfont_open): + * xmenu.c (x_menu_wait_for_event, menu_highlight_callback) + (menubar_selection_callback, menu_position_func) + (popup_selection_callback, create_and_show_popup_menu) + (dialog_selection_callback, create_and_show_dialog): + * xrdb.c (x_get_string_resource): + (main) [TESTRM]: + * xsmfns.c (x_session_check_input): + * xterm.c (x_draw_glyphless_glyph_string_foreground) + (xm_scroll_callback, xg_scroll_callback, xg_end_scroll_callback) + (xaw_jump_callback, xaw_scroll_callback): + Omit unnecessary casts. + 2013-08-10 Paul Eggert Minor string-length refactoring. === modified file 'src/alloc.c' --- src/alloc.c 2013-08-10 15:42:08 +0000 +++ src/alloc.c 2013-08-11 01:30:20 +0000 @@ -4058,7 +4058,7 @@ { if (m->type == MEM_TYPE_STRING) { - struct string_block *b = (struct string_block *) m->start; + struct string_block *b = m->start; ptrdiff_t offset = (char *) p - (char *) &b->strings[0]; /* P must point to the start of a Lisp_String structure, and it @@ -4081,7 +4081,7 @@ { if (m->type == MEM_TYPE_CONS) { - struct cons_block *b = (struct cons_block *) m->start; + struct cons_block *b = m->start; ptrdiff_t offset = (char *) p - (char *) &b->conses[0]; /* P must point to the start of a Lisp_Cons, not be @@ -4107,7 +4107,7 @@ { if (m->type == MEM_TYPE_SYMBOL) { - struct symbol_block *b = (struct symbol_block *) m->start; + struct symbol_block *b = m->start; ptrdiff_t offset = (char *) p - (char *) &b->symbols[0]; /* P must point to the start of a Lisp_Symbol, not be @@ -4133,7 +4133,7 @@ { if (m->type == MEM_TYPE_FLOAT) { - struct float_block *b = (struct float_block *) m->start; + struct float_block *b = m->start; ptrdiff_t offset = (char *) p - (char *) &b->floats[0]; /* P must point to the start of a Lisp_Float and not be @@ -4157,7 +4157,7 @@ { if (m->type == MEM_TYPE_MISC) { - struct marker_block *b = (struct marker_block *) m->start; + struct marker_block *b = m->start; ptrdiff_t offset = (char *) p - (char *) &b->markers[0]; /* P must point to the start of a Lisp_Misc, not be @@ -4184,7 +4184,7 @@ if (m->type == MEM_TYPE_VECTOR_BLOCK) { /* This memory node corresponds to a vector block. */ - struct vector_block *block = (struct vector_block *) m->start; + struct vector_block *block = m->start; struct Lisp_Vector *vector = (struct Lisp_Vector *) block->data; /* P is in the block's allocation range. Scan the block === modified file 'src/buffer.c' --- src/buffer.c 2013-08-07 13:21:59 +0000 +++ src/buffer.c 2013-08-11 01:30:20 +0000 @@ -3146,8 +3146,8 @@ static int compare_overlays (const void *v1, const void *v2) { - const struct sortvec *s1 = (const struct sortvec *) v1; - const struct sortvec *s2 = (const struct sortvec *) v2; + const struct sortvec *s1 = v1; + const struct sortvec *s2 = v2; if (s1->priority != s2->priority) return s1->priority < s2->priority ? -1 : 1; if (s1->beg != s2->beg) @@ -3253,8 +3253,8 @@ static int cmp_for_strings (const void *as1, const void *as2) { - struct sortstr *s1 = (struct sortstr *)as1; - struct sortstr *s2 = (struct sortstr *)as2; + struct sortstr const *s1 = as1; + struct sortstr const *s2 = as2; if (s1->size != s2->size) return s2->size < s1->size ? -1 : 1; if (s1->priority != s2->priority) @@ -4752,7 +4752,7 @@ mmap_find (void *start, void *end) { struct mmap_region *r; - char *s = (char *) start, *e = (char *) end; + char *s = start, *e = end; for (r = mmap_regions; r; r = r->next) { @@ -4911,7 +4911,7 @@ } else { - struct mmap_region *r = (struct mmap_region *) p; + struct mmap_region *r = p; r->nbytes_specified = nbytes; r->nbytes_mapped = map; @@ -5051,7 +5051,7 @@ memory_full (nbytes); } - b->text->beg = (unsigned char *) p; + b->text->beg = p; unblock_input (); } @@ -5079,7 +5079,7 @@ memory_full (nbytes); } - BUF_BEG_ADDR (b) = (unsigned char *) p; + BUF_BEG_ADDR (b) = p; unblock_input (); } @@ -5397,11 +5397,7 @@ bo_fwd->predicate = predicate; sym->declared_special = 1; sym->redirect = SYMBOL_FORWARDED; - { - /* I tried to do the job without a cast, but it seems impossible. - union Lisp_Fwd *fwd; &(fwd->u_buffer_objfwd) = bo_fwd; */ - SET_SYMBOL_FWD (sym, (union Lisp_Fwd *)bo_fwd); - } + SET_SYMBOL_FWD (sym, (union Lisp_Fwd *) bo_fwd); XSETSYMBOL (PER_BUFFER_SYMBOL (offset), sym); if (PER_BUFFER_IDX (offset) == 0) === modified file 'src/callint.c' --- src/callint.c 2013-07-16 06:39:49 +0000 +++ src/callint.c 2013-08-11 01:30:20 +0000 @@ -529,7 +529,7 @@ make_number (SCHARS (callint_message)), Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_char (callint_message, Qnil, Qnil); - message1_nolog ((char *) 0); + message1_nolog (0); /* Passing args[i] directly stimulates compiler bug. */ teml = args[i]; /* See bug#8479. */ === modified file 'src/doc.c' --- src/doc.c 2013-07-18 09:55:00 +0000 +++ src/doc.c 2013-08-11 01:30:20 +0000 @@ -905,7 +905,7 @@ If this one's not active, get nil. */ earlier_maps = Fcdr (Fmemq (tem, Freverse (active_maps))); describe_map_tree (tem, 1, Fnreverse (earlier_maps), - Qnil, (char *)0, 1, 0, 0, 1); + Qnil, 0, 1, 0, 0, 1); } tem = Fbuffer_string (); Ferase_buffer (); === modified file 'src/filelock.c' --- src/filelock.c 2013-08-05 04:14:43 +0000 +++ src/filelock.c 2013-08-11 01:30:20 +0000 @@ -181,7 +181,7 @@ since utmp is typically much smaller than wtmp. Passing a null pointer causes get_boot_time_1 to inspect the default file, namely utmp. */ - get_boot_time_1 ((char *) 0, 0); + get_boot_time_1 (0, 0); if (boot_time) return boot_time; === modified file 'src/frame.c' --- src/frame.c 2013-08-10 15:42:08 +0000 +++ src/frame.c 2013-08-11 01:30:20 +0000 @@ -3544,7 +3544,7 @@ value = x_get_string_resource (rdb, name_key, class_key); - if (value != (char *) 0 && *value) + if (value && *value) return build_string (value); else return Qnil; === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-08-03 03:29:03 +0000 +++ src/gtkutil.c 2013-08-11 01:30:20 +0000 @@ -641,7 +641,7 @@ GtkWidget *previous_toplevel, gpointer user_data) { - struct frame *f = (struct frame *) user_data; + struct frame *f = user_data; struct x_output *x = f->output_data.x; GtkWidget *top = gtk_widget_get_toplevel (x->ttip_lbl); @@ -663,7 +663,7 @@ GtkTooltip *tooltip, gpointer user_data) { - struct frame *f = (struct frame *) user_data; + struct frame *f = user_data; struct x_output *x = f->output_data.x; if (x->ttip_widget == NULL) { @@ -1073,7 +1073,7 @@ gpointer user_data) { struct input_event event; - GdkDisplay *gdpy = (GdkDisplay *) user_data; + GdkDisplay *gdpy = user_data; const char *display_name = gdk_display_get_name (gdpy); Display *dpy = GDK_DISPLAY_XDISPLAY (gdpy); @@ -1115,7 +1115,7 @@ #ifdef HAVE_GTK3 /* The event doesn't arrive in the normal event loop. Send event here. */ - struct frame *f = (struct frame *) user_data; + struct frame *f = user_data; struct input_event ie; EVENT_INIT (ie); @@ -1642,7 +1642,7 @@ gint response, gpointer user_data) { - struct xg_dialog_data *dd = (struct xg_dialog_data *)user_data; + struct xg_dialog_data *dd = user_data; dd->response = response; g_main_loop_quit (dd->loop); } @@ -1671,7 +1671,7 @@ static gboolean xg_maybe_add_timer (gpointer data) { - struct xg_dialog_data *dd = (struct xg_dialog_data *) data; + struct xg_dialog_data *dd = data; EMACS_TIME next_time = timer_check (); dd->timerid = 0; @@ -1921,7 +1921,7 @@ xg_get_file_name_from_selector (GtkWidget *w) { GtkFileSelection *filesel = GTK_FILE_SELECTION (w); - return xstrdup ((char*) gtk_file_selection_get_filename (filesel)); + return xstrdup (gtk_file_selection_get_filename (filesel)); } /* Create a file selection dialog. @@ -2277,7 +2277,7 @@ { if (client_data) { - xg_menu_item_cb_data *data = (xg_menu_item_cb_data*) client_data; + xg_menu_item_cb_data *data = client_data; xg_list_remove (&xg_menu_item_cb_list, &data->ptrs); xfree (data); } @@ -2301,8 +2301,7 @@ ev.crossing = *event; subwidget = gtk_get_event_widget (&ev); - data = (xg_menu_item_cb_data *) g_object_get_data (G_OBJECT (subwidget), - XG_ITEM_DATA); + data = g_object_get_data (G_OBJECT (subwidget), XG_ITEM_DATA); if (data) { if (! NILP (data->help) && data->cl_data->highlight_cb) @@ -2323,7 +2322,7 @@ static void menu_destroy_callback (GtkWidget *w, gpointer client_data) { - unref_cl_data ((xg_menu_cb_data*) client_data); + unref_cl_data (client_data); } /* Make a GTK widget that contains both UTF8_LABEL and UTF8_KEY (both @@ -3064,8 +3063,7 @@ else if (val->enabled && ! gtk_widget_get_sensitive (w)) gtk_widget_set_sensitive (w, TRUE); - cb_data = (xg_menu_item_cb_data*) g_object_get_data (G_OBJECT (w), - XG_ITEM_DATA); + cb_data = g_object_get_data (G_OBJECT (w), XG_ITEM_DATA); if (cb_data) { cb_data->call_data = val->call_data; @@ -3271,8 +3269,7 @@ if (! list) return; - cl_data = (xg_menu_cb_data*) g_object_get_data (G_OBJECT (menubar), - XG_FRAME_DATA); + cl_data = g_object_get_data (G_OBJECT (menubar), XG_FRAME_DATA); xg_update_menubar (menubar, f, &list, list, 0, val->contents, select_cb, deactivate_cb, highlight_cb, cl_data); @@ -3336,7 +3333,7 @@ menubar_map_cb (GtkWidget *w, gpointer user_data) { GtkRequisition req; - struct frame *f = (struct frame *) user_data; + struct frame *f = user_data; gtk_widget_get_preferred_size (w, NULL, &req); if (FRAME_MENUBAR_HEIGHT (f) != req.height) { @@ -3946,8 +3943,7 @@ gpointer gmod = g_object_get_data (G_OBJECT (w), XG_TOOL_BAR_LAST_MODIFIER); intptr_t mod = (intptr_t) gmod; - struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), - XG_FRAME_DATA); + struct frame *f = g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object key, frame; struct input_event event; EVENT_INIT (event); @@ -4020,8 +4016,8 @@ xg_get_tool_bar_widgets (GtkWidget *vb, GtkWidget **wimage) { GList *clist = gtk_container_get_children (GTK_CONTAINER (vb)); - GtkWidget *c1 = (GtkWidget *) clist->data; - GtkWidget *c2 = clist->next ? (GtkWidget *) clist->next->data : NULL; + GtkWidget *c1 = clist->data; + GtkWidget *c2 = clist->next ? clist->next->data : NULL; *wimage = GTK_IS_IMAGE (c1) ? c1 : c2; g_list_free (clist); @@ -4150,7 +4146,7 @@ GtkWidget *w, gpointer client_data) { - struct frame *f = (struct frame *) client_data; + struct frame *f = client_data; g_object_set (G_OBJECT (w), "show-arrow", !x_gtk_whole_detached_tool_bar, NULL); @@ -4187,7 +4183,7 @@ GtkWidget *w, gpointer client_data) { - struct frame *f = (struct frame *) client_data; + struct frame *f = client_data; g_object_set (G_OBJECT (w), "show-arrow", TRUE, NULL); if (f) @@ -4225,8 +4221,7 @@ gpointer client_data) { intptr_t idx = (intptr_t) client_data; - struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (w), - XG_FRAME_DATA); + struct frame *f = g_object_get_data (G_OBJECT (w), XG_FRAME_DATA); Lisp_Object help, frame; if (! f || ! f->n_tool_bar_items || NILP (f->tool_bar_items)) @@ -4366,7 +4361,7 @@ /* When tool bar is created it has one preferred size. But when size is allocated between widgets, it may get another. So we must update size hints if tool bar size changes. Seen on Fedora 18 at least. */ - struct frame *f = (struct frame *) user_data; + struct frame *f = user_data; if (xg_update_tool_bar_sizes (f)) x_wm_set_size_hint (f, 0, 0); } === modified file 'src/image.c' --- src/image.c 2013-08-03 03:29:03 +0000 +++ src/image.c 2013-08-11 01:30:20 +0000 @@ -3332,7 +3332,7 @@ xpm_alloc_color (Display *dpy, Colormap cmap, char *color_name, XColor *color, void *closure) { - return xpm_lookup_color ((struct frame *) closure, color_name, color); + return xpm_lookup_color (closure, color_name, color); } @@ -5652,8 +5652,7 @@ static void png_read_from_memory (png_structp png_ptr, png_bytep data, png_size_t length) { - struct png_memory_storage *tbr - = (struct png_memory_storage *) fn_png_get_io_ptr (png_ptr); + struct png_memory_storage *tbr = fn_png_get_io_ptr (png_ptr); if (length > tbr->len - tbr->index) fn_png_error (png_ptr, "Read error"); @@ -5670,7 +5669,7 @@ static void png_read_from_file (png_structp png_ptr, png_bytep data, png_size_t length) { - FILE *fp = (FILE *) fn_png_get_io_ptr (png_ptr); + FILE *fp = fn_png_get_io_ptr (png_ptr); if (fread (data, 1, length, fp) < length) fn_png_error (png_ptr, "Read error"); @@ -5814,9 +5813,9 @@ /* Read image info. */ if (!NILP (specified_data)) - fn_png_set_read_fn (png_ptr, (void *) &tbr, png_read_from_memory); + fn_png_set_read_fn (png_ptr, &tbr, png_read_from_memory); else - fn_png_set_read_fn (png_ptr, (void *) fp, png_read_from_file); + fn_png_set_read_fn (png_ptr, fp, png_read_from_file); fn_png_set_sig_bytes (png_ptr, sizeof sig); fn_png_read_info (png_ptr, info_ptr); @@ -6306,7 +6305,7 @@ static void our_memory_skip_input_data (j_decompress_ptr cinfo, long int num_bytes) { - struct jpeg_source_mgr *src = (struct jpeg_source_mgr *) cinfo->src; + struct jpeg_source_mgr *src = cinfo->src; if (src) { @@ -6326,19 +6325,17 @@ static void jpeg_memory_src (j_decompress_ptr cinfo, JOCTET *data, ptrdiff_t len) { - struct jpeg_source_mgr *src; + struct jpeg_source_mgr *src = cinfo->src; - if (cinfo->src == NULL) + if (! src) { /* First time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof (struct jpeg_source_mgr)); - src = (struct jpeg_source_mgr *) cinfo->src; + src = cinfo->mem->alloc_small ((j_common_ptr) cinfo, + JPOOL_PERMANENT, sizeof *src); + cinfo->src = src; src->next_input_byte = data; } - src = (struct jpeg_source_mgr *) cinfo->src; src->init_source = our_common_init_source; src->fill_input_buffer = our_memory_fill_input_buffer; src->skip_input_data = our_memory_skip_input_data; @@ -6430,20 +6427,17 @@ static void jpeg_file_src (j_decompress_ptr cinfo, FILE *fp) { - struct jpeg_stdio_mgr *src; + struct jpeg_stdio_mgr *src = (struct jpeg_stdio_mgr *) cinfo->src; - if (cinfo->src != NULL) - src = (struct jpeg_stdio_mgr *) cinfo->src; - else + if (! src) { /* First time for this JPEG object? */ - cinfo->src = (struct jpeg_source_mgr *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - sizeof (struct jpeg_stdio_mgr)); - src = (struct jpeg_stdio_mgr *) cinfo->src; - src->buffer = (JOCTET *) - (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, - JPEG_STDIO_BUFFER_SIZE); + src = cinfo->mem->alloc_small ((j_common_ptr) cinfo, + JPOOL_PERMANENT, sizeof *src); + cinfo->src = (struct jpeg_source_mgr *) src; + src->buffer = cinfo->mem->alloc_small ((j_common_ptr) cinfo, + JPOOL_PERMANENT, + JPEG_STDIO_BUFFER_SIZE); } src->file = fp; @@ -8120,7 +8114,7 @@ /* Copy pixels from the imagemagick image structure to the x image map. */ iterator = NewPixelIterator (image_wand); - if (iterator == (PixelIterator *) NULL) + if (! iterator) { #ifdef COLOR_TABLE_SUPPORT free_color_table (); @@ -8135,7 +8129,7 @@ for (y = 0; y < image_height; y++) { pixels = PixelGetNextIteratorRow (iterator, &width); - if (pixels == (PixelWand **) NULL) + if (! pixels) break; for (x = 0; x < (long) width; x++) { @@ -9200,7 +9194,7 @@ DEFVAR_LISP ("x-bitmap-file-path", Vx_bitmap_file_path, doc: /* List of directories to search for window system bitmap files. */); - Vx_bitmap_file_path = decode_env_path ((char *) 0, PATH_BITMAPS); + Vx_bitmap_file_path = decode_env_path (0, PATH_BITMAPS); DEFVAR_LISP ("image-cache-eviction-delay", Vimage_cache_eviction_delay, doc: /* Maximum time after which images are removed from the cache. === modified file 'src/keymap.c' --- src/keymap.c 2013-07-19 01:24:35 +0000 +++ src/keymap.c 2013-08-11 01:30:20 +0000 @@ -3249,8 +3249,7 @@ for (tail = map; CONSP (tail); tail = XCDR (tail)) length_needed++; - vect = ((struct describe_map_elt *) - alloca (sizeof (struct describe_map_elt) * length_needed)); + vect = alloca (length_needed * sizeof *vect); for (tail = map; CONSP (tail); tail = XCDR (tail)) { === modified file 'src/nsfns.m' --- src/nsfns.m 2013-08-03 03:29:03 +0000 +++ src/nsfns.m 2013-08-11 01:30:20 +0000 @@ -2447,7 +2447,7 @@ if (n_monitors == 0) return Qnil; - monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors)); + monitors = xzalloc (n_monitors * sizeof *monitors); for (i = 0; i < [screens count]; ++i) { === modified file 'src/nsmenu.m' --- src/nsmenu.m 2013-08-03 03:29:03 +0000 +++ src/nsmenu.m 2013-08-11 01:30:20 +0000 @@ -1665,7 +1665,7 @@ } if (buttons > 0) - button_values = (Lisp_Object *) xmalloc (buttons * sizeof (*button_values)); + button_values = xmalloc (buttons * sizeof *button_values); for (; XTYPE (list) == Lisp_Cons; list = XCDR (list)) { === modified file 'src/nsterm.m' --- src/nsterm.m 2013-08-08 17:52:00 +0000 +++ src/nsterm.m 2013-08-11 01:30:20 +0000 @@ -344,8 +344,8 @@ { if (hold_event_q.cap == 0) hold_event_q.cap = 10; else hold_event_q.cap *= 2; - hold_event_q.q = (struct input_event *) - xrealloc (hold_event_q.q, hold_event_q.cap * sizeof (*hold_event_q.q)); + hold_event_q.q = + xrealloc (hold_event_q.q, hold_event_q.cap * sizeof *hold_event_q.q); } hold_event_q.q[hold_event_q.nr++] = *event; === modified file 'src/process.c' --- src/process.c 2013-08-06 14:17:25 +0000 +++ src/process.c 2013-08-11 01:30:20 +0000 @@ -4526,7 +4526,7 @@ #endif (max (max_process_desc, max_input_desc) + 1, &Available, - (check_write ? &Writeok : (SELECT_TYPE *)0), + (check_write ? &Writeok : 0), NULL, &timeout, NULL); #ifdef HAVE_GNUTLS === modified file 'src/regex.c' --- src/regex.c 2013-07-10 23:23:57 +0000 +++ src/regex.c 2013-08-11 01:30:20 +0000 @@ -468,7 +468,7 @@ /* Assumes a `char *destination' variable. */ # define REGEX_REALLOCATE(source, osize, nsize) \ - (destination = (char *) alloca (nsize), \ + (destination = alloca (nsize), \ memcpy (destination, source, osize)) /* No need to do anything to free, after alloca. */ @@ -4208,7 +4208,7 @@ { bufp->regs_allocated = REGS_UNALLOCATED; regs->num_regs = 0; - regs->start = regs->end = (regoff_t *) 0; + regs->start = regs->end = 0; } } WEAK_ALIAS (__re_set_registers, re_set_registers) @@ -6395,8 +6395,7 @@ re_exec (const char *s) { const size_t len = strlen (s); - return (re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0) - >= 0); + return re_search (&re_comp_buf, s, len, 0, len, 0) >= 0; } #endif /* _REGEX_RE_COMP */ @@ -6560,7 +6559,7 @@ /* Perform the searching operation. */ ret = re_search (&private_preg, string, len, /* start: */ 0, /* range: */ len, - want_reg_info ? ®s : (struct re_registers *) 0); + want_reg_info ? ®s : 0); /* Copy the register information to the POSIX structure. */ if (want_reg_info) === modified file 'src/scroll.c' --- src/scroll.c 2013-08-03 03:29:03 +0000 +++ src/scroll.c 2013-08-11 01:30:20 +0000 @@ -652,8 +652,7 @@ /* A queue of deletions and insertions to be performed. */ struct alt_queue { int count, pos, window; }; - struct alt_queue *queue_start = (struct alt_queue *) - alloca (window_size * sizeof *queue_start); + struct alt_queue *queue_start = alloca (window_size * sizeof *queue_start); struct alt_queue *queue = queue_start; /* True if a terminal window has been set with set_terminal_window. */ @@ -797,9 +796,8 @@ int unchanged_at_bottom, int *draw_cost, int *old_draw_cost, int *old_hash, int *new_hash, int free_at_end) { - struct matrix_elt *matrix; - matrix = ((struct matrix_elt *) - alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix)); + struct matrix_elt *matrix + = alloca ((window_size + 1) * (window_size + 1) * sizeof *matrix); if (FRAME_SCROLL_REGION_OK (frame)) { === modified file 'src/termcap.c' --- src/termcap.c 2013-07-12 02:03:47 +0000 +++ src/termcap.c 2013-08-11 01:30:20 +0000 @@ -406,7 +406,7 @@ if (termcap_name && !filep && !strcmp (name, getenv ("TERM"))) { - indirect = tgetst1 (find_capability (termcap_name, "tc"), (char **) 0); + indirect = tgetst1 (find_capability (termcap_name, "tc"), 0); if (!indirect) { if (!bp) @@ -490,7 +490,7 @@ /* Does this entry refer to another terminal type's entry? If something is found, copy it into heap and null-terminate it. */ tc_search_point = find_capability (tc_search_point, "tc"); - term = tgetst1 (tc_search_point, (char **) 0); + term = tgetst1 (tc_search_point, 0); } emacs_close (fd); === modified file 'src/window.c' --- src/window.c 2013-08-08 04:42:40 +0000 +++ src/window.c 2013-08-11 01:30:20 +0000 @@ -1364,7 +1364,7 @@ static int check_window_containing (struct window *w, void *user_data) { - struct check_window_data *cw = (struct check_window_data *) user_data; + struct check_window_data *cw = user_data; enum window_part found; int continue_p = 1; @@ -2164,7 +2164,7 @@ static int add_window_to_list (struct window *w, void *user_data) { - Lisp_Object *list = (Lisp_Object *) user_data; + Lisp_Object *list = user_data; Lisp_Object window; XSETWINDOW (window, w); *list = Fcons (window, *list); @@ -6481,7 +6481,7 @@ void freeze_window_starts (struct frame *f, bool freeze_p) { - foreach_window (f, freeze_window_start, (void *) (freeze_p ? f : 0)); + foreach_window (f, freeze_window_start, freeze_p ? f : 0); } === modified file 'src/xdisp.c' --- src/xdisp.c 2013-08-09 21:19:42 +0000 +++ src/xdisp.c 2013-08-11 01:30:20 +0000 @@ -5508,8 +5508,8 @@ static int compare_overlay_entries (const void *e1, const void *e2) { - struct overlay_entry *entry1 = (struct overlay_entry *) e1; - struct overlay_entry *entry2 = (struct overlay_entry *) e2; + struct overlay_entry const *entry1 = e1; + struct overlay_entry const *entry2 = e2; int result; if (entry1->after_string_p != entry2->after_string_p) @@ -9908,7 +9908,7 @@ ptrdiff_t maxsize = FRAME_MESSAGE_BUF_SIZE (f); char *message_buf = alloca (maxsize + 1); - len = doprnt (message_buf, maxsize, m, (char *)0, ap); + len = doprnt (message_buf, maxsize, m, 0, ap); message3 (make_string (message_buf, len)); } === modified file 'src/xfns.c' --- src/xfns.c 2013-08-09 12:25:34 +0000 +++ src/xfns.c 2013-08-11 01:30:20 +0000 @@ -2331,12 +2331,8 @@ /* maybe_set_screen_title_format (shell_widget); */ pane_widget = lw_create_widget ("main", "pane", widget_id_tick++, - (widget_value *) NULL, - shell_widget, False, - (lw_callback) NULL, - (lw_callback) NULL, - (lw_callback) NULL, - (lw_callback) NULL); + NULL, shell_widget, False, + NULL, NULL, NULL, NULL); ac = 0; XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++; @@ -2483,8 +2479,7 @@ */ XChangeProperty (XtDisplay (frame_widget), XtWindow (frame_widget), FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols, - XA_ATOM, 32, PropModeAppend, - (unsigned char*) NULL, 0); + XA_ATOM, 32, PropModeAppend, NULL, 0); /* Make all the standard events reach the Emacs frame. */ attributes.event_mask = STANDARD_EVENT_SET; @@ -4009,7 +4004,7 @@ / x_display_pixel_width (dpyinfo)); mm_height_per_pixel = ((double) HeightMMOfScreen (dpyinfo->screen) / x_display_pixel_height (dpyinfo)); - monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors)); + monitors = xzalloc (n_monitors * sizeof *monitors); for (i = 0; i < n_monitors; ++i) { struct MonitorInfo *mi = &monitors[i]; @@ -4069,7 +4064,7 @@ return Qnil; } n_monitors = resources->noutput; - monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors)); + monitors = xzalloc (n_monitors * sizeof *monitors); #ifdef HAVE_XRRGETOUTPUTPRIMARY pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window); @@ -4225,7 +4220,7 @@ #endif n_monitors = gdk_screen_get_n_monitors (gscreen); monitor_frames = Fmake_vector (make_number (n_monitors), Qnil); - monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors)); + monitors = xzalloc (n_monitors * sizeof *monitors); FOR_EACH_FRAME (rest, frame) { @@ -4463,8 +4458,7 @@ validate_x_resource_name (); - dpyinfo = x_term_init (name, (char *)0, - SSDATA (Vx_resource_name)); + dpyinfo = x_term_init (name, 0, SSDATA (Vx_resource_name)); if (dpyinfo == 0) error ("Cannot connect to X server %s", SDATA (name)); @@ -4497,10 +4491,7 @@ error ("Not using X Windows"); /* That doesn't stop us anymore. */ #endif - if (! NILP (xrm_string)) - xrm_option = SSDATA (xrm_string); - else - xrm_option = (char *) 0; + xrm_option = NILP (xrm_string) ? 0 : SSDATA (xrm_string); validate_x_resource_name (); @@ -5724,8 +5715,8 @@ static void file_dialog_cb (Widget widget, XtPointer client_data, XtPointer call_data) { - int *result = (int *) client_data; - XmAnyCallbackStruct *cb = (XmAnyCallbackStruct *) call_data; + int *result = client_data; + XmAnyCallbackStruct *cb = call_data; *result = cb->reason; } @@ -5738,7 +5729,7 @@ static void file_dialog_unmap_cb (Widget widget, XtPointer client_data, XtPointer call_data) { - int *result = (int *) client_data; + int *result = client_data; *result = XmCR_CANCEL; } === modified file 'src/xfont.c' --- src/xfont.c 2013-08-03 03:29:03 +0000 +++ src/xfont.c 2013-08-11 01:30:20 +0000 @@ -593,9 +593,7 @@ { if (XGetFontProperty (xfont, XA_FONT, &value)) { - char *s; - - s = (char *) XGetAtomName (display, (Atom) value); + char *s = XGetAtomName (display, (Atom) value); /* If DXPC (a Differential X Protocol Compressor) Ver.3.7 is running, XGetAtomName will return null @@ -760,7 +758,7 @@ char *p0, *p; int dashes = 0; - p0 = p = (char *) XGetAtomName (FRAME_X_DISPLAY (f), (Atom) value); + p0 = p = XGetAtomName (FRAME_X_DISPLAY (f), (Atom) value); /* Count the number of dashes in the "full name". If it is too few, this isn't really the font's full name, so don't use it. === modified file 'src/xmenu.c' --- src/xmenu.c 2013-08-03 03:29:03 +0000 +++ src/xmenu.c 2013-08-11 01:30:20 +0000 @@ -373,7 +373,7 @@ #elif defined USE_GTK ! gtk_events_pending () #else - ! XPending ((Display*) data) + ! XPending (data) #endif ) { @@ -722,8 +722,7 @@ xg_menu_item_cb_data *cb_data; Lisp_Object help; - cb_data = (xg_menu_item_cb_data*) g_object_get_data (G_OBJECT (widget), - XG_ITEM_DATA); + cb_data = g_object_get_data (G_OBJECT (widget), XG_ITEM_DATA); if (! cb_data) return; help = call_data ? cb_data->help : Qnil; @@ -741,15 +740,11 @@ static void menu_highlight_callback (Widget widget, LWLIB_ID id, void *call_data) { - struct frame *f; - Lisp_Object help; - - widget_value *wv = (widget_value *) call_data; - - help = wv ? wv->help : Qnil; + widget_value *wv = call_data; + Lisp_Object help = wv ? wv->help : Qnil; /* Determine the frame for the help event. */ - f = menubar_id_to_frame (id); + struct frame *f = menubar_id_to_frame (id); show_help_event (f, widget, help); } @@ -769,7 +764,7 @@ static void menubar_selection_callback (GtkWidget *widget, gpointer client_data) { - xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; + xg_menu_item_cb_data *cb_data = client_data; if (xg_crazy_callback_abort) return; @@ -1370,7 +1365,7 @@ static void menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { - struct next_popup_x_y* data = (struct next_popup_x_y*)user_data; + struct next_popup_x_y *data = user_data; GtkRequisition req; struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (data->f); int disp_width = x_display_pixel_width (dpyinfo); @@ -1391,10 +1386,10 @@ static void popup_selection_callback (GtkWidget *widget, gpointer client_data) { - xg_menu_item_cb_data *cb_data = (xg_menu_item_cb_data*) client_data; + xg_menu_item_cb_data *cb_data = client_data; if (xg_crazy_callback_abort) return; - if (cb_data) menu_item_selection = (Lisp_Object *) cb_data->call_data; + if (cb_data) menu_item_selection = cb_data->call_data; } static void @@ -1497,7 +1492,7 @@ static void popup_selection_callback (Widget widget, LWLIB_ID id, XtPointer client_data) { - menu_item_selection = (Lisp_Object *) client_data; + menu_item_selection = client_data; } /* ARG is the LWLIB ID of the dialog box, represented @@ -1583,7 +1578,7 @@ make_number (menu_id & ~(-1 << (fact))))); /* Process events that apply to the menu. */ - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 1); + popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), menu_id, 1); unbind_to (specpdl_count, Qnil); } @@ -1882,7 +1877,7 @@ /* Treat the pointer as an integer. There's no problem as long as pointers have enough bits to hold small integers. */ if ((intptr_t) client_data != -1) - menu_item_selection = (Lisp_Object *) client_data; + menu_item_selection = client_data; popup_activated_flag = 0; } @@ -1924,7 +1919,7 @@ /* Treat the pointer as an integer. There's no problem as long as pointers have enough bits to hold small integers. */ if ((intptr_t) client_data != -1) - menu_item_selection = (Lisp_Object *) client_data; + menu_item_selection = client_data; block_input (); lw_destroy_all_widgets (id); @@ -1967,8 +1962,7 @@ Fcons (make_number (dialog_id >> (fact)), make_number (dialog_id & ~(-1 << (fact))))); - popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), - dialog_id, 1); + popup_get_selection (0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); unbind_to (count, Qnil); } === modified file 'src/xrdb.c' --- src/xrdb.c 2013-08-09 12:25:34 +0000 +++ src/xrdb.c 2013-08-11 01:30:20 +0000 @@ -596,7 +596,7 @@ if (x_get_resource (rdb, name, class, x_rm_string, &value)) return (char *) value.addr; - return (char *) 0; + return 0; } /* Stand-alone test facilities. */ @@ -646,10 +646,7 @@ displayname = "localhost:0.0"; lp = member ("-xrm", arg_list); - if (! NIL (lp)) - resource_string = car (cdr (lp)); - else - resource_string = (char *) 0; + resource_string = NIL (lp) ? 0 : car (cdr (lp)); lp = member ("-c", arg_list); if (! NIL (lp)) === modified file 'src/xsmfns.c' --- src/xsmfns.c 2013-04-02 01:54:56 +0000 +++ src/xsmfns.c 2013-08-11 01:30:20 +0000 @@ -107,8 +107,7 @@ will be called. */ emacs_event.kind = NO_EVENT; - ret = IceProcessMessages (SmcGetIceConnection (smc_conn), - (IceReplyWaitInfo *)0, (Bool *)0); + ret = IceProcessMessages (SmcGetIceConnection (smc_conn), 0, 0); if (ret != IceProcessMessagesSuccess) { /* Either IO error or Connection closed. */ === modified file 'src/xterm.c' --- src/xterm.c 2013-08-10 09:16:37 +0000 +++ src/xterm.c 2013-08-11 01:30:20 +0000 @@ -1366,7 +1366,7 @@ } else if (glyph->u.glyphless.method == GLYPHLESS_DISPLAY_HEX_CODE) { - sprintf ((char *) buf, "%0*X", + sprintf (buf, "%0*X", glyph->u.glyphless.ch < 0x10000 ? 4 : 6, glyph->u.glyphless.ch); str = buf; @@ -4328,8 +4328,8 @@ static void xm_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) { - struct scroll_bar *bar = (struct scroll_bar *) client_data; - XmScrollBarCallbackStruct *cs = (XmScrollBarCallbackStruct *) call_data; + struct scroll_bar *bar = client_data; + XmScrollBarCallbackStruct *cs = call_data; int part = -1, whole = 0, portion = 0; switch (cs->reason) @@ -4403,12 +4403,11 @@ gdouble value, gpointer user_data) { - struct scroll_bar *bar = (struct scroll_bar *) user_data; + struct scroll_bar *bar = user_data; gdouble position; int part = -1, whole = 0, portion = 0; GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (range)); - struct frame *f = (struct frame *) g_object_get_data (G_OBJECT (range), - XG_FRAME_DATA); + struct frame *f = g_object_get_data (G_OBJECT (range), XG_FRAME_DATA); if (xg_ignore_gtk_scrollbar) return FALSE; position = gtk_adjustment_get_value (adj); @@ -4463,7 +4462,7 @@ GdkEventButton *event, gpointer user_data) { - struct scroll_bar *bar = (struct scroll_bar *) user_data; + struct scroll_bar *bar = user_data; bar->dragging = Qnil; if (WINDOWP (window_being_scrolled)) { @@ -4486,8 +4485,9 @@ static void xaw_jump_callback (Widget widget, XtPointer client_data, XtPointer call_data) { - struct scroll_bar *bar = (struct scroll_bar *) client_data; - float top = *(float *) call_data; + struct scroll_bar *bar = client_data; + float *top_addr = call_data; + float top = *top_addr; float shown; int whole, portion, height; int part; @@ -4528,9 +4528,9 @@ static void xaw_scroll_callback (Widget widget, XtPointer client_data, XtPointer call_data) { - struct scroll_bar *bar = (struct scroll_bar *) client_data; + struct scroll_bar *bar = client_data; /* The position really is stored cast to a pointer. */ - int position = (long) call_data; + int position = (intptr_t) call_data; Dimension height; int part; ------------------------------------------------------------ revno: 113793 committer: Juanma Barranquero branch nick: trunk timestamp: Sun 2013-08-11 02:07:48 +0200 message: lisp/*.el: More lexical-binding warnings' cleanups. * tutorial.el (tutorial--describe-nonstandard-key): Use string-match-p. (tutorial--detailed-help): Remove unused local variables. (tutorial--save-tutorial-to): Use ignore-errors. (help-with-tutorial): Use looking-at-p. * view.el (view-buffer-other-window, view-buffer-other-frame): Mark unused arguments. * woman.el (woman-parse-colon-path, woman-parse-colon-path) (woman-select-symbol-fonts, woman, woman-find-file) (woman-insert-file-contents, woman-non-underline-faces): Use string-match-p. (woman1-unquote): Move declaration. * xml.el (xml-parse-tag-1, xml-parse-string): Use looking-at-p. (xml-parse-dtd): Use looking-at-p, string-match-p. Mark unused argument. Remove unused local variable. (xml-parse-elem-type): Use string-match-p. (xml-substitute-numeric-entities): Use ignore-errors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-10 15:17:29 +0000 +++ lisp/ChangeLog 2013-08-11 00:07:48 +0000 @@ -1,5 +1,25 @@ 2013-08-10 Juanma Barranquero + * tutorial.el (tutorial--describe-nonstandard-key): Use string-match-p. + (tutorial--detailed-help): Remove unused local variables. + (tutorial--save-tutorial-to): Use ignore-errors. + (help-with-tutorial): Use looking-at-p. + + * view.el (view-buffer-other-window, view-buffer-other-frame): + Mark unused arguments. + + * woman.el (woman-parse-colon-path, woman-parse-colon-path) + (woman-select-symbol-fonts, woman, woman-find-file) + (woman-insert-file-contents, woman-non-underline-faces): + Use string-match-p. + (woman1-unquote): Move declaration. + + * xml.el (xml-parse-tag-1, xml-parse-string): Use looking-at-p. + (xml-parse-dtd): Use looking-at-p, string-match-p. Mark unused + argument. Remove unused local variable. + (xml-parse-elem-type): Use string-match-p. + (xml-substitute-numeric-entities): Use ignore-errors. + * calculator.el (calculator): Mark unused argument. (calculator-paste, calculator-quit, calculator-integer-p): Use ignore-errors. === modified file 'lisp/tutorial.el' --- lisp/tutorial.el 2013-08-05 14:26:57 +0000 +++ lisp/tutorial.el 2013-08-11 00:07:48 +0000 @@ -156,7 +156,7 @@ " RET instead.")) (insert "\n\nWith your current key bindings" " you can use " - (if (string-match "^the .*menus?$" where) + (if (string-match-p "^the .*menus?$" where) "" "the key") where @@ -346,10 +346,8 @@ (def-fun-txt (nth 2 tk)) (where (nth 3 tk)) (remark (nth 4 tk)) - (rem-fun (command-remapping def-fun)) (key-txt (key-description key)) - (key-fun (with-current-buffer tutorial-buffer (key-binding key))) - tot-len) + (key-fun (with-current-buffer tutorial-buffer (key-binding key)))) (unless (eq def-fun key-fun) ;; Insert key binding description: (when (string= key-txt explain-key-desc) @@ -723,9 +721,7 @@ saved-file (error-message-string err)))) ;; An error is raised here?? Is this a bug? - (condition-case nil - (undo-only) - (error nil)) + (ignore-errors (undo-only)) ;; Restore point (goto-char old-point) (if save-err @@ -881,7 +877,7 @@ ;; or just delete the <<...>> line if a [...] line follows. (cond ((save-excursion (forward-line 1) - (looking-at "\\[")) + (looking-at-p "\\[")) (delete-region (point) (progn (forward-line 1) (point)))) ((looking-at "<>") (replace-match "[Middle of page left blank for didactic purposes. Text continues below]")) === modified file 'lisp/view.el' --- lisp/view.el 2013-02-12 04:46:18 +0000 +++ lisp/view.el 2013-08-11 00:07:48 +0000 @@ -322,7 +322,7 @@ (view-mode-enter nil exit-action))) ;;;###autoload -(defun view-buffer-other-window (buffer &optional not-return exit-action) +(defun view-buffer-other-window (buffer &optional _not-return exit-action) "View BUFFER in View mode in another window. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and @@ -349,7 +349,7 @@ (view-mode-enter nil exit-action))) ;;;###autoload -(defun view-buffer-other-frame (buffer &optional not-return exit-action) +(defun view-buffer-other-frame (buffer &optional _not-return exit-action) "View BUFFER in View mode in another frame. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and === modified file 'lisp/woman.el' --- lisp/woman.el 2013-01-02 16:13:04 +0000 +++ lisp/woman.el 2013-08-11 00:07:48 +0000 @@ -438,7 +438,7 @@ (if (memq system-type '(windows-nt ms-dos)) (cond ((null paths) (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf))) - ((string-match ";" paths) + ((string-match-p ";" paths) ;; Assume DOS-style path-list... (woman-mapcan ; splice list into list (lambda (x) @@ -446,7 +446,7 @@ (list x) (mapcar 'woman-Cyg-to-Win (woman-parse-man.conf)))) (parse-colon-path paths))) - ((string-match "\\`[a-zA-Z]:" paths) + ((string-match-p "\\`[a-zA-Z]:" paths) ;; Assume single DOS-style path... (list paths)) (t @@ -974,7 +974,7 @@ ;; With NTEmacs 20.5, the PATTERN option to `x-list-fonts' does ;; not seem to work and fonts may be repeated, so ... (dolist (font fonts) - (and (string-match "-Symbol-" font) + (and (string-match-p "-Symbol-" font) (not (member font symbol-fonts)) (setq symbol-fonts (cons font symbol-fonts)))) symbol-fonts)) @@ -1173,7 +1173,7 @@ should be a topic string and non-nil RE-CACHE forces re-caching." (interactive (list nil current-prefix-arg)) ;; The following test is for non-interactive calls via gnudoit etc. - (if (or (not (stringp topic)) (string-match "\\S " topic)) + (if (or (not (stringp topic)) (string-match-p "\\S " topic)) (let ((file-name (woman-file-name topic re-cache))) (if file-name (woman-find-file file-name) @@ -1614,7 +1614,7 @@ (let* ((bufname (file-name-nondirectory file-name)) (case-fold-search t) (compressed - (not (not (string-match woman-file-compression-regexp bufname))))) + (and (string-match-p woman-file-compression-regexp bufname) t))) (if compressed (setq bufname (file-name-sans-extension bufname))) (setq bufname (if exists @@ -1756,7 +1756,7 @@ ;; Co-operate with auto-compression mode: (if (and compressed (or (eq compressed t) - (string-match woman-file-compression-regexp filename)) + (string-match-p woman-file-compression-regexp filename)) ;; (not auto-compression-mode) (not (rassq 'jka-compr-handler file-name-handler-alist)) ) ;; (error "Compressed file requires Auto File Decompression turned on") @@ -2192,7 +2192,7 @@ (let ((face-list (face-list))) (dolist (face face-list) (let ((face-name (symbol-name face))) - (if (and (string-match "\\`woman-" face-name) + (if (and (string-match-p "\\`woman-" face-name) (face-underline-p face)) (let ((face-no-ul (intern (concat face-name "-no-ul")))) (copy-face face face-no-ul) @@ -3029,6 +3029,8 @@ "Delete any double-quote characters up to the end of the line." (woman-unquote (save-excursion (end-of-line) (point-marker)))) +(defvar woman1-unquote) ; bound locally by woman1-roff-buffer + (defun woman1-roff-buffer () "Process non-breaking requests." (let ((case-fold-search t) @@ -3069,8 +3071,6 @@ ".I -- Set words of current line in italic font." (woman1-B-or-I ".ft I\n")) -(defvar woman1-unquote) ; bound locally by woman1-roff-buffer - (defun woman1-B-or-I (B-or-I) ".B/I -- Set words of current line in bold/italic font. B-OR-I is the appropriate complete control line." === modified file 'lisp/xml.el' --- lisp/xml.el 2013-02-13 07:24:11 +0000 +++ lisp/xml.el 2013-08-11 00:07:48 +0000 @@ -479,7 +479,7 @@ xml-default-ns)))) (cond ;; Processing instructions, like . - ((looking-at "<\\?") + ((looking-at-p "<\\?") (search-forward "?>") (skip-syntax-forward " ") (xml-parse-tag-1 parse-dtd xml-ns)) @@ -492,14 +492,14 @@ (buffer-substring-no-properties pos (match-beginning 0)) (xml-parse-string)))) ;; DTD for the document - ((looking-at "") ;; FIXME: This loses the skipped-over spaces. (skip-syntax-forward " ") @@ -507,7 +507,7 @@ (let ((xml-sub-parser t)) (xml-parse-tag-1 parse-dtd xml-ns)))) ;; end tag - ((looking-at "") + ((looking-at-p "/>") (forward-char 2) (nreverse children)) ;; is this a valid start tag ? @@ -538,12 +538,12 @@ (forward-char 1) ;; Now check that we have the right end-tag. (let ((end (concat ""))) - (while (not (looking-at end)) + (while (not (looking-at-p end)) (cond ((eobp) (error "XML: (Not Well-Formed) End of document while reading element `%s'" node-name)) - ((looking-at "") + (if (and (looking-at-p ">") xml-validating-parser) (error "XML: (Validity) Invalid DTD (expecting name of the document)")) @@ -755,7 +755,7 @@ ;; Parse the rest of the DTD ;; Fixme: Deal with NOTATION, PIs. - (while (not (looking-at "\\s-*\\]")) + (while (not (looking-at-p "\\s-*\\]")) (skip-syntax-forward " ") (cond ((eobp) @@ -771,14 +771,14 @@ (end-pos (match-end 0))) ;; Translation of rule [46] of XML specifications (cond - ((string-match "\\`EMPTY\\s-*\\'" type) ; empty declaration + ((string-match-p "\\`EMPTY\\s-*\\'" type) ; empty declaration (setq type 'empty)) - ((string-match "\\`ANY\\s-*$" type) ; any type of contents + ((string-match-p "\\`ANY\\s-*$" type) ; any type of contents (setq type 'any)) ((string-match "\\`(\\(.*\\))\\s-*\\'" type) ; children ([47]) (setq type (xml-parse-elem-type (match-string-no-properties 1 type)))) - ((string-match "^%[^;]+;[ \t\n\r]*\\'" type) ; substitution + ((string-match-p "^%[^;]+;[ \t\n\r]*\\'" type) ; substitution nil) (xml-validating-parser (error "XML: (Validity) Invalid element type in the DTD"))) @@ -803,7 +803,7 @@ (goto-char (match-end 0))) ;; Comments (skip to end, ignoring parameter entity): - ((looking-at "") (and next-parameter-entity (> (point) next-parameter-entity) @@ -856,7 +856,6 @@ (unless (looking-at xml-pe-reference-re) (error "XML: Internal error")) (let* ((entity (match-string 1)) - (beg (point-marker)) (elt (assoc entity xml-parameter-entity-alist))) (if elt (progn @@ -916,11 +915,11 @@ (progn (setq elem (match-string-no-properties 1 string) modifier (match-string-no-properties 2 string)) - (if (string-match "|" elem) + (if (string-match-p "|" elem) (setq elem (cons 'choice (mapcar 'xml-parse-elem-type (split-string elem "|")))) - (if (string-match "," elem) + (if (string-match-p "," elem) (setq elem (cons 'seq (mapcar 'xml-parse-elem-type (split-string elem ","))))))) @@ -987,13 +986,12 @@ (if (and string (stringp string)) (let ((start 0)) (while (string-match "&#\\([0-9]+\\);" string start) - (condition-case nil - (setq string (replace-match - (string (read (substring string - (match-beginning 1) - (match-end 1)))) - nil nil string)) - (error nil)) + (ignore-errors + (setq string (replace-match + (string (read (substring string + (match-beginning 1) + (match-end 1)))) + nil nil string))) (setq start (1+ (match-beginning 0)))) string) nil)) ------------------------------------------------------------ revno: 113792 committer: Xue Fuqiao branch nick: trunk timestamp: Sun 2013-08-11 06:54:32 +0800 message: Add some notes related to continuous build on Hydra diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-04 16:56:56 +0000 +++ admin/ChangeLog 2013-08-10 22:54:32 +0000 @@ -1,3 +1,7 @@ +2013-08-10 Xue Fuqiao + + * notes/hydra: New file. + 2013-08-04 Paul Eggert Fix some minor races in hosts lacking mkostemp (Bug#15015). === added file 'admin/notes/hydra' --- admin/notes/hydra 1970-01-01 00:00:00 +0000 +++ admin/notes/hydra 2013-08-10 22:54:32 +0000 @@ -0,0 +1,57 @@ +-*- outline -*- + +Copyright (C) 2013 Free Software Foundation, Inc. +See the end of the file for license conditions. + +NOTES FOR EMACS CONTINUOUS BUILD ON HYDRA + +A continuous build for Emacs trunk can be found at +http://hydra.nixos.org/jobset/gnu/emacs-trunk + +* It builds (and runs ERT tests) on these platforms: +i686-cygwin +i686-freebsd +i686-linux +x86_64-darwin +x86_64-linux + +* Mail notifications +Hydra sends notifications about build breakages in Emacs trunk to +emacs-buildstatus@gnu.org. + +If you want to receive these notifications, please subscribe at +http://lists.gnu.org/mailman/listinfo/emacs-buildstatus + +* The Emacs jobset consists of the following jobs: + +** The `tarball' job +which gets the source tree as input, and is just a `make dist' after +some autoconf/-make or bootstrap script. + +** The `build' job +which gets the result of the tarball job as input, together with +system identifier, this job basically does a normal make, make check, +make install. + +** The 'coverage' job +is now running `make check'. + +* Other GNU packages +For a list of other GNU packages that have a continuous build on +Hydra, see http://hydra.nixos.org/project/gnu + + +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 . ------------------------------------------------------------ revno: 113791 committer: Paul Eggert branch nick: trunk timestamp: Sat 2013-08-10 08:42:08 -0700 message: Minor string-length refactoring. * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known. * frame.c (make_monitor_attribute_list): Prefer build_string to strlen + make_string. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-10 09:16:37 +0000 +++ src/ChangeLog 2013-08-10 15:42:08 +0000 @@ -1,3 +1,10 @@ +2013-08-10 Paul Eggert + + Minor string-length refactoring. + * alloc.c (xstrdup): Use memcpy, not strcpy, since the length's known. + * frame.c (make_monitor_attribute_list): + Prefer build_string to strlen + make_string. + 2013-08-10 Jan Djärv * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus, === modified file 'src/alloc.c' --- src/alloc.c 2013-08-09 12:25:34 +0000 +++ src/alloc.c 2013-08-10 15:42:08 +0000 @@ -796,8 +796,10 @@ char * xstrdup (const char *s) { + ptrdiff_t size; eassert (s); - return strcpy (xmalloc (strlen (s) + 1), s); + size = strlen (s) + 1; + return memcpy (xmalloc (size), s, size); } /* Like putenv, but (1) use the equivalent of xmalloc and (2) the === modified file 'src/frame.c' --- src/frame.c 2013-08-08 04:42:40 +0000 +++ src/frame.c 2013-08-10 15:42:08 +0000 @@ -725,7 +725,7 @@ XSETFRAME (frame, f); store_in_alist (&parms, Qtty_type, build_string (t->display_info.tty->type)); - store_in_alist (&parms, Qtty, + store_in_alist (&parms, Qtty, (t->display_info.tty->name ? build_string (t->display_info.tty->name) : Qnil)); @@ -4203,8 +4203,7 @@ mi->work.width, mi->work.height); geometry = list4i (mi->geom.x, mi->geom.y, mi->geom.width, mi->geom.height); - attributes = Fcons (Fcons (Qsource, - make_string (source, strlen (source))), + attributes = Fcons (Fcons (Qsource, build_string (source)), attributes); attributes = Fcons (Fcons (Qframes, AREF (monitor_frames, i)), attributes); ------------------------------------------------------------ revno: 113790 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-10 17:17:29 +0200 message: lisp/*.el: Remove lexical-binding warnings; additional small cleanups. * calculator.el (calculator): Mark unused argument. (calculator-paste, calculator-quit, calculator-integer-p): Use ignore-errors. (calculator-string-to-number, calculator-decimal, calculator-exp) (calculator-op-or-exp): Use string-match-p. * dired-aux.el (dired-compress): Use ignore-errors. (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions) (dired-do-async-shell-command, dired-do-shell-command) (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir) (dired-insert-subdir-validate): Use string-match-p. (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p. (dired-add-entry): Use string-match-p, looking-at-p. (dired-insert-subdir-newpos): Remove unused local variable. * dired.el (dired-buffer-more-recently-used-p): Declare. (dired-insert-set-properties, dired-insert-old-subdirs): Use ignore-errors. * filenotify.el (file-notify-callback): Remove unused local variable. * filesets.el (filesets-error): Mark unused argument. (filesets-which-command-p, filesets-filter-dir-names) (filesets-directory-files, filesets-get-external-viewer) (filesets-ingroup-get-data): Use string-match-p. * find-file.el (ff-other-file-name, ff-other-file-name) (ff-find-the-other-file, ff-cc-hh-converter): Remove unused local variables. (ff-get-file-name): Use string-match-p. (ff-all-dirs-under): Use ignore-errors. * follow.el (follow-comint-scroll-to-bottom): Mark unused argument. (follow-select-if-visible): Remove unused local variable. * forms.el (read-file-filter): Move declaration. (forms--make-format, forms--make-parser, forms-insert-record): Quote function with #'. (forms--update): Use string-match-p. Quote function with #'. * help-mode.el (help-dir-local-var-def): Mark unused argument. (help-make-xrefs): Use looking-at-p. (help-xref-on-pp): Use looking-at-p, ignore-errors. * ibuffer.el (ibuffer-ext-visible-p): Declare. (ibuffer-confirm-operation-on): Use string-match-p. * msb.el (msb-item-handler, msb-dired-item-handler): Mark unused arguments. * ses.el (ses-decode-cell-symbol) (ses-kill-override): Remove unused local variable. (ses-create-cell-variable, ses-relocate-formula): Use string-match-p. (ses-load): Use ignore-errors, looking-at-p. (ses-jump-safe): Use ignore-errors. (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments. * tabify.el (untabify, tabify): Mark unused arguments. * thingatpt.el (thing-at-point--bounds-of-well-formed-url): Mark unused argument. (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point) (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-10 12:30:38 +0000 +++ lisp/ChangeLog 2013-08-10 15:17:29 +0000 @@ -1,5 +1,69 @@ 2013-08-10 Juanma Barranquero + * calculator.el (calculator): Mark unused argument. + (calculator-paste, calculator-quit, calculator-integer-p): + Use ignore-errors. + (calculator-string-to-number, calculator-decimal, calculator-exp) + (calculator-op-or-exp): Use string-match-p. + + * dired.el (dired-buffer-more-recently-used-p): Declare. + (dired-insert-set-properties, dired-insert-old-subdirs): + Use ignore-errors. + + * dired-aux.el (dired-compress): Use ignore-errors. + (dired-do-chxxx, dired-do-chmod, dired-trample-file-versions) + (dired-do-async-shell-command, dired-do-shell-command) + (dired-shell-stuff-it, dired-compress-file, dired-insert-subdir) + (dired-insert-subdir-validate): Use string-match-p. + (dired-map-dired-file-lines, dired-subdir-hidden-p): Use looking-at-p. + (dired-add-entry): Use string-match-p, looking-at-p. + (dired-insert-subdir-newpos): Remove unused local variable. + + * filenotify.el (file-notify-callback): Remove unused local variable. + + * filesets.el (filesets-error): Mark unused argument. + (filesets-which-command-p, filesets-filter-dir-names) + (filesets-directory-files, filesets-get-external-viewer) + (filesets-ingroup-get-data): Use string-match-p. + + * find-file.el (ff-other-file-name, ff-other-file-name) + (ff-find-the-other-file, ff-cc-hh-converter): + Remove unused local variables. + (ff-get-file-name): Use string-match-p. + (ff-all-dirs-under): Use ignore-errors. + + * follow.el (follow-comint-scroll-to-bottom): Mark unused argument. + (follow-select-if-visible): Remove unused local variable. + + * forms.el (read-file-filter): Move declaration. + (forms--make-format, forms--make-parser, forms-insert-record): + Quote function with #'. + (forms--update): Use string-match-p. Quote function with #'. + + * help-mode.el (help-dir-local-var-def): Mark unused argument. + (help-make-xrefs): Use looking-at-p. + (help-xref-on-pp): Use looking-at-p, ignore-errors. + + * ibuffer.el (ibuffer-ext-visible-p): Declare. + (ibuffer-confirm-operation-on): Use string-match-p. + + * msb.el (msb-item-handler, msb-dired-item-handler): + Mark unused arguments. + + * ses.el (ses-decode-cell-symbol) + (ses-kill-override): Remove unused local variable. + (ses-create-cell-variable, ses-relocate-formula): Use string-match-p. + (ses-load): Use ignore-errors, looking-at-p. + (ses-jump-safe): Use ignore-errors. + (ses-export-tsv, ses-export-tsf, ses-unsafe): Mark unused arguments. + + * tabify.el (untabify, tabify): Mark unused arguments. + + * thingatpt.el (thing-at-point--bounds-of-well-formed-url): + Mark unused argument. + (bounds-of-thing-at-point, thing-at-point-bounds-of-list-at-point) + (thing-at-point-newsgroup-p, form-at-point): Use ignore-errors. + * emacs-lisp/timer.el (timer--time): Define setter with gv-define-setter to avoid deprecation warning. === modified file 'lisp/calculator.el' --- lisp/calculator.el 2013-05-21 07:25:14 +0000 +++ lisp/calculator.el 2013-08-10 15:17:29 +0000 @@ -708,7 +708,7 @@ ;; can't use 'noprompt, bug in electric.el (lambda () 'noprompt) nil - (lambda (x y) (calculator-update-display)))) + (lambda (_x _y) (calculator-update-display)))) (and calculator-buffer (catch 'calculator-done (calculator-quit))) (use-local-map old-l-map) @@ -905,9 +905,9 @@ value) (car (read-from-string (cond ((equal "." str) "0.0") - ((string-match "[eE][+-]?$" str) (concat str "0")) - ((string-match "\\.[0-9]\\|[eE]" str) str) - ((string-match "\\." str) + ((string-match-p "[eE][+-]?$" str) (concat str "0")) + ((string-match-p "\\.[0-9]\\|[eE]" str) str) + ((string-match-p "\\." str) ;; do this because Emacs reads "23." as an integer (concat str "0")) ((stringp str) (concat str ".0")) @@ -1366,7 +1366,7 @@ (or calculator-display-fragile (not (numberp (car calculator-stack)))) (not (and calculator-curnum - (string-match "[.eE]" calculator-curnum)))) + (string-match-p "[.eE]" calculator-curnum)))) ;; enter the period on the same condition as a digit, only if no ;; period or exponent entered yet (progn @@ -1382,7 +1382,7 @@ (if (and (or calculator-display-fragile (not (numberp (car calculator-stack)))) (not (and calculator-curnum - (string-match "[eE]" calculator-curnum)))) + (string-match-p "[eE]" calculator-curnum)))) ;; same condition as above, also no E so far (progn (calculator-clear-fragile) @@ -1452,7 +1452,7 @@ (interactive) (if (and (not calculator-display-fragile) calculator-curnum - (string-match "[eE]$" calculator-curnum)) + (string-match-p "[eE]$" calculator-curnum)) (calculator-digit) (calculator-op))) @@ -1661,8 +1661,7 @@ (setq str (concat (or (match-string 1 str) "0") (or (match-string 2 str) ".0") (or (match-string 3 str) "")))) - (condition-case nil (calculator-string-to-number str) - (error nil))))) + (ignore-errors (calculator-string-to-number str))))) (defun calculator-get-register (reg) "Get a value from a register REG." @@ -1728,13 +1727,11 @@ (interactive) (set-buffer calculator-buffer) (let ((inhibit-read-only t)) (erase-buffer)) - (if (not calculator-electric-mode) - (progn - (condition-case nil - (while (get-buffer-window calculator-buffer) - (delete-window (get-buffer-window calculator-buffer))) - (error nil)) - (kill-buffer calculator-buffer))) + (unless calculator-electric-mode + (ignore-errors + (while (get-buffer-window calculator-buffer) + (delete-window (get-buffer-window calculator-buffer)))) + (kill-buffer calculator-buffer)) (setq calculator-buffer nil) (message "Calculator done.") (if calculator-electric-mode (throw 'calculator-done nil))) @@ -1768,14 +1765,11 @@ (defun calculator-integer-p (x) "Non-nil if X is equal to an integer." - (condition-case nil - (= x (ftruncate x)) - (error nil))) + (ignore-errors (= x (ftruncate x)))) (defun calculator-expt (x y) "Compute X^Y, dealing with errors appropriately." - (condition-case - nil + (condition-case nil (expt x y) (domain-error 0.0e+NaN) (range-error === modified file 'lisp/dired-aux.el' --- lisp/dired-aux.el 2013-08-05 18:05:46 +0000 +++ lisp/dired-aux.el 2013-08-10 15:17:29 +0000 @@ -286,7 +286,7 @@ (if (eq op-symbol 'touch) (list "-t" new-attribute) (list new-attribute))) - (if (string-match "gnu" system-configuration) + (if (string-match-p "gnu" system-configuration) '("--") nil)) files)) (dired-do-redisplay arg);; moves point if ARG is an integer @@ -327,7 +327,7 @@ ;; We used to treat empty input as DEFAULT, but that is not ;; such a good idea (Bug#9361). (error "No file mode specified")) - ((string-match "^[0-7]+" modes) + ((string-match-p "^[0-7]+" modes) (setq num-modes (string-to-number modes 8)))) (dolist (file files) @@ -500,7 +500,7 @@ (goto-char (point-min)) (while (not (eobp)) (save-excursion - (and (not (looking-at dired-re-dir)) + (and (not (looking-at-p dired-re-dir)) (not (eolp)) (setq file (dired-get-filename nil t)) ; nil on non-file (progn (end-of-line) @@ -530,7 +530,7 @@ dired-file-version-alist))))))) (defun dired-trample-file-versions (fn) - (let* ((start-vn (string-match "\\.~[0-9]+~$" fn)) + (let* ((start-vn (string-match-p "\\.~[0-9]+~$" fn)) base-version-list) (and start-vn (setq base-version-list ; there was a base version to which @@ -602,7 +602,7 @@ (dired-read-shell-command "& on %s: " current-prefix-arg files) current-prefix-arg files))) - (unless (string-match "&[ \t]*\\'" command) + (unless (string-match-p "&[ \t]*\\'" command) (setq command (concat command " &"))) (dired-do-shell-command command arg file-list)) @@ -663,10 +663,10 @@ (dired-read-shell-command "! on %s: " current-prefix-arg files) current-prefix-arg files))) - (let* ((on-each (not (string-match dired-star-subst-regexp command))) - (no-subst (not (string-match dired-quark-subst-regexp command))) - (star (string-match "\\*" command)) - (qmark (string-match "\\?" command))) + (let* ((on-each (not (string-match-p dired-star-subst-regexp command))) + (no-subst (not (string-match-p dired-quark-subst-regexp command))) + (star (string-match-p "\\*" command)) + (qmark (string-match-p "\\?" command))) ;; Get confirmation for wildcards that may have been meant ;; to control substitution of a file name or the file name list. (if (cond ((not (or on-each no-subst)) @@ -713,8 +713,8 @@ (substring command 0 (match-beginning 0)) command)) (stuff-it - (if (or (string-match dired-star-subst-regexp command) - (string-match dired-quark-subst-regexp command)) + (if (or (string-match-p dired-star-subst-regexp command) + (string-match-p dired-quark-subst-regexp command)) (lambda (x) (let ((retval command)) (while (string-match @@ -840,9 +840,7 @@ (if new-file (let ((start (point))) ;; Remove any preexisting entry for the name NEW-FILE. - (condition-case nil - (dired-remove-entry new-file) - (error nil)) + (ignore-errors (dired-remove-entry new-file)) (goto-char start) ;; Now replace the current line with an entry for NEW-FILE. (dired-update-file-line new-file) nil) @@ -883,7 +881,7 @@ ;; See if any suffix rule matches this file name. (while suffixes (let (case-fold-search) - (if (string-match (car (car suffixes)) file) + (if (string-match-p (car (car suffixes)) file) (setq suffix (car suffixes) suffixes nil)) (setq suffixes (cdr suffixes)))) ;; If so, compute desired new name. @@ -1143,16 +1141,16 @@ ;; Avoid calling ls for files that are going to be omitted anyway. (let ((omit-re (dired-omit-regexp))) (or (string= omit-re "") - (not (string-match omit-re - (cond - ((eq 'no-dir dired-omit-localp) - filename) - ((eq t dired-omit-localp) - (dired-make-relative filename)) - (t - (dired-make-absolute - filename - (file-name-directory filename))))))))) + (not (string-match-p omit-re + (cond + ((eq 'no-dir dired-omit-localp) + filename) + ((eq t dired-omit-localp) + (dired-make-relative filename)) + (t + (dired-make-absolute + filename + (file-name-directory filename))))))))) ;; Do it! (progn (setq filename (directory-file-name filename)) @@ -1180,7 +1178,7 @@ ;; else try to find correct place to insert (if (dired-goto-subdir directory) (progn ;; unhide if necessary - (if (looking-at "\r") + (if (looking-at-p "\r") ;; Point is at end of subdir line. (dired-unhide-subdir)) ;; found - skip subdir and `total' line @@ -2090,7 +2088,7 @@ (and (not switches) cons (setq switches (cdr cons))) (dired-insert-subdir-validate dirname switches) ;; case-fold-search is nil now, so we can test for capital `R': - (if (setq switches-have-R (and switches (string-match "R" switches))) + (if (setq switches-have-R (and switches (string-match-p "R" switches))) ;; avoid duplicated subdirs (setq mark-alist (dired-kill-tree dirname t))) (if elt @@ -2128,8 +2126,8 @@ (mapcar (function (lambda (x) - (or (eq (null (string-match x real-switches)) - (null (string-match x dired-actual-switches))) + (or (eq (null (string-match-p x real-switches)) + (null (string-match-p x dired-actual-switches))) (error "Can't have dirs with and without -%s switches together" x)))) ;; all switches that make a difference to dired-get-filename: @@ -2170,7 +2168,7 @@ (defun dired-insert-subdir-newpos (new-dir) ;; Find pos for new subdir, according to tree order. ;;(goto-char (point-max)) - (let ((alist dired-subdir-alist) elt dir pos new-pos) + (let ((alist dired-subdir-alist) elt dir new-pos) (while alist (setq elt (car alist) alist (cdr alist) @@ -2421,7 +2419,7 @@ (and selective-display (save-excursion (dired-goto-subdir dir) - (looking-at "\r")))) + (looking-at-p "\r")))) ;;;###autoload (defun dired-hide-subdir (arg) === modified file 'lisp/dired.el' --- lisp/dired.el 2013-08-06 01:03:08 +0000 +++ lisp/dired.el 2013-08-10 15:17:29 +0000 @@ -34,6 +34,9 @@ ;;; Code: +(declare-function dired-buffer-more-recently-used-p + "dired-x" (buffer1 buffer2)) + ;;; Customizable variables (defgroup dired nil @@ -1242,26 +1245,25 @@ (save-excursion (goto-char beg) (while (< (point) end) - (condition-case nil - (if (not (dired-move-to-filename)) - (put-text-property (line-beginning-position) - (1+ (line-end-position)) - 'invisible 'dired-hide-details-information) - (put-text-property (+ (line-beginning-position) 1) (1- (point)) - 'invisible 'dired-hide-details-detail) - (add-text-properties - (point) - (progn - (dired-move-to-end-of-filename) - (point)) - '(mouse-face - highlight - dired-filename t - help-echo "mouse-2: visit this file in other window")) - (when (< (+ (point) 4) (line-end-position)) - (put-text-property (+ (point) 4) (line-end-position) - 'invisible 'dired-hide-details-link))) - (error nil)) + (ignore-errors + (if (not (dired-move-to-filename)) + (put-text-property (line-beginning-position) + (1+ (line-end-position)) + 'invisible 'dired-hide-details-information) + (put-text-property (+ (line-beginning-position) 1) (1- (point)) + 'invisible 'dired-hide-details-detail) + (add-text-properties + (point) + (progn + (dired-move-to-end-of-filename) + (point)) + '(mouse-face + highlight + dired-filename t + help-echo "mouse-2: visit this file in other window")) + (when (< (+ (point) 4) (line-end-position)) + (put-text-property (+ (point) 4) (line-end-position) + 'invisible 'dired-hide-details-link)))) (forward-line 1)))) ;; Reverting a dired buffer @@ -1401,11 +1403,9 @@ (setq elt (car old-subdir-alist) old-subdir-alist (cdr old-subdir-alist) dir (car elt)) - (condition-case () - (progn - (dired-uncache dir) - (dired-insert-subdir dir)) - (error nil)))))) + (ignore-errors + (dired-uncache dir) + (dired-insert-subdir dir)))))) (defun dired-uncache (dir) "Remove directory DIR from any directory cache." @@ -3849,7 +3849,7 @@ ;;; Start of automatically extracted autoloads. -;;;### (autoloads nil "dired-aux" "dired-aux.el" "555c067fcab27f5a377536db407803ab") +;;;### (autoloads nil "dired-aux" "dired-aux.el" "04b4cb6bde3220f55574eb1d99ac0d29") ;;; Generated autoloads from dired-aux.el (autoload 'dired-diff "dired-aux" "\ === modified file 'lisp/filenotify.el' --- lisp/filenotify.el 2013-07-24 13:29:15 +0000 +++ lisp/filenotify.el 2013-08-10 15:17:29 +0000 @@ -92,7 +92,7 @@ (pending-event (assoc desc file-notify--pending-events)) (actions (nth 1 event)) (file (file-notify--event-file-name event)) - file1 cookie callback) + file1 callback) ;; Make actions a list. (unless (consp actions) (setq actions (cons actions nil))) === modified file 'lisp/filesets.el' --- lisp/filesets.el 2013-07-12 03:54:57 +0000 +++ lisp/filesets.el 2013-08-10 15:17:29 +0000 @@ -214,8 +214,8 @@ (defun filesets-which-command-p (cmd) "Call \"which CMD\" and return non-nil if the command was found." - (when (string-match (format "\\(/[^/]+\\)?/%s" cmd) - (filesets-which-command cmd)) + (when (string-match-p (format "\\(/[^/]+\\)?/%s" cmd) + (filesets-which-command cmd)) cmd)) (defun filesets-message (level &rest args) @@ -1082,7 +1082,7 @@ (require 'easymenu) - (defun filesets-error (class &rest args) + (defun filesets-error (_class &rest args) "`error' wrapper." (error "%s" (mapconcat 'identity args " "))) @@ -1093,10 +1093,10 @@ If NEGATIVE is non-nil, remove all directory names." (filesets-filter-list lst (lambda (x) - (and (not (string-match "^\\.+/$" x)) + (and (not (string-match-p "^\\.+/$" x)) (if negative - (not (string-match "[:/\\]$" x)) - (string-match "[:/\\]$" x)))))) + (not (string-match-p "[:/\\]$" x)) + (string-match-p "[:/\\]$" x)))))) (defun filesets-conditional-sort (lst &optional access-fn) "Return a sorted copy of LST, LST being a list of strings. @@ -1130,18 +1130,18 @@ (dirs nil)) (dolist (this (file-name-all-completions "" dir)) (cond - ((string-match "^\\.+/$" this) + ((string-match-p "^\\.+/$" this) nil) - ((string-match "[:/\\]$" this) + ((string-match-p "[:/\\]$" this) (when (or (not match-dirs-flag) (not pattern) - (string-match pattern this)) + (string-match-p pattern this)) (filesets-message 5 "Filesets: matched dir %S with pattern %S" this pattern) (setq dirs (cons this dirs)))) (t (when (or (not pattern) - (string-match pattern this)) + (string-match-p pattern this)) (filesets-message 5 "Filesets: matched file %S with pattern %S" this pattern) (setq files (cons (if full-flag @@ -1249,7 +1249,7 @@ (let ((filename (file-name-nondirectory file))) (filesets-some (lambda (entry) - (when (and (string-match (nth 0 entry) filename) + (when (and (string-match-p (nth 0 entry) filename) (filesets-eviewer-constraint-p entry)) entry)) filesets-external-viewers))) @@ -2004,7 +2004,7 @@ (fn (or fun (lambda (a b) (and (stringp a) (stringp b) - (string-match a b)))))) + (string-match-p a b)))))) (filesets-some (lambda (x) (if (funcall fn (car x) masterfile) (nth pos x) === modified file 'lisp/find-file.el' --- lisp/find-file.el 2013-05-06 15:46:31 +0000 +++ lisp/find-file.el 2013-08-10 15:17:29 +0000 @@ -528,11 +528,9 @@ stub ;; name of the file without extension alist ;; working copy of the list of file extensions pathname ;; the pathname of the file or the #include line - default-name ;; file we should create if none found format ;; what we have to match found ;; name of the file or buffer found - nil if none - dirs ;; local value of ff-search-directories - no-match) ;; whether we know about this kind of file + dirs) ;; local value of ff-search-directories (message "Working...") @@ -545,7 +543,6 @@ (cond ((and (not ff-ignore-include) fname) - (setq default-name fname) (setq found (ff-get-file-name dirs fname nil))) ;; let's just get the corresponding file @@ -558,7 +555,6 @@ "/none.none")) (setq fname (file-name-nondirectory pathname) - no-match nil match (car alist)) ;; find the table entry corresponding to this file @@ -569,8 +565,7 @@ (setq pos (ff-string-match (car match) fname))) ;; no point going on if we haven't found anything - (if (not match) - (setq no-match t) + (when match ;; otherwise, suffixes contains what we need (setq suffixes (car (cdr match)) @@ -583,8 +578,7 @@ (progn (setq suffixes (funcall action (buffer-file-name)) match (cons (car match) (list suffixes)) - stub nil - default-name (car suffixes))) + stub nil)) ;; otherwise build our filename stub (cond @@ -599,11 +593,7 @@ (setq format (concat "\\(.+\\)" (car match))) (string-match format fname) (setq stub (substring fname (match-beginning 1) (match-end 1))) - )) - - ;; if we find nothing, we should try to get a file like this one - (setq default-name - (concat stub (car (car (cdr match)))))) + ))) ;; do the real work - find the file (setq found @@ -671,7 +661,7 @@ (setq buf (buffer-name (car blist))) (while (and blist (not found)) - (if (string-match (concat filename "<[0-9]+>") buf) + (if (string-match-p (concat filename "<[0-9]+>") buf) (setq found (buffer-file-name (car blist)))) (setq blist (cdr blist)) @@ -797,20 +787,18 @@ "Get all the directory files under directory HERE. Exclude all files in the optional EXCLUDE list." (if (file-directory-p here) - (condition-case nil - (progn - (let ((files (directory-files here t)) - (dirlist (list)) - file) - (while files - (setq file (car files)) - (if (and - (file-directory-p file) - (not (member (ff-basename file) exclude))) - (setq dirlist (cons file dirlist))) - (setq files (cdr files))) - (setq dirlist (reverse dirlist)))) - (error nil)) + (ignore-errors + (let ((files (directory-files here t)) + (dirlist (list)) + file) + (while files + (setq file (car files)) + (if (and + (file-directory-p file) + (not (member (ff-basename file) exclude))) + (setq dirlist (cons file dirlist))) + (setq files (cdr files))) + (setq dirlist (reverse dirlist)))) nil)) (defun ff-switch-file (f1 f2 file &optional in-other-window new-file) @@ -892,9 +880,7 @@ Build up a new file list based possibly on part of the directory name and the name of the file passed in." (ff-string-match "\\(.*\\)/\\([^/]+\\)/\\([^.]+\\).\\([^/]+\\)$" arg) - (let ((path (if (match-beginning 1) - (substring arg (match-beginning 1) (match-end 1)) nil)) - (dire (if (match-beginning 2) + (let ((dire (if (match-beginning 2) (substring arg (match-beginning 2) (match-end 2)) nil)) (file (if (match-beginning 3) (substring arg (match-beginning 3) (match-end 3)) nil)) === modified file 'lisp/follow.el' --- lisp/follow.el 2013-08-05 10:35:55 +0000 +++ lisp/follow.el 2013-08-10 15:17:29 +0000 @@ -515,7 +515,7 @@ (declare-function comint-adjust-point "comint" (window)) (defvar comint-scroll-show-maximum-output) -(defun follow-comint-scroll-to-bottom (&optional window) +(defun follow-comint-scroll-to-bottom (&optional _window) "Scroll the bottom-most window in the current Follow chain. This is to be called by `comint-postoutput-scroll-to-bottom'." (let* ((buffer (current-buffer)) @@ -883,15 +883,14 @@ (defun follow-select-if-visible (dest win-start-end) "Select and return a window, if DEST is visible in it. Return the selected window." - (let (win win-end wse) + (let (win wse) (while (and (not win) win-start-end) ;; Don't select a window that was just moved. This makes it ;; possible to later select the last window after a ;; `end-of-buffer' command. (setq wse (car win-start-end)) (when (follow-pos-visible dest (car wse) win-start-end) - (setq win (car wse) - win-end (nth 2 wse)) + (setq win (car wse)) (select-window win)) (setq win-start-end (cdr win-start-end))) win)) === modified file 'lisp/forms.el' --- lisp/forms.el 2013-01-01 09:11:05 +0000 +++ lisp/forms.el 2013-08-10 15:17:29 +0000 @@ -439,6 +439,8 @@ (defvar forms--rw-face nil "Face used to represent read-write data on the screen.") +(defvar read-file-filter) ; bound in forms--intuit-from-file + ;;;###autoload (defun forms-mode (&optional primary) "Major mode to visit files in a field-structured manner using a form. @@ -913,7 +915,7 @@ `(lambda (arg) (let ((inhibit-read-only t)) ,@(apply 'append - (mapcar 'forms--make-format-elt-using-text-properties + (mapcar #'forms--make-format-elt-using-text-properties forms-format-list)) ;; Prevent insertion before the first text. ,@(if (numberp (car forms-format-list)) @@ -926,7 +928,7 @@ (setq forms--iif-start nil)) `(lambda (arg) ,@(apply 'append - (mapcar 'forms--make-format-elt forms-format-list))))) + (mapcar #'forms--make-format-elt forms-format-list))))) ;; We have tallied the number of markers and dynamic texts, ;; so we can allocate the arrays now. @@ -1098,7 +1100,7 @@ (goto-char (point-min)) ,@(apply 'append (mapcar - 'forms--make-parser-elt + #'forms--make-parser-elt (append forms-format-list (list nil))))))))) (forms--debug 'forms--parser)) @@ -1198,8 +1200,6 @@ (setq forms--field nil))) )) -(defvar read-file-filter) ; bound in forms--intuit-from-file - (defun forms--intuit-from-file () "Get number of fields and a default form using the data file." @@ -1569,10 +1569,10 @@ ;; Build new record. (setq forms--the-record-list (forms--parse-form)) (setq the-record - (mapconcat 'identity forms--the-record-list forms-field-sep)) + (mapconcat #'identity forms--the-record-list forms-field-sep)) - (if (string-match (regexp-quote forms-field-sep) - (mapconcat 'identity forms--the-record-list "")) + (if (string-match-p (regexp-quote forms-field-sep) + (mapconcat #'identity forms--the-record-list "")) (error "Field separator occurs in record - update refused")) ;; Handle multi-line fields, if allowed. @@ -1580,7 +1580,7 @@ (forms--trans the-record "\n" forms-multi-line)) ;; A final sanity check before updating. - (if (string-match "\n" the-record) + (if (string-match-p "\n" the-record) (error "Multi-line fields in this record - update refused")) (with-current-buffer forms--file-buffer @@ -1779,11 +1779,7 @@ (setq the-list (cdr (append the-fields nil)))) (setq the-list (make-list forms-number-of-fields ""))) - (setq the-record - (mapconcat - 'identity - the-list - forms-field-sep)) + (setq the-record (mapconcat #'identity the-list forms-field-sep)) (with-current-buffer forms--file-buffer (forms--goto-record ln) === modified file 'lisp/help-mode.el' --- lisp/help-mode.el 2013-06-12 02:16:02 +0000 +++ lisp/help-mode.el 2013-08-10 15:17:29 +0000 @@ -268,7 +268,7 @@ (define-button-type 'help-dir-local-var-def :supertype 'help-xref - 'help-function (lambda (var &optional file) + 'help-function (lambda (_var &optional file) ;; FIXME: this should go to the point where the ;; local variable was defined. (find-file file)) @@ -541,7 +541,7 @@ (while (and (not (eobp)) ;; Stop at a pair of blank lines. - (not (looking-at "\n\\s-*\n"))) + (not (looking-at-p "\n\\s-*\n"))) ;; Skip a single blank line. (and (eolp) (forward-line)) (end-of-line) @@ -605,26 +605,25 @@ (save-restriction (narrow-to-region from to) (goto-char (point-min)) - (condition-case nil - (while (not (eobp)) - (cond - ((looking-at "\"") (forward-sexp 1)) - ((looking-at "#<") (search-forward ">" nil 'move)) - ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)") - (let* ((sym (intern-soft (match-string 1))) - (type (cond ((fboundp sym) 'help-function) - ((or (memq sym '(t nil)) - (keywordp sym)) - nil) - ((and sym - (or (boundp sym) - (get sym - 'variable-documentation))) - 'help-variable)))) - (when type (help-xref-button 1 type sym))) - (goto-char (match-end 1))) - (t (forward-char 1)))) - (error nil))))))) + (ignore-errors + (while (not (eobp)) + (cond + ((looking-at-p "\"") (forward-sexp 1)) + ((looking-at-p "#<") (search-forward ">" nil 'move)) + ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)") + (let* ((sym (intern-soft (match-string 1))) + (type (cond ((fboundp sym) 'help-function) + ((or (memq sym '(t nil)) + (keywordp sym)) + nil) + ((and sym + (or (boundp sym) + (get sym + 'variable-documentation))) + 'help-variable)))) + (when type (help-xref-button 1 type sym))) + (goto-char (match-end 1))) + (t (forward-char 1)))))))))) ;; Additional functions for (re-)creating types of help buffers. === modified file 'lisp/ibuffer.el' --- lisp/ibuffer.el 2013-07-31 10:19:06 +0000 +++ lisp/ibuffer.el 2013-08-10 15:17:29 +0000 @@ -53,6 +53,8 @@ (defvar ibuffer-tmp-hide-regexps) (defvar ibuffer-tmp-show-regexps) +(declare-function ibuffer-ext-visible-p "ibuf-ext" + (buf all &optional ibuffer-buf)) (declare-function ibuffer-mark-on-buffer "ibuf-ext" (func &optional ibuffer-mark-on-buffer-mark group)) (declare-function ibuffer-generate-filter-groups "ibuf-ext" @@ -1198,7 +1200,7 @@ (and (stringp (cadr err)) ;; This definitely falls in the ;; ghetto hack category... - (not (string-match "too small" (cadr err))))) + (not (string-match-p "too small" (cadr err))))) (signal (car err) (cdr err)) (enlarge-window 3)))))) (select-window (next-window)) === modified file 'lisp/msb.el' --- lisp/msb.el 2013-01-01 09:11:05 +0000 +++ lisp/msb.el 2013-08-10 15:17:29 +0000 @@ -386,7 +386,7 @@ ;;; ;;; Some example function to be used for `msb-item-handling-function'. ;;; -(defun msb-item-handler (buffer &optional maxbuf) +(defun msb-item-handler (_buffer &optional _maxbuf) "Create one string item, concerning BUFFER, for the buffer menu. The item looks like: *% @@ -410,7 +410,7 @@ (error "Unknown type of `dired-directory' in buffer %s" (buffer-name))))) -(defun msb-dired-item-handler (buffer &optional maxbuf) +(defun msb-dired-item-handler (_buffer &optional _maxbuf) "Create one string item, concerning a dired BUFFER, for the buffer menu. The item looks like: *% === modified file 'lisp/ses.el' --- lisp/ses.el 2013-01-02 16:13:04 +0000 +++ lisp/ses.el 2013-08-10 15:17:29 +0000 @@ -703,7 +703,6 @@ (and (string-match "\\`\\([A-Z]+\\)\\([0-9]+\\)\\'" str) (let* ((col-str (match-string-no-properties 1 str)) (col 0) - (col-offset 0) (col-base 1) (col-idx (1- (length col-str))) (row (1- (string-to-number (match-string-no-properties 2 str))))) @@ -740,7 +739,7 @@ Return nil in case of failure." (unless (local-variable-p sym) (make-local-variable sym) - (if (let (case-fold-search) (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name sym))) + (if (let (case-fold-search) (string-match-p "\\`[A-Z]+[0-9]+\\'" (symbol-name sym))) (put sym 'ses-cell (cons row col)) (put sym 'ses-cell :ses-named) (setq ses--named-cell-hashmap (or ses--named-cell-hashmap (make-hash-table :test 'eq))) @@ -1474,7 +1473,7 @@ (let (rowcol result) (if (or (atom formula) (eq (car formula) 'quote)) (if (and (setq rowcol (ses-sym-rowcol formula)) - (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) + (string-match-p "\\`[A-Z]+[0-9]+\\'" (symbol-name formula))) (ses-relocate-symbol formula rowcol startrow startcol rowincr colincr) formula) ; Pass through as-is. @@ -1735,7 +1734,7 @@ (search-backward ";; Local Variables:\n" nil t) (backward-list 1) (setq ses--params-marker (point-marker)) - (let ((params (condition-case nil (read (current-buffer)) (error nil)))) + (let ((params (ignore-errors (read (current-buffer))))) (or (and (= (safe-length params) 3) (numberp (car params)) (numberp (cadr params)) @@ -1761,7 +1760,7 @@ ;; Skip over print area, which we assume is correct. (goto-char (point-min)) (forward-line ses--numrows) - (or (looking-at ses-print-data-boundary) + (or (looking-at-p ses-print-data-boundary) (error "Missing marker between print and data areas")) (forward-char 1) (setq ses--data-marker (point-marker)) @@ -1774,12 +1773,12 @@ (dotimes (col ses--numcols) (let* ((x (read (current-buffer))) (sym (car-safe (cdr-safe x)))) - (or (and (looking-at "\n") + (or (and (looking-at-p "\n") (eq (car-safe x) 'ses-cell) (ses-create-cell-variable sym row col)) (error "Cell-def error")) (eval x))) - (or (looking-at "\n\n") + (or (looking-at-p "\n\n") (error "Missing blank line between rows"))) ;; Load global parameters. (let ((widths (read (current-buffer))) @@ -1805,8 +1804,8 @@ (1value (eval head-row))) ;; Should be back at global-params. (forward-char 1) - (or (looking-at (replace-regexp-in-string "1" "[0-9]+" - ses-initial-global-parameters)) + (or (looking-at-p (replace-regexp-in-string "1" "[0-9]+" + ses-initial-global-parameters)) (error "Problem with column-defs or global-params")) ;; Check for overall newline count in definitions area. (forward-line 3) @@ -2077,9 +2076,8 @@ (defun ses-jump-safe (cell) "Like `ses-jump', but no error if invalid cell." - (condition-case nil - (ses-jump cell) - (error))) + (ignore-errors + (ses-jump cell))) (defun ses-reprint-all (&optional nonarrow) "Recreate the display area. Calls all printer functions. Narrows to @@ -2789,7 +2787,7 @@ ;; For some reason, the text-read-only error is not caught by `delete-region', ;; so we have to use subterfuge. (let ((buffer-read-only t)) - (1value (condition-case x + (1value (condition-case nil (noreturn (funcall (lookup-key (current-global-map) (this-command-keys)) beg end)) @@ -3014,13 +3012,13 @@ (ses-col-printer (1- ses--numcols))))) rowcol)) -(defun ses-export-tsv (beg end) +(defun ses-export-tsv (_beg _end) "Export values from the current range, with tabs between columns and newlines between rows. Result is placed in kill ring." (interactive "r") (ses-export-tab nil)) -(defun ses-export-tsf (beg end) +(defun ses-export-tsf (_beg _end) "Export formulas from the current range, with tabs between columns and newlines between rows. Result is placed in kill ring." (interactive "r") @@ -3298,7 +3296,7 @@ (let* ((x (ses-sym-rowcol ref)) (xcell (ses-get-cell (car x) (cdr x)))) (ses-cell-references-aset xcell - (cons new-name (delq sym + (cons new-name (delq sym (ses-cell-references xcell)))))) (push new-name ses--renamed-cell-symb-list) (set new-name (symbol-value sym)) @@ -3579,7 +3577,7 @@ current column and continues until the next nonblank column." (ses-center-span value ?~)) -(defun ses-unsafe (value) +(defun ses-unsafe (_value) "Substitute for an unsafe formula or printer." (error "Unsafe formula or printer")) === modified file 'lisp/tabify.el' --- lisp/tabify.el 2013-06-18 08:17:01 +0000 +++ lisp/tabify.el 2013-08-10 15:17:29 +0000 @@ -28,7 +28,7 @@ ;;; Code: ;;;###autoload -(defun untabify (start end &optional arg) +(defun untabify (start end &optional _arg) "Convert all tabs in region to multiple spaces, preserving columns. If called interactively with prefix ARG, convert for the entire buffer. @@ -61,7 +61,7 @@ \"^\\t* [ \\t]+\" is also useful, for tabifying only initial whitespace.") ;;;###autoload -(defun tabify (start end &optional arg) +(defun tabify (start end &optional _arg) "Convert multiple spaces in region to tabs when possible. A group of spaces is partially replaced by tabs when this can be done without changing the column they end at. === modified file 'lisp/thingatpt.el' --- lisp/thingatpt.el 2013-05-08 15:10:17 +0000 +++ lisp/thingatpt.el 2013-08-10 15:17:29 +0000 @@ -84,48 +84,47 @@ (if (get thing 'bounds-of-thing-at-point) (funcall (get thing 'bounds-of-thing-at-point)) (let ((orig (point))) - (condition-case nil - (save-excursion - ;; Try moving forward, then back. - (funcall ;; First move to end. - (or (get thing 'end-op) - (lambda () (forward-thing thing 1)))) - (funcall ;; Then move to beg. - (or (get thing 'beginning-op) - (lambda () (forward-thing thing -1)))) - (let ((beg (point))) - (if (<= beg orig) - ;; If that brings us all the way back to ORIG, - ;; it worked. But END may not be the real end. - ;; So find the real end that corresponds to BEG. - ;; FIXME: in which cases can `real-end' differ from `end'? - (let ((real-end - (progn - (funcall - (or (get thing 'end-op) - (lambda () (forward-thing thing 1)))) - (point)))) - (when (and (<= orig real-end) (< beg real-end)) - (cons beg real-end))) - (goto-char orig) - ;; Try a second time, moving backward first and then forward, - ;; so that we can find a thing that ends at ORIG. - (funcall ;; First, move to beg. - (or (get thing 'beginning-op) - (lambda () (forward-thing thing -1)))) - (funcall ;; Then move to end. - (or (get thing 'end-op) - (lambda () (forward-thing thing 1)))) - (let ((end (point)) - (real-beg + (ignore-errors + (save-excursion + ;; Try moving forward, then back. + (funcall ;; First move to end. + (or (get thing 'end-op) + (lambda () (forward-thing thing 1)))) + (funcall ;; Then move to beg. + (or (get thing 'beginning-op) + (lambda () (forward-thing thing -1)))) + (let ((beg (point))) + (if (<= beg orig) + ;; If that brings us all the way back to ORIG, + ;; it worked. But END may not be the real end. + ;; So find the real end that corresponds to BEG. + ;; FIXME: in which cases can `real-end' differ from `end'? + (let ((real-end (progn (funcall - (or (get thing 'beginning-op) - (lambda () (forward-thing thing -1)))) + (or (get thing 'end-op) + (lambda () (forward-thing thing 1)))) (point)))) - (if (and (<= real-beg orig) (<= orig end) (< real-beg end)) - (cons real-beg end)))))) - (error nil))))) + (when (and (<= orig real-end) (< beg real-end)) + (cons beg real-end))) + (goto-char orig) + ;; Try a second time, moving backward first and then forward, + ;; so that we can find a thing that ends at ORIG. + (funcall ;; First, move to beg. + (or (get thing 'beginning-op) + (lambda () (forward-thing thing -1)))) + (funcall ;; Then move to end. + (or (get thing 'end-op) + (lambda () (forward-thing thing 1)))) + (let ((end (point)) + (real-beg + (progn + (funcall + (or (get thing 'beginning-op) + (lambda () (forward-thing thing -1)))) + (point)))) + (if (and (<= real-beg orig) (<= orig end) (< real-beg end)) + (cons real-beg end)))))))))) ;;;###autoload (defun thing-at-point (thing &optional no-properties) @@ -217,21 +216,19 @@ \[Internal function used by `bounds-of-thing-at-point'.]" (save-excursion (let ((opoint (point)) - (beg (condition-case nil - (progn (up-list -1) - (point)) - (error nil)))) - (condition-case nil - (if beg - (progn (forward-sexp) - (cons beg (point))) - ;; Are we are at the beginning of a top-level sexp? - (forward-sexp) - (let ((end (point))) - (backward-sexp) - (if (>= opoint (point)) - (cons opoint end)))) - (error nil))))) + (beg (ignore-errors + (up-list -1) + (point)))) + (ignore-errors + (if beg + (progn (forward-sexp) + (cons beg (point))) + ;; Are we are at the beginning of a top-level sexp? + (forward-sexp) + (let ((end (point))) + (backward-sexp) + (if (>= opoint (point)) + (cons opoint end)))))))) ;; Defuns @@ -358,7 +355,7 @@ (if found (cons (match-beginning 1) (match-end 1)))))) -(defun thing-at-point--bounds-of-well-formed-url (beg end pt) +(defun thing-at-point--bounds-of-well-formed-url (beg end _pt) (save-excursion (goto-char beg) (let (url-beg paren-end regexp) @@ -453,16 +450,14 @@ htb ret) (while htbs (setq htb (car htbs) htbs (cdr htbs)) - (condition-case nil - (progn - ;; errs: htb symbol may be unbound, or not a hash-table. - ;; gnus-gethash is just a macro for intern-soft. - (and (symbol-value htb) - (intern-soft string (symbol-value htb)) - (setq ret string htbs nil)) - ;; If we made it this far, gnus is running, so ignore "heads": - (setq heads nil)) - (error nil))) + (ignore-errors + ;; errs: htb symbol may be unbound, or not a hash-table. + ;; gnus-gethash is just a macro for intern-soft. + (and (symbol-value htb) + (intern-soft string (symbol-value htb)) + (setq ret string htbs nil)) + ;; If we made it this far, gnus is running, so ignore "heads": + (setq heads nil))) (or ret (not heads) (let ((head (string-match "\\`\\([[:lower:]]+\\)\\." string))) (and head (setq head (substring string 0 (match-end 1))) @@ -566,9 +561,8 @@ (car read-data)))) (defun form-at-point (&optional thing pred) - (let ((sexp (condition-case nil - (read-from-whole-string (thing-at-point (or thing 'sexp))) - (error nil)))) + (let ((sexp (ignore-errors + (read-from-whole-string (thing-at-point (or thing 'sexp)))))) (if (or (not pred) (funcall pred sexp)) sexp))) ;;;###autoload ------------------------------------------------------------ revno: 113789 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-10 14:30:38 +0200 message: lisp/emacs-lisp/timer.el (timer--time): Define setter with gv-define-setter. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-10 12:00:19 +0000 +++ lisp/ChangeLog 2013-08-10 12:30:38 +0000 @@ -1,7 +1,10 @@ 2013-08-10 Juanma Barranquero + * emacs-lisp/timer.el (timer--time): Define setter with + gv-define-setter to avoid deprecation warning. + * completion.el: Remove stuff unused since revno:3176 (1993-05-27). - (*record-cmpl-statistics-p*): Remove (was commented out ). + (*record-cmpl-statistics-p*): Remove (was commented out). (cmpl-statistics-block): Remove (body was commented out). All callers changed. (add-completions-from-buffer, load-completions-from-file): === modified file 'lisp/emacs-lisp/timer.el' --- lisp/emacs-lisp/timer.el 2013-05-17 04:09:16 +0000 +++ lisp/emacs-lisp/timer.el 2013-08-10 12:30:38 +0000 @@ -62,23 +62,22 @@ (timer--usecs timer) (timer--psecs timer))) -(gv-define-simple-setter timer--time - (lambda (timer time) - (timer--check timer) - (setf (timer--high-seconds timer) (pop time)) - (let ((low time) (usecs 0) (psecs 0)) - (if (consp time) - (progn - (setq low (pop time)) - (if time - (progn - (setq usecs (pop time)) - (if time - (setq psecs (car time))))))) - (setf (timer--low-seconds timer) low) - (setf (timer--usecs timer) usecs) - (setf (timer--psecs timer) psecs)))) - +(gv-define-setter timer--time (time timer) + (macroexp-let2 nil val time + `(progn + (timer--check ,timer) + (setf (timer--high-seconds ,timer) (pop ,val)) + (let ((low ,val) (usecs 0) (psecs 0)) + (when (consp ,val) + (setq low (pop ,val)) + (when ,val + (setq usecs (pop ,val)) + (when ,val + (setq psecs (car ,val))))) + (setf (timer--low-seconds ,timer) low) + (setf (timer--usecs ,timer) usecs) + (setf (timer--psecs ,timer) psecs)) + ,val))) (defun timer-set-time (timer time &optional delta) "Set the trigger time of TIMER to TIME. ------------------------------------------------------------ revno: 113788 committer: Juanma Barranquero branch nick: trunk timestamp: Sat 2013-08-10 14:00:19 +0200 message: lisp/completion.el: Remove stuff unused since revno:3176 (1993-05-27). (*record-cmpl-statistics-p*): Remove (was commented out ). (cmpl-statistics-block): Remove (body was commented out). All callers changed. (add-completions-from-buffer, load-completions-from-file): Remove unused variables. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-09 23:15:39 +0000 +++ lisp/ChangeLog 2013-08-10 12:00:19 +0000 @@ -1,3 +1,12 @@ +2013-08-10 Juanma Barranquero + + * completion.el: Remove stuff unused since revno:3176 (1993-05-27). + (*record-cmpl-statistics-p*): Remove (was commented out ). + (cmpl-statistics-block): Remove (body was commented out). + All callers changed. + (add-completions-from-buffer, load-completions-from-file): + Remove unused variables. + 2013-08-09 Juanma Barranquero * filecache.el (file-cache-delete-file-list): === modified file 'lisp/completion.el' --- lisp/completion.el 2013-08-05 14:26:57 +0000 +++ lisp/completion.el 2013-08-10 12:00:19 +0000 @@ -343,9 +343,6 @@ :type '(set (const lisp) (const c)) :group 'completion) -;;(defvar *record-cmpl-statistics-p* nil -;; "If non-nil, record completion statistics.") - ;;(defvar *completion-auto-save-period* 1800 ;; "The period in seconds to wait for emacs to be idle before autosaving ;;the completions. Default is a 1/2 hour.") @@ -692,16 +689,6 @@ ;; are in completion-stats.el. ;;----------------------------------------------- -;; Conditionalizing code on *record-cmpl-statistics-p* -;;----------------------------------------------- -;; All statistics code outside this block should use this -(defmacro cmpl-statistics-block (&rest _body)) -;; "Only executes body if we are recording statistics." -;; (list 'cond -;; (list* '*record-cmpl-statistics-p* body) -;; )) - -;;----------------------------------------------- ;; Completion Sources ;;----------------------------------------------- @@ -1004,9 +991,7 @@ "Initialize the completion storage. All existing completions are lost." (interactive) (setq cmpl-prefix-obarray (make-vector cmpl-obarray-length 0)) - (setq cmpl-obarray (make-vector cmpl-obarray-length 0)) - (cmpl-statistics-block - (record-clear-all-completions))) + (setq cmpl-obarray (make-vector cmpl-obarray-length 0))) (defvar completions-list-return-value) @@ -1154,9 +1139,6 @@ (set-cmpl-prefix-entry-tail prefix-entry entry)) (t (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) - ;; statistics - (cmpl-statistics-block - (note-added-completion)) ;; set symbol (set cmpl-db-symbol (car entry))))) @@ -1206,9 +1188,6 @@ (t ;; Start new prefix entry (set cmpl-db-prefix-symbol (make-cmpl-prefix-entry entry)))) - ;; statistics - (cmpl-statistics-block - (note-added-completion)) ;; Add it to the symbol (set cmpl-db-symbol (car entry))))) @@ -1236,9 +1215,7 @@ (or (set-cmpl-prefix-entry-head prefix-entry (cdr (cmpl-prefix-entry-head prefix-entry))) ;; List is now empty - (set cmpl-db-prefix-symbol nil)))) - (cmpl-statistics-block - (note-completion-deleted))) + (set cmpl-db-prefix-symbol nil))))) (error "Unknown completion `%s'" completion-string))) ;; Tests -- @@ -1372,8 +1349,6 @@ (let ((string (and enable-completion (symbol-before-point))) (current-completion-source cmpl-source-separator) entry) - (cmpl-statistics-block - (note-separator-character string)) (cond (string (setq entry (add-completion-to-head string)) (if (and completion-on-separator-character @@ -1614,9 +1589,6 @@ completion-prefix-min-length))) ;; get index (setq cmpl-current-index (if current-prefix-arg arg 0)) - ;; statistics - (cmpl-statistics-block - (note-complete-entered-afresh cmpl-original-string)) ;; reset database (completion-search-reset cmpl-original-string) ;; erase what we've got @@ -1649,9 +1621,6 @@ (goto-char insert-point)) (t;; point at end, (setq cmpl-last-insert-location insert-point))) - ;; statistics - (cmpl-statistics-block - (note-complete-inserted entry cmpl-current-index)) ;; Done ! cmpl-stat-complete-successful ;;display the next completion (cond @@ -1677,9 +1646,6 @@ (if (and print-status-p (sit-for 0)) (message "No %scompletions." (if (eq this-command last-command) "more " ""))) - ;; statistics - (cmpl-statistics-block - (record-complete-failed cmpl-current-index)) ;; Pretend that we were never here (setq this-command 'failed-complete))))) @@ -1709,25 +1675,14 @@ (defun add-completions-from-buffer () (interactive) - (let ((current-completion-source cmpl-source-file-parsing) - (start-num - (cmpl-statistics-block - (aref completion-add-count-vector cmpl-source-file-parsing))) - mode) + (let ((current-completion-source cmpl-source-file-parsing)) (cond ((memq major-mode '(emacs-lisp-mode lisp-mode)) - (add-completions-from-lisp-buffer) - (setq mode 'lisp)) + (add-completions-from-lisp-buffer)) ((memq major-mode '(c-mode)) - (add-completions-from-c-buffer) - (setq mode 'c)) + (add-completions-from-c-buffer)) (t (error "Cannot parse completions in %s buffers" - major-mode))) - (cmpl-statistics-block - (record-cmpl-parse-file - mode (point-max) - (- (aref completion-add-count-vector cmpl-source-file-parsing) - start-num))))) + major-mode))))) ;; Find file hook (defun completion-find-file-hook () @@ -1960,8 +1915,7 @@ ((not cmpl-completions-accepted-p) (message "Completions database has not changed - not writing.")) (t - (save-completions-to-file)))) - (cmpl-statistics-block (record-cmpl-kill-emacs))) + (save-completions-to-file))))) ;; There is no point bothering to change this again ;; unless the package changes so much that it matters @@ -2066,9 +2020,7 @@ (set-buffer-modified-p nil) (message "Couldn't save completion file `%s'" filename))) ;; Reset accepted-p flag - (setq cmpl-completions-accepted-p nil) ) - (cmpl-statistics-block - (record-save-completions total-in-db total-perm total-saved)))))) + (setq cmpl-completions-accepted-p nil) ))))) ;;(defun auto-save-completions () ;; (if (and save-completions-flag enable-completion cmpl-initialized-p @@ -2103,9 +2055,6 @@ string entry last-use-time cmpl-entry cmpl-last-use-time (current-completion-source cmpl-source-init-file) - (start-num - (cmpl-statistics-block - (aref completion-add-count-vector cmpl-source-file-parsing))) (total-in-file 0) (total-perm 0)) ;; insert the file into a buffer (condition-case nil @@ -2163,12 +2112,6 @@ (message "Loading completions from file %s . . . Done." filename)) (message "End of file while reading completions.")))))) - - (cmpl-statistics-block - (record-load-completions - total-in-file total-perm - (- (aref completion-add-count-vector cmpl-source-init-file) - start-num))) )))))) (defun completion-initialize () @@ -2201,9 +2144,7 @@ (cond ((eq last-command 'complete) (delete-region (point) cmpl-last-insert-location) (insert cmpl-original-string) - (setq completion-to-accept nil) - (cmpl-statistics-block - (record-complete-failed))) + (setq completion-to-accept nil)) (t (kill-region beg end)))) @@ -2263,15 +2204,10 @@ (use-completion-before-separator))) (defun use-completion-backward-under () - (use-completion-under-point) - (if (eq last-command 'complete) - ;; probably a failed completion if you have to back up - (cmpl-statistics-block (record-complete-failed)))) + (use-completion-under-point)) (defun use-completion-backward () - (if (eq last-command 'complete) - ;; probably a failed completion if you have to back up - (cmpl-statistics-block (record-complete-failed)))) + nil) (defun completion-before-command () (funcall (or (and (symbolp this-command) @@ -2428,9 +2364,6 @@ ;; fooquux ;; fooper - (cmpl-statistics-block - (record-completion-file-loaded)) - (completion-initialize))) ;;----------------------------------------------- ------------------------------------------------------------ revno: 113787 committer: Glenn Morris branch nick: trunk timestamp: Sat 2013-08-10 06:18:08 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-08-05 10:17:40 +0000 +++ autogen/Makefile.in 2013-08-10 10:18:08 +0000 @@ -1129,6 +1129,7 @@ UNEXEC_OBJ = @UNEXEC_OBJ@ UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@ +UPDATE_MANIFEST = @UPDATE_MANIFEST@ USE_ACL = @USE_ACL@ VERSION = @VERSION@ VMLIMIT_OBJ = @VMLIMIT_OBJ@ === modified file 'autogen/configure' --- autogen/configure 2013-08-05 10:17:40 +0000 +++ autogen/configure 2013-08-10 10:18:08 +0000 @@ -1368,6 +1368,7 @@ W32_RES_LINK CLIENTW CLIENTRES +UPDATE_MANIFEST EMACS_MANIFEST EMACSRES W32_LIBS @@ -10080,6 +10081,7 @@ CLIENTW= W32_RES_LINK= EMACS_MANIFEST= +UPDATE_MANIFEST= if test "${with_w32}" != no; then case "${opsys}" in cygwin) @@ -10243,6 +10245,7 @@ x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; *) EMACS_MANIFEST="emacs-x86.manifest" ;; esac + UPDATE_MANIFEST=update-game-score.exe.manifest if test "${opsys}" = "cygwin"; then W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" @@ -10280,6 +10283,7 @@ + if test "${HAVE_W32}" = "yes"; then window_system=w32 with_xft=no ------------------------------------------------------------ revno: 113786 fixes bug: http://debbugs.gnu.org/14417 committer: Jan D. branch nick: trunk timestamp: Sat 2013-08-10 11:16:37 +0200 message: * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus, don't check minor_code. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-08-09 21:19:42 +0000 +++ src/ChangeLog 2013-08-10 09:16:37 +0000 @@ -1,3 +1,8 @@ +2013-08-10 Jan Djärv + + * xterm.c (x_error_handler): Also ignore BadWindow for X_SetInputFocus, + don't check minor_code (Bug#14417). + 2013-08-09 Eli Zaretskii * xdisp.c (draw_glyphs): Don't compare row pointers, compare row === modified file 'src/xterm.c' --- src/xterm.c 2013-08-09 12:25:34 +0000 +++ src/xterm.c 2013-08-10 09:16:37 +0000 @@ -7808,9 +7808,8 @@ x_error_handler (Display *display, XErrorEvent *event) { #if defined USE_GTK && defined HAVE_GTK3 - if (event->error_code == BadMatch - && event->request_code == X_SetInputFocus - && event->minor_code == 0) + if ((event->error_code == BadMatch || event->error_code == BadWindow) + && event->request_code == X_SetInputFocus) { return 0; } ------------------------------------------------------------ revno: 113785 committer: Eli Zaretskii branch nick: trunk timestamp: Sat 2013-08-10 10:43:41 +0300 message: Provide a Windows manifest for update-game-score.exe. lib-src/update-game-score.exe.manifest: New file. lib-src/Makefile.in (UPDATE_MANIFEST): New variable. (SCRIPTS): Add $(UPDATE_MANIFEST). configure.ac: Define and substitute UPDATE_MANIFEST. diff: === modified file 'ChangeLog' --- ChangeLog 2013-08-04 21:27:49 +0000 +++ ChangeLog 2013-08-10 07:43:41 +0000 @@ -1,3 +1,7 @@ +2013-08-10 Eli Zaretskii + + * configure.ac: Define and substitute UPDATE_MANIFEST. + 2013-08-04 Stephen Berman * info/dir: Add todo-mode. === modified file 'configure.ac' --- configure.ac 2013-08-04 16:56:56 +0000 +++ configure.ac 2013-08-10 07:43:41 +0000 @@ -1641,6 +1641,7 @@ CLIENTW= W32_RES_LINK= EMACS_MANIFEST= +UPDATE_MANIFEST= if test "${with_w32}" != no; then case "${opsys}" in cygwin) @@ -1691,6 +1692,7 @@ x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; *) EMACS_MANIFEST="emacs-x86.manifest" ;; esac + UPDATE_MANIFEST=update-game-score.exe.manifest if test "${opsys}" = "cygwin"; then W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" @@ -1717,6 +1719,7 @@ AC_SUBST(W32_LIBS) AC_SUBST(EMACSRES) AC_SUBST(EMACS_MANIFEST) +AC_SUBST(UPDATE_MANIFEST) AC_SUBST(CLIENTRES) AC_SUBST(CLIENTW) AC_SUBST(W32_RES_LINK) === modified file 'lib-src/ChangeLog' --- lib-src/ChangeLog 2013-08-05 18:05:46 +0000 +++ lib-src/ChangeLog 2013-08-10 07:43:41 +0000 @@ -1,3 +1,10 @@ +2013-08-10 Eli Zaretskii + + * update-game-score.exe.manifest: New file. + + * Makefile.in (UPDATE_MANIFEST): New variable. + (SCRIPTS): Add $(UPDATE_MANIFEST). + 2013-08-05 Stefan Monnier * makefile.w32-in (lisp2): Add nadvice.elc. === modified file 'lib-src/Makefile.in' --- lib-src/Makefile.in 2013-07-23 22:55:38 +0000 +++ lib-src/Makefile.in 2013-08-10 07:43:41 +0000 @@ -40,6 +40,7 @@ PROFILING_CFLAGS = @PROFILING_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@ WERROR_CFLAGS = @WERROR_CFLAGS@ +UPDATE_MANIFEST = @UPDATE_MANIFEST@ # Program name transformation. TRANSFORM = @program_transform_name@ @@ -132,7 +133,7 @@ # Like UTILITIES, but they're not system-dependent, and should not be # deleted by the distclean target. -SCRIPTS= rcs2log +SCRIPTS= rcs2log $(UPDATE_MANIFEST) # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} === added file 'lib-src/update-game-score.exe.manifest' --- lib-src/update-game-score.exe.manifest 1970-01-01 00:00:00 +0000 +++ lib-src/update-game-score.exe.manifest 2013-08-10 07:43:41 +0000 @@ -0,0 +1,10 @@ + + + + + + + + + + ------------------------------------------------------------ revno: 113784 committer: Xue Fuqiao branch nick: trunk timestamp: Sat 2013-08-10 13:03:11 +0800 message: * doc/lispref/edebug.texi (Instrumenting Macro Calls): Use @defmac for macros. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-08-09 22:34:05 +0000 +++ doc/lispref/ChangeLog 2013-08-10 05:03:11 +0000 @@ -1,3 +1,7 @@ +2013-08-10 Xue Fuqiao + + * edebug.texi (Instrumenting Macro Calls): Use @defmac for macros. + 2013-08-09 Xue Fuqiao * control.texi (Error Symbols): Minor fix for previous change. === modified file 'doc/lispref/edebug.texi' --- doc/lispref/edebug.texi 2013-01-01 09:11:05 +0000 +++ doc/lispref/edebug.texi 2013-08-10 05:03:11 +0000 @@ -1132,14 +1132,14 @@ definitions in Lisp, but @code{def-edebug-spec} makes it possible to define Edebug specifications for special forms implemented in C. -@deffn Macro def-edebug-spec macro specification +@defmac def-edebug-spec macro specification Specify which expressions of a call to macro @var{macro} are forms to be evaluated. @var{specification} should be the edebug specification. Neither argument is evaluated. The @var{macro} argument can actually be any symbol, not just a macro name. -@end deffn +@end defmac Here is a table of the possibilities for @var{specification} and how each directs processing of arguments.