Now on revision 111860. ------------------------------------------------------------ revno: 111860 author: David Engster committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2013-02-22 22:54:37 +0000 message: gnus-registry.el (gnus-registry-save): Provide class name when calling `eieio-persistent-read' to avoid "unsafe call" warning Use `condition-case' to stay compatible with older EIEIO versions which only accept one argument diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-02-17 12:46:28 +0000 +++ lisp/gnus/ChangeLog 2013-02-22 22:54:37 +0000 @@ -1,3 +1,10 @@ +2013-02-22 David Engster + + * gnus-registry.el (gnus-registry-save): Provide class name when + calling `eieio-persistent-read' to avoid "unsafe call" warning. Use + `condition-case' to stay compatible with older EIEIO versions which + only accept one argument. + 2013-02-17 Daiki Ueno * mml2015.el (epg-key-user-id-list, epg-user-id-string) === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2013-01-02 16:13:04 +0000 +++ lisp/gnus/gnus-registry.el 2013-02-22 22:54:37 +0000 @@ -296,8 +296,14 @@ (condition-case nil (progn (gnus-message 5 "Reading Gnus registry from %s..." file) - (setq gnus-registry-db (gnus-registry-fixup-registry - (eieio-persistent-read file))) + (setq gnus-registry-db + (gnus-registry-fixup-registry + (condition-case nil + (with-no-warnings + (eieio-persistent-read file 'registry-db)) + ;; Older EIEIO versions do not check the class name. + ('wrong-number-of-arguments + (eieio-persistent-read file))))) (gnus-message 5 "Reading Gnus registry from %s...done" file)) (error (gnus-message ------------------------------------------------------------ revno: 111859 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-02-22 11:23:12 -0800 message: Assume C89 or better. * ralloc.c (SIZE, POINTER, NIL): * vm-limit.c (POINTER): Remove, replacing all uses with C89 equivalents. These old symbols were present only for porting to pre-C89 platforms. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-22 16:00:14 +0000 +++ src/ChangeLog 2013-02-22 19:23:12 +0000 @@ -1,3 +1,11 @@ +2013-02-22 Paul Eggert + + Assume C89 or better. + * ralloc.c (SIZE, POINTER, NIL): + * vm-limit.c (POINTER): + Remove, replacing all uses with C89 equivalents. These old + symbols were present only for porting to pre-C89 platforms. + 2013-02-22 Claudio Bley * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop. === modified file 'src/ralloc.c' --- src/ralloc.c 2013-01-01 09:11:05 +0000 +++ src/ralloc.c 2013-02-22 19:23:12 +0000 @@ -52,10 +52,6 @@ #include "getpagesize.h" -typedef size_t SIZE; -typedef void *POINTER; -#define NIL ((POINTER) 0) - /* A flag to indicate whether we have initialized ralloc yet. For Emacs's sake, please do not make this local to malloc_init; on some machines, the dumping procedure makes all static variables @@ -72,14 +68,14 @@ /* Declarations for working with the malloc, ralloc, and system breaks. */ /* Function to set the real break value. */ -POINTER (*real_morecore) (ptrdiff_t); +void *(*real_morecore) (ptrdiff_t); /* The break value, as seen by malloc. */ -static POINTER virtual_break_value; +static void *virtual_break_value; /* The address of the end of the last data in use by ralloc, including relocatable blocs as well as malloc data. */ -static POINTER break_value; +static void *break_value; /* This is the size of a page. We round memory requests to this boundary. */ static int page_size; @@ -92,17 +88,17 @@ by changing the definition of PAGE. */ #define PAGE (getpagesize ()) #define ROUNDUP(size) (((size_t) (size) + page_size - 1) \ - & ~((size_t)(page_size - 1))) + & ~((size_t) (page_size - 1))) #define MEM_ALIGN sizeof (double) -#define MEM_ROUNDUP(addr) (((size_t)(addr) + MEM_ALIGN - 1) \ +#define MEM_ROUNDUP(addr) (((size_t) (addr) + MEM_ALIGN - 1) \ & ~(MEM_ALIGN - 1)) /* The hook `malloc' uses for the function which gets more space from the system. */ #ifndef SYSTEM_MALLOC -extern POINTER (*__morecore) (ptrdiff_t); +extern void *(*__morecore) (ptrdiff_t); #endif @@ -131,13 +127,13 @@ struct heap *next; struct heap *prev; /* Start of memory range of this heap. */ - POINTER start; + void *start; /* End of memory range of this heap. */ - POINTER end; + void *end; /* Start of relocatable data in this heap. */ - POINTER bloc_start; + void *bloc_start; /* Start of unused space in this heap. */ - POINTER free; + void *free; /* First bloc in this heap. */ struct bp *first_bloc; /* Last bloc in this heap. */ @@ -159,7 +155,7 @@ The data blocks abut each other; if b->next is non-nil, then b->data + b->size == b->next->data. - An element with variable==NIL denotes a freed block, which has not yet + An element with variable==NULL denotes a freed block, which has not yet been collected. They may only appear while r_alloc_freeze_level > 0, and will be freed when the arena is thawed. Currently, these blocs are not reusable, while the arena is frozen. Very inefficient. */ @@ -168,10 +164,10 @@ { struct bp *next; struct bp *prev; - POINTER *variable; - POINTER data; - SIZE size; - POINTER new_data; /* temporarily used for relocation */ + void **variable; + void *data; + size_t size; + void *new_data; /* temporarily used for relocation */ struct heap *heap; /* Heap this bloc is in. */ } *bloc_ptr; @@ -192,7 +188,7 @@ /* Find the heap that ADDRESS falls within. */ static heap_ptr -find_heap (POINTER address) +find_heap (void *address) { heap_ptr heap; @@ -223,11 +219,11 @@ Return the address of the space if all went well, or zero if we couldn't allocate the memory. */ -static POINTER -obtain (POINTER address, SIZE size) +static void * +obtain (void *address, size_t size) { heap_ptr heap; - SIZE already_available; + size_t already_available; /* Find the heap that ADDRESS falls within. */ for (heap = last_heap; heap; heap = heap->prev) @@ -253,19 +249,19 @@ get more space. */ if (heap == NIL_HEAP) { - POINTER new = (*real_morecore)(0); - SIZE get; + void *new = real_morecore (0); + size_t get; - already_available = (char *)last_heap->end - (char *)address; + already_available = (char *) last_heap->end - (char *) address; if (new != last_heap->end) { /* Someone else called sbrk. Make a new heap. */ heap_ptr new_heap = (heap_ptr) MEM_ROUNDUP (new); - POINTER bloc_start = (POINTER) MEM_ROUNDUP ((POINTER)(new_heap + 1)); + void *bloc_start = (void *) MEM_ROUNDUP ((void *) (new_heap + 1)); - if ((*real_morecore) ((char *) bloc_start - (char *) new) != new) + if (real_morecore ((char *) bloc_start - (char *) new) != new) return 0; new_heap->start = new; @@ -287,10 +283,10 @@ Get some extra, so we can come here less often. */ get = size + extra_bytes - already_available; - get = (char *) ROUNDUP ((char *)last_heap->end + get) + get = (char *) ROUNDUP ((char *) last_heap->end + get) - (char *) last_heap->end; - if ((*real_morecore) (get) != last_heap->end) + if (real_morecore (get) != last_heap->end) return 0; last_heap->end = (char *) last_heap->end + get; @@ -319,13 +315,13 @@ ? h->bloc_start : break_value); } - if (excess > extra_bytes * 2 && (*real_morecore) (0) == last_heap->end) + if (excess > extra_bytes * 2 && real_morecore (0) == last_heap->end) { /* Keep extra_bytes worth of empty space. And don't free anything unless we can free at least extra_bytes. */ excess -= extra_bytes; - if ((char *)last_heap->end - (char *)last_heap->bloc_start <= excess) + if ((char *) last_heap->end - (char *) last_heap->bloc_start <= excess) { heap_ptr lh_prev; @@ -336,12 +332,12 @@ return; /* Return the last heap, with its header, to the system. */ - excess = (char *)last_heap->end - (char *)last_heap->start; + excess = (char *) last_heap->end - (char *) last_heap->start; lh_prev = last_heap->prev; /* If the system doesn't want that much memory back, leave last_heap unaltered to reflect that. This can occur if break_value is still within the original data segment. */ - if ((*real_morecore) (- excess) != 0) + if (real_morecore (- excess) != 0) { last_heap = lh_prev; last_heap->next = NIL_HEAP; @@ -349,13 +345,13 @@ } else { - excess = (char *) last_heap->end - - (char *) ROUNDUP ((char *)last_heap->end - excess); + excess = ((char *) last_heap->end + - (char *) ROUNDUP ((char *) last_heap->end - excess)); /* If the system doesn't want that much memory back, leave the end of the last heap unchanged to reflect that. This can occur if break_value is still within the original data segment. */ - if ((*real_morecore) (- excess) != 0) + if (real_morecore (- excess) != 0) last_heap->end = (char *) last_heap->end - excess; } } @@ -367,9 +363,9 @@ to that block. */ static bloc_ptr -find_bloc (POINTER *ptr) +find_bloc (void **ptr) { - register bloc_ptr p = first_bloc; + bloc_ptr p = first_bloc; while (p != NIL_BLOC) { @@ -392,10 +388,10 @@ memory for the new block. */ static bloc_ptr -get_bloc (SIZE size) +get_bloc (size_t size) { - register bloc_ptr new_bloc; - register heap_ptr heap; + bloc_ptr new_bloc; + heap_ptr heap; if (! (new_bloc = malloc (BLOC_PTR_SIZE)) || ! (new_bloc->data = obtain (break_value, size))) @@ -409,7 +405,7 @@ new_bloc->size = size; new_bloc->next = NIL_BLOC; - new_bloc->variable = (POINTER *) NIL; + new_bloc->variable = NULL; new_bloc->new_data = 0; /* Record in the heap that this space is in use. */ @@ -447,9 +443,9 @@ Do not touch the contents of blocs or break_value. */ static int -relocate_blocs (bloc_ptr bloc, heap_ptr heap, POINTER address) +relocate_blocs (bloc_ptr bloc, heap_ptr heap, void *address) { - register bloc_ptr b = bloc; + bloc_ptr b = bloc; /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) @@ -471,8 +467,8 @@ get enough new space to hold BLOC and all following blocs. */ if (heap == NIL_HEAP) { - register bloc_ptr tb = b; - register SIZE s = 0; + bloc_ptr tb = b; + size_t s = 0; /* Add up the size of all the following blocs. */ while (tb != NIL_BLOC) @@ -568,12 +564,12 @@ that come after BLOC in memory. */ static int -resize_bloc (bloc_ptr bloc, SIZE size) +resize_bloc (bloc_ptr bloc, size_t size) { - register bloc_ptr b; + bloc_ptr b; heap_ptr heap; - POINTER address; - SIZE old_size; + void *address; + size_t old_size; /* No need to ever call this if arena is frozen, bug somewhere! */ if (r_alloc_freeze_level) @@ -675,7 +671,7 @@ if (r_alloc_freeze_level) { - bloc->variable = (POINTER *) NIL; + bloc->variable = NULL; return; } @@ -752,17 +748,17 @@ __morecore hook values - in particular, __default_morecore in the GNU malloc package. */ -static POINTER +static void * r_alloc_sbrk (ptrdiff_t size) { - register bloc_ptr b; - POINTER address; + bloc_ptr b; + void *address; if (! r_alloc_initialized) r_alloc_init (); if (use_relocatable_buffers <= 0) - return (*real_morecore) (size); + return real_morecore (size); if (size == 0) return virtual_break_value; @@ -772,19 +768,19 @@ /* Allocate a page-aligned space. GNU malloc would reclaim an extra space if we passed an unaligned one. But we could not always find a space which is contiguous to the previous. */ - POINTER new_bloc_start; + void *new_bloc_start; heap_ptr h = first_heap; - SIZE get = ROUNDUP (size); + size_t get = ROUNDUP (size); - address = (POINTER) ROUNDUP (virtual_break_value); + address = (void *) ROUNDUP (virtual_break_value); /* Search the list upward for a heap which is large enough. */ - while ((char *) h->end < (char *) MEM_ROUNDUP ((char *)address + get)) + while ((char *) h->end < (char *) MEM_ROUNDUP ((char *) address + get)) { h = h->next; if (h == NIL_HEAP) break; - address = (POINTER) ROUNDUP (h->start); + address = (void *) ROUNDUP (h->start); } /* If not found, obtain more space. */ @@ -796,19 +792,19 @@ return 0; if (first_heap == last_heap) - address = (POINTER) ROUNDUP (virtual_break_value); + address = (void *) ROUNDUP (virtual_break_value); else - address = (POINTER) ROUNDUP (last_heap->start); + address = (void *) ROUNDUP (last_heap->start); h = last_heap; } - new_bloc_start = (POINTER) MEM_ROUNDUP ((char *)address + get); + new_bloc_start = (void *) MEM_ROUNDUP ((char *) address + get); if (first_heap->bloc_start < new_bloc_start) { /* This is no clean solution - no idea how to do it better. */ if (r_alloc_freeze_level) - return NIL; + return NULL; /* There is a bug here: if the above obtain call succeeded, but the relocate_blocs call below does not succeed, we need to free @@ -818,7 +814,7 @@ if (! relocate_blocs (first_bloc, h, new_bloc_start)) return 0; - /* Note that (POINTER)(h+1) <= new_bloc_start since + /* Note that (char *) (h + 1) <= (char *) new_bloc_start since get >= page_size, so the following does not destroy the heap header. */ for (b = last_bloc; b != NIL_BLOC; b = b->prev) @@ -855,8 +851,8 @@ } else /* size < 0 */ { - SIZE excess = (char *)first_heap->bloc_start - - ((char *)virtual_break_value + size); + size_t excess = ((char *) first_heap->bloc_start + - ((char *) virtual_break_value + size)); address = virtual_break_value; @@ -864,7 +860,7 @@ { excess -= extra_bytes; first_heap->bloc_start - = (POINTER) MEM_ROUNDUP ((char *)first_heap->bloc_start - excess); + = (void *) MEM_ROUNDUP ((char *) first_heap->bloc_start - excess); relocate_blocs (first_bloc, first_heap, first_heap->bloc_start); @@ -876,14 +872,14 @@ } } - if ((char *)virtual_break_value + size < (char *)first_heap->start) + if ((char *) virtual_break_value + size < (char *) first_heap->start) { /* We found an additional space below the first heap */ - first_heap->start = (POINTER) ((char *)virtual_break_value + size); + first_heap->start = (void *) ((char *) virtual_break_value + size); } } - virtual_break_value = (POINTER) ((char *)address + size); + virtual_break_value = (void *) ((char *) address + size); break_value = (last_bloc ? (char *) last_bloc->data + last_bloc->size : (char *) first_heap->bloc_start); @@ -905,10 +901,10 @@ If we can't allocate the necessary memory, set *PTR to zero, and return zero. */ -POINTER -r_alloc (POINTER *ptr, SIZE size) +void * +r_alloc (void **ptr, size_t size) { - register bloc_ptr new_bloc; + bloc_ptr new_bloc; if (! r_alloc_initialized) r_alloc_init (); @@ -929,9 +925,9 @@ Store 0 in *PTR to show there's no block allocated. */ void -r_alloc_free (register POINTER *ptr) +r_alloc_free (void **ptr) { - register bloc_ptr dead_bloc; + bloc_ptr dead_bloc; if (! r_alloc_initialized) r_alloc_init (); @@ -962,10 +958,10 @@ If more memory cannot be allocated, then leave *PTR unchanged, and return zero. */ -POINTER -r_re_alloc (POINTER *ptr, SIZE size) +void * +r_re_alloc (void **ptr, size_t size) { - register bloc_ptr bloc; + bloc_ptr bloc; if (! r_alloc_initialized) r_alloc_init (); @@ -1004,15 +1000,15 @@ { new_bloc->variable = ptr; *ptr = new_bloc->data; - bloc->variable = (POINTER *) NIL; + bloc->variable = NULL; } else - return NIL; + return NULL; } else { if (! resize_bloc (bloc, MEM_ROUNDUP (size))) - return NIL; + return NULL; } } return *ptr; @@ -1052,27 +1048,27 @@ return; assert (first_heap); - assert (last_heap->end <= (POINTER) sbrk (0)); - assert ((POINTER) first_heap < first_heap->start); + assert (last_heap->end <= (void *) sbrk (0)); + assert ((void *) first_heap < first_heap->start); assert (first_heap->start <= virtual_break_value); assert (virtual_break_value <= first_heap->end); for (h = first_heap; h; h = h->next) { assert (h->prev == ph); - assert ((POINTER) ROUNDUP (h->end) == h->end); + assert ((void *) ROUNDUP (h->end) == h->end); #if 0 /* ??? The code in ralloc.c does not really try to ensure the heap start has any sort of alignment. Perhaps it should. */ - assert ((POINTER) MEM_ROUNDUP (h->start) == h->start); + assert ((void *) MEM_ROUNDUP (h->start) == h->start); #endif - assert ((POINTER) MEM_ROUNDUP (h->bloc_start) == h->bloc_start); + assert ((void *) MEM_ROUNDUP (h->bloc_start) == h->bloc_start); assert (h->start <= h->bloc_start && h->bloc_start <= h->end); if (ph) { assert (ph->end < h->start); - assert (h->start <= (POINTER)h && (POINTER)(h+1) <= h->bloc_start); + assert (h->start <= (void *) h && (void *) (h + 1) <= h->bloc_start); } if (h->bloc_start <= break_value && break_value <= h->end) @@ -1087,8 +1083,8 @@ for (b = first_bloc; b; b = b->next) { assert (b->prev == pb); - assert ((POINTER) MEM_ROUNDUP (b->data) == b->data); - assert ((SIZE) MEM_ROUNDUP (b->size) == b->size); + assert ((void *) MEM_ROUNDUP (b->data) == b->data); + assert ((size_t) MEM_ROUNDUP (b->size) == b->size); ph = 0; for (h = first_heap; h; h = h->next) @@ -1137,7 +1133,7 @@ is checked to ensure that memory corruption does not occur due to misuse. */ void -r_alloc_reset_variable (POINTER *old, POINTER *new) +r_alloc_reset_variable (void **old, void **new) { bloc_ptr bloc = first_bloc; @@ -1192,8 +1188,8 @@ first_heap = last_heap = &heap_base; first_heap->next = first_heap->prev = NIL_HEAP; first_heap->start = first_heap->bloc_start - = virtual_break_value = break_value = (*real_morecore) (0); - if (break_value == NIL) + = virtual_break_value = break_value = real_morecore (0); + if (break_value == NULL) emacs_abort (); extra_bytes = ROUNDUP (50000); @@ -1218,7 +1214,7 @@ #endif #ifndef SYSTEM_MALLOC - first_heap->end = (POINTER) ROUNDUP (first_heap->start); + first_heap->end = (void *) ROUNDUP (first_heap->start); /* The extra call to real_morecore guarantees that the end of the address space is a multiple of page_size, even if page_size is @@ -1226,7 +1222,7 @@ which page_size is stored. This allows a binary to be built on a system with one page size and run on a system with a smaller page size. */ - (*real_morecore) ((char *) first_heap->end - (char *) first_heap->start); + real_morecore ((char *) first_heap->end - (char *) first_heap->start); /* Clear the rest of the last page; this memory is in our address space even though it is after the sbrk value. */ === modified file 'src/vm-limit.c' --- src/vm-limit.c 2013-01-02 16:13:04 +0000 +++ src/vm-limit.c 2013-02-22 19:23:12 +0000 @@ -31,14 +31,12 @@ enum warnlevel { not_warned, warned_75, warned_85, warned_95 }; static enum warnlevel warnlevel; -typedef void *POINTER; - /* Function to call to issue a warning; 0 means don't issue them. */ static void (*warn_function) (const char *); /* Start of data space; can be changed by calling malloc_init. */ -static POINTER data_space_start; +static void *data_space_start; /* Number of bytes of writable memory we can expect to be able to get. */ static size_t lim_data; @@ -123,11 +121,11 @@ check_memory_limits (void) { #ifdef REL_ALLOC - extern POINTER (*real_morecore) (ptrdiff_t); + extern void *(*real_morecore) (ptrdiff_t); #endif - extern POINTER (*__morecore) (ptrdiff_t); + extern void *(*__morecore) (ptrdiff_t); - register POINTER cp; + void *cp; size_t five_percent; size_t data_size; enum warnlevel new_warnlevel; @@ -215,9 +213,9 @@ { #ifdef BSD_SYSTEM extern char etext; - return (POINTER)(&etext); + return (void *) &etext; #elif defined DATA_START - return ((POINTER) DATA_START); + return (void *) DATA_START; #elif defined ORDINARY_LINK /* * This is a hack. Since we're not linking crt0.c or pre_crt0.c, @@ -225,10 +223,10 @@ * is known to live at or near the start of the system crt0.c, and * we don't sweat the handful of bytes that might lose. */ - return ((POINTER) &environ); + return (void *) &environ; #else extern int data_start; - return ((POINTER) &data_start); + return (void *) &data_start; #endif } #endif /* (not CANNOT_DUMP or not SYSTEM_MALLOC) */ @@ -238,7 +236,7 @@ WARNFUN specifies the function to call to issue a warning. */ void -memory_warnings (POINTER start, void (*warnfun) (const char *)) +memory_warnings (void *start, void (*warnfun) (const char *)) { extern void (* __after_morecore_hook) (void); /* From gmalloc.c */ ------------------------------------------------------------ revno: 111858 [merge] committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-02-22 09:13:05 -0800 message: Merge from emacs-24; up to r111291 diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2013-02-21 06:03:02 +0000 +++ doc/emacs/ChangeLog 2013-02-22 17:13:05 +0000 @@ -1,3 +1,8 @@ +2013-02-22 Glenn Morris + + * ack.texi (Acknowledgments): + * emacs.texi (Acknowledgments): Small updates. + 2013-02-21 Glenn Morris * files.texi (File Conveniences): Not just GIFs can be animated. === modified file 'doc/emacs/ack.texi' --- doc/emacs/ack.texi 2013-02-13 08:50:44 +0000 +++ doc/emacs/ack.texi 2013-02-22 17:13:05 +0000 @@ -202,7 +202,7 @@ prior to Emacs 23 for Mac OS. @item -Chong Yidong was the Emacs co-maintainer from Emacs 23 onwards. He made many +Chong Yidong was the Emacs co-maintainer from Emacs 23 to 24.3. He made many improvements to the Emacs display engine. He also wrote @file{tabulated-list.el}, a generic major mode for lists of data; and improved support for themes and packages. @@ -825,7 +825,7 @@ and @file{rx.el}, a regular expression constructor. @item -Stefan Monnier was the Emacs co-maintainer from Emacs 23 onwards. He added +Stefan Monnier was the Emacs (co-)maintainer from Emacs 23 onwards. He added support for Arch and Subversion to VC, re-wrote much of the Emacs server to use the built-in networking primitives, and re-wrote the abbrev and minibuffer completion code for Emacs 23. He also wrote @code{PCL-CVS}, === modified file 'doc/emacs/emacs.texi' --- doc/emacs/emacs.texi 2013-01-01 09:11:05 +0000 +++ doc/emacs/emacs.texi 2013-02-22 17:10:58 +0000 @@ -1375,7 +1375,7 @@ Farnbach, Oscar Figueiredo, Fred Fish, Steve Fisk, Karl Fogel, Gary Foster, Eric S. Fraga, Romain Francoise, Noah Friedman, Andreas Fuchs, Shigeru Fukaya, Hallvard Furuseth, Keith Gabryelski, Peter S. -Galbraith, Kevin Gallagher, Kevin Gallo, Juan León Lahoz García, +Galbraith, Kevin Gallagher, Fabián E. Gallina, Kevin Gallo, Juan León Lahoz García, Howard Gayle, Daniel German, Stephen Gildea, Julien Gilles, David Gillespie, Bob Glickstein, Deepak Goel, David De La Harpe Golden, Boris Goldowsky, David Goodger, Chris Gray, Kevin Greiner, Michelangelo Grigni, Odd === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2013-02-21 22:42:56 +0000 +++ doc/misc/ChangeLog 2013-02-22 17:13:05 +0000 @@ -1,3 +1,7 @@ +2013-02-22 Glenn Morris + + * flymake.texi (Syntax check statuses): Fix multitable continued rows. + 2013-02-21 Paul Eggert * Makefile.in (html): New rule. === modified file 'doc/misc/flymake.texi' --- doc/misc/flymake.texi 2013-02-12 17:36:54 +0000 +++ doc/misc/flymake.texi 2013-02-22 02:16:44 +0000 @@ -210,14 +210,14 @@ @multitable @columnfractions 0.25 0.75 @item Flymake* or Flymake:E/W* @tab Flymake is currently running. For the second case, E/W contains the - error and warning count for the previous run. +error and warning count for the previous run. @item Flymake @tab Syntax check is not running. Usually this means syntax check was - successfully passed (no errors, no warnings). Other possibilities are: - syntax check was killed as a result of executing - @code{flymake-compile}, or syntax check cannot start as compilation - is currently in progress. +successfully passed (no errors, no warnings). Other possibilities are: +syntax check was killed as a result of executing +@code{flymake-compile}, or syntax check cannot start as compilation +is currently in progress. @item Flymake:E/W @tab Number of errors/warnings found by the syntax check process. @@ -232,9 +232,9 @@ @multitable @columnfractions 0.25 0.75 @item CFGERR @tab Syntax check process returned nonzero exit code, but no - errors/warnings were reported. This indicates a possible configuration - error (for example, no suitable error message patterns for the - syntax check tool). +errors/warnings were reported. This indicates a possible configuration +error (for example, no suitable error message patterns for the +syntax check tool). @item NOMASTER @tab Flymake was unable to find master file for the current buffer. === modified file 'etc/DEBUG' --- etc/DEBUG 2013-01-01 09:11:05 +0000 +++ etc/DEBUG 2013-02-22 09:22:21 +0000 @@ -8,17 +8,28 @@ read the Windows-specific section near the end of this document.] ** When you debug Emacs with GDB, you should start it in the directory -where the executable was made. That directory has a .gdbinit file -that defines various "user-defined" commands for debugging Emacs. -(These commands are described below under "Examining Lisp object -values" and "Debugging Emacs Redisplay problems".) - -** When you are trying to analyze failed assertions, it will be -essential to compile Emacs either completely without optimizations or -at least (when using GCC) with the -fno-crossjumping option. Failure -to do so may make the compiler recycle the same abort call for all -assertions in a given function, rendering the stack backtrace useless -for identifying the specific failed assertion. +where the executable was made (the 'src' directory in the Emacs source +tree). That directory has a .gdbinit file that defines various +"user-defined" commands for debugging Emacs. (These commands are +described below under "Examining Lisp object values" and "Debugging +Emacs Redisplay problems".) + +Some GDB versions by default do not automatically load .gdbinit files +in the directory where you invoke GDB. With those versions of GDB, +you will see a warning when GDB starts, like this: + + warning: File ".../src/.gdbinit" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load". + +There are several ways to overcome that difficulty, they are all +described in the node "Auto-loading safe path" in the GDB user manual. + +** When you are trying to analyze failed assertions or backtraces, it +will be essential to compile Emacs either completely without +optimizations (set CFLAGS to "-O0 -g3") or at least (when using GCC) +with the -fno-crossjumping option in CFLAGS. Failure to do so may +make the compiler recycle the same abort call for all assertions in a +given function, rendering the stack backtrace useless for identifying +the specific failed assertion. ** It is a good idea to run Emacs under GDB (or some other suitable debugger) *all the time*. Then, when Emacs crashes, you will be able === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-02-22 14:05:38 +0000 +++ lisp/ChangeLog 2013-02-22 17:13:05 +0000 @@ -1,3 +1,16 @@ +2013-02-22 Juri Linkov + + * isearch.el (isearch-lazy-highlight-new-loop): + Set `isearch-lazy-highlight-start' and `isearch-lazy-highlight-end' + to `isearch-other-end' if it is not nil. (Bug#13402) + + * replace.el (replace-highlight): Let-bind `isearch-other-end' + to `match-beg'. + + * textmodes/ispell.el (ispell-highlight-spelling-error-overlay): + Let-bind `isearch-other-end' to `start', `isearch-forward' to t + and `isearch-error' to nil. + 2013-02-22 Michael Albinus * net/tramp.el (tramp-tramp-file-p): Fix docstring. === modified file 'lisp/isearch.el' --- lisp/isearch.el 2013-02-02 03:38:21 +0000 +++ lisp/isearch.el 2013-02-22 17:13:05 +0000 @@ -2961,8 +2961,15 @@ (setq isearch-lazy-highlight-window (selected-window) isearch-lazy-highlight-window-start (window-start) isearch-lazy-highlight-window-end (window-end) - isearch-lazy-highlight-start (point) - isearch-lazy-highlight-end (point) + ;; Start lazy-highlighting at the beginning of the found + ;; match (`isearch-other-end'). If no match, use point. + ;; One of the next two variables (depending on search direction) + ;; is used to define the starting position of lazy-highlighting + ;; and also to remember the current position of point between + ;; calls of `isearch-lazy-highlight-update', and another variable + ;; is used to define where the wrapped search must stop. + isearch-lazy-highlight-start (or isearch-other-end (point)) + isearch-lazy-highlight-end (or isearch-other-end (point)) isearch-lazy-highlight-wrapped nil isearch-lazy-highlight-last-string isearch-string isearch-lazy-highlight-case-fold-search isearch-case-fold-search @@ -3060,6 +3067,9 @@ (overlay-put ov 'priority 1000) (overlay-put ov 'face lazy-highlight-face) (overlay-put ov 'window (selected-window)))) + ;; Remember the current position of point for + ;; the next call of `isearch-lazy-highlight-update' + ;; when `lazy-highlight-max-at-a-time' is too small. (if isearch-lazy-highlight-forward (setq isearch-lazy-highlight-end (point)) (setq isearch-lazy-highlight-start (point))))) === modified file 'lisp/replace.el' --- lisp/replace.el 2013-02-16 09:26:42 +0000 +++ lisp/replace.el 2013-02-22 17:13:05 +0000 @@ -2203,6 +2203,7 @@ replace-regexp-lax-whitespace) (isearch-case-fold-search case-fold-search) (isearch-forward t) + (isearch-other-end match-beg) (isearch-error nil)) (isearch-lazy-highlight-new-loop range-beg range-end)))) === modified file 'lisp/textmodes/ispell.el' --- lisp/textmodes/ispell.el 2013-01-21 16:05:30 +0000 +++ lisp/textmodes/ispell.el 2013-02-22 17:13:05 +0000 @@ -2602,7 +2602,10 @@ (regexp-quote (buffer-substring-no-properties start end)) "\\b")) (isearch-regexp t) - (isearch-case-fold-search nil)) + (isearch-case-fold-search nil) + (isearch-forward t) + (isearch-other-end start) + (isearch-error nil)) (isearch-lazy-highlight-new-loop (if (boundp 'reg-start) reg-start) (if (boundp 'reg-end) reg-end))) ------------------------------------------------------------ revno: 111857 author: Claudio Bley committer: Eli Zaretskii branch nick: trunk timestamp: Fri 2013-02-22 18:00:14 +0200 message: Don't call 'select' from emacs_gnutls_pull. src/w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop. This avoids warning messages reported as part of Bug#13546. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-02-21 02:35:33 +0000 +++ src/ChangeLog 2013-02-22 16:00:14 +0000 @@ -1,3 +1,8 @@ +2013-02-22 Claudio Bley + + * w32.c (emacs_gnutls_pull): Don't call 'select', and don't loop. + This avoids warning messages reported as part of Bug#13546. + 2013-02-21 Ken Brown * sheap.c (report_sheap_usage): Fix arguments of message1_no_log. === modified file 'src/w32.c' --- src/w32.c 2013-02-16 14:16:07 +0000 +++ src/w32.c 2013-02-22 16:00:14 +0000 @@ -7822,47 +7822,26 @@ ssize_t emacs_gnutls_pull (gnutls_transport_ptr_t p, void* buf, size_t sz) { - int n, sc, err; + int n, err; SELECT_TYPE fdset; EMACS_TIME timeout; struct Lisp_Process *process = (struct Lisp_Process *)p; int fd = process->infd; - for (;;) - { - n = sys_read (fd, (char*)buf, sz); - - if (n >= 0) - return n; - - err = errno; - - if (err == EWOULDBLOCK) - { - /* Set a small timeout. */ - timeout = make_emacs_time (1, 0); - FD_ZERO (&fdset); - FD_SET ((int)fd, &fdset); - - /* Use select with the timeout to poll the selector. */ - sc = select (fd + 1, &fdset, (SELECT_TYPE *)0, (SELECT_TYPE *)0, - &timeout, NULL); - - if (sc > 0) - continue; /* Try again. */ - - /* Translate the WSAEWOULDBLOCK alias EWOULDBLOCK to EAGAIN. - Also accept select return 0 as an indicator to EAGAIN. */ - if (sc == 0 || errno == EWOULDBLOCK) - err = EAGAIN; - else - err = errno; /* Other errors are just passed on. */ - } - - emacs_gnutls_transport_set_errno (process->gnutls_state, err); - - return -1; - } + n = sys_read (fd, (char*)buf, sz); + + if (n >= 0) + return n; + + err = errno; + + /* Translate the WSAEWOULDBLOCK alias EWOULDBLOCK to EAGAIN. */ + if (err == EWOULDBLOCK) + err = EAGAIN; + + emacs_gnutls_transport_set_errno (process->gnutls_state, err); + + return -1; } ssize_t ------------------------------------------------------------ revno: 111856 committer: Michael Albinus + + * net/tramp.el (tramp-tramp-file-p): Fix docstring. + + * net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle + multibyte file names. + 2013-02-22 Glenn Morris * textmodes/sgml-mode.el (sgml-xml-mode): Move before use. === modified file 'lisp/net/tramp-sh.el' --- lisp/net/tramp-sh.el 2013-02-21 13:36:16 +0000 +++ lisp/net/tramp-sh.el 2013-02-22 14:05:38 +0000 @@ -2606,10 +2606,13 @@ (if full-directory-p "yes" "no")) ;; If `full-directory-p', we just say `ls -l FILENAME'. ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'. + ;; "--dired" returns byte positions. Therefore, the file names + ;; must be encoded, which is guaranteed by "LC_ALL=en_US.UTF8 + ;; LC_CTYPE=''". (if full-directory-p (tramp-send-command v - (format "%s %s %s 2>/dev/null" + (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s 2>/dev/null" (tramp-get-ls-command v) switches (if wildcard @@ -2625,7 +2628,7 @@ (tramp-run-real-handler 'file-name-directory (list localname)))) (tramp-send-command v - (format "%s %s %s" + (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s" (tramp-get-ls-command v) switches (if (or wildcard @@ -2671,6 +2674,11 @@ (while (re-search-forward tramp-color-escape-sequence-regexp nil t) (replace-match ""))) + ;; Decode the output, it could be multibyte. + (decode-coding-region + beg (point-max) + (or file-name-coding-system default-file-name-coding-system)) + ;; The inserted file could be from somewhere else. (when (and (not wildcard) (not full-directory-p)) (goto-char (point-max)) === modified file 'lisp/net/tramp.el' --- lisp/net/tramp.el 2013-02-21 16:56:49 +0000 +++ lisp/net/tramp.el 2013-02-22 14:05:38 +0000 @@ -1166,11 +1166,9 @@ ;;;###tramp-autoload (defun tramp-tramp-file-p (name) - "Return t if NAME is a string with Tramp file name syntax. -It checks also, whether NAME is unibyte encoded." + "Return t if NAME is a string with Tramp file name syntax." (save-match-data (and (stringp name) -; (string-equal name (string-as-unibyte name)) (string-match tramp-file-name-regexp name)))) (defun tramp-find-method (method user host) @@ -1354,7 +1352,7 @@ (get-buffer-create (tramp-debug-buffer-name vec)) (when (bobp) (setq buffer-undo-list t) - ;; So it does not get loaded while outline-regexp is let-bound. + ;; So it does not get loaded while `outline-regexp' is let-bound. (require 'outline) ;; Activate `outline-mode'. This runs `text-mode-hook' and ;; `outline-mode-hook'. We must prevent that local processes ------------------------------------------------------------ revno: 111855 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-02-21 21:33:42 -0500 message: Use derived-mode-p in previous change diff: === modified file 'lisp/textmodes/sgml-mode.el' --- lisp/textmodes/sgml-mode.el 2013-02-22 02:01:32 +0000 +++ lisp/textmodes/sgml-mode.el 2013-02-22 02:33:42 +0000 @@ -62,7 +62,7 @@ (set-default sym val) (mapc (lambda (buff) (with-current-buffer buff - (and (eq major-mode 'sgml-mode) + (and (derived-mode-p 'sgml-mode) (not sgml-xml-mode) (setq skeleton-transformation-function val)))) (buffer-list))) ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.