commit 658b768a6534ae6e77a8547a56fc31b46b63710b (HEAD, refs/remotes/origin/master) Author: David Reitter Date: Fri Nov 14 10:56:39 2014 -0500 Time-out NS event loop OS X 10.10 will, at times, not send us the application-defined event that is used to terminate the event loop. As a workaround, we define a timeout and react accordingly. Leaving it in place for other OSX and NS versions as a safety net. Partial revert of 2014-11-08T16:32:37Z!jan.h.d@swipnet.se. Fixes debbugs:18993 diff --git a/src/ChangeLog b/src/ChangeLog index 3bcac1b..71b2938 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 David Reitter + + * nsterm.m (run): set timeout for event loop to prevent hang. + (Bug#18993) + 2014-11-14 Paul Eggert * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1. diff --git a/src/nsterm.m b/src/nsterm.m index 64951da..539f77e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -4511,15 +4511,6 @@ ns_term_shutdown (int sig) #ifdef NS_IMPL_COCOA - (void)run { -#ifndef NSAppKitVersionNumber10_9 -#define NSAppKitVersionNumber10_9 1265 -#endif - - if ((int)NSAppKitVersionNumber != NSAppKitVersionNumber10_9) - { - [super run]; - return; - } NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; @@ -4532,12 +4523,22 @@ ns_term_shutdown (int sig) [pool release]; pool = [[NSAutoreleasePool alloc] init]; + /* OSX 10.10.1 swallows the AppDefined event we are sending ourselves + in certain situations (rapid incoming events). + The timeout we set with untilDate is necessary to prevent a hang. + Bug #18993 */ + NSEvent *event = [self nextEventMatchingMask:NSAnyEventMask - untilDate:[NSDate distantFuture] + untilDate:[NSDate dateWithTimeIntervalSinceNow:0.5] inMode:NSDefaultRunLoopMode dequeue:YES]; - [self sendEvent:event]; + + if (event == nil) // timeout + shouldKeepRunning = NO; + else + [self sendEvent:event]; + [self updateWindows]; } while (shouldKeepRunning); commit f20a19df87444d1977f63dd5b3fc42f4f2d50aa2 Author: Ivan Andrus Date: Sat Nov 1 12:33:02 2014 -0600 Use derived-mode-p in python.el instead of equality test on major-mode * progmodes/python.el (python-shell-font-lock-kill-buffer): (python-shell-font-lock-with-font-lock-buffer) (python-shell-get-buffer, python-ffap-module-path): Use `derived-mode-p' instead of equality test on `major-mode'. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3b879a..e2e5352 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-11-14 Ivan Andrus + + * progmodes/python.el (python-shell-font-lock-kill-buffer): + (python-shell-font-lock-with-font-lock-buffer) + (python-shell-get-buffer, python-ffap-module-path): Use + `derived-mode-p' instead of equality test on `major-mode'. + 2014-11-14 Fabián Ezequiel Gallina * progmodes/python.el (python-shell-virtualenv-root): Rename from diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 122f4ec..2fcbe64 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -2224,7 +2224,7 @@ Signals an error if no shell buffer is available for current buffer." (when (and python-shell--font-lock-buffer (buffer-live-p python-shell--font-lock-buffer)) (kill-buffer python-shell--font-lock-buffer) - (when (eq major-mode 'inferior-python-mode) + (when (derived-mode-p 'inferior-python-mode) (setq python-shell--font-lock-buffer nil))))) (defmacro python-shell-font-lock-with-font-lock-buffer (&rest body) @@ -2241,7 +2241,7 @@ also `with-current-buffer'." (set-buffer python-shell--font-lock-buffer) (set (make-local-variable 'delay-mode-hooks) t) (let ((python-indent-guess-indent-offset nil)) - (when (not (eq major-mode 'python-mode)) + (when (not (derived-mode-p 'python-mode)) (python-mode)) ,@body)))) @@ -2504,7 +2504,7 @@ startup." (defun python-shell-get-buffer () "Return inferior Python buffer for current buffer. If current buffer is in `inferior-python-mode', return it." - (if (eq major-mode 'inferior-python-mode) + (if (derived-mode-p 'inferior-python-mode) (current-buffer) (let* ((dedicated-proc-name (python-shell-get-process-name t)) (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) @@ -3481,7 +3481,7 @@ The skeleton will be bound to python-skeleton-NAME." (defun python-ffap-module-path (module) "Function for `ffap-alist' to return path for MODULE." (let ((process (or - (and (eq major-mode 'inferior-python-mode) + (and (derived-mode-p 'inferior-python-mode) (get-buffer-process (current-buffer))) (python-shell-get-process)))) (if (not process) commit a6a43d654a5f2a139c69f75f6d46383bf58b3a77 Author: Andreas Schwab Date: Fri Nov 14 21:44:03 2014 +0100 Don't rerun configure if lisp/version.el changes lisp/version.el is no longer the authority for emacs-version. * Makefile.in (config.status): Don't depend on ${srcdir}/lisp/version.el. diff --git a/ChangeLog b/ChangeLog index c11ebea..6d8543c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 Andreas Schwab + + * Makefile.in (config.status): Don't depend on + ${srcdir}/lisp/version.el. + 2014-11-14 Paul Eggert Merge from gnulib. diff --git a/Makefile.in b/Makefile.in index 25d2a08..ccb70a4 100644 --- a/Makefile.in +++ b/Makefile.in @@ -408,7 +408,7 @@ $(MAKEFILE_NAME): config.status $(srcdir)/src/config.in \ # Don't erase these files if make is interrupted while refreshing them. .PRECIOUS: Makefile config.status -config.status: ${srcdir}/configure ${srcdir}/lisp/version.el +config.status: ${srcdir}/configure if [ -x ./config.status ]; then \ $(CFG) ./config.status --recheck; \ else \ commit dc7a3ba28b49fe67e469931bc9e66ea1b71fc4d3 Author: Paul Eggert Date: Fri Nov 14 12:23:11 2014 -0800 Merge from gnulib. 2014-11-14 extern-inline: update commentary about GCC bugs 2014-11-06 unistd: port to iOS 2014-11-04 update from texinfo * doc/misc/texinfo.tex, lib/unistd.in.h, m4/extern-inline.m4: Update from gnulib. diff --git a/ChangeLog b/ChangeLog index 0e9dc0d..c11ebea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2014-11-14 Paul Eggert + Merge from gnulib. + 2014-11-14 extern-inline: update commentary about GCC bugs + 2014-11-06 unistd: port to iOS + 2014-11-04 update from texinfo + * doc/misc/texinfo.tex, lib/unistd.in.h, m4/extern-inline.m4: + Update from gnulib. + build: port to GCC 4.6.4 + glibc 2.5 On platforms this old, building with _FORTIFY_SOURCE equal to 2 results in duplicate definitions of standard library functions. diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex index 6312dad..72c8cf4 100644 --- a/doc/misc/texinfo.tex +++ b/doc/misc/texinfo.tex @@ -3,7 +3,7 @@ % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % -\def\texinfoversion{2014-05-20.16} +\def\texinfoversion{2014-10-29.10} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, @@ -5739,13 +5739,16 @@ end % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. +% Not used for @heading series. % % To test against our argument. \def\Ynothingkeyword{Ynothing} -\def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} +\def\Yomitfromtockeyword{Yomitfromtoc} % \def\chapmacro#1#2#3{% + \checkenv{}% chapters, etc., should not start inside an environment. + % % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs @@ -5891,22 +5894,28 @@ end % Print any size, any type, section title. % -% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is -% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the -% section number. +% #1 is the text of the title, +% #2 is the section level (sec/subsec/subsubsec), +% #3 is the section type (Ynumbered, Ynothing, Yappendix, Yomitfromtoc), +% #4 is the section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% - \checkenv{}% should not be in an environment. + \def\sectionlevel{#2}% + \def\temptype{#3}% + % + % It is ok for the @heading series commands to appear inside an + % environment (it's been historically allowed, though the logic is + % dubious), but not the others. + \ifx\temptype\Yomitfromtockeyword\else + \checkenv{}% non-@*heading should not be in an environment. + \fi % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % - \def\sectionlevel{#2}% - \def\temptype{#3}% - % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword diff --git a/lib/unistd.in.h b/lib/unistd.in.h index bbbfd75..219f43d 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -401,6 +401,12 @@ _GL_WARN_ON_USE (dup3, "dup3 is unportable - " /* Set of environment variables and values. An array of strings of the form "VARIABLE=VALUE", terminated with a NULL. */ # if defined __APPLE__ && defined __MACH__ +# include +# if !defined TARGET_OS_IPHONE && !defined TARGET_IPHONE_SIMULATOR +# define _GL_USE_CRT_EXTERNS +# endif +# endif +# ifdef _GL_USE_CRT_EXTERNS # include # define environ (*_NSGetEnviron ()) # else diff --git a/m4/extern-inline.m4 b/m4/extern-inline.m4 index 7f1bb39..0edbe3c 100644 --- a/m4/extern-inline.m4 +++ b/m4/extern-inline.m4 @@ -74,6 +74,11 @@ AC_DEFUN([gl_EXTERN_INLINE], # define _GL_EXTERN_INLINE static _GL_UNUSED #endif +/* In GCC, suppress bogus "no previous prototype for 'FOO'" + and "no previous declaration for 'FOO'" diagnostics, + when FOO is an inline function in the header; see + and + . */ #if 4 < __GNUC__ + (6 <= __GNUC_MINOR__) # if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ # define _GL_INLINE_HEADER_CONST_PRAGMA @@ -81,10 +86,6 @@ AC_DEFUN([gl_EXTERN_INLINE], # define _GL_INLINE_HEADER_CONST_PRAGMA \ _Pragma ("GCC diagnostic ignored \"-Wsuggest-attribute=const\"") # endif - /* Suppress GCC's bogus "no previous prototype for 'FOO'" - and "no previous declaration for 'FOO'" diagnostics, - when FOO is an inline function in the header; see - . */ # define _GL_INLINE_HEADER_BEGIN \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wmissing-prototypes\"") \ commit 5caf6c9358068f9fca8ebde3230a2df1155c0d0c Author: Paul Eggert Date: Fri Nov 14 12:20:17 2014 -0800 build: port to GCC 4.6.4 + glibc 2.5 On platforms this old, building with _FORTIFY_SOURCE equal to 2 results in duplicate definitions of standard library functions. Problem reported by Nelson H. F. Beebe. * configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK. By default, do not enable this unless GNULIB_PORTCHECK is defined. This better matches the original intent, which as I recall was to enable these extra checks only with --enable-gcc-warnings. diff --git a/ChangeLog b/ChangeLog index 92c3995..0e9dc0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2014-11-14 Paul Eggert + + build: port to GCC 4.6.4 + glibc 2.5 + On platforms this old, building with _FORTIFY_SOURCE equal to 2 + results in duplicate definitions of standard library functions. + Problem reported by Nelson H. F. Beebe. + * configure.ac (_FORTIFY_SOURCE): Sort after GNULIB_PORTCHECK. + By default, do not enable this unless GNULIB_PORTCHECK is defined. + This better matches the original intent, which as I recall was to + enable these extra checks only with --enable-gcc-warnings. + 2014-11-14 David Reitter * Makefile.in (install-arch-indep): Compress publicsuffix.txt file. diff --git a/configure.ac b/configure.ac index b2b98a0..5d71c2f 100644 --- a/configure.ac +++ b/configure.ac @@ -899,14 +899,15 @@ else fi AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.]) - AH_VERBATIM([FORTIFY_SOURCE], + AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) + AH_VERBATIM([GNULIB_PORTCHECK_FORTIFY_SOURCE], [/* Enable compile-time and run-time bounds-checking, and some warnings, without upsetting glibc 2.15+. */ - #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ + #if (defined GNULIB_PORTCHECK && !defined _FORTIFY_SOURCE \ + && defined __OPTIMIZE__ && __OPTIMIZE__) # define _FORTIFY_SOURCE 2 #endif ]) - AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks]) # We use a slightly smaller set of warning options for lib/. # Remove the following and save the result in GNULIB_WARN_CFLAGS. commit 9bcde6cdcaa0494aaac20ff23101577aa80de5b0 Author: Paul Eggert Date: Fri Nov 14 12:18:44 2014 -0800 * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1. diff --git a/src/.gitignore b/src/.gitignore index ebacd57..0942abf 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,5 +1,6 @@ buildobj.h config.h +emacs-[1-9]* epaths.h stamp_BLD stamp-h.in diff --git a/src/ChangeLog b/src/ChangeLog index 6f105ea..3bcac1b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-11-14 Paul Eggert + + * .gitignore: Add emacs-[1-9]*, to ignore files like emacs-25.0.50.1. + 2014-11-14 Dmitry Antipov * xfont.c (xfont_list_pattern): Do not allocate font entity object commit c28ef9a4662324fe77910e6c82b72cef0c2aa7df Author: David Reitter Date: Fri Nov 14 07:22:01 2014 -0500 Compress publicsuffix file to save space * url-domsuf.el (url-domsuf-parse-file): Read compressed publicsuffix file if available. * Makefile.in (install-arch-indep): Compress publicsuffix.txt file. diff --git a/ChangeLog b/ChangeLog index 174fe6a..92c3995 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-11-14 David Reitter + + * Makefile.in (install-arch-indep): Compress publicsuffix.txt file. + 2014-11-13 Lars Magne Ingebrigtsen * .gitignore: Copy over sufficient ignorable files from the old diff --git a/Makefile.in b/Makefile.in index 8f5cacb..25d2a08 100644 --- a/Makefile.in +++ b/Makefile.in @@ -259,7 +259,7 @@ MKDIR_P = @MKDIR_P@ # Create a link to a file in the same directory as the target. LN_S_FILEONLY = @LN_S_FILEONLY@ -# We use gzip to compress installed .el files. +# We use gzip to compress installed .el and some .txt files. GZIP_PROG = @GZIP_PROG@ # ============================= Targets ============================== @@ -600,11 +600,12 @@ install-arch-indep: lisp install-info install-man ${INSTALL_ARCH_INDEP_EXTRA} subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \ ${write_subdir} || true [ -z "${GZIP_PROG}" ] || { \ - echo "Compressing *.el ..." && \ + echo "Compressing *.el etc. ..." && \ cd "$(DESTDIR)${lispdir}" && \ for f in `find . -name "*.elc" -print | sed 's/.elc$$/.el/'`; do \ ${GZIP_PROG} -9n "$$f"; \ done; \ + ${GZIP_PROG} -9n "../etc/publicsuffix.txt"; \ } -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS} diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 1362877..1be4ca7 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,8 @@ +2014-11-14 David Reitter + + * url-domsuf.el (url-domsuf-parse-file): Read compressed + publicsuffix file if available. + 2014-11-05 Teodor Zlatanov * url-http.el (url-user-agent): New variable, can be function or diff --git a/lisp/url/url-domsuf.el b/lisp/url/url-domsuf.el index 365cf56..b7f9259 100644 --- a/lisp/url/url-domsuf.el +++ b/lisp/url/url-domsuf.el @@ -32,8 +32,12 @@ (defun url-domsuf-parse-file () (with-temp-buffer - (insert-file-contents - (expand-file-name "publicsuffix.txt" data-directory)) + (with-auto-compression-mode + (insert-file-contents + (let* ((suffixfile (expand-file-name "publicsuffix.txt" data-directory)) + (compressed-file (concat suffixfile ".gz"))) + (or (and (file-readable-p compressed-file) compressed-file) + suffixfile)))) (let ((domains nil) domain exception) (while (not (eobp)) commit a5cbb7d9cc072db90201dd6e7e597c424a7d015e Author: Dmitry Antipov Date: Fri Nov 14 13:40:24 2014 +0300 Attempt to allocate less font entity objects in xfont_list_pattern * xfont.c (xfont_list_pattern): Do not allocate font entity object for each candidate font but attempt to reuse it from previous improper candidate, if any. diff --git a/src/ChangeLog b/src/ChangeLog index 2be24fa..6f105ea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-11-14 Dmitry Antipov + + * xfont.c (xfont_list_pattern): Do not allocate font entity object + for each candidate font but attempt to reuse it from previous improper + candidate, if any. + 2014-11-13 Paul Eggert Avoid undefined behavior in color table hashing. @@ -237,7 +243,7 @@ functions in Vselection_converter_alist (Bug#18911). (syms_of_nsselect): Remove Vselection_converter_alist. -(2014-10-31 Dmitry Antipov +2014-10-31 Dmitry Antipov * font.c (copy_font_spec): Redesign to avoid Fcopy_alist and unnecessary initialization. Adjust comments. diff --git a/src/xfont.c b/src/xfont.c index 5e8dd37..06a4479 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -386,7 +386,7 @@ xfont_list_pattern (Display *display, const char *pattern, { char **indices = alloca (sizeof (char *) * num_fonts); Lisp_Object *props = XVECTOR (xfont_scratch_props)->contents; - Lisp_Object scripts = Qnil; + Lisp_Object scripts = Qnil, entity = Qnil; for (i = 0; i < ASIZE (xfont_scratch_props); i++) ASET (xfont_scratch_props, i, Qnil); @@ -397,11 +397,11 @@ xfont_list_pattern (Display *display, const char *pattern, for (i = 0; i < num_fonts; i++) { ptrdiff_t len; - Lisp_Object entity; if (i > 0 && xstrcasecmp (indices[i - 1], indices[i]) == 0) continue; - entity = font_make_entity (); + if (NILP (entity)) + entity = font_make_entity (); len = xfont_decode_coding_xlfd (indices[i], -1, buf); if (font_parse_xlfd (buf, len, entity) < 0) continue; @@ -459,7 +459,7 @@ xfont_list_pattern (Display *display, const char *pattern, { if (NILP (script) || xfont_chars_supported (chars, NULL, encoding, repertory)) - list = Fcons (entity, list); + list = Fcons (entity, list), entity = Qnil; continue; } if (memcmp (props, aref_addr (entity, FONT_FOUNDRY_INDEX), @@ -474,7 +474,7 @@ xfont_list_pattern (Display *display, const char *pattern, } if (NILP (script) || ! NILP (Fmemq (script, scripts))) - list = Fcons (entity, list); + list = Fcons (entity, list), entity = Qnil; } XFreeFontNames (names); }