1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00
emacs/test/lisp
Basil L. Contovounesios 0185d76e74 Fix and extend format-spec (bug#41758)
* lisp/format-spec.el: Use lexical-binding.  Remove dependence on
subr-x.el.
(format-spec-make): Clarify docstring.
(format-spec--parse-modifiers): Rename to...
(format-spec--parse-flags): ...this and simplify.  In particular,
don't bother parsing :space-pad which is redundant and unused.
(format-spec--pad): Remove, replacing with...
(format-spec--do-flags): ...this new helper function which performs
more of format-spec's supported text manipulation.
(format-spec): Autoload.  Allow optional argument to take on special
values 'ignore' and 'delete' for more control over what happens when
a replacement for a format specification isn't provided.  Bring back
proper support for a precision modifier similar to that of 'format'.

* lisp/battery.el (battery-format): Rewrite in terms of format-spec.
(battery-echo-area-format, battery-mode-line-format): Mention
support of format-spec syntax in docstrings.

* doc/lispref/strings.texi (Custom Format Strings):
* etc/NEWS: Document and announce these changes.

* lisp/dired-aux.el (dired-do-compress-to):
* lisp/erc/erc-match.el (erc-log-matches):
* lisp/erc/erc.el (erc-update-mode-line-buffer):
* lisp/gnus/gnus-sieve.el (gnus-sieve-update):
* lisp/gnus/gssapi.el (open-gssapi-stream):
* lisp/gnus/mail-source.el (mail-source-fetch-file)
(mail-source-fetch-directory, mail-source-fetch-pop)
(mail-source-fetch-imap):
* lisp/gnus/message.el (message-insert-formatted-citation-line):
* lisp/image-dired.el:
* lisp/net/eww.el:
* lisp/net/imap.el (imap-kerberos4-open, imap-gssapi-open)
(imap-shell-open):
* lisp/net/network-stream.el (network-stream-open-shell):
* lisp/obsolete/tls.el (open-tls-stream):
* lisp/textmodes/tex-mode.el:
Remove extraneous loads and autoloads of format-spec now that it is
autoloaded and simplify its uses where possible.

* test/lisp/battery-tests.el (battery-format): Test new format-spec
support.
* test/lisp/format-spec-tests.el (test-format-spec): Rename to...
(format-spec) ...this, extending test cases.
(test-format-unknown): Rename to...
(format-spec-unknown): ...this, extending test cases.
(test-format-modifiers): Rename to...
(format-spec-flags): ...this.
(format-spec-make, format-spec-parse-flags, format-spec-do-flags)
(format-spec-do-flags-truncate, format-spec-do-flags-pad)
(format-spec-do-flags-chop, format-spec-do-flags-case): New tests.
2020-06-18 12:46:21 +01:00
..
bookmark-resources Add tests for bookmark.el (Bug#36452) 2019-07-03 14:49:38 +03:00
calc Calc: GCD(0,x)=GCD(x,0)=|x|, not x (bug#41279) 2020-05-15 20:15:36 +02:00
calendar Tag a test as unstable 2020-06-13 10:42:47 -07:00
cedet Use lexical-binding in most semantic tests 2020-04-28 16:11:47 +02:00
custom-resources Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
emacs-lisp Band-aid for edebugging generator bodies (Bug#40434). 2020-06-14 20:01:28 +02:00
emulation Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
erc Don’t attempt to modify constant strings 2020-05-16 22:25:07 -07:00
eshell Merge from origin/emacs-27 2020-06-07 09:03:59 -07:00
gnus Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
image Merge from origin/emacs-27 2020-06-07 09:03:59 -07:00
international Merge from origin/emacs-27 2020-06-07 09:03:59 -07:00
mail Merge from origin/emacs-27 2020-06-07 09:03:59 -07:00
net Various dbus.el cleanups (bug#41744) 2020-06-18 12:20:48 +01:00
nxml Update copyright year to 2020 2020-01-01 00:59:52 +00:00
obsolete Update copyright year to 2020 2020-01-01 00:59:52 +00:00
org Update copyright year to 2020 2020-01-01 00:59:52 +00:00
play Use lexical-binding in animate.el and add tests 2020-05-13 02:06:03 +02:00
progmodes 2020-03-29 Michael R. Mauger <michael@mauger.com> 2020-06-13 18:36:27 -04:00
so-long-tests Update copyright year to 2020 2020-01-01 00:59:52 +00:00
term Update copyright year to 2020 2020-01-01 00:59:52 +00:00
textmodes Use lexical-binding in po.el and add tests 2020-04-25 09:12:24 +02:00
url Use lexical-binding in most url tests 2020-04-24 20:26:36 +02:00
vc Use lexical-binding in most vc tests 2020-04-28 10:36:34 +02:00
abbrev-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
apropos-tests.el Use lexical-binding in apropos.el and add tests 2020-04-18 18:43:23 +02:00
arc-mode-tests.el Combine archive-int-to-mode and tar-grind-file-mode 2020-05-14 18:43:15 +02:00
auth-source-pass-tests.el * test/lisp/auth-source-pass-tests.el: Test for multiple ports. 2020-01-22 07:37:01 +01:00
auth-source-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
autoinsert-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
autorevert-tests.el Minor cleanup in {autorevert,filenotify,shadowfile}-tests.el 2020-01-22 11:45:26 +01:00
battery-tests.el Fix and extend format-spec (bug#41758) 2020-06-18 12:46:21 +01:00
bookmark-tests.el Add more tests for bookmark-bmenu-list 2020-01-26 04:11:38 +01:00
buff-menu-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
button-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
char-fold-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
color-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
comint-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
custom-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
dabbrev-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
delim-col-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
descr-text-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
dired-aux-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
dired-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
dired-x-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
dom-tests.el ; Fix last addition to dom-tests.el 2020-04-30 10:46:54 +01:00
electric-tests.el Add test for bug#39680 2020-05-20 00:15:11 +01:00
elide-head-tests.el Use lexical-binding in elide-head.el and add tests 2020-04-19 08:04:57 +02:00
epg-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
faces-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ffap-tests.el Fix sxhash-equal on bytecodes, markers, etc. 2020-01-07 11:29:42 -08:00
filenotify-tests.el Skip filenotify tests on hydra.nixos.org 2020-03-07 12:17:01 -08:00
files-tests.el Combine archive-int-to-mode and tar-grind-file-mode 2020-05-14 18:43:15 +02:00
files-x-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
font-lock-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
format-spec-tests.el Fix and extend format-spec (bug#41758) 2020-06-18 12:46:21 +01:00
help-fns-tests.el Provide default for describe-keymap prompt 2020-02-04 02:04:20 +01:00
help-mode-tests.el Use lexical-binding in help-mode.el and add tests 2020-05-09 20:01:37 +02:00
help-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
hi-lock-tests.el Fix hi-lock test and add new test for unhighlight (bug#40337) 2020-04-14 02:33:52 +03:00
htmlfontify-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ibuffer-tests.el Remove (or double) redundant backslashes in string literals 2020-01-24 23:04:34 +01:00
ido-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
image-file-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
image-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
imenu-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
info-xref-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
isearch-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
jit-lock-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
json-tests.el Various json.el improvements 2020-05-22 15:16:13 +01:00
jsonrpc-tests.el ; Fix some typos and doc issues (bug#40695) 2020-04-18 17:10:02 +02:00
kmacro-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ls-lisp-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
makesum-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
man-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
md4-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
minibuffer-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
misc-tests.el Use lexical-binding in misc.el and add tests 2020-04-26 00:30:37 +02:00
mouse-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
obarray-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
paren-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
password-cache-tests.el Don’t attempt to modify constant strings 2020-05-16 22:25:07 -07:00
ps-print-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
register-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
replace-tests.el occur: Add bindings for next-error-no-select 2020-05-31 12:31:27 +02:00
rot13-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
scroll-lock-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ses-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
shadowfile-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
shell-tests.el Fix shell-tests failures 2020-01-20 15:52:27 +01:00
simple-tests.el Merge from origin/emacs-27 2020-06-07 09:03:59 -07:00
sort-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
soundex-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
startup-tests.el Fix documentation related to 'command-switch-alist'. 2020-05-14 19:29:14 +02:00
subr-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
tabify-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
tar-mode-tests.el Combine archive-int-to-mode and tar-grind-file-mode 2020-05-14 18:43:15 +02:00
tempo-tests.el Allow tempo-define-template to reassign tags to new templates 2020-02-21 11:15:00 +02:00
term-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
thingatpt-tests.el Use lexical-binding in most remaining tests 2020-05-01 13:05:26 +02:00
thread-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
time-stamp-tests.el Merge from origin/emacs-27 2020-01-01 01:08:16 +00:00
timezone-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
version-tests.el Use lexical-binding in version.el and add tests 2020-04-28 23:35:52 +02:00
wdired-tests.el Silence some byte-compiler warnings in tests 2020-06-03 01:22:41 +01:00
whitespace-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
wid-edit-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
xdg-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00
xml-tests.el Reject invalid characters in XML strings (Bug#41094). 2020-05-23 14:01:17 +02:00
xt-mouse-tests.el Update copyright year to 2020 2020-01-01 00:59:52 +00:00