1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-06 20:00:46 -08:00
Commit graph

151273 commits

Author SHA1 Message Date
Eli Zaretskii
d1523bc78c Avoid signaling errors in lookup-key
* src/keymap.c (Flookup_key): Handle KEY vectors where not all
components are symbols.  (Bug#51527
2021-10-31 16:16:38 +02:00
Alan Third
90bd80d47b Ensure help echoes only occur once on NS
* src/nsterm.m ([EmacsView windowDidResignKey:]): Reset
any_help_event_p as it is never reset otherwise.
2021-10-31 10:28:19 +00:00
Eli Zaretskii
d9b309cda8 Merge from origin/emacs-28
335a660b4b Fix display glitches with side-by-side windows on TTY frames
4a96f32def Avoid replacing common prefix with ellipsis
2021-10-31 03:58:55 -04:00
Eli Zaretskii
335a660b4b 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)
2021-10-31 09:42:09 +02:00
Stefan Kangas
54b8ec4e6f 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.
2021-10-31 03:02:32 +01:00
Stefan Kangas
8227d1273e 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.
2021-10-31 03:02:32 +01:00
Stefan Kangas
da67e888d5 Use primes for hash table bucket sizes
* src/dispextern.h (IMAGE_CACHE_BUCKETS_SIZE):
* src/image.c (XPM_COLOR_CACHE_BUCKETS): Use primes for hash table
bucket sizes.
2021-10-30 20:24:25 +02:00
Eli Zaretskii
ba9ae325e5 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.
2021-10-30 20:29:40 +03:00
Carlos Pita
4a96f32def Avoid replacing common prefix with ellipsis
* lisp/progmodes/python.el
(python-shell-completion-native-setup): Configure readline not to
suppress common prefixes.  (Bug#51218)
2021-10-30 17:51:27 +02:00
Jim Porter
a0fb3939ab Expand connection-local variables example in doc/emacs/custom.texi
* doc/emacs/custom.texi (Per-Connection Local Variables): Expand the
example to include setting 'system-uses-terminfo'.
2021-10-30 17:40:18 +02:00
dalanicolai
eb07b3d9b3 Make list-colors-display sort list passed as argument
* lisp/facemenu.el (list-colors-display): Don't skip sorting list of
colors if it was passed as an argument.  (Bug#51371)
2021-10-30 17:34:08 +02:00
Lars Ingebrigtsen
c23cb2861e Add new function string-glyph-split
* doc/lispref/strings.texi (Creating Strings): Document it.
* lisp/emacs-lisp/shortdoc.el (string): Mention it.

* lisp/emacs-lisp/subr-x.el (string-glyph-split): New function.
2021-10-30 15:22:36 +02:00
Kévin Le Gouguec
b54be604bf 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.

Bug#51495; discussed in help-gnu-emacs[2].

[1] https://mirrors.ctan.org/fonts/kpfonts-otf/doc/unimath-kpfonts.pdf

[2] <878s02u5m6.fsf@gmail.com>
    https://lists.gnu.org/archive/html/help-gnu-emacs/2021-09/msg00150.html
2021-10-30 14:44:01 +02:00
Eli Zaretskii
3eaa873d23 ; * doc/emacs/msdos.texi (Windows Misc): Fix typos. 2021-10-30 13:25:46 +03:00
Eli Zaretskii
520e358a3f 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.
2021-10-30 13:22:57 +03:00
Vince Salvino
c79d8fa416 Support system dark mode on Windows 10 version 1809 and higher
* src/w32fns.c (DARK_MODE_APP_NAME)
(DWMWA_USE_IMMERSIVE_DARK_MODE_OLD)
(DWMWA_USE_IMMERSIVE_DARK_MODE): Define.
(w32_applytheme): New function.
(w32_createvscrollbar, w32_createhscrollbar, w32_createwindow):
Call 'w32_applytheme'.
(globals_of_w32fns): Load 'DwmSetWindowAttribute' and
'SetWindowTheme' from their DLLs, and initialize 'w32_darkmode'.
* src/w32.c (w32_get_resource): Accept an additional argument
instead of hard-coding REG_ROOT; callers changed.  (Bug#51404)

* etc/NEWS:
* doc/emacs/msdos.texi (Windows Misc): Document the new feature.
2021-10-30 12:55:35 +03:00
Eli Zaretskii
c30f95078c Merge from origin/emacs-28
20ebd91a73 Improve documentation of string truncation APIs
3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo.  (Bug#51488)
2021-10-30 04:07:09 -04:00
Eli Zaretskii
20ebd91a73 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'.
2021-10-30 10:26:38 +03:00
Eli Zaretskii
c3499b8ddc ; Fix a recent change in image.c
* src/image.c (DGifSavedExtensionToGCB): Define only for GIFLIB >= 5.
2021-10-29 22:07:27 +03:00
Stefan Kangas
d9abc45ab5 * src/image.c: Fix building with giflib on MS-Windows. 2021-10-29 20:25:42 +02:00
Imran Khan
3f998a3fc8 * lisp/textmodes/css-mode.el: Fix typo. (Bug#51488)
Copyright-paperwork-exempt: yes
2021-10-29 19:06:40 +02:00
Glenn Morris
4dd8b2c086 ; Merge from origin/emacs-28
The following commit was skipped:

986fe634e2 (origin/emacs-28) Make message/rfc822 on buttons work agai...
2021-10-29 09:20:05 -07:00
Glenn Morris
faa2a990c9 Merge from origin/emacs-28
52e7049b58 * lisp/loadup.el: Unbreak build.
91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el
00103154e0 Some Tramp changes, mainly in tramp-tests.el
2021-10-29 09:20:05 -07:00
Glenn Morris
65e71d9a8a ; Merge from origin/emacs-28
The following commit was skipped:

9436943fb1 ; * doc/emacs/custom.texi (Connection Variables): Fix typo...
2021-10-29 09:20:05 -07:00
Glenn Morris
1216743042 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
2021-10-29 09:20:05 -07:00
Glenn Morris
3808498440 ; Merge from origin/emacs-28
The following commit was skipped:

bea843dee1 Avoid assertion violations in 'lookup-key'
2021-10-29 09:20:05 -07:00
Glenn Morris
af22a0a083 Merge from origin/emacs-28
f52fa1c150 image-dired: Unreverse accidentally reversed menus

# Conflicts:
#	lisp/image-dired.el
2021-10-29 09:20:05 -07:00
Glenn Morris
18b455f823 ; Merge from origin/emacs-28
The following commit was skipped:

0f8417d597 Be more allowing when looking for menu-bar items
2021-10-29 09:19:51 -07:00
Glenn Morris
502a00b8b9 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

# Conflicts:
#	etc/NEWS
2021-10-29 09:19:51 -07:00
Lars Ingebrigtsen
986fe634e2 Make message/rfc822 on buttons work again in Gnus
* 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.
2021-10-29 18:08:31 +02:00
Stefan Kangas
288e8bba81 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.
2021-10-29 17:44:29 +02:00
Stefan Kangas
f9282e1d72 Don't parse GCB block by hand with giflib 5 or later
* src/image.c (gif_load): If GIFLIB_MAJOR > 5, use
DGifSavedExtensionToGCB instead of parsing the Graphic Control
Extension block by hand.
2021-10-29 17:44:23 +02:00
Glenn Morris
52e7049b58 * lisp/loadup.el: Unbreak build. 2021-10-29 16:41:11 +01:00
Lars Ingebrigtsen
16995fa7c2 Make message/rfc822 on buttons work again in Gnus
* 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.
2021-10-29 17:26:53 +02:00
Morgan J. Smith
8ada213b87 Add some gnus-short-group-name tests
* test/lisp/gnus/gnus-group-tests.el (gnus-short-group-name): Add
some gnus-short-group-name tests (bug#51450).
2021-10-29 15:30:21 +02:00
Lars Ingebrigtsen
7f312f0be6 Shorten Gnus groups with [foo] in the name better
* lisp/gnus/gnus.el (gnus-short-group-name): Shorten groups with
[] in the names better (bug#51450).
2021-10-29 15:30:21 +02:00
Stefan Kangas
6523df43e6 * src/image.c (gif_load): Minor simplification. 2021-10-29 15:07:29 +02:00
Lars Ingebrigtsen
91e7df281e Move lisp/shorthands.el to lisp/emacs-lisp/shorthands.el 2021-10-29 14:37:08 +02:00
Michael Albinus
00103154e0 Some Tramp changes, mainly in tramp-tests.el
* doc/misc/tramp.texi (External packages): Don't use Tramp internals.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handler-mounted-unmounted):
Protect `tramp-make-tramp-file-name' call.

* lisp/net/tramp.el (tramp-make-tramp-file-name): Set advertised
calling conventions.

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes):
Adapt test.
(tramp--test-supports-processes-p): New defun.
(tramp-test28-process-file, tramp-test29-start-file-process)
(tramp-test30-make-process, tramp-test32-shell-command)
(tramp-test32-shell-command-dont-erase-buffer)
(tramp-test34-explicit-shell-file-name, tramp-test35-exec-path)
(tramp-test44-asynchronous-requests): Use it.
2021-10-29 14:06:47 +02:00
Michael Albinus
9436943fb1 ; * doc/emacs/custom.texi (Connection Variables): Fix typo. Don't merge 2021-10-29 14:05:36 +02:00
Eli Zaretskii
08de838531 ; Improve commentary in the last change
* lisp/language/misc-lang.el: Minor copyedits of the commentary
regarding Egyptian hieroglyph support.
2021-10-29 10:41:33 +03:00
Gregory Heytings
3da9fa875b Make hieroglyphs display correctly with existing fonts
* etc/HELLO: Remove hieroglyph format control characters.

* lisp/language/misc-lang.el: Add a rule to compose Egyptian
hieroglyphs even without Unicode format control characters.
2021-10-29 10:33:36 +03:00
Eli Zaretskii
928e05f2d6 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)
2021-10-29 10:10:01 +03:00
Eli Zaretskii
aaed8d4a81 Fix bootstrapping broken by a recent change
* src/keymap.c (Flookup_key): Avoid crashes during bootstrap when
uni-lowercase.el is not available yet.
2021-10-29 09:23:54 +03:00
akater
0aa9f478e9 Indent cl-flet-like forms correctly in incomplete expressions
* lisp/emacs-lisp/lisp-mode.el
(lisp--local-defform-body-p): Support incomplete sexps

* test/lisp/progmodes/elisp-mode-resources/flet.erts:
Add tests for incomplete sexps (bug#9622).
2021-10-28 23:53:50 +02:00
Lars Ingebrigtsen
5dbb04e0eb Make `C-u RET' work again
* lisp/simple.el (newline): Fix regression introduced by
d1aacceae9 (bug#51459).
2021-10-28 23:38:29 +02:00
Jan Synacek
d72fefdeab Fix typos in the manual and in a comment
* lisp/minibuffer.el (completion-pcm--hilit-commonality):
* doc/lispintro/emacs-lisp-intro.texi (Mode Line): Fix typos
(bug#51434).

Copyright-paperwork-exempt: yes
2021-10-28 23:33:12 +02:00
Stefan Kangas
2671ea0de8 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.
2021-10-28 22:21:16 +02:00
Eli Zaretskii
64cc31b5c8 ; * src/keyboard.c (readable_events): Fix a thinko. 2021-10-28 21:19:34 +03:00
Eli Zaretskii
bea843dee1 Avoid assertion violations in 'lookup-key'
* src/keymap.c (Flookup_key): Don't call ASIZE unless KEY is a
vector.  This avoids assertion violations when KEY is a string.
2021-10-28 20:52:41 +03:00