| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
| |
* doc/lispref/strings.texi (Formatting Strings):
Don’t allow mixing numbered with unnumbered format specs.
* src/editfns.c (styled_format): Don’t bother checking for field 0,
since it doesn’t crash and the behavior is not specified.
* test/src/editfns-tests.el (format-with-field): Adjust tests to
match current doc. Add more tests for out-of-range fields.
|
|
|
|
|
|
|
| |
* src/editfns.c (styled_format): Allow field numbers in a %% spec.
No need for a special diagnostic for field numbers greater than
PTRDIFF_MAX. Reword diagnostic for field 0.
* test/src/editfns-tests.el (format-with-field): Adjust to match.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A field number explicitly specifies the argument to be formatted.
This is especially important for potential localization work, since
grammars of various languages dictate different word orders.
* src/editfns.c (Fformat): Update documentation.
(styled_format): Implement field numbers.
* doc/lispref/strings.texi (Formatting Strings): Document field numbers.
* lisp/emacs-lisp/bytecomp.el (byte-compile-format-warn): Adapt.
* test/src/editfns-tests.el (format-with-field): New unit test.
|
|
|
|
|
| |
* test/src/editfns-tests.el (format-time-string-with-zone):
Port test cases to MS-Windows.
|
|
|
|
|
| |
* test/src/editfns-tests.el (format-time-string-with-zone): Fix
typo in timezone specification.
|
|
|
|
|
| |
* test/src/editfns-tests.el (format-time-string-with-zone): Minor
copyedit in the commentary.
|
|
|
|
|
|
|
| |
* test/src/editfns-tests.el (format-time-string-with-zone)
(format-time-string-with-outlandish-zone): Don’t format
timestamps near the Epoch, as this runs into bugs on MS-Windows,
and we don’t want to worry about those bugs.
|
|
|
|
|
| |
* test/src/editfns-tests.el (format-time-string-with-zone)
(format-time-string-with-outlandish-zone): New tests.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Without this fix, (ceiling most-negative-fixnum -1.0) returns
most-negative-fixnum instead of correctly signaling range-error,
and similarly for floor, round, and truncate.
* configure.ac (trunc): Add a check, since Gnulib’s doc says
‘trunc’ is missing from MSVC 9. The Gnulib doc says ‘trunc’ is
also missing from some other older operating systems like Solaris
9 which I know we don’t care about any more, so MSVC is the only
reason to worry about ‘trunc’ here.
* src/editfns.c (styled_format): Formatting a float with %c is now an
error. The old code did not work in general, because FIXNUM_OVERFLOW_P
had rounding errors. Besides, the "if (FLOATP (...))" was in there
only as a result of my misunderstanding old code that I introduced
2011. Although %d etc. is sometimes used on floats that represent
huge UIDs or PIDs etc. that do not fit in fixnums, this cannot
happen with characters.
* src/floatfns.c (rounding_driver): Rework to do the right thing
when the intermediate result equals 2.305843009213694e+18, i.e.,
is exactly 1 greater than MOST_POSITIVE_FIXNUM on a 64-bit host.
Simplify so that only one section of code checks for overflow,
rather than two.
(double_identity): Remove. All uses changed to ...
(emacs_trunc): ... this new function. Add replacement for
platforms that lack ‘trunc’.
* src/lisp.h (FIXNUM_OVERFLOW_P, make_fixnum_or_float):
Make it clear that the arg cannot be floating point.
* test/src/editfns-tests.el (format-c-float): New test.
* test/src/floatfns-tests.el: New file, to test for this bug.
|
|
|
|
|
|
| |
Run admin/update-copyright in the master branch. This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/insdel.c (adjust_markers_bytepos): New function.
* src/lisp.h (adjust_markers_bytepos): Add prototype.
* src/insdel.c (replace_range, replace_range_2):
* src/editfns.c (Ftranspose_regions): Call
adjust_markers_bytepos. (Bug#5131)
* test/src/editfns-tests.el (transpose-test-reverse-word)
(transpose-test-get-byte-positions): New functions.
(transpose-ascii-regions-test)
(transpose-nonascii-regions-test-1)
(transpose-nonascii-regions-test-2): New tests.
|
|
|
|
|
|
|
|
| |
* src/editfns.c (styled_format): Don't include padding on the left
in the properties at the beginning of the string. (Bug#23897)
* test/src/editfns-tests.el (format-properties): Add tests for
faces when the string is padded on the left or on the right.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* src/textprop.c (extend_property_ranges): Accept an additional
argument OLD_END, and only extend the end of a property range if
its original end is at OLD_END; all the other ranges are left
intact. (Bug#23897)
* src/editfns.c (styled_format): Pass the original length of the
string to 'extend_property_ranges'.
* src/intervals.h (extend_property_ranges): Adjust prototype.
* test/src/editfns-tests.el (format-properties): Add tests for
bug#23897.
|
|
* test/src/editfns-tests.el (format-properties): New test.
|