1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-14 09:39:42 +00:00
emacs/lisp/erc
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
..
ChangeLog.1 Update copyright year to 2020 2020-01-01 00:59:52 +00:00
ChangeLog.2 Update copyright year to 2020 2020-01-01 00:59:52 +00:00
erc-autoaway.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-backend.el Merge from origin/emacs-27 2020-04-29 07:50:20 -07:00
erc-button.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-capab.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-compat.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-dcc.el Fix bugs, inefficiencies and bad style in regexps 2020-04-16 12:14:38 +02:00
erc-desktop-notifications.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-ezbounce.el Merge from origin/emacs-27 2020-03-23 09:46:39 -07:00
erc-fill.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-goodies.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-ibuffer.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-identd.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-imenu.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-join.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-lang.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-list.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-log.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-match.el Fix and extend format-spec (bug#41758) 2020-06-18 12:46:21 +01:00
erc-menu.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-netsplit.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-networks.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-notify.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-page.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-pcomplete.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-replace.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-ring.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-services.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-sound.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-speedbar.el Merge from origin/emacs-27 2020-03-23 09:46:39 -07:00
erc-spelling.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-stamp.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-track.el New function erc-track-switch-buffer-other-window 2020-04-14 00:23:56 -04:00
erc-truncate.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc-xdcc.el ERC: Update maintainer address 2020-03-18 21:27:49 -04:00
erc.el Fix and extend format-spec (bug#41758) 2020-06-18 12:46:21 +01:00