------------------------------------------------------------ revno: 117140 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-05-22 15:56:49 -0400 message: * lisp/shell.el (shell-mode) : Bypass bash aliases. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-05-21 01:55:54 +0000 +++ lisp/ChangeLog 2014-05-22 19:56:49 +0000 @@ -1,3 +1,7 @@ +2014-05-22 Glenn Morris + + * shell.el (shell-mode) : Bypass bash aliases. + 2014-05-21 Daniel Colascione * files.el (interpreter-mode-alist): Add mksh. === modified file 'lisp/shell.el' --- lisp/shell.el 2014-04-07 01:27:32 +0000 +++ lisp/shell.el 2014-05-22 19:56:49 +0000 @@ -1,7 +1,6 @@ ;;; shell.el --- specialized comint.el for running the shell -*- lexical-binding: t -*- -;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, -;; Inc. +;; Copyright (C) 1988, 1993-1997, 2000-2014 Free Software Foundation, Inc. ;; Author: Olin Shivers ;; Simon Marshall @@ -584,6 +583,8 @@ (setq shell-dirstack-query (cond ((string-equal shell "sh") "pwd") ((string-equal shell "ksh") "echo $PWD ~-") + ;; Bypass any aliases. TODO all shells could use this. + ((string-equal shell "bash") "command dirs") (t "dirs"))) ;; Bypass a bug in certain versions of bash. (when (string-equal shell "bash") ------------------------------------------------------------ revno: 117139 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-05-22 09:40:35 -0700 message: Supply malloc and alloc_size attributes for extern allocators. This documents the C API, and helps GCC generate a bit better code. * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE) (ATTRIBUTE_MALLOC_SIZE): New macros. * gmalloc.c (malloc, realloc, calloc): * gtkutil.h (malloc_widget_value): * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc) (xnrealloc, xstrdup, xlispstrdup, record_xmalloc): Use them. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-05-21 19:51:58 +0000 +++ src/ChangeLog 2014-05-22 16:40:35 +0000 @@ -1,3 +1,15 @@ +2014-05-22 Paul Eggert + + Supply malloc and alloc_size attributes for extern allocators. + This documents the C API, and helps GCC generate a bit better code. + * conf_post.h (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE) + (ATTRIBUTE_MALLOC_SIZE): New macros. + * gmalloc.c (malloc, realloc, calloc): + * gtkutil.h (malloc_widget_value): + * lisp.h (ralloc, r_re_alloc, xmalloc, xzalloc, xrealloc, xnmalloc) + (xnrealloc, xstrdup, xlispstrdup, record_xmalloc): + Use them. + 2014-05-21 Paul Eggert Don't assume that ImageMagick uses a 16-bit quantum (Bug#17519). === modified file 'src/conf_post.h' --- src/conf_post.h 2014-05-17 08:11:31 +0000 +++ src/conf_post.h 2014-05-22 16:40:35 +0000 @@ -225,6 +225,20 @@ #define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST +#if 3 <= __GNUC__ +# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define ATTRIBUTE_MALLOC +#endif + +#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) +# define ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args)) +#else +# define ATTRIBUTE_ALLOC_SIZE(args) +#endif + +#define ATTRIBUTE_MALLOC_SIZE(args) ATTRIBUTE_MALLOC ATTRIBUTE_ALLOC_SIZE (args) + /* Work around GCC bug 59600: when a function is inlined, the inlined code may have its addresses sanitized even if the function has the no_sanitize_address attribute. This bug is fixed in GCC 4.9.0 and === modified file 'src/gmalloc.c' --- src/gmalloc.c 2014-03-04 19:02:49 +0000 +++ src/gmalloc.c 2014-05-22 16:40:35 +0000 @@ -51,12 +51,12 @@ /* Allocate SIZE bytes of memory. */ -extern void *malloc (size_t size); +extern void *malloc (size_t size) ATTRIBUTE_MALLOC_SIZE ((1)); /* Re-allocate the previously allocated block in ptr, making the new block SIZE bytes long. */ -extern void *realloc (void *ptr, size_t size); +extern void *realloc (void *ptr, size_t size) ATTRIBUTE_ALLOC_SIZE ((2)); /* Allocate NMEMB elements of SIZE bytes each, all initialized to 0. */ -extern void *calloc (size_t nmemb, size_t size); +extern void *calloc (size_t nmemb, size_t size) ATTRIBUTE_MALLOC_SIZE ((1,2)); /* Free a block allocated by `malloc', `realloc' or `calloc'. */ extern void free (void *ptr); === modified file 'src/gtkutil.h' --- src/gtkutil.h 2014-01-13 01:40:35 +0000 +++ src/gtkutil.h 2014-05-22 16:40:35 +0000 @@ -74,7 +74,7 @@ } xg_menu_item_cb_data; -extern struct _widget_value *malloc_widget_value (void); +extern struct _widget_value *malloc_widget_value (void) ATTRIBUTE_MALLOC; extern void free_widget_value (struct _widget_value *); extern bool xg_uses_old_file_dialog (void) ATTRIBUTE_CONST; === modified file 'src/lisp.h' --- src/lisp.h 2014-05-19 19:19:05 +0000 +++ src/lisp.h 2014-05-22 16:40:35 +0000 @@ -3755,9 +3755,9 @@ #ifdef REL_ALLOC /* Defined in ralloc.c. */ -extern void *r_alloc (void **, size_t); +extern void *r_alloc (void **, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); extern void r_alloc_free (void **); -extern void *r_re_alloc (void **, size_t); +extern void *r_re_alloc (void **, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); extern void r_alloc_reset_variable (void **, void **); extern void r_alloc_inhibit_buffer_relocation (int); #endif @@ -4391,16 +4391,17 @@ /* True means ^G can quit instantly. */ extern bool immediate_quit; -extern void *xmalloc (size_t); -extern void *xzalloc (size_t); -extern void *xrealloc (void *, size_t); +extern void *xmalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); +extern void *xzalloc (size_t) ATTRIBUTE_MALLOC_SIZE ((1)); +extern void *xrealloc (void *, size_t) ATTRIBUTE_ALLOC_SIZE ((2)); extern void xfree (void *); -extern void *xnmalloc (ptrdiff_t, ptrdiff_t); -extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t); +extern void *xnmalloc (ptrdiff_t, ptrdiff_t) ATTRIBUTE_MALLOC_SIZE ((1,2)); +extern void *xnrealloc (void *, ptrdiff_t, ptrdiff_t) + ATTRIBUTE_ALLOC_SIZE ((2,3)); extern void *xpalloc (void *, ptrdiff_t *, ptrdiff_t, ptrdiff_t, ptrdiff_t); -extern char *xstrdup (const char *); -extern char *xlispstrdup (Lisp_Object); +extern char *xstrdup (const char *) ATTRIBUTE_MALLOC; +extern char *xlispstrdup (Lisp_Object) ATTRIBUTE_MALLOC; extern void dupstring (char **, char const *); extern void xputenv (const char *); @@ -4432,7 +4433,7 @@ enum MAX_ALLOCA { MAX_ALLOCA = 16 * 1024 }; -extern void *record_xmalloc (size_t); +extern void *record_xmalloc (size_t) ATTRIBUTE_ALLOC_SIZE ((1)); #define USE_SAFE_ALLOCA \ ptrdiff_t sa_count = SPECPDL_INDEX (); bool sa_must_free = false ------------------------------------------------------------ revno: 117138 committer: Leo Liu branch nick: trunk timestamp: Thu 2014-05-22 12:30:48 +0800 message: * sequences.texi (Sequence Functions): Don't mention when and how SEQ to nreverse is mutated. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2014-05-21 03:49:58 +0000 +++ doc/lispref/ChangeLog 2014-05-22 04:30:48 +0000 @@ -1,3 +1,8 @@ +2014-05-22 Leo Liu + + * sequences.texi (Sequence Functions): Don't mention when and how + SEQ to nreverse is mutated. + 2014-05-21 Leo Liu * sequences.texi (Sequence Functions): Update nreverse. === modified file 'doc/lispref/sequences.texi' --- doc/lispref/sequences.texi 2014-05-21 03:49:58 +0000 +++ doc/lispref/sequences.texi 2014-05-22 04:30:48 +0000 @@ -265,12 +265,7 @@ @cindex reversing a list @cindex reversing a vector This function reverses the order of the elements of @var{seq}. -If @var{seq} is a list, @code{nreverse} alters it by reversing the @sc{cdr}s -in the cons cells. The cons cell that used to be the last one in @var{seq} -becomes the first cons cell of the value. If @var{seq} is a vector or -bool vector, its items are placed in the same vector in a reversed -order. If @var{seq} is a string, it works like @code{reverse} i.e., no -destructive modifcation in preference to treat strings as immutable. +Unlike @code{reverse} the original @var{seq} may be modified. For example: