commit dce99f222f1ca33265cd56ddb157817be1dc078e (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Tue Jun 14 22:40:18 2016 -0700 Fix ifdef-vs-if typo with RANDR13_LIBRARY * src/xfns.c (x_get_monitor_attributes_xrandr): Use #if, not #ifdef. This ports to systems that predate xrandr 1.3. See Christian Lynbech in: http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00198.html diff --git a/src/xfns.c b/src/xfns.c index 9ff7773..35e2a23 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4286,7 +4286,7 @@ x_get_monitor_attributes_xrandr (struct x_display_info *dpyinfo) n_monitors = resources->noutput; monitors = xzalloc (n_monitors * sizeof *monitors); -#ifdef RANDR13_LIBRARY +#if RANDR13_LIBRARY if (randr13_avail) pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window); #endif commit c5461d03a411ff5c6f43885a0a9030e8a94bbc2e Author: Paul Eggert Date: Tue Jun 14 12:19:36 2016 -0700 Port to platforms where char * has top bit set This fixes a five-year-old FIXME comment. Although I don’t know of a platform where this is a problem in practice, better safe than sorry. * src/doc.c (Fdocumentation): If SUBRP, simply use doc as integer, as it is now an integer, not char *. (store_function_docstring): Offset is now EMACS_INT, not ptrdiff_t; this is a file offset and EMACS_INT is better if --with-wide-int. If SUBRP, simply store the offset rather than negating it and converting it to char *. * src/lisp.h (struct Lisp_Subr.doc): Now EMACS_INT, not char *. diff --git a/src/doc.c b/src/doc.c index 7107580..6ffdad1 100644 --- a/src/doc.c +++ b/src/doc.c @@ -339,16 +339,7 @@ string is passed through `substitute-command-keys'. */) if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) fun = XCDR (fun); if (SUBRP (fun)) - { - if (XSUBR (fun)->doc == 0) - return Qnil; - /* FIXME: This is not portable, as it assumes that string - pointers have the top bit clear. */ - else if ((intptr_t) XSUBR (fun)->doc >= 0) - doc = build_string (XSUBR (fun)->doc); - else - doc = make_number ((intptr_t) XSUBR (fun)->doc); - } + doc = make_number (XSUBR (fun)->doc); else if (COMPILEDP (fun)) { if ((ASIZE (fun) & PSEUDOVECTOR_SIZE_MASK) <= COMPILED_DOC_STRING) @@ -473,7 +464,7 @@ aren't strings. */) /* Scanning the DOC files and placing docstring offsets into functions. */ static void -store_function_docstring (Lisp_Object obj, ptrdiff_t offset) +store_function_docstring (Lisp_Object obj, EMACS_INT offset) { /* Don't use indirect_function here, or defaliases will apply their docstrings to the base functions (Bug#2603). */ @@ -502,10 +493,7 @@ store_function_docstring (Lisp_Object obj, ptrdiff_t offset) /* Lisp_Subrs have a slot for it. */ else if (SUBRP (fun)) - { - intptr_t negative_offset = - offset; - XSUBR (fun)->doc = (char *) negative_offset; - } + XSUBR (fun)->doc = offset; /* Bytecode objects sometimes have slots for it. */ else if (COMPILEDP (fun)) diff --git a/src/lisp.h b/src/lisp.h index 972ca33..e0eb52a 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1752,7 +1752,7 @@ struct Lisp_Subr short min_args, max_args; const char *symbol_name; const char *intspec; - const char *doc; + EMACS_INT doc; }; enum char_table_specials commit 7f35d5cbaf055dddcf0489a6f6a46df7ddaeeaf4 Author: Paul Eggert Date: Tue Jun 14 11:46:30 2016 -0700 Remove recursion from store_function_docstring * src/doc.c (store_function_docstring): Refactor to avoid the need for C-level recursion. diff --git a/src/doc.c b/src/doc.c index 017dd17..7107580 100644 --- a/src/doc.c +++ b/src/doc.c @@ -481,15 +481,10 @@ store_function_docstring (Lisp_Object obj, ptrdiff_t offset) /* The type determines where the docstring is stored. */ - /* Lisp_Subrs have a slot for it. */ - if (SUBRP (fun)) - { - intptr_t negative_offset = - offset; - XSUBR (fun)->doc = (char *) negative_offset; - } - /* If it's a lisp form, stick it in the form. */ - else if (CONSP (fun)) + if (CONSP (fun) && EQ (XCAR (fun), Qmacro)) + fun = XCDR (fun); + if (CONSP (fun)) { Lisp_Object tem; @@ -503,8 +498,13 @@ store_function_docstring (Lisp_Object obj, ptrdiff_t offset) correctness is quite delicate. */ XSETCAR (tem, make_number (offset)); } - else if (EQ (tem, Qmacro)) - store_function_docstring (XCDR (fun), offset); + } + + /* Lisp_Subrs have a slot for it. */ + else if (SUBRP (fun)) + { + intptr_t negative_offset = - offset; + XSUBR (fun)->doc = (char *) negative_offset; } /* Bytecode objects sometimes have slots for it. */ commit 61cfd6acfe099bae4b743665d0a10c2ba55e7ff2 Author: Ken Brown Date: Tue Jun 14 09:50:38 2016 -0400 Remove system-specific -I switch from Cygwin-w32 build Suggested by Eli Zaretskii in discussion of bug#18302. * src/image.c [HAVE_NTGUI]: Remove the unused macro PIXEL_ALREADY_TYPEDEFED. On Cygwin, include "noX/xpm.h" instead of "X11/xpm.h". * configure.ac [CYGWIN && HAVE_W32]: Change the xpm test to use "noX/xpm.h". Don't add a -I switch to CPPFLAGS. diff --git a/configure.ac b/configure.ac index 069a726..2674806 100644 --- a/configure.ac +++ b/configure.ac @@ -3245,34 +3245,29 @@ fi ### Use -lXpm if available, unless '--with-xpm=no'. ### mingw32 doesn't use -lXpm, since it loads the library dynamically. -### In the Cygwin-w32 build, we need to use /usr/include/noX/X11/xpm.h -### rather than /usr/include/X11/xpm.h, so we set CPPFLAGS (and -### LDFLAGS) accordingly. +### The Cygwin-w32 build uses instead of , so +### we need to set LDFLAGS accordingly. HAVE_XPM=no LIBXPM= if test "${HAVE_W32}" = "yes" && test "${opsys}" = "cygwin"; then if test "${with_xpm}" != "no"; then - SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS -I/usr/include/noX" LDFLAGS="$LDFLAGS -L/usr/lib/noX" - AC_CHECK_HEADER(X11/xpm.h, + AC_CHECK_HEADER(noX/xpm.h, [AC_CHECK_LIB(Xpm, XpmReadFileToImage, HAVE_XPM=yes)]) if test "${HAVE_XPM}" = "yes"; then AC_MSG_CHECKING(for XpmReturnAllocPixels preprocessor define) AC_EGREP_CPP(no_return_alloc_pixels, - [#include "X11/xpm.h" + [#include "noX/xpm.h" #ifndef XpmReturnAllocPixels no_return_alloc_pixels #endif ], HAVE_XPM=no, HAVE_XPM=yes) if test "${HAVE_XPM}" = "yes"; then - REAL_CPPFLAGS="$REAL_CPPFLAGS -I/usr/include/noX" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) - CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi fi diff --git a/src/image.c b/src/image.c index 38866e0..657852b 100644 --- a/src/image.c +++ b/src/image.c @@ -3159,16 +3159,18 @@ static bool xpm_load (struct frame *f, struct image *img); #define XColor xpm_XColor #define XImage xpm_XImage #define Display xpm_Display -#define PIXEL_ALREADY_TYPEDEFED +#ifdef CYGWIN +#include "noX/xpm.h" +#else /* not CYGWIN */ #include "X11/xpm.h" +#endif /* not CYGWIN */ #undef FOR_MSW #undef XColor #undef XImage #undef Display -#undef PIXEL_ALREADY_TYPEDEFED -#else +#else /* not HAVE_NTGUI */ #include "X11/xpm.h" -#endif /* HAVE_NTGUI */ +#endif /* not HAVE_NTGUI */ #endif /* HAVE_XPM */ #if defined (HAVE_XPM) || defined (HAVE_NS) commit 2f523c15801366d269cb4a526906e018f8cd713f Author: Noam Postavsky Date: Sat Jun 4 13:32:50 2016 -0400 Make python.el work in Emacs 24 * lisp/progmodes/python.el: Bump version. (python-define-auxiliary-skeleton): Only use format-message if fbound (Bug#23126). diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 343023f..d4089a3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4,7 +4,7 @@ ;; Author: Fabián E. Gallina ;; URL: https://github.com/fgallina/python.el -;; Version: 0.25.1 +;; Version: 0.25.2 ;; Package-Requires: ((emacs "24.1") (cl-lib "1.0")) ;; Maintainer: emacs-devel@gnu.org ;; Created: Jul 2010 @@ -4045,8 +4045,8 @@ The skeleton will be bound to python-skeleton-NAME." (declare (indent 2)) (let* ((name (symbol-name name)) (function-name (intern (concat "python-skeleton--" name))) - (msg (format-message - "Add `%s' clause? " name))) + (msg (funcall (if (fboundp 'format-message) #'format-message #'format) + "Add `%s' clause? " name))) (when (not skel) (setq skel `(< ,(format "%s:" name) \n \n