commit ae348f328643e55ea2d2e8fd42ff034d08855cae (HEAD, refs/remotes/origin/master) Author: Noam Postavsky Date: Wed May 27 12:49:35 2020 -0400 Adjust NEWS for revert of eshell fix on emacs-27 (Bug#41370) * etc/NEWS.27: Move "Eshell no longer re-initializes its keymap every call" to... * etc/NEWS: ... here. diff --git a/etc/NEWS b/etc/NEWS index e97755a454..ac65b32004 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -197,6 +197,12 @@ their backends. *** Environment variable 'INSIDE_EMACS' is now copied to subprocesses. Its value equals the result of evaluating '(format "%s,eshell" emacs-version)'. +--- +*** Eshell no longer re-initializes its keymap every call. +This allows users to use (define-key eshell-mode-map ...) as usual. +Some modules have their own minor mode now to account for these +changes. + ** Tramp +++ diff --git a/etc/NEWS.27 b/etc/NEWS.27 index bb275b70e6..58bd491753 100644 --- a/etc/NEWS.27 +++ b/etc/NEWS.27 @@ -2054,12 +2054,6 @@ default, and not just the opening element. behave similarly, e.g. Pcomplete's default cycling can be obtained with '(setq completion-cycle-threshold 5)'. ---- -*** Eshell no longer re-initializes its keymap every call. -This allows users to use (define-key eshell-mode-map ...) as usual. -Some modules have their own minor mode now to account for these -changes. - +++ *** Expansion of history event designators is disabled by default. To restore the old behavior, use commit a824d5c87a1a1f914ce5dc4a6763fd3a8e45d146 Author: Noam Postavsky Date: Wed May 27 11:44:18 2020 -0400 Fix customizing of ido-mode (Bug#41557) lisp/ido.el (ido-mode): When setting the user option to nil, pass 0 to the function, so that it will be disabled as intended. diff --git a/lisp/ido.el b/lisp/ido.el index ad71d468cb..4fb01c68df 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -355,7 +355,7 @@ The following values are possible: Setting this variable directly does not take effect; use either \\[customize] or the function `ido-mode'." :set #'(lambda (_symbol value) - (ido-mode value)) + (ido-mode (or value 0))) :initialize #'custom-initialize-default :require 'ido :link '(emacs-commentary-link "ido.el") commit dcd96745b0c505da5343549410fdab070ca72ff5 Author: Paul Eggert Date: Wed May 27 09:50:07 2020 -0700 Fix crash with invalid bytecode vectors * src/lread.c (read_vector): If the vector is to short to be for bytecodes don’t do bytecode processing for it, as the processing might run past the end of the vector. diff --git a/src/lread.c b/src/lread.c index 53b4e1be2d..29deddaf15 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3844,6 +3844,10 @@ read_vector (Lisp_Object readcharfun, bool bytecodeflag) ptrdiff_t size = list_length (tem); Lisp_Object vector = make_nil_vector (size); + /* Avoid accessing past the end of a vector if the vector is too + small to be valid for bytecode. */ + bytecodeflag &= COMPILED_STACK_DEPTH < size; + Lisp_Object *ptr = XVECTOR (vector)->contents; for (ptrdiff_t i = 0; i < size; i++) { commit 9d11f127f15cc4dafcdb825dcfc6e495d729a069 Author: Paul Eggert Date: Wed May 27 09:45:49 2020 -0700 --with-wide-int is a no-op on 64-bit hosts * configure.ac: Clarify wording for --with-wide-int help. * src/pdumper.c (dump_vectorlike_generic): Do the eassert even if --with-wide-int was specified unnecessarily. diff --git a/configure.ac b/configure.ac index 719eb747ae..b1b8c846e1 100644 --- a/configure.ac +++ b/configure.ac @@ -414,7 +414,11 @@ this option's value should be 'yes', 'no', 'lucid', 'athena', 'motif', 'gtk', with_x_toolkit=$val ]) -OPTION_DEFAULT_OFF([wide-int], [prefer wide Emacs integers (typically 62-bit); allows buffer and string size up to 2GB on 32-bit hosts, at the cost of 10% to 30% slowdown of Lisp interpreter and larger memory footprint]) +OPTION_DEFAULT_OFF([wide-int], + [prefer wide Emacs integers (typically 62-bit); + on 32-bit hosts, this allows buffer and string size up to 2GB, + at the cost of 10% to 30% slowdown of Lisp interpreter + and larger memory footprint]) if test "$with_wide_int" = yes; then AC_DEFINE([WIDE_EMACS_INT], 1, [Use long long for EMACS_INT if available.]) fi diff --git a/src/pdumper.c b/src/pdumper.c index 63424c5734..bac6900cd1 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2603,7 +2603,7 @@ dump_vectorlike_generic (struct dump_context *ctx, Lisp_Object out; const Lisp_Object *vslot = &v->contents[i]; /* In the wide case, we're always misaligned. */ -#ifndef WIDE_EMACS_INT +#if INTPTR_MAX == EMACS_INT_MAX eassert (ctx->offset % sizeof (out) == 0); #endif dump_object_start (ctx, &out, sizeof (out)); commit 22446569cd319403e6e5e19369439ec71c46150d Author: Paul Eggert Date: Wed May 27 09:05:12 2020 -0700 Omit unnecessary USE_LAB_TAG #if * src/lisp.h: Omit unnecessary #if; the condition is always false now. diff --git a/src/lisp.h b/src/lisp.h index f5d581a2f1..3442699088 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -251,12 +251,6 @@ DEFINE_GDB_SYMBOL_BEGIN (EMACS_INT, VALMASK) # define VALMASK (USE_LSB_TAG ? - (1 << GCTYPEBITS) : VAL_MAX) DEFINE_GDB_SYMBOL_END (VALMASK) -#if !USE_LSB_TAG && !defined WIDE_EMACS_INT -# error "USE_LSB_TAG not supported on this platform; please report this." \ - "Try 'configure --with-wide-int' to work around the problem." -error !; -#endif - /* Minimum alignment requirement for Lisp objects, imposed by the internal representation of tagged pointers. It is 2**GCTYPEBITS if USE_LSB_TAG, 1 otherwise. It must be a literal integer constant, commit c5cf630ecd467fdcac13928f7e240cfc98cedc7a Author: Mattias Engdegård Date: Fri May 22 12:21:28 2020 +0200 Don't clobber match data in utf-8-hfs conversion (bug#41445) Reported by Ture Pålsson. * lisp/international/ucs-normalize.el (ucs-normalize-hfs-nfd-post-read-conversion) (ucs-normalize-hfs-nfd-pre-write-conversion): Use save-match-data to avoid match data clobber in normalisation. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-save-match-data): New test. diff --git a/lisp/international/ucs-normalize.el b/lisp/international/ucs-normalize.el index 201ff6b9b1..b703d3dd2f 100644 --- a/lisp/international/ucs-normalize.el +++ b/lisp/international/ucs-normalize.el @@ -612,14 +612,16 @@ COMPOSITION-PREDICATE will be used to compose region." (defun ucs-normalize-hfs-nfd-post-read-conversion (len) (save-excursion (save-restriction - (narrow-to-region (point) (+ (point) len)) - (ucs-normalize-HFS-NFC-region (point-min) (point-max)) - (- (point-max) (point-min))))) + (save-match-data + (narrow-to-region (point) (+ (point) len)) + (ucs-normalize-HFS-NFC-region (point-min) (point-max)) + (- (point-max) (point-min)))))) ;; Pre-write conversion for `utf-8-hfs'. ;; _from and _to are legacy arguments (see `define-coding-system'). (defun ucs-normalize-hfs-nfd-pre-write-conversion (_from _to) - (ucs-normalize-HFS-NFD-region (point-min) (point-max))) + (save-match-data + (ucs-normalize-HFS-NFD-region (point-min) (point-max)))) ;;; coding-system definition (define-coding-system 'utf-8-hfs diff --git a/test/lisp/international/ucs-normalize-tests.el b/test/lisp/international/ucs-normalize-tests.el index c36808ad72..2c60bd318a 100644 --- a/test/lisp/international/ucs-normalize-tests.el +++ b/test/lisp/international/ucs-normalize-tests.el @@ -341,4 +341,15 @@ implementations: (display-buffer (current-buffer))) (message "No changes to failing lines needed")))) +(ert-deftest ucs-normalize-save-match-data () + "Verify that match data isn't clobbered (bug#41445)" + (string-match (rx (+ digit)) "a47b") + (should (equal (match-data t) '(1 3))) + (should (equal + (decode-coding-string + (encode-coding-string "Käsesoßenrührlöffel" 'utf-8-hfs) + 'utf-8-hfs) + "Käsesoßenrührlöffel")) + (should (equal (match-data t) '(1 3)))) + ;;; ucs-normalize-tests.el ends here