Now on revision 109101. ------------------------------------------------------------ revno: 109101 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-07-16 08:47:31 +0400 message: Remove empty and useless init functions. * lisp.h (init_character_once, init_fns, init_image) (init_filelock, init_sound): Remove prototype. * character.c (init_character_once): Remove. * filelock.c (init_filelock): Likewise. * fns.c (init_fns): Likewise. * image.c (init_image): Likewise. * sound.c (init_sound): Likewise. * emacs.c (main): Adjust accordingly. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-16 03:36:46 +0000 +++ src/ChangeLog 2012-07-16 04:47:31 +0000 @@ -1,5 +1,17 @@ 2012-07-16 Dmitry Antipov + Remove empty and useless init functions. + * lisp.h (init_character_once, init_fns, init_image) + (init_filelock, init_sound): Remove prototype. + * character.c (init_character_once): Remove. + * filelock.c (init_filelock): Likewise. + * fns.c (init_fns): Likewise. + * image.c (init_image): Likewise. + * sound.c (init_sound): Likewise. + * emacs.c (main): Adjust accordingly. + +2012-07-16 Dmitry Antipov + * gtkutil.h: Tiny cleanups. (use_old_gtk_file_dialog): Remove useless declaration. (xg_uses_old_file_dialog): Add suggested const attribute. === modified file 'src/character.c' --- src/character.c 2012-06-30 09:13:54 +0000 +++ src/character.c 2012-07-16 04:47:31 +0000 @@ -1010,12 +1010,6 @@ return make_number (c); } - -void -init_character_once (void) -{ -} - #ifdef emacs void === modified file 'src/emacs.c' --- src/emacs.c 2012-07-12 23:56:39 +0000 +++ src/emacs.c 2012-07-16 04:47:31 +0000 @@ -1254,7 +1254,6 @@ init_alloc_once (); init_obarray (); init_eval_once (); - init_character_once (); init_charset_once (); init_coding_once (); init_syntax_once (); /* Create standard syntax table. */ @@ -1307,9 +1306,6 @@ init_eval (); init_data (); -#ifdef CLASH_DETECTION - init_filelock (); -#endif init_atimer (); running_asynch_code = 0; @@ -1602,17 +1598,12 @@ init_keyboard (); /* This too must precede init_sys_modes. */ if (!noninteractive) init_display (); /* Determine terminal type. Calls init_sys_modes. */ - init_fns (); init_xdisp (); #ifdef HAVE_WINDOW_SYSTEM init_fringe (); - init_image (); #endif /* HAVE_WINDOW_SYSTEM */ init_macros (); init_floatfns (); -#ifdef HAVE_SOUND - init_sound (); -#endif init_window (); init_font (); === modified file 'src/filelock.c' --- src/filelock.c 2012-07-10 06:23:45 +0000 +++ src/filelock.c 2012-07-16 04:47:31 +0000 @@ -708,15 +708,6 @@ return ret; } - -/* Initialization functions. */ - -void -init_filelock (void) -{ - boot_time = 0; - boot_time_initialized = 0; -} #endif /* CLASH_DETECTION */ === modified file 'src/fns.c' --- src/fns.c 2012-07-15 11:17:09 +0000 +++ src/fns.c 2012-07-16 04:47:31 +0000 @@ -5022,9 +5022,3 @@ defsubr (&Ssecure_hash); defsubr (&Slocale_info); } - - -void -init_fns (void) -{ -} === modified file 'src/image.c' --- src/image.c 2012-07-13 12:20:07 +0000 +++ src/image.c 2012-07-16 04:47:31 +0000 @@ -8951,8 +8951,3 @@ #endif } - -void -init_image (void) -{ -} === modified file 'src/lisp.h' --- src/lisp.h 2012-07-15 11:17:09 +0000 +++ src/lisp.h 2012-07-16 04:47:31 +0000 @@ -2402,7 +2402,6 @@ extern ptrdiff_t multibyte_chars_in_text (const unsigned char *, ptrdiff_t); extern int multibyte_char_to_unibyte (int) ATTRIBUTE_CONST; extern int multibyte_char_to_unibyte_safe (int) ATTRIBUTE_CONST; -extern void init_character_once (void) ATTRIBUTE_CONST; extern void syms_of_character (void); /* Defined in charset.c */ @@ -2437,7 +2436,6 @@ ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, EMACS_UINT); -extern void init_fns (void) ATTRIBUTE_CONST; extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, ptrdiff_t, ptrdiff_t); @@ -2473,7 +2471,6 @@ extern Lisp_Object QCconversion; extern int x_bitmap_mask (struct frame *, ptrdiff_t); extern void syms_of_image (void); -extern void init_image (void) ATTRIBUTE_CONST; /* Defined in insdel.c */ extern Lisp_Object Qinhibit_modification_hooks; @@ -3162,11 +3159,9 @@ extern void unlock_file (Lisp_Object); extern void unlock_buffer (struct buffer *); extern void syms_of_filelock (void); -extern void init_filelock (void); /* Defined in sound.c */ extern void syms_of_sound (void); -extern void init_sound (void) ATTRIBUTE_CONST; /* Defined in category.c */ extern void init_category_once (void); === modified file 'src/sound.c' --- src/sound.c 2012-07-11 02:16:25 +0000 +++ src/sound.c 2012-07-16 04:47:31 +0000 @@ -1473,10 +1473,4 @@ defsubr (&Splay_sound_internal); } - -void -init_sound (void) -{ -} - #endif /* HAVE_SOUND */ ------------------------------------------------------------ revno: 109100 committer: Dmitry Antipov branch nick: trunk timestamp: Mon 2012-07-16 07:36:46 +0400 message: * gtkutil.h: Tiny cleanups. (use_old_gtk_file_dialog): Remove useless declaration. (xg_uses_old_file_dialog): Add suggested const attribute. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-15 14:41:08 +0000 +++ src/ChangeLog 2012-07-16 03:36:46 +0000 @@ -1,3 +1,9 @@ +2012-07-16 Dmitry Antipov + + * gtkutil.h: Tiny cleanups. + (use_old_gtk_file_dialog): Remove useless declaration. + (xg_uses_old_file_dialog): Add suggested const attribute. + 2012-07-15 Eli Zaretskii * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro. === modified file 'src/gtkutil.h' --- src/gtkutil.h 2012-01-19 07:21:25 +0000 +++ src/gtkutil.h 2012-07-16 03:36:46 +0000 @@ -73,16 +73,12 @@ } xg_menu_item_cb_data; - -#ifdef HAVE_GTK_FILE_SELECTION_NEW -extern int use_old_gtk_file_dialog; -#endif struct _widget_value; extern struct _widget_value *malloc_widget_value (void); extern void free_widget_value (struct _widget_value *); -extern int xg_uses_old_file_dialog (void); +extern int xg_uses_old_file_dialog (void) ATTRIBUTE_CONST; extern char *xg_get_file_name (FRAME_PTR f, char *prompt, ------------------------------------------------------------ revno: 109099 fixes bug(s): http://debbugs.gnu.org/11884 committer: Paul Eggert branch nick: trunk timestamp: Sun 2012-07-15 11:18:37 -0700 message: Merge from gnulib. 2012-07-15 pthread_sigmask: fix bug on FreeBSD 9 (Bug#11884) 2012-07-11 gettext: do not assume '#define ... defined ...' behavior diff: === modified file 'ChangeLog' --- ChangeLog 2012-07-14 02:08:32 +0000 +++ ChangeLog 2012-07-15 18:18:37 +0000 @@ -1,3 +1,9 @@ +2012-07-15 Paul Eggert + + Merge from gnulib, incorporating: + 2012-07-15 pthread_sigmask: fix bug on FreeBSD 9 (Bug#11884) + 2012-07-11 gettext: do not assume '#define ... defined ...' behavior + 2012-07-14 Glenn Morris * configure.ac (GC_SETJMP_WORKS, GC_MARK_STACK): Move here from src/s. === modified file 'lib/gettext.h' --- lib/gettext.h 2012-05-26 23:14:36 +0000 +++ lib/gettext.h 2012-07-15 18:18:37 +0000 @@ -183,9 +183,12 @@ #include -#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) +#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 +#else +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 +#endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include === modified file 'lib/pthread_sigmask.c' --- lib/pthread_sigmask.c 2012-05-26 23:14:36 +0000 +++ lib/pthread_sigmask.c 2012-07-15 18:18:37 +0000 @@ -22,6 +22,10 @@ #include #include +#if PTHREAD_SIGMASK_INEFFECTIVE +# include +#endif + #if PTHREAD_SIGMASK_UNBLOCK_BUG # include #endif @@ -31,7 +35,22 @@ #undef pthread_sigmask { #if HAVE_PTHREAD_SIGMASK - int ret = pthread_sigmask (how, new_mask, old_mask); + int ret; + +# if PTHREAD_SIGMASK_INEFFECTIVE + sigset_t omask, omask_copy; + sigset_t *old_mask_ptr = &omask; + sigemptyset (&omask); + /* Add a signal unlikely to be blocked, so that OMASK_COPY + is unlikely to match the actual mask. */ + sigaddset (&omask, SIGILL); + memcpy (&omask_copy, &omask, sizeof omask); +# else + sigset_t *old_mask_ptr = old_mask; +# endif + + ret = pthread_sigmask (how, new_mask, old_mask_ptr); + # if PTHREAD_SIGMASK_INEFFECTIVE if (ret == 0) { @@ -39,12 +58,16 @@ Don't cache the information: libpthread.so could be dynamically loaded after the program started and after pthread_sigmask was called for the first time. */ - if (pthread_sigmask (1729, NULL, NULL) == 0) + if (memcmp (&omask_copy, &omask, sizeof omask) == 0 + && pthread_sigmask (1729, &omask_copy, NULL) == 0) { /* pthread_sigmask is currently ineffective. The program is not linked to -lpthread. So use sigprocmask instead. */ return (sigprocmask (how, new_mask, old_mask) < 0 ? errno : 0); } + + if (old_mask) + memcpy (old_mask, &omask, sizeof omask); } # endif # if PTHREAD_SIGMASK_FAILS_WITH_ERRNO ------------------------------------------------------------ revno: 109098 fixes bug(s): http://debbugs.gnu.org/11943 committer: Eli Zaretskii branch nick: trunk timestamp: Sun 2012-07-15 17:41:08 +0300 message: Fix bug #11943 with slow redisplay in large paragraphs full of weak characters. src/bidi.c (MAX_STRONG_CHAR_SEARCH): New macro. (bidi_paragraph_init): Use it to limit search forward for a strong directional character in abnormally large paragraphs full of neutral or weak characters. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-15 14:22:09 +0000 +++ src/ChangeLog 2012-07-15 14:41:08 +0000 @@ -1,3 +1,10 @@ +2012-07-15 Eli Zaretskii + + * bidi.c (MAX_STRONG_CHAR_SEARCH): New macro. + (bidi_paragraph_init): Use it to limit search forward for a strong + directional character in abnormally large paragraphs full of + neutral or weak characters. (Bug#11943) + 2012-07-15 Stefano Facchini (tiny change) * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to === modified file 'src/bidi.c' --- src/bidi.c 2012-07-05 18:35:48 +0000 +++ src/bidi.c 2012-07-15 14:41:08 +0000 @@ -1123,6 +1123,12 @@ return pos_byte; } +/* On a 3.4 GHz machine, searching forward for a strong directional + character in a long paragraph full of weaks or neutrals takes about + 1 ms for each 20K characters. The number below limits each call to + bidi_paragraph_init to less than 10 ms even on slow machines. */ +#define MAX_STRONG_CHAR_SEARCH 100000 + /* Determine the base direction, a.k.a. base embedding level, of the paragraph we are about to iterate through. If DIR is either L2R or R2L, just use that. Otherwise, determine the paragraph direction @@ -1218,6 +1224,8 @@ /* The following loop is run more than once only if NO_DEFAULT_P is non-zero, and only if we are iterating on a buffer. */ do { + ptrdiff_t pos1; + bytepos = pstartbyte; if (!string_p) pos = BYTE_TO_CHAR (bytepos); @@ -1226,11 +1234,15 @@ bidi_it->frame_window_p, &ch_len, &nchars); type = bidi_get_type (ch, NEUTRAL_DIR); + pos1 = pos; for (pos += nchars, bytepos += ch_len; - (bidi_get_category (type) != STRONG) - || (bidi_ignore_explicit_marks_for_paragraph_level - && (type == RLE || type == RLO - || type == LRE || type == LRO)); + ((bidi_get_category (type) != STRONG) + || (bidi_ignore_explicit_marks_for_paragraph_level + && (type == RLE || type == RLO + || type == LRE || type == LRO))) + /* Stop when searched too far into an abnormally large + paragraph full of weak or neutral characters. */ + && pos - pos1 < MAX_STRONG_CHAR_SEARCH; type = bidi_get_type (ch, NEUTRAL_DIR)) { if (pos >= end) ------------------------------------------------------------ revno: 109097 fixes bug(s): http://debbugs.gnu.org/9451 author: Stefano Facchini committer: Chong Yidong branch nick: trunk timestamp: Sun 2012-07-15 22:22:09 +0800 message: * src/gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to the toolbar. (xg_make_tool_item): Give the widget event box a transparent background. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-15 11:17:09 +0000 +++ src/ChangeLog 2012-07-15 14:22:09 +0000 @@ -1,3 +1,10 @@ +2012-07-15 Stefano Facchini (tiny change) + + * gtkutil.c (xg_create_tool_bar): Apply "primary-toolbar" style to + the toolbar (Bug#9451). + (xg_make_tool_item): Give the widget event box a transparent + background. + 2012-07-15 Dmitry Antipov Cleanup basic allocation variables and functions. === modified file 'src/gtkutil.c' --- src/gtkutil.c 2012-07-10 21:48:34 +0000 +++ src/gtkutil.c 2012-07-15 14:22:09 +0000 @@ -4203,6 +4203,9 @@ xg_create_tool_bar (FRAME_PTR f) { struct x_output *x = f->output_data.x; +#if GTK_CHECK_VERSION (3, 3, 6) + GtkStyleContext *gsty; +#endif x->toolbar_widget = gtk_toolbar_new (); x->toolbar_detached = 0; @@ -4211,6 +4214,10 @@ gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS); toolbar_set_orientation (x->toolbar_widget, GTK_ORIENTATION_HORIZONTAL); +#if GTK_CHECK_VERSION (3, 3, 6) + gsty = gtk_widget_get_style_context (x->toolbar_widget); + gtk_style_context_add_class (gsty, "primary-toolbar"); +#endif } @@ -4262,6 +4269,22 @@ GtkWidget *wb = gtk_button_new (); /* The eventbox is here so we can have tooltips on disabled items. */ GtkWidget *weventbox = gtk_event_box_new (); +#if GTK_CHECK_VERSION (3, 3, 6) + GtkCssProvider *css_prov = gtk_css_provider_new (); + GtkStyleContext *gsty; + + gtk_css_provider_load_from_data (css_prov, + "GtkEventBox {" + " background-color: transparent;" + "}", + -1, NULL); + + gsty = gtk_widget_get_style_context (weventbox); + gtk_style_context_add_provider (gsty, + GTK_STYLE_PROVIDER (css_prov), + GTK_STYLE_PROVIDER_PRIORITY_USER); + g_object_unref (css_prov); +#endif gtk_box_set_homogeneous (GTK_BOX (vb), FALSE); ------------------------------------------------------------ revno: 109096 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2012-07-15 15:17:09 +0400 message: Cleanup basic allocation variables and functions. * alloc.c (ignore_warnings, init_intervals, init_float) (init_cons, init_symbol, init_marker): Remove. (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE. (float_block_index): Initialize to FLOAT_BLOCK_SIZE. (cons_block_index): Initialize to CONS_BLOCK_SIZE. (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE. (marker_block_index): Initialize to MARKER_BLOCK_SIZE. (staticidx, init_alloc_once, init_strings, free_ablock): Remove redundant initialization. * fns.c (init_weak_hash_tables): Remove. * lisp.h (init_weak_hash_tables): Remove prototype. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-15 07:57:54 +0000 +++ src/ChangeLog 2012-07-15 11:17:09 +0000 @@ -1,5 +1,20 @@ 2012-07-15 Dmitry Antipov + Cleanup basic allocation variables and functions. + * alloc.c (ignore_warnings, init_intervals, init_float) + (init_cons, init_symbol, init_marker): Remove. + (interval_block_index): Initialize to INTERVAL_BLOCK_SIZE. + (float_block_index): Initialize to FLOAT_BLOCK_SIZE. + (cons_block_index): Initialize to CONS_BLOCK_SIZE. + (symbol_block_size): Initialize to SYMBOL_BLOCK_SIZE. + (marker_block_index): Initialize to MARKER_BLOCK_SIZE. + (staticidx, init_alloc_once, init_strings, free_ablock): + Remove redundant initialization. + * fns.c (init_weak_hash_tables): Remove. + * lisp.h (init_weak_hash_tables): Remove prototype. + +2012-07-15 Dmitry Antipov + Use zero_vector where appropriate. * alloc.c (zero_vector): Define as Lisp_Object. Adjust users accordingly. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-15 07:57:54 +0000 +++ src/alloc.c 2012-07-15 11:17:09 +0000 @@ -258,11 +258,6 @@ static ptrdiff_t stack_copy_size; #endif -/* Non-zero means ignore malloc warnings. Set during initialization. - Currently not used. */ - -static int ignore_warnings; - static Lisp_Object Qgc_cons_threshold; Lisp_Object Qchar_table_extra_slots; @@ -435,7 +430,7 @@ /* Index of next unused slot in staticvec. */ -static int staticidx = 0; +static int staticidx; static void *pure_alloc (size_t, int); @@ -1481,7 +1476,7 @@ /* Index in interval_block above of the next unused interval structure. */ -static int interval_block_index; +static int interval_block_index = INTERVAL_BLOCK_SIZE; /* Number of free and live intervals. */ @@ -1491,18 +1486,6 @@ static INTERVAL interval_free_list; - -/* Initialize interval allocation. */ - -static void -init_intervals (void) -{ - interval_block = NULL; - interval_block_index = INTERVAL_BLOCK_SIZE; - interval_free_list = 0; -} - - /* Return a new interval. */ INTERVAL @@ -1803,10 +1786,6 @@ static void init_strings (void) { - total_strings = total_free_strings = total_string_size = 0; - oldest_sblock = current_sblock = large_sblocks = NULL; - string_blocks = NULL; - string_free_list = NULL; empty_unibyte_string = make_pure_string ("", 0, 0, 0); empty_multibyte_string = make_pure_string ("", 0, 0, 1); } @@ -2590,24 +2569,12 @@ /* Index of first unused Lisp_Float in the current float_block. */ -static int float_block_index; +static int float_block_index = FLOAT_BLOCK_SIZE; /* Free-list of Lisp_Floats. */ static struct Lisp_Float *float_free_list; - -/* Initialize float allocation. */ - -static void -init_float (void) -{ - float_block = NULL; - float_block_index = FLOAT_BLOCK_SIZE; /* Force alloc of new float_block. */ - float_free_list = 0; -} - - /* Return a new float object with value FLOAT_VALUE. */ Lisp_Object @@ -2696,24 +2663,12 @@ /* Index of first unused Lisp_Cons in the current block. */ -static int cons_block_index; +static int cons_block_index = CONS_BLOCK_SIZE; /* Free-list of Lisp_Cons structures. */ static struct Lisp_Cons *cons_free_list; - -/* Initialize cons allocation. */ - -static void -init_cons (void) -{ - cons_block = NULL; - cons_block_index = CONS_BLOCK_SIZE; /* Force alloc of new cons_block. */ - cons_free_list = 0; -} - - /* Explicitly free a cons cell by putting it on the free-list. */ void @@ -3453,24 +3408,12 @@ structure in it. */ static struct symbol_block *symbol_block; -static int symbol_block_index; +static int symbol_block_index = SYMBOL_BLOCK_SIZE; /* List of free symbols. */ static struct Lisp_Symbol *symbol_free_list; - -/* Initialize symbol allocation. */ - -static void -init_symbol (void) -{ - symbol_block = NULL; - symbol_block_index = SYMBOL_BLOCK_SIZE; - symbol_free_list = 0; -} - - DEFUN ("make-symbol", Fmake_symbol, Smake_symbol, 1, 1, 0, doc: /* Return a newly allocated uninterned symbol whose name is NAME. Its value and function definition are void, and its property list is nil. */) @@ -3554,18 +3497,10 @@ }; static struct marker_block *marker_block; -static int marker_block_index; +static int marker_block_index = MARKER_BLOCK_SIZE; static union Lisp_Misc *marker_free_list; -static void -init_marker (void) -{ - marker_block = NULL; - marker_block_index = MARKER_BLOCK_SIZE; - marker_free_list = 0; -} - /* Return a newly allocated Lisp_Misc object, with no substructure. */ Lisp_Object @@ -6713,32 +6648,19 @@ /* Used to do Vpurify_flag = Qt here, but Qt isn't set up yet! */ purebeg = PUREBEG; pure_size = PURESIZE; - pure_bytes_used = 0; - pure_bytes_used_lisp = pure_bytes_used_non_lisp = 0; - pure_bytes_used_before_overflow = 0; - - /* Initialize the list of free aligned blocks. */ - free_ablock = NULL; #if GC_MARK_STACK || defined GC_MALLOC_CHECK mem_init (); Vdead = make_pure_string ("DEAD", 4, 4, 0); #endif - ignore_warnings = 1; #ifdef DOUG_LEA_MALLOC mallopt (M_TRIM_THRESHOLD, 128*1024); /* trim threshold */ mallopt (M_MMAP_THRESHOLD, 64*1024); /* mmap threshold */ mallopt (M_MMAP_MAX, MMAP_MAX_AREAS); /* max. number of mmap'ed areas */ #endif init_strings (); - init_cons (); - init_symbol (); - init_marker (); - init_float (); - init_intervals (); init_vectors (); - init_weak_hash_tables (); #ifdef REL_ALLOC malloc_hysteresis = 32; @@ -6747,14 +6669,7 @@ #endif refill_memory_reserve (); - - ignore_warnings = 0; - gcprolist = 0; - byte_stack_list = 0; - staticidx = 0; - consing_since_gc = 0; gc_cons_threshold = 100000 * sizeof (Lisp_Object); - gc_relative_threshold = 0; } void === modified file 'src/fns.c' --- src/fns.c 2012-07-10 23:24:36 +0000 +++ src/fns.c 2012-07-15 11:17:09 +0000 @@ -3945,12 +3945,6 @@ Weak Hash Tables ************************************************************************/ -void -init_weak_hash_tables (void) -{ - weak_hash_tables = NULL; -} - /* Sweep weak hash table H. REMOVE_ENTRIES_P non-zero means remove entries from the table that don't survive the current GC. REMOVE_ENTRIES_P zero means mark entries that are in use. Value is === modified file 'src/lisp.h' --- src/lisp.h 2012-07-15 07:57:54 +0000 +++ src/lisp.h 2012-07-15 11:17:09 +0000 @@ -2437,7 +2437,6 @@ ptrdiff_t hash_lookup (struct Lisp_Hash_Table *, Lisp_Object, EMACS_UINT *); ptrdiff_t hash_put (struct Lisp_Hash_Table *, Lisp_Object, Lisp_Object, EMACS_UINT); -void init_weak_hash_tables (void); extern void init_fns (void) ATTRIBUTE_CONST; extern Lisp_Object substring_both (Lisp_Object, ptrdiff_t, ptrdiff_t, ------------------------------------------------------------ revno: 109095 committer: Dmitry Antipov branch nick: trunk timestamp: Sun 2012-07-15 11:57:54 +0400 message: Use zero_vector where appropriate. * alloc.c (zero_vector): Define as Lisp_Object. Adjust users accordingly. * lisp.h (zero_vector): New declaration. * font.c (null_vector): Remove. (syms_of_font): Remove initialization and staticpro. (font_list_entities, font_find_for_lface): Change to use zero_vector. * keymap.c (Faccessible_keymaps): Likewise. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-15 00:52:16 +0000 +++ src/ChangeLog 2012-07-15 07:57:54 +0000 @@ -1,3 +1,14 @@ +2012-07-15 Dmitry Antipov + + Use zero_vector where appropriate. + * alloc.c (zero_vector): Define as Lisp_Object. Adjust users + accordingly. + * lisp.h (zero_vector): New declaration. + * font.c (null_vector): Remove. + (syms_of_font): Remove initialization and staticpro. + (font_list_entities, font_find_for_lface): Change to use zero_vector. + * keymap.c (Faccessible_keymaps): Likewise. + 2012-07-15 Leo Liu * fringe.c: Fix typo in comments. === modified file 'src/alloc.c' --- src/alloc.c 2012-07-11 06:14:27 +0000 +++ src/alloc.c 2012-07-15 07:57:54 +0000 @@ -2973,7 +2973,7 @@ /* The only vector with 0 slots, allocated from pure space. */ -static struct Lisp_Vector *zero_vector; +Lisp_Object zero_vector; /* Get a new vector block. */ @@ -2997,8 +2997,7 @@ static void init_vectors (void) { - zero_vector = pure_alloc (header_size, Lisp_Vectorlike); - zero_vector->header.size = 0; + zero_vector = make_pure_vector (0); } /* Allocate vector from a vector block. */ @@ -3190,7 +3189,7 @@ /* eassert (!handling_signal); */ if (len == 0) - p = zero_vector; + p = XVECTOR (zero_vector); else { size_t nbytes = header_size + len * word_size; === modified file 'src/font.c' --- src/font.c 2012-07-11 07:37:39 +0000 +++ src/font.c 2012-07-15 07:57:54 +0000 @@ -59,10 +59,6 @@ /* Unicode category `Cf'. */ static Lisp_Object QCf; -/* Special vector of zero length. This is repeatedly used by (struct - font_driver *)->list when a specified font is not found. */ -static Lisp_Object null_vector; - /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ static Lisp_Object font_style_table; @@ -2748,7 +2744,7 @@ val = driver_list->driver->list (frame, scratch_font_spec); if (NILP (val)) - val = null_vector; + val = zero_vector; else val = Fvconcat (1, &val); copy = copy_font_spec (scratch_font_spec); @@ -3104,10 +3100,10 @@ { registry[0] = DEFAULT_ENCODING; registry[1] = Qascii_0; - registry[2] = null_vector; + registry[2] = zero_vector; } else - registry[1] = null_vector; + registry[1] = zero_vector; if (c >= 0 && ! NILP (AREF (spec, FONT_REGISTRY_INDEX))) { @@ -3136,20 +3132,20 @@ ASET (work, FONT_SIZE_INDEX, Qnil); foundry[0] = AREF (work, FONT_FOUNDRY_INDEX); if (! NILP (foundry[0])) - foundry[1] = null_vector; + foundry[1] = zero_vector; else if (STRINGP (attrs[LFACE_FOUNDRY_INDEX])) { val = attrs[LFACE_FOUNDRY_INDEX]; foundry[0] = font_intern_prop (SSDATA (val), SBYTES (val), 1); foundry[1] = Qnil; - foundry[2] = null_vector; + foundry[2] = zero_vector; } else - foundry[0] = Qnil, foundry[1] = null_vector; + foundry[0] = Qnil, foundry[1] = zero_vector; adstyle[0] = AREF (work, FONT_ADSTYLE_INDEX); if (! NILP (adstyle[0])) - adstyle[1] = null_vector; + adstyle[1] = zero_vector; else if (FONTP (attrs[LFACE_FONT_INDEX])) { Lisp_Object face_font = attrs[LFACE_FONT_INDEX]; @@ -3158,13 +3154,13 @@ { adstyle[0] = AREF (face_font, FONT_ADSTYLE_INDEX); adstyle[1] = Qnil; - adstyle[2] = null_vector; + adstyle[2] = zero_vector; } else - adstyle[0] = Qnil, adstyle[1] = null_vector; + adstyle[0] = Qnil, adstyle[1] = zero_vector; } else - adstyle[0] = Qnil, adstyle[1] = null_vector; + adstyle[0] = Qnil, adstyle[1] = zero_vector; val = AREF (work, FONT_FAMILY_INDEX); @@ -3177,7 +3173,7 @@ { family = alloca ((sizeof family[0]) * 2); family[0] = Qnil; - family[1] = null_vector; /* terminator. */ + family[1] = zero_vector; /* terminator. */ } else { @@ -3192,7 +3188,7 @@ family[i] = XCAR (alters); if (NILP (AREF (spec, FONT_FAMILY_INDEX))) family[i++] = Qnil; - family[i] = null_vector; + family[i] = zero_vector; } else { @@ -3201,7 +3197,7 @@ family[i++] = val; if (NILP (AREF (spec, FONT_FAMILY_INDEX))) family[i++] = Qnil; - family[i] = null_vector; + family[i] = zero_vector; } } @@ -5095,9 +5091,6 @@ DEFSYM (QCuser_spec, "user-spec"); - staticpro (&null_vector); - null_vector = Fmake_vector (make_number (0), Qnil); - staticpro (&scratch_font_spec); scratch_font_spec = Ffont_spec (0, NULL); staticpro (&scratch_font_prefer); === modified file 'src/keymap.c' --- src/keymap.c 2012-07-10 08:43:46 +0000 +++ src/keymap.c 2012-07-15 07:57:54 +0000 @@ -2010,9 +2010,7 @@ return Qnil; } else - maps = Fcons (Fcons (Fmake_vector (make_number (0), Qnil), - get_keymap (keymap, 1, 0)), - Qnil); + maps = Fcons (Fcons (zero_vector, get_keymap (keymap, 1, 0)), Qnil); /* For each map in the list maps, look at any other maps it points to, === modified file 'src/lisp.h' --- src/lisp.h 2012-07-12 23:56:39 +0000 +++ src/lisp.h 2012-07-15 07:57:54 +0000 @@ -2605,6 +2605,7 @@ extern void refill_memory_reserve (void); #endif extern const char *pending_malloc_warning; +extern Lisp_Object zero_vector; extern Lisp_Object *stack_base; extern Lisp_Object list1 (Lisp_Object); extern Lisp_Object list2 (Lisp_Object, Lisp_Object); ------------------------------------------------------------ revno: 109094 committer: Leo Liu branch nick: trunk timestamp: Sun 2012-07-15 08:52:16 +0800 message: Add news for exclamation-mark and flymake diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2012-07-14 02:08:32 +0000 +++ doc/lispref/ChangeLog 2012-07-15 00:52:16 +0000 @@ -1,3 +1,7 @@ +2012-07-15 Leo Liu + + * display.texi (Fringe Bitmaps): Add exclamation-mark. + 2012-07-13 Chong Yidong * buffers.texi (Read Only Buffers): Document toggle-read-only === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2012-06-17 05:13:40 +0000 +++ doc/lispref/display.texi 2012-07-15 00:52:16 +0000 @@ -3550,7 +3550,7 @@ @itemx @code{vertical-bar}, @code{horizontal-bar} Used for different types of fringe cursors. -@item @code{empty-line}, @code{question-mark} +@item @code{empty-line}, @code{question-mark}, @code{exclamation-mark} Unused. @end table === modified file 'etc/ChangeLog' --- etc/ChangeLog 2012-07-14 02:08:32 +0000 +++ etc/ChangeLog 2012-07-15 00:52:16 +0000 @@ -1,3 +1,7 @@ +2012-07-15 Leo Liu + + * NEWS: Mention exclamation-mark and flymake. + 2012-07-08 Juanma Barranquero * tutorials/TUTORIAL.es: Sync with changes in revno:108936. === modified file 'etc/NEWS' --- etc/NEWS 2012-07-14 02:19:07 +0000 +++ etc/NEWS 2012-07-15 00:52:16 +0000 @@ -113,6 +113,8 @@ ** Face underlining can now use a wave. See the "Face Attributes" section of the Elisp manual. +** New fringe bitmap exclamation-mark. + ** String values for `initial-buffer-choice' also apply to emacsclient frames, if emacsclient is only told to open a new frame without specifying any file to visit or expression to evaluate. @@ -268,6 +270,10 @@ the face `diff-changed', or `diff-removed' and `diff-added' to highlight changes in context diffs. +** Flymake uses fringe bitmaps to indicate errors and warnings. +See flymake-fringe-indicator-position, flymake-error-bitmap and +flymake-warning-bitmap. + ** Ediff now uses the same color scheme as Diff mode on high color displays. === modified file 'src/ChangeLog' --- src/ChangeLog 2012-07-14 11:44:39 +0000 +++ src/ChangeLog 2012-07-15 00:52:16 +0000 @@ -1,3 +1,7 @@ +2012-07-15 Leo Liu + + * fringe.c: Fix typo in comments. + 2012-07-14 Leo Liu * fringe.c: Add a new bitmap exclamation-mark. === modified file 'src/fringe.c' --- src/fringe.c 2012-07-14 11:44:39 +0000 +++ src/fringe.c 2012-07-15 00:52:16 +0000 @@ -107,7 +107,7 @@ static unsigned short question_mark_bits[] = { 0x3c, 0x7e, 0x7e, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18}; -/* A exclamation mark. */ +/* An exclamation mark. */ /* ...XX... ...XX...