commit 9f6d3a84d8f55c296d3cc15574ad75ec738b4d01 (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Mon Mar 30 17:17:01 2020 -0700 Mark recently failing Tramp tests on hydra * test/lisp/net/tramp-tests.el (tramp-test29-start-file-process) (tramp-test30-make-process, tramp-test33-environment-variables): Expect failure on hydra.nixos.org, since March 29 Tramp cache changes. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index e6c6b28c58..2deab9af25 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4252,6 +4252,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (ert-deftest tramp-test29-start-file-process () "Check `start-file-process'." + :expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) @@ -4325,6 +4326,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (ert-deftest tramp-test30-make-process () "Check `make-process'." + :expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (or (tramp--test-adb-p) (tramp--test-sh-p))) @@ -4741,6 +4743,7 @@ INPUT, if non-nil, is a string sent to the process." ;; This test is inspired by Bug#23952. (ert-deftest tramp-test33-environment-variables () "Check that remote processes set / unset environment variables properly." + :expected-result (if (getenv "EMACS_HYDRA_CI") :failed :passed) :tags '(:expensive-test) (skip-unless (tramp--test-enabled)) (skip-unless (tramp--test-sh-p)) commit 33b427c1052992e9f26f4058c9b59ef41b9c18b6 Author: Juri Linkov Date: Tue Mar 31 01:52:59 2020 +0300 * lisp/minibuffer.el (minibuffer-completion-help): Use mainbuf (bug#39822) * lisp/minibuffer.el (minibuffer-completion-help): Run display-completion-list in the original buffer mainbuf to allow completion-setup-function set completion-reference-buffer to it. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 9e0e6339c6..3c8202c7eb 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1968,6 +1968,7 @@ variables.") (plist-get completion-extra-properties :annotation-function) completion-annotate-function)) + (mainbuf (current-buffer)) ;; If the *Completions* buffer is shown in a new ;; window, mark it as softly-dedicated, so bury-buffer in ;; minibuffer-hide-completions will know whether to @@ -1987,67 +1988,68 @@ variables.") ,(if (eq (selected-window) (minibuffer-window)) 'display-buffer-at-bottom 'display-buffer-below-selected)) - ,(if temp-buffer-resize-mode - '(window-height . resize-temp-buffer-window) - '(window-height . fit-window-to-buffer)) - ,(when temp-buffer-resize-mode - '(preserve-size . (nil . t))) + ,(if temp-buffer-resize-mode + '(window-height . resize-temp-buffer-window) + '(window-height . fit-window-to-buffer)) + ,(when temp-buffer-resize-mode + '(preserve-size . (nil . t))) (body-function . ,#'(lambda (_window) - ;; Remove the base-size tail because `sort' requires a properly - ;; nil-terminated list. - (when last (setcdr last nil)) - (setq completions - ;; FIXME: This function is for the output of all-completions, - ;; not completion-all-completions. Often it's the same, but - ;; not always. - (let ((sort-fun (completion-metadata-get - all-md 'display-sort-function))) - (if sort-fun - (funcall sort-fun completions) - (sort completions 'string-lessp)))) - (when afun + (with-current-buffer mainbuf + ;; Remove the base-size tail because `sort' requires a properly + ;; nil-terminated list. + (when last (setcdr last nil)) (setq completions - (mapcar (lambda (s) - (let ((ann (funcall afun s))) - (if ann (list s ann) s))) - completions))) - - (with-current-buffer standard-output - (set (make-local-variable 'completion-base-position) - (list (+ start base-size) - ;; FIXME: We should pay attention to completion - ;; boundaries here, but currently - ;; completion-all-completions does not give us the - ;; necessary information. - end)) - (set (make-local-variable 'completion-list-insert-choice-function) - (let ((ctable minibuffer-completion-table) - (cpred minibuffer-completion-predicate) - (cprops completion-extra-properties)) - (lambda (start end choice) - (unless (or (zerop (length prefix)) - (equal prefix - (buffer-substring-no-properties - (max (point-min) - (- start (length prefix))) - start))) - (message "*Completions* out of date")) - ;; FIXME: Use `md' to do quoting&terminator here. - (completion--replace start end choice) - (let* ((minibuffer-completion-table ctable) - (minibuffer-completion-predicate cpred) - (completion-extra-properties cprops) - (result (concat prefix choice)) - (bounds (completion-boundaries - result ctable cpred ""))) - ;; If the completion introduces a new field, then - ;; completion is not finished. - (completion--done result - (if (eq (car bounds) (length result)) - 'exact 'finished))))))) - - (display-completion-list completions)))) + ;; FIXME: This function is for the output of all-completions, + ;; not completion-all-completions. Often it's the same, but + ;; not always. + (let ((sort-fun (completion-metadata-get + all-md 'display-sort-function))) + (if sort-fun + (funcall sort-fun completions) + (sort completions 'string-lessp)))) + (when afun + (setq completions + (mapcar (lambda (s) + (let ((ann (funcall afun s))) + (if ann (list s ann) s))) + completions))) + + (with-current-buffer standard-output + (set (make-local-variable 'completion-base-position) + (list (+ start base-size) + ;; FIXME: We should pay attention to completion + ;; boundaries here, but currently + ;; completion-all-completions does not give us the + ;; necessary information. + end)) + (set (make-local-variable 'completion-list-insert-choice-function) + (let ((ctable minibuffer-completion-table) + (cpred minibuffer-completion-predicate) + (cprops completion-extra-properties)) + (lambda (start end choice) + (unless (or (zerop (length prefix)) + (equal prefix + (buffer-substring-no-properties + (max (point-min) + (- start (length prefix))) + start))) + (message "*Completions* out of date")) + ;; FIXME: Use `md' to do quoting&terminator here. + (completion--replace start end choice) + (let* ((minibuffer-completion-table ctable) + (minibuffer-completion-predicate cpred) + (completion-extra-properties cprops) + (result (concat prefix choice)) + (bounds (completion-boundaries + result ctable cpred ""))) + ;; If the completion introduces a new field, then + ;; completion is not finished. + (completion--done result + (if (eq (car bounds) (length result)) + 'exact 'finished))))))) + + (display-completion-list completions))))) nil))) nil)) commit e35d68f2d8958f345206979a1ed87d25b321cc10 Author: Stefan Monnier Date: Mon Mar 30 15:46:47 2020 -0400 * lisp/dired.el (dired-readin): Don't bind inhibit-modification-hooks Fixes bug#40332 diff --git a/lisp/dired.el b/lisp/dired.el index b66bb03471..d58c37be2f 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1208,15 +1208,11 @@ wildcards, erases the buffer, and builds the subdir-alist anew ;; default-directory and dired-actual-switches must be buffer-local ;; and initialized by now. - (let (dirname - ;; This makes read-in much faster. - ;; In particular, it prevents the font lock hook from running - ;; until the directory is all read in. - (inhibit-modification-hooks t)) - (if (consp dired-directory) - (setq dirname (car dired-directory)) - (setq dirname dired-directory)) - (setq dirname (expand-file-name dirname)) + (let ((dirname + (expand-file-name + (if (consp dired-directory) + (car dired-directory) + dired-directory)))) (save-excursion ;; This hook which may want to modify dired-actual-switches ;; based on dired-directory, e.g. with ange-ftp to a SysV host @@ -1226,17 +1222,25 @@ wildcards, erases the buffer, and builds the subdir-alist anew (setq buffer-undo-list nil)) (setq-local file-name-coding-system (or coding-system-for-read file-name-coding-system)) - (let ((inhibit-read-only t) - ;; Don't make undo entries for readin. - (buffer-undo-list t)) - (widen) - (erase-buffer) - (dired-readin-insert)) - (goto-char (point-min)) - ;; Must first make alist buffer local and set it to nil because - ;; dired-build-subdir-alist will call dired-clear-alist first - (setq-local dired-subdir-alist nil) - (dired-build-subdir-alist) + (widen) + ;; We used to bind `inhibit-modification-hooks' to try and speed up + ;; execution, in particular, to prevent the font-lock hook from running + ;; until the directory is all read in. + ;; I strongly suspect that this was only useful in Emacs<21, because + ;; jit-lock made it a non-issue. + ;; Nevertheless, I used `combine-change-calls' which provides the + ;; same performance advantages, just in case. + (combine-change-calls (point-min) (point-max) + (let ((inhibit-read-only t) + ;; Don't make undo entries for readin. + (buffer-undo-list t)) + (erase-buffer) + (dired-readin-insert)) + (goto-char (point-min)) + ;; Must first make alist buffer local and set it to nil because + ;; dired-build-subdir-alist will call dired-clear-alist first + (setq-local dired-subdir-alist nil) + (dired-build-subdir-alist)) (let ((attributes (file-attributes dirname))) (if (eq (car attributes) t) (set-visited-file-modtime (file-attribute-modification-time commit fa4eec5cfa8121837e5d5b89e623ba478f0759ad Merge: 8911d08997 c6e0981b96 Author: Glenn Morris Date: Mon Mar 30 07:50:37 2020 -0700 Merge from origin/emacs-27 c6e0981b96 (origin/emacs-27) * lisp/image/image-converter.el: Fix cus... 461bd9cc20 Fix url-cookie.el for lexical binding f3ccfb1926 ; * src/decompress.c: Fix comment style. 1af03e7e92 ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo. 93945fcd19 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit ee47e00f4e Don't suggest setting face-remapping-alist to a literal (B... c2b8ce4439 Calc: don't treat nil as an integer (bug#40155) e1f0e08922 * lisp/files.el (directory-files-recursively): Doc fix. (... 02b3820315 Document how to disable Tramp file archives commit 8911d0899713132ccc2299b0700dac3315c44de0 Merge: 142198f40d 4860530f3c Author: Glenn Morris Date: Mon Mar 30 07:50:37 2020 -0700 ; Merge from origin/emacs-27 The following commit was skipped: 4860530f3c Don't add repeated xlmns:xlink declarations in svg-create commit 142198f40df597ce944e39a7b42708e9e416e0a9 Merge: ced7852046 8db6b432bb Author: Glenn Morris Date: Mon Mar 30 07:50:37 2020 -0700 Merge from origin/emacs-27 8db6b432bb Calc: Declare dynamic variable bound in lexbind code (bug#... commit ced7852046469b8248718d5c95c64c0cd4ddf417 Author: Eli Zaretskii Date: Mon Mar 30 16:57:43 2020 +0300 Avoid assertion violation at startup in pdumped Emacs * src/buffer.c (init_buffer) [USE_MMAP_FOR_BUFFERS]: Remove the assertion that ensured all buffers in pdumped Emacs have non-NULL pointer to buffer text. That was false when Emacs was pdumped with killed buffer(s) in the all_buffers linked list. See https://lists.gnu.org/archive/html/emacs-devel/2020-03/msg00800.html for more details. diff --git a/src/buffer.c b/src/buffer.c index 70598a7a22..4e121ca4ca 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5387,17 +5387,6 @@ init_buffer (void) enlarge_buffer_text (b, 0); } } - else - { - struct buffer *b; - - /* Only buffers with allocated buffer text should be present at - this point in temacs. */ - FOR_EACH_BUFFER (b) - { - eassert (b->text->beg != NULL); - } - } #endif /* USE_MMAP_FOR_BUFFERS */ AUTO_STRING (scratch, "*scratch*"); commit c6e0981b96eaa12c28b70c949ccd6e426c13df4d Author: Juri Linkov Date: Mon Mar 30 02:16:12 2020 +0300 * lisp/image/image-converter.el: Fix customization of image-converter. * lisp/image/image-converter.el (image-convert-p): Update image-converter-regexp when image-converter was customized (bug#39994). diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el index ae3d959892..b694052f5b 100644 --- a/lisp/image/image-converter.el +++ b/lisp/image/image-converter.el @@ -57,6 +57,10 @@ is a string, it should be a MIME format string like ;; Find an installed image converter. (unless image-converter (image-converter--find-converter)) + ;; When image-converter was customized + (if (and image-converter (not image-converter-regexp)) + (when-let ((formats (image-converter--probe image-converter))) + (setq image-converter-regexp (concat "\\." (regexp-opt formats) "\\'")))) (and image-converter (or (and (not data-p) (string-match image-converter-regexp source)) commit 461bd9cc20b778b934ecbd276f4905fedb7d8c18 Author: Andreas Schwab Date: Sun Mar 29 21:56:05 2020 +0200 Fix url-cookie.el for lexical binding * lisp/url/url-cookie.el (url-cookie-handle-set-cookie): Use setq instead of set to modify lexical binding. diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 7ab9a2f177..bee3a6b85e 100644 --- a/lisp/url/url-cookie.el +++ b/lisp/url/url-cookie.el @@ -319,7 +319,7 @@ i.e. 1970-1-1) are loaded as expiring one year from now instead." (pop untrusted))) (and trusted untrusted ;; Choose the more specific match. - (set (if (> trusted untrusted) 'untrusted 'trusted) nil)) + (if (> trusted untrusted) (setq untrusted nil) (setq trusted nil))) (cond (untrusted ;; The site was explicitly marked as untrusted by the user. commit f3ccfb19261172f94e5d77c8ed182f74f83045f6 Author: Eli Zaretskii Date: Sun Mar 29 19:14:13 2020 +0300 ; * src/decompress.c: Fix comment style. diff --git a/src/decompress.c b/src/decompress.c index 5d246387e7..8e8f244311 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -87,7 +87,7 @@ unwind_decompress (void *ddata) 0); update_compositions (data->start, data->start, CHECK_HEAD); /* "Balance" the before-change-functions call, which would - otherwise be left "hanging". */ + otherwise be left "hanging". */ signal_after_change (data->orig, data->start - data->orig, data->start - data->orig); } @@ -159,7 +159,7 @@ This function can be called only in unibyte buffers. */) istart = XFIXNUM (start); iend = XFIXNUM (end); - /* Do the following before manipulating the gap. */ + /* Do the following before manipulating the gap. */ modify_text (istart, iend); move_gap_both (iend, iend); @@ -224,7 +224,7 @@ This function can be called only in unibyte buffers. */) unwind_data.start = 0; /* Delete the compressed data. */ - del_range_2 (istart, istart, /* byte and char offsets are the same. */ + del_range_2 (istart, istart, /* byte and char offsets are the same */ iend, iend, 0); signal_after_change (istart, iend - istart, unwind_data.nbytes); commit 1af03e7e921e1a65aebc34526ca993efe7a1a333 Author: Eli Zaretskii Date: Sun Mar 29 16:14:34 2020 +0300 ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo. diff --git a/src/xfaces.c b/src/xfaces.c index 6ff252b023..711ec48bbd 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6957,9 +6957,9 @@ function, do: You probably want to use the face-remap package included in Emacs instead of manipulating face-remapping-alist directly. Note that many -of the functions inthat package modify the list destructively, so make -sure to set it to a fresh value (for instance, use `copy-tree' as in -the example above). +of the functions in that package modify the list destructively, so make +sure you set it to a fresh value (for instance, use `copy-tree' as in +the example above) before modifying. Because Emacs normally only redraws screen areas when the underlying buffer contents change, you may need to call `redraw-display' after commit 93945fcd19bea4c044dcb45542086798cbdae6bc Author: Mattias Engdegård Date: Sun Mar 29 11:12:36 2020 +0200 ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 8fffb7c14b..6db5426ff6 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -343,7 +343,7 @@ An existing calc stack is reused, otherwise a new one is created." (should (Math-num-integerp -7)) (should (Math-num-integerp (ash 1 65))) (should (Math-num-integerp '(float 1 0))) - (should-not (Math-integerp nil))) + (should-not (Math-num-integerp nil))) (provide 'calc-tests) ;;; calc-tests.el ends here commit ee47e00f4e0a644a0948743ac43892710663b243 Author: Noam Postavsky Date: Sat Mar 28 21:20:02 2020 -0400 Don't suggest setting face-remapping-alist to a literal (Bug#39812) * src/xfaces.c (syms_of_xfaces) : Use copy-tree in the costring example code, and note why. diff --git a/src/xfaces.c b/src/xfaces.c index 91a7a8533e..6ff252b023 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -6953,10 +6953,13 @@ could define a face `my-mode-default', and then in the mode setup function, do: (set (make-local-variable \\='face-remapping-alist) - \\='((default my-mode-default)))). + (copy-tree \\='((default my-mode-default)))). You probably want to use the face-remap package included in Emacs -instead of manipulating face-remapping-alist directly. +instead of manipulating face-remapping-alist directly. Note that many +of the functions inthat package modify the list destructively, so make +sure to set it to a fresh value (for instance, use `copy-tree' as in +the example above). Because Emacs normally only redraws screen areas when the underlying buffer contents change, you may need to call `redraw-display' after commit c2b8ce4439935e2e158d4357d234135a251c5767 Author: Mattias Engdegård Date: Fri Mar 27 18:11:18 2020 +0100 Calc: don't treat nil as an integer (bug#40155) Make Math-num-integerp return false for nil, following Math-integerp which was changed in the bignum reform. This fixes a crash in calc-graph-fast. Reported by Narendra Joshi. * lisp/calc/calc-macs.el (Math-num-integerp): Not true for nil. * test/lisp/calc/calc-tests.el (calc-Math-integerp): New tests. diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index e73d108e6d..257d369b87 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -161,8 +161,9 @@ hms date mod var)))) (defsubst Math-num-integerp (a) - (or (not (consp a)) - (and (eq (car a) 'float) + (or (integerp a) + (and (consp a) + (eq (car a) 'float) (>= (nth 2 a) 0)))) (defsubst Math-equal-int (a b) diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 784b404898..8fffb7c14b 100644 --- a/test/lisp/calc/calc-tests.el +++ b/test/lisp/calc/calc-tests.el @@ -334,6 +334,17 @@ An existing calc stack is reused, otherwise a new one is created." (should (equal tos '(- (* 2 (var x var-x)) 4))) (should (equal trail "pdiv 2 * x - 4\nprem 8 * x + 1\n")))))) +(ert-deftest calc-Math-integerp () + (should (Math-integerp -7)) + (should (Math-integerp (ash 1 65))) + (should-not (Math-integerp '(float 1 0))) + (should-not (Math-integerp nil)) + + (should (Math-num-integerp -7)) + (should (Math-num-integerp (ash 1 65))) + (should (Math-num-integerp '(float 1 0))) + (should-not (Math-integerp nil))) + (provide 'calc-tests) ;;; calc-tests.el ends here commit e1f0e0892232221e6333b24788b97942c83ec738 Author: Eli Zaretskii Date: Wed Mar 25 21:54:21 2020 +0200 * lisp/files.el (directory-files-recursively): Doc fix. (Bug#40202) diff --git a/lisp/files.el b/lisp/files.el index 38536a92da..01da2a985b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -819,23 +819,25 @@ The path separator is colon in GNU and GNU-like systems." (defun directory-files-recursively (dir regexp &optional include-directories predicate follow-symlinks) - "Return list of all files under DIR that have file names matching REGEXP. + "Return list of all files under directory DIR whose names match REGEXP. This function works recursively. Files are returned in \"depth first\" order, and files from each directory are sorted in alphabetical order. Each file name appears in the returned list in its absolute form. -Optional argument INCLUDE-DIRECTORIES non-nil means also include -in the output directories whose names match REGEXP. +By default, the returned list excludes directories, but if +optional argument INCLUDE-DIRECTORIES is non-nil, they are +included. PREDICATE can be either nil (which means that all subdirectories -are descended into), t (which means that subdirectories that +of DIR are descended into), t (which means that subdirectories that can't be read are ignored), or a function (which is called with -the name of the subdirectory and should return non-nil if the +the name of each subdirectory, and should return non-nil if the subdirectory is to be descended into). -If FOLLOW-SYMLINKS, symbolic links that point to directories are -followed. Note that this can lead to infinite recursion." +If FOLLOW-SYMLINKS is non-nil, symbolic links that point to +directories are followed. Note that this can lead to infinite +recursion." (let* ((result nil) (files nil) (dir (directory-file-name dir)) commit 02b3820315e11c64074ade8474c693401c44ae24 Author: Michael Albinus Date: Wed Mar 25 19:24:06 2020 +0100 Document how to disable Tramp file archives * doc/misc/tramp.texi (Archive file names): Explain how to disable file archives. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 49c32ac3f1..e48a48b5d1 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -3753,6 +3753,14 @@ It is even possible to access file archives in file archives, as @end group @end lisp +@vindex tramp-archive-enabled +In order to disable file archives, you could add the following form to +your init file: + +@lisp +(customize-set-variable 'tramp-archive-enabled nil) +@end lisp + @node Bug Reports @chapter Reporting Bugs and Problems commit 4860530f3c130c6f854ea83dcc03f59e535a33ba Author: Lars Ingebrigtsen Date: Tue Mar 24 05:30:49 2020 +0100 Don't add repeated xlmns:xlink declarations in svg-create * lisp/svg.el (svg-create): Fix previous unconditional addition of the xmlns:xlink declaration -- callers may already add one, and having it twice is something most svg libraries doesn't like. diff --git a/lisp/svg.el b/lisp/svg.el index 370c9c04e7..7aadbc2359 100644 --- a/lisp/svg.el +++ b/lisp/svg.el @@ -70,7 +70,8 @@ any further elements added." (height . ,height) (version . "1.1") (xmlns . "http://www.w3.org/2000/svg") - (xmlns:xlink . "http://www.w3.org/1999/xlink") + ,@(unless (plist-get args :xmlns:xlink) + '((xmlns:xlink . "http://www.w3.org/1999/xlink"))) ,@(svg--arguments nil args)))) (defun svg-gradient (svg id type stops) commit 8db6b432bb812923c44b94b7bf087dd52d39e345 Author: Mattias Engdegård Date: Mon Mar 23 21:34:22 2020 +0100 Calc: Declare dynamic variable bound in lexbind code (bug#40185) * lisp/calc/calc.el: Declare math-comp-selected as dynamic. diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index b519559330..648cb7bb80 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -2925,6 +2925,7 @@ the United States." +(defvar math-comp-selected) (defvar calc-selection-cache-entry) ;;; Format the number A as a string. [X N; X Z] [Public] (defun math-format-stack-value (entry)