From 02b3820315e11c64074ade8474c693401c44ae24 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Wed, 25 Mar 2020 19:24:06 +0100 Subject: [PATCH 1/9] Document how to disable Tramp file archives * doc/misc/tramp.texi (Archive file names): Explain how to disable file archives. --- doc/misc/tramp.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 49c32ac3f17..e48a48b5d14 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 From e1f0e0892232221e6333b24788b97942c83ec738 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 25 Mar 2020 21:54:21 +0200 Subject: [PATCH 2/9] * lisp/files.el (directory-files-recursively): Doc fix. (Bug#40202) --- lisp/files.el | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/lisp/files.el b/lisp/files.el index 38536a92da7..01da2a985bc 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)) From c2b8ce4439935e2e158d4357d234135a251c5767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 27 Mar 2020 18:11:18 +0100 Subject: [PATCH 3/9] 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. --- lisp/calc/calc-macs.el | 5 +++-- test/lisp/calc/calc-tests.el | 11 +++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index e73d108e6d9..257d369b87a 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 784b404898a..8fffb7c14b5 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 From ee47e00f4e0a644a0948743ac43892710663b243 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 28 Mar 2020 21:20:02 -0400 Subject: [PATCH 4/9] 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. --- src/xfaces.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 91a7a8533e8..6ff252b0233 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 From 93945fcd19bea4c044dcb45542086798cbdae6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 29 Mar 2020 11:12:36 +0200 Subject: [PATCH 5/9] ; * test/lisp/calc/calc-tests.el: Fix mistake in last commit --- test/lisp/calc/calc-tests.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el index 8fffb7c14b5..6db5426ff6d 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 From 1af03e7e921e1a65aebc34526ca993efe7a1a333 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 29 Mar 2020 16:14:34 +0300 Subject: [PATCH 6/9] ; * src/xfaces.c (syms_of_xfaces): Fix wording and typo. --- src/xfaces.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xfaces.c b/src/xfaces.c index 6ff252b0233..711ec48bbdd 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 From f3ccfb19261172f94e5d77c8ed182f74f83045f6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 29 Mar 2020 19:14:13 +0300 Subject: [PATCH 7/9] ; * src/decompress.c: Fix comment style. --- src/decompress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/decompress.c b/src/decompress.c index 5d246387e76..8e8f2443111 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); From 461bd9cc20b778b934ecbd276f4905fedb7d8c18 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 29 Mar 2020 21:56:05 +0200 Subject: [PATCH 8/9] 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. --- lisp/url/url-cookie.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el index 7ab9a2f1779..bee3a6b85e4 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. From c6e0981b96eaa12c28b70c949ccd6e426c13df4d Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 30 Mar 2020 02:16:12 +0300 Subject: [PATCH 9/9] * 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). --- lisp/image/image-converter.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el index ae3d9598920..b694052f5b9 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))