commit 84d415e94c202c921f8a0e725f4ed7ece7cab04a (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Wed Mar 8 13:43:16 2017 -0800 * src/data.c (arithcompare): Add comments. diff --git a/src/data.c b/src/data.c index 997a41b6d0..fb7bf51c68 100644 --- a/src/data.c +++ b/src/data.c @@ -2404,9 +2404,11 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2); /* If either arg is floating point, set F1 and F2 to the 'double' - approximations of the two arguments. Regardless, set I1 and I2 - to integers that break ties if the floating point comparison is - either not done or reports equality. */ + approximations of the two arguments, and set FNEQ if floating-point + comparison reports that F1 is not equal to F2, possibly because F1 + or F2 is a NaN. Regardless, set I1 and I2 to integers that break + ties if the floating-point comparison is either not done or reports + equality. */ if (FLOATP (num1)) { @@ -2417,7 +2419,17 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, f2 = XFLOAT_DATA (num2); } else - i1 = f2 = i2 = XINT (num2); + { + /* Compare a float NUM1 to an integer NUM2 by converting the + integer I2 (i.e., NUM2) to the double F2 (a conversion that + can round on some platforms, if I2 is large enough), and then + converting F2 back to the integer I1 (a conversion that is + always exact), so that I1 exactly equals ((double) NUM2). If + floating-point comparison reports a tie, NUM1 = F1 = F2 = I1 + (exactly) so I1 - I2 = NUM1 - NUM2 (exactly), so comparing I1 + to I2 will break the tie correctly. */ + i1 = f2 = i2 = XINT (num2); + } fneq = f1 != f2; } else @@ -2425,6 +2437,8 @@ arithcompare (Lisp_Object num1, Lisp_Object num2, i1 = XINT (num1); if (FLOATP (num2)) { + /* Compare an integer NUM1 to a float NUM2. This is the + converse of comparing float to integer (see above). */ i2 = f1 = i1; f2 = XFLOAT_DATA (num2); fneq = f1 != f2; commit de610c4b678e4634e20baa2afee7d8c921e1e3fc Author: Glenn Morris Date: Wed Mar 8 14:43:16 2017 -0500 Update a cl-print test * test/lisp/emacs-lisp/cl-print-tests.el (cl-print-tests-1): Update for recent change in cl-print-object function output. diff --git a/test/lisp/emacs-lisp/cl-print-tests.el b/test/lisp/emacs-lisp/cl-print-tests.el index cbc79b0e64..f46ecde031 100644 --- a/test/lisp/emacs-lisp/cl-print-tests.el +++ b/test/lisp/emacs-lisp/cl-print-tests.el @@ -34,7 +34,7 @@ (let ((print-circle t)) (should (equal (cl-prin1-to-string `((x . ,x) (y . ,x))) "((x . #1=#s(cl-print--test :a 1 :b 2)) (y . #1#))"))) - (should (string-match "\\`#\\'" + (should (string-match "\\`#f(compiled-function (x) .*)\\'" (cl-prin1-to-string (symbol-function #'caar)))))) ;;; cl-print-tests.el ends here. commit e4fff0ff2a2f3526c7b2f82100b5ad56b7b481a1 Author: Sam Steingold Date: Wed Mar 8 13:32:21 2017 -0500 Replace change-log-date-face -> change-log-date This fixes c430f7e23fc2c22f251ace4254e37dea1452dfc3. diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index ceef5724dc..91c69202dd 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -240,7 +240,7 @@ a case simply use the directory containing the changed file." ;; addition, using any kind of fixed setting like this doesn't ;; work if a user customizes add-log-time-format. ("^[0-9-]+ +\\|^ \\{11,\\}\\|^\t \\{3,\\}\\|^\\(Sun\\|Mon\\|Tue\\|Wed\\|Thu\\|Fri\\|Sat\\) [A-z][a-z][a-z] [0-9:+ ]+" - (0 'change-log-date-face) + (0 'change-log-date) ;; Name and e-mail; some people put e-mail in parens, not angles. ("\\([^<(]+?\\)[ \t]*[(<]\\([A-Za-z0-9_.+-]+@[A-Za-z0-9_.-]+\\)[>)]" nil nil (1 'change-log-name) diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 085c05bcc0..73d05c7bfc 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -725,7 +725,7 @@ or a superior directory.") \\([^<(]+?\\)[ ]*[(<]\\([[:alnum:]_.+-]+@[[:alnum:]_.-]+\\)[>)]" (1 'change-log-name) (2 'change-log-email)) - ("^ *timestamp: \\(.*\\)" (1 'change-log-date-face))))))) + ("^ *timestamp: \\(.*\\)" (1 'change-log-date))))))) (autoload 'vc-setup-buffer "vc-dispatcher") diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 0b832aaf39..ac95da08f1 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -250,7 +250,7 @@ If LIMIT is non-nil, show no more than this many entries." (set (make-local-variable 'log-view-font-lock-keywords) (append log-view-font-lock-keywords '(("^[ |]+Author: \\(.*\\)" (1 'change-log-email)) - ("^[ |]+Date: \\(.*\\)" (1 'change-log-date-face)))))) + ("^[ |]+Date: \\(.*\\)" (1 'change-log-date)))))) ;; (defun vc-mtn-show-log-entry (revision) ;; ) commit a158b351e754329c92f87178090df49824fdcb00 Author: Michael Albinus Date: Wed Mar 8 17:27:24 2017 +0100 Fix bug#26011 * lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-via-buffer): Check, whether file is too large. (Bug#26011) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 071ef7982a..85619621d9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2147,6 +2147,11 @@ file names." First arg OP is either `copy' or `rename' and indicates the operation. FILENAME is the source file, NEWNAME the target file. KEEP-DATE is non-nil if NEWNAME should have the same timestamp as FILENAME." + ;; Check, whether file is too large. Emacs checks in `insert-file-1' + ;; and `find-file-noselect', but that's not called here. + (abort-if-file-too-large + (tramp-compat-file-attribute-size (file-attributes (file-truename filename))) + (symbol-name op) filename) ;; We must disable multibyte, because binary data shall not be ;; converted. We don't want the target file to be compressed, so we ;; let-bind `jka-compr-inhibit' to t. `epa-file-handler' shall not