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.
Eli Zaretskii [Sat, 30 Oct 2021 07:26:38 +0000 (10:26 +0300)]
Improve documentation of string truncation APIs
* doc/lispref/display.texi (Size of Displayed Text):
* lisp/international/mule-util.el (truncate-string-to-width):
Document caveats of using 'truncate-string-to-width' when
character composition is involved.
* lisp/emacs-lisp/subr-x.el (string-limit):
* doc/lispref/strings.texi (Creating Strings): Improve the
documentation of 'string-limit'.
Glenn Morris [Fri, 29 Oct 2021 16:20:05 +0000 (09:20 -0700)]
Merge from origin/emacs-28
08de838531 ; Improve commentary in the last change 3da9fa875b Make hieroglyphs display correctly with existing fonts 928e05f2d6 Clarify "default face attributes" in the ELisp manual 5dbb04e0eb Make `C-u RET' work again d72fefdeab Fix typos in the manual and in a comment
Glenn Morris [Fri, 29 Oct 2021 16:19:51 +0000 (09:19 -0700)]
Merge from origin/emacs-28
7e2b973d60 * lisp/textmodes/text-mode.el (text-mode-context-menu): Re... da6d889e90 ; * etc/NEWS: Use active voice for 'repeat-mode', etc. e3171e7e86 Allow automatic use of color fonts for emoji on macOS
* lisp/gnus/gnus-art.el (gnus-article-mode): Set
mm-inline-message-prepare-function buffer-locally so that it works
both when inlining rfc822 and hitting the MIME button (bug#51388).
(gnus-mime--inline-message): Factor out into own function.
(gnus-mime-display-single): From here.
Stefan Kangas [Fri, 29 Oct 2021 15:44:29 +0000 (17:44 +0200)]
Prefer giflib 5 macros to magic numbers
* src/image.c (DISPOSAL_UNSPECIFIED, DISPOSE_DO_NOT)
(DISPOSE_BACKGROUND, DISPOSE_PREVIOUS, NO_TRANSPARENT_COLOR)
[GIFLIB_MAJOR < 5]: Macro defined (for old versions of giflib).
(gif_load): Replace magic numbers with giflib 5 macros for disposal
and transparency_color_index.
* lisp/gnus/gnus-art.el (gnus-article-mode): Set
mm-inline-message-prepare-function buffer-locally so that it works
both when inlining rfc822 and hitting the MIME button (bug#51388).
(gnus-mime--inline-message): Factor out into own function.
(gnus-mime-display-single): From here.
Eli Zaretskii [Fri, 29 Oct 2021 07:10:01 +0000 (10:10 +0300)]
Clarify "default face attributes" in the ELisp manual
* doc/lispref/display.texi (Defining Faces): Add index entries for
face symbol properties.
(Attribute Functions): Clarify "default face attribute values" wrt
'face-all-attributes' and 'face-attribute'. (Bug#51465)
Stefan Kangas [Tue, 12 Oct 2021 22:04:23 +0000 (00:04 +0200)]
Be more allowing when looking for menu-bar items
* src/keymap.c (lookup_key_1): Factor out function from
Flookup_key.
(Flookup_key): Be case insensitive, and treat spaces as dashes,
when looking for Qmenu_bar items. (Bug#50752)
* test/src/keymap-tests.el
(keymap-lookup-key/mixed-case)
(keymap-lookup-key/mixed-case-multibyte)
(keymap-lookup-keymap/with-spaces)
(keymap-lookup-keymap/with-spaces-multibyte)
(keymap-lookup-keymap/with-spaces-multibyte-lang-env): New tests.
Eli Zaretskii [Thu, 28 Oct 2021 15:47:41 +0000 (18:47 +0300)]
Ignore more events in input-pending-p
* src/keyboard.c (readable_events)
(kbd_buffer_store_buffered_event): Use 'is_ignored_event' to
decide whether the input event is to be ignored.
(is_ignored_event): New function.
(syms_of_keyboard) <input-pending-p-filter-events>: New variable.
Patch from Aaron Jensen <aaronjensen@gmail.com>.
* lisp/image-dired.el (image-dired-thumbnail-mode-map)
(image-dired-display-image-mode-map, image-dired-minor-mode-map):
In Emacs 26.1 (commits b905454680c7 and bed0373855ea), the menus were
converted to use 'easy-menu-define', but they were reversed in the
process. Unreverse the menus. (Bug#51446)
Stefan Kangas [Thu, 28 Oct 2021 00:10:09 +0000 (02:10 +0200)]
Do interactive mode tagging in image-dired.el
* lisp/image-dired.el (image-dired-restore-window-configuration)
(image-dired-next-line, image-dired-previous-line)
(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)
(image-dired-jump-original-dired-buffer)
(image-dired-delete-char, image-dired-refresh-thumb)
(image-dired-display-next-thumbnail-original)
(image-dired-display-previous-thumbnail-original): Do interactive
tagging; these will only work in 'image-dired-thumbnail-mode'.
Stefan Kangas [Wed, 27 Oct 2021 23:59:01 +0000 (01:59 +0200)]
image-dired: Make thumbnail rotation commands obsolete
* lisp/image-dired.el (image-dired-cmd-rotate-thumbnail-program)
(image-dired-cmd-rotate-thumbnail-options)
(image-dired-rotate-thumbnail)
(image-dired-rotate-thumbnail-left)
(image-dired-rotate-thumbnail-right): Make obsolete in favor of
'image-dired-refresh-thumb' and 'image-rotate'. It makes no sense to
have destructive thumbnail rotation commands now that Emacs can rotate
thumbnails in memory, and it is very fast to just generate a new one
reflecting the rotation of the original.
(image-dired-thumbnail-mode-map): Remove menu entries and key bindings
for above obsolete commands. The rotate right keybinding had already
been made ineffective by the local keymap added by 'insert-image'.