[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master fa4eec5 3/3: Merge from origin/emacs-27

From: Glenn Morris
Subject: master fa4eec5 3/3: Merge from origin/emacs-27
Date: Mon, 30 Mar 2020 10:55:36 -0400 (EDT)

branch: master
commit fa4eec5cfa8121837e5d5b89e623ba478f0759ad
Merge: 8911d08 c6e0981
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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
 doc/misc/tramp.texi           |  8 ++++++++
 lisp/calc/calc-macs.el        |  5 +++--
 lisp/files.el                 | 16 +++++++++-------
 lisp/image/image-converter.el |  4 ++++
 lisp/url/url-cookie.el        |  2 +-
 src/decompress.c              |  6 +++---
 src/xfaces.c                  |  7 +++++--
 test/lisp/calc/calc-tests.el  | 11 +++++++++++
 8 files changed, 44 insertions(+), 15 deletions(-)

diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 61cf373..75d2fd1 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -3776,6 +3776,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:
+(customize-set-variable 'tramp-archive-enabled nil)
+@end lisp
 @node Bug Reports
 @chapter Reporting Bugs and Problems
diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el
index e73d108..257d369 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/lisp/files.el b/lisp/files.el
index 1f5fae9..55a0958 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
-  "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
 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
   (let* ((result nil)
         (files nil)
          (dir (directory-file-name dir))
diff --git a/lisp/image/image-converter.el b/lisp/image/image-converter.el
index ae3d959..b694052 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
+  ;; 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))
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index 7ab9a2f..bee3a6b 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 
        (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)))
       ;; The site was explicitly marked as untrusted by the user.
diff --git a/src/decompress.c b/src/decompress.c
index 5d24638..8e8f244 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -87,7 +87,7 @@ unwind_decompress (void *ddata)
       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);
diff --git a/src/xfaces.c b/src/xfaces.c
index 91a7a85..711ec48 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 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
diff --git a/test/lisp/calc/calc-tests.el b/test/lisp/calc/calc-tests.el
index 784b404..6db5426 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 
         (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-num-integerp nil)))
 (provide 'calc-tests)
 ;;; calc-tests.el ends here

reply via email to

[Prev in Thread] Current Thread [Next in Thread]