This bug was exposed by a previous removal of quoting around lambda
expressions in autoinsert-tests.el (1ecd350f38), which caused some
of those tests to fail.
* lisp/autoinsert.el (auto-insert): Cope with lexical closures.
Failure to do so caused errors in several cases.
Reported by Shinichi Sakata.
* lisp/progmodes/pascal.el (pascal-type-completion)
(pascal-completion): Wrap code that may move point in save-excursion.
* test/lisp/progmodes/pascal-tests.el: New file.
Use a single parser of color strings in the #RGB, rgb:R/G/B and
rgbi:R/G/B formats, replacing four existing ones. Previously,
error-checking was spotty, handling of the rgbi: format not always
present, and normalization of the result was sometimes incorrect.
* src/dispextern.h: New prototype.
* src/xfaces.c (parse_hex_color_comp, parse_float_color_comp)
(parse_color_spec, Finternal-color_values_from_color_spec): New functions.
* test/src/xfaces-tests.el (xfaces-internal-color-values-from-color-spec):
New test.
* lisp/term/tty-colors.el (tty-color-standard-values):
Use internal-color-values-from-color-spec, replacing old parser.
* src/nsterm.m (ns_get_color):
* src/w32fns.c (x_to_w32_color):
* src/xterm.c (x_parse_color): Use parse_color_spec, replacing old
parsers.
(HEX_COLOR_NAME_LENGTH): Remove #define.
* lisp/progmodes/project.el (project-shell): Improve docstring to
include information about an implementation detail.
* list/progmodes/project.el (project-eshell): Modelled after
'project-shell', change default behavior such that we don't create too
many eshell buffers by default. Use universal argument to create
subsequent buffers.
* src/term.c (init_tty): When COLORTERM=truecolor is defined,
override setaf/setab/colors terminfo capabilities with 24-bit
color support.
* doc/misc/efaq.texi (Colors on a TTY): Mention the possibility to
enable 24-bit color via the COLORTERM environment variable.
(Bug#41846)
Copyright-paperwork-exempt: yes
* lisp/progmodes/project.el (project-shell):
Pop to an existing shell buffer by default.
If there's none, or if universal argument is used, open a subsequent
shell buffer and jump to it. Prefix shell buffer name with the base
name of project root directory. (Bug#41858)
* lisp/progmodes/project.el
(project-switch-to-buffer): Pass the "other buffer" as DEF to
read-buffer if it belongs to the current project (bug#41879).
To make the meaning of the color-dark-p cutoff luminance clear,
define it as a named constant. (We no longer use the somewhat
obscure 0.6^2.2 definition since it doesn't really make sense
to define the limit in gamma-compressed space.)
* lisp/faces.el (color-luminance-dark-limit): New constant.
(color-dark-p): Use color-luminance-dark-limit.
* lisp/net/shr.el (shr-target-id): Add docstring.
(shr-descend, shr-tag-a): Display dummy anchor characters as the
empty string. Give all relevant 'id' or 'name' fragment identifier
attributes the shr-target-id text property. This ensures that
cached content, such as tables, retains the property across
renders. (Bug#40532)
* lisp/net/eww.el: (eww-display-html): Adapt shr-target-id property
search accordingly.
For discussion, see the following threads:
https://lists.gnu.org/archive/html/emacs-devel/2020-01/msg00843.htmlhttps://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00042.htmlhttps://lists.gnu.org/archive/html/emacs-devel/2020-02/msg00282.html
* etc/NEWS: Announce that battery-upower is enabled by default.
* lisp/battery.el (battery-upower-device): Accept both battery and
line power device names, or a list thereof (bug#39491).
(battery-upower-line-power-device): Remove user option; superseded
by battery-upower-device.
(battery-upower-subscribe): New user option.
(battery-status-function): Check whether a UPower service is
provided without activating it.
(display-battery-mode): Subscribe to UPower signals when using
battery-upower.
(battery-upower): Merge data from multiple power sources. Calculate
terse battery status %b based on average battery load percentage
rather than coarse and often missing BatteryLevel (bug#39491). Add
support for average temperature %d.
(battery-upower-dbus-service)
(battery-upower-dbus-interface)
(battery-upower-dbus-path)
(battery-upower-dbus-device-interface)
(battery-upower-dbus-device-path)
(battery-upower-device-all-properties): Rename to...
(battery-upower-service)
(battery-upower-interface)
(battery-upower-path)
(battery-upower-device-interface)
(battery-upower-device-path)
(battery--upower-device-properties): ...these, respectively.
(battery-upower-device-list): Rename to...
(battery--upower-devices) ...this. Return a flat list of device
names determined by battery-upower-device.
(battery-upower-types, battery-upower-states)
(battery-upower-device-property, battery-upower-device-autodetect):
Remove.
(battery--upower-signals): New variable.
(battery--upower-signal-handler, battery--upower-props-changed)
(battery--upower-unsubscribe, battery--upower-subsribe)
(battery--upower-state): New functions.
* test/lisp/battery-tests.el (battery-upower-state)
(battery-upower-state-unknown): New tests.
* lisp/battery.el: Mention BSD support in Commentary. Don't load
preloaded lisp/emacs-lisp/timer.el.
(battery--files): New function.
(battery--find-linux-sysfs-batteries): Use it and make fewer
syscalls.
(battery-status-function): Perform GNU/Linux checks in increasing
order of obsolescence: sysfs, ACPI, and then APM. Simplify Darwin
check. Add :version tag now that battery-upower is the default.
(battery-echo-area-format, battery-mode-line-format): Mention %s.
(battery-load-low, battery-load-critical): New faces.
(battery-update): Display battery-mode-line-format even if
percentage is N/A. Apply faces battery-load-low or
battery-load-critical according to the percentage, but append them
so they don't override user customizations. Update all mode lines
since we are in global-mode-string.
(battery-linux-proc-apm-regexp): Mark as obsolete, replacing with...
(battery--linux-proc-apm): ...this new rx definition.
(battery-linux-proc-apm): Use it. Fix indentation. Simplify.
(battery--acpi-rate, battery--acpi-capacity): New rx definitions.
(battery-linux-proc-acpi): Use them. Fix pathological whitespace
regexps. Simplify.
(battery-linux-sysfs): Fix docstring and indentation. Reduce number
of file searches. Simplify.
(battery-bsd-apm): Fix docstring. Simplify.
(battery-pmset): Fix docstring. Simplify ID regexp.
* lisp/emacs-lisp/rx.el (rx-define): Indent as a defun.
* test/lisp/battery-tests.el (battery-linux-proc-apm-regexp): Test
new battery--linux-proc-apm rx definition.
(battery-acpi-rate-regexp, battery-acpi-capacity-regexp): New tests.
* 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.
* etc/NEWS: Announce removal of aliases obsolete since Emacs 24.3.
* lisp/net/dbus.el: Remove unneeded dependency on cl-lib.el. Quote
function symbols as such.
(dbus-ignore-errors): Don't add macro name to font-lock keywords, as
emacs-lisp-mode now dynamically fontifies new macro definitions.
(dbus-event-error-hooks, dbus-call-method-non-blocking): Remove
aliases obsolete since Emacs 24.3.
(dbus-register-signal, dbus-escape-as-identifier): Simplify. Use
regexp \` and \' in place of ^ and $.
(dbus--parse-xml-buffer): New function for libxml2 compatibility.
(dbus-introspect-xml): Use it.
(dbus-string-to-byte-array, dbus-byte-array-to-string)
(dbus-unescape-from-identifier, dbus-list-known-names)
(dbus-introspect-get-all-nodes, dbus-get-all-properties)
(dbus-get-all-managed-objects): Simplify.
(dbus--introspect-names, dbus--introspect-name): New convenience
functions.
(dbus-introspect-get-node-names)
(dbus-introspect-get-interface-names)
(dbus-introspect-get-interface, dbus-introspect-get-method-names)
(dbus-introspect-get-method, dbus-introspect-get-signal-names)
(dbus-introspect-get-signal, dbus-introspect-get-property-names)
(dbus-introspect-get-property)
(dbus-introspect-get-annotation-names)
(dbus-introspect-get-annotation)
(dbus-introspect-get-argument-names, dbus-introspect-get-argument):
Use them to DRY.
* test/lisp/net/dbus-tests.el (dbus-test-all): Quote function
symbols as such.
Otherwise, "git config branch.<branch>.remote" would return the global
default "origin" instead of the actual, project-specific remote name.
* lisp/vc/vc-git.el (vc-git-dir-extra-headers): Bind default-directory
to given DIR.
* lisp/progmodes/project.el
(project-kill-buffers-skip-conditions): New variable.
(project--buffer-list): New function.
(project-kill-buffers): New command (bug#41868).