diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2018-06-25 12:21:40 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2018-06-25 12:23:08 -0700 |
commit | d0e2a341dd9a9a365fd311748df024ecb25b70ec (patch) | |
tree | aa5b4e9f33777155349c3aacefece4d25199b887 /test/lisp/emacs-lisp/cl-generic-tests.el | |
parent | 27a21970f6faa9baf42823f731b7842b075e86eb (diff) | |
download | emacs-d0e2a341dd9a9a365fd311748df024ecb25b70ec.tar.gz emacs-d0e2a341dd9a9a365fd311748df024ecb25b70ec.tar.bz2 emacs-d0e2a341dd9a9a365fd311748df024ecb25b70ec.zip |
(format "%d" F) now truncates floating F
Problem reported by Paul Pogonyshev (Bug#31938).
* src/editfns.c: Include math.h, for trunc.
(styled_format): For %d, truncate floating-point numbers and
convert -0 to 0, going back to how Emacs 26 did things.
* doc/lispref/strings.texi (Formatting Strings):
Document behavior of %o, %d, %x, %X on floating-point numbers.
* src/floatfns.c (trunc) [!HAVE_TRUNC]: Rename from emacs_trunc
and make it an extern function, so that editfns.c can use it.
All callers changed.
* test/src/editfns-tests.el (format-%d-float): New test.
Diffstat (limited to 'test/lisp/emacs-lisp/cl-generic-tests.el')
0 files changed, 0 insertions, 0 deletions