Eli Zaretskii [Wed, 3 Nov 2021 14:02:15 +0000 (16:02 +0200)]
Fix the Cygwin w32 build broken by adding the dark theme support
* src/w32fns.c (w32_applytheme): Make a no-op for Cygwin w32
builds.
(globals_of_w32fns): Don't attempt to load dwmapi.dll and
uxtheme.dll in the Cygwin w32 build. (Bug#51583)
Stefan Kangas [Wed, 3 Nov 2021 06:14:21 +0000 (07:14 +0100)]
image-dired: Improve marking behavior
* lisp/image-dired.el (image-dired-thumb-mark): Use DarkOrange as
background to better match the 'dired-marked' face.
(image-dired-show-all-from-dir): Disable all marks when entering a
full directory.
(image-dired-unmark-all-marks): Add mode tag.
(image-dired-thumbnail-mode-map): Bind 'image-dired-unmark-all-marks'
to "U".
Stefan Kangas [Wed, 3 Nov 2021 06:02:13 +0000 (07:02 +0100)]
image-dired: Cleanup of four commands
* lisp/image-dired.el
(image-dired--on-file-in-dired-buffer): New macro.
(image-dired-mark-thumb-original-file)
(image-dired-unmark-thumb-original-file)
(image-dired-flag-thumb-original-file)
(image-dired-toggle-mark-thumb-original-file): Rewrite using
above new macro.
(image-dired-modify-mark-on-thumb-original-file): Make obsolete in
favor of above new macro.
Stefan Kangas [Wed, 3 Nov 2021 02:34:28 +0000 (03:34 +0100)]
image-dired: Support wrap-around in display-next-thumbnail-original
* lisp/image-dired.el (image-dired-forward-image): Support negative
prefix argument. Optionally wrap-around, which means to continue from
first image after reaching the last one and vice versa.
(image-dired-backward-image): Reimplement in terms of
'image-dired-forward-image'.
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Wrap around; when
reaching the last image, continue from the first one. Add optional
prefix argument to move more than one image at a time.
Stefan Kangas [Wed, 3 Nov 2021 01:39:00 +0000 (02:39 +0100)]
image-dired: Move menu definitions to top level
* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
Move menu definitions from here...
(image-dired-thumbnail-mode-menu)
(image-dired-display-image-mode-menu)
(image-dired-minor-mode-menu): ...to these new top level
definitions.
* lisp/emacs-lisp/byte-opt.el (byte-optimize-cond):
Optimise clause-free `cond`, which can arise from earlier
transformations. This enables further optimisations.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
Add test cases.
Stefan Kangas [Tue, 2 Nov 2021 19:14:13 +0000 (20:14 +0100)]
Use current face foreground for SVG icons in customize
* etc/images/down.svg:
* etc/images/left.svg:
* etc/images/right.svg:
* etc/images/up.svg: Don't define foreground; this means they will use
the foreground of the currently defined face instead. (Bug#51556)
Stefan Kangas [Tue, 2 Nov 2021 16:33:35 +0000 (17:33 +0100)]
Support inserting images in tabulated-list-mode columns
* lisp/emacs-lisp/tabulated-list.el (tabulated-list-print-col):
Support using an image descriptor to insert an image in a column.
(tabulated-list-entries):
* doc/lispref/modes.texi (Tabulated List Mode): Update documentation
to reflect above change.
Make `C-h b' indentation more regular (and avoid continuation lines)
* lisp/help.el (help--describe-command): Don't do any indentation.
(describe-map): Store data about each section.
(describe-map--align-section): New function to do indentation on a
per-block basis.
(describe-map--fill-columns): Helper function.
* lisp/help.el (help--describe-translation): Make obsolete.
(help--describe-command): Take an optional parameter to output key
translations.
(describe-map): Make optional parameters optional.
Add buttons to definition in help--describe-command
* lisp/help-mode.el (help-make-xrefs): Don't add buttons to
keymaps, because they're pre-buttonized.
* lisp/help.el (help--describe-command): Make buttons out of the
definitions.
* doc/lispref/files.texi (File Attributes): Document it.
* lisp/files.el (file-has-changed-p): New function.
(file-has-changed-p--hash-table): Internal variable used by the
new function (bug#51523).
* lisp/emacs-lisp/shortdoc.el (file): Mention it.
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Read mailcaps again
only when at least one of the mailcap files has changed. Fixes
bug#51523.
Michael Albinus [Sun, 31 Oct 2021 16:45:39 +0000 (17:45 +0100)]
Adapt emba control files
* test/infra/Dockerfile.emba: Do not generate debug info.
* test/infra/gitlab-ci.yml (variables, default): Revert timeout
back to three hours.
(.job-template): Comment test prints.
(test-all-inotify): Exclude emacs-module-tests.el.
Stefan Monnier [Sun, 31 Oct 2021 14:57:44 +0000 (10:57 -0400)]
eieio-core.el: Make slot-value work on defstructs
Adjust the values in EIEIO's index-tables so they are compatible with those
of defstructs.
* lisp/emacs-lisp/eieio-core.el (eieio--slot-name-index): Don't add the
`eieio--object-num-slots` offset.
(eieio-defclass-internal): Add the `eieio--object-num-slots` offset
here instead.
(eieio-oref): Allow its use on `cl-structure-object`.
* lisp/emacs-lisp/eieio.el (eieio-pcase-slot-index-from-index-table):
Don't need to add the `eieio--object-num-slots` offset.
* doc/misc/eieio.texi (Accessing Slots, Accessing Slots):
Mention the use on structs.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el
(eieio-test-defstruct-slot-value): New test.
Daniel Martín [Sat, 23 Oct 2021 12:44:31 +0000 (14:44 +0200)]
Fix localized display of date and time in the NS port
* src/nsterm.m (ns_init_locale): If not already set, set LC_ALL to the
current locale ID so that dates, currencies, etc. use the settings
configured in the operating system. (Bug#51321)
Eli Zaretskii [Sun, 31 Oct 2021 07:42:09 +0000 (09:42 +0200)]
Fix display glitches with side-by-side windows on TTY frames
* src/dispnew.c (adjust_glyph_matrix, prepare_desired_row): Leave
room for the border glyph only if the window does actually have
the right margin. (Bug#51521)
Stefan Kangas [Thu, 21 Oct 2021 17:53:00 +0000 (19:53 +0200)]
Remove workaround for fixed Bug#6581 from ert
* lisp/emacs-lisp/ert.el (ert-equal-including-properties): Make
into obsolete function alias for 'equal-including-properties'.
* test/src/editfns-tests.el (format-properties):
* test/lisp/emacs-lisp/ert-x-tests.el (ert-propertized-string)
(ert-test-run-tests-interactively-2): Don't use above obsolete
name.
(ert--explain-equal-including-properties-rec): New function.
(ert--explain-equal-including-properties): Use as an explainer for
'equal-including-properties' now that Bug#6581 is fixed.
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-explain-equal-string-properties): Expand test.
(ert-test-equal-including-properties): Merge test into above
expanded test.
Stefan Kangas [Wed, 20 Oct 2021 12:16:07 +0000 (14:16 +0200)]
Fix bug with string values in equal-including-properties
* src/intervals.c (intervals_equal_1): Factor out from
intervals_equal. Optionally use Fequal for comparison of string
values in property lists.
(intervals_equal): Update for the above.
(compare_string_intervals): Use the above optional Fequal comparison
to fix a bug where 'equal-including-properties' compared strings with
eq, instead of equal. (Bug#6581)
* test/src/fns-tests.el (fns-tests-equal-including-properties)
(fns-tests-equal-including-properties/string-prop-vals): New tests.
* test/lisp/emacs-lisp/ert-tests.el
(ert-test-equal-including-properties): Remove parts testing
'equal-including-properties'.
* lisp/emacs-lisp/ert.el (ert-equal-including-properties): Add
FIXME that this should be removed.
Eli Zaretskii [Sat, 30 Oct 2021 17:29:40 +0000 (20:29 +0300)]
Move the documentation of 'string-glyph-split' to proper place
* doc/lispref/strings.texi (Creating Strings): Move the
description of 'string-glyph-split' from here...
* doc/lispref/display.texi (Size of Displayed Text): ...to here.
Kévin Le Gouguec [Sat, 30 Oct 2021 12:44:01 +0000 (14:44 +0200)]
Avoid fonts with incomplete coverage of MATHEMATICAL chars
* lisp/international/fontset.el (setup-default-fontset): Include both
ends of each sub-range in 'script-representative-chars' (bug#51495).
Some fonts include glyphs for MATHEMATICAL SCRIPT CAPITAL codepoints
(#x1D49C-#x1D4B5) but not for MATHEMATICAL SCRIPT SMALL codepoints
(#x1D4B6-#x1D4CF), see e.g. KpMath[1].
'script-representative-chars' must thus include both CAPITAL and SMALL
codepoints to ensure that we filter those fonts out.
Eli Zaretskii [Sat, 30 Oct 2021 10:22:57 +0000 (13:22 +0300)]
Minor fixes for previous change
* src/w32fns.c (DWMWA_USE_IMMERSIVE_DARK_MODE_OLD): Define only if
undefined.
(w32_applytheme, w32_createwindow, globals_of_w32fns): Minor
stylistic copyedits.
* etc/NEWS: Reword the entry about using dark mode on MS-Windows.
* doc/emacs/msdos.texi (Windows Misc): Fix wording and markup in
the last change.