* lisp/language/indian.el ("Wancho"): New language environment.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Wancho.
* lisp/leim/quail/indian.el ("wancho"): New input method.
* etc/HELLO: Add a Wancho greeting.
* etc/NEWS: Announce the new language environment.
Add support for the Mende Kikakui script (bug#58151)
* lisp/language/misc-lang.el ("Mende Kikakui"): New language environment.
Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Mende Kikakui, Indic Siyaq Numbers,
Ottoman Siyaq Numbers.
* lisp/leim/quail/misc-lang.el ("mende-kikakui"): New input method.
* etc/HELLO: Add Mende Kikakui greeting.
* etc/NEWS: Announce the new language environment.
Stefan Kangas [Wed, 28 Sep 2022 12:50:24 +0000 (14:50 +0200)]
Add .mailmap for proper git log output
This file is used to fix a few misspelled names in various git
listings (e.g., "git log"). This can be used to fix incorrect
attribution, poor display, or names showing up more than once.
It also allows updating an old email addresses to a new one.
See "man git-shortlog" for more information on the format.
* lisp/language/misc-lang.el ("Adlam"): New language environment.
Add composition rules for Adlam. Add sample text and input method.
* lisp/international/fontset.el (script-representative-chars):
Support Adlam.
* lisp/leim/quail/misc-lang.el ("adlam"): New input method.
* etc/HELLO: Add Adlam greeting.
* etc/NEWS: Announce the new language environment.
Po Lu [Wed, 28 Sep 2022 12:33:24 +0000 (20:33 +0800)]
Apply root window coordinate optimizations to crossing events as well
* src/xterm.c (xi_compute_root_window_offset_enter): New
function.
(handle_one_xevent): Apply root window crossing optimizations to
XI_Enter and XI_Leave events too. Not strictly necessary but
since we apply them to motion events it would be consistent to
apply them to crossing events as well as recommended by the
ICCCM.
* doc/emacs/misc.texi (DocView Navigation):
* lisp/doc-view.el (doc-view-imenu-title-format, doc-view-imenu-flatten):
(doc-view--imenu-subtree): customizable format for imenu entry titles,
and flag to disable nested submenus.
* lisp/doc-view.el (doc-view--pdf-outline): clean up whitespace
markers '\r' and '\t' in imenu item titles (bug#58131).
* lisp/net/eww.el (eww-follow-link): Do a text property search instead
of re-rendering to follow #target links in the same page. (bug#58118)
(eww-link-keymap): Bind <mouse-2> to eww-follow-link as well.
Stefan Kangas [Tue, 27 Sep 2022 22:41:01 +0000 (00:41 +0200)]
image-dired: End thumbnail file names with ".jpg"
* lisp/image/image-dired-util.el (image-dired-thumb-name): Always
end thumbnail name in ".jpg" and simplify naming to just use the
SHA-1 hash. (Bug#57961)
* test/lisp/image/image-dired-util-tests.el
(image-dired-thumb-name/image-dired): Adjust test for the above
change.
* etc/NEWS: Announce the above change.
Paul Eggert [Wed, 28 Sep 2022 08:06:10 +0000 (01:06 -0700)]
Port better to C23 bool+true+false keywords
C23 is adding the C++ keywords bool, true, and false;
prefer them to <stdbool.h> if they are available.
* admin/merge-gnulib (GNULIB_MODULES):
Add stdbool, which emulates C23 on pre-C23 platforms.
(AVOIDED_MODULES): Remove stdbool; Gnulib has renamed
this module to stdbool-c99 and nobody uses it so it does
not need to be avoided.
* m4/c-bool.m4: New file, from Gnulib stdbool module.
* lib-src/seccomp-filter.c, src/conf_post.h, src/dynlib.h:
* src/emacs-module.c, src/nsterm.m, src/systhread.h:
* test/src/emacs-module-resources/mod-test.c:
Use the C23 style and use bool without including <stdbool.h>.
The Gnulib stdbool module causes config.h to include stdbool.h
on pre-C23 platforms.
* src/emacs-module.h.in:
Don’t include <stdbool.h> if C23 or later, or if
it has already been included.
Michael Albinus [Tue, 27 Sep 2022 16:46:28 +0000 (18:46 +0200)]
Some tramp-docker.el adaptions
* lisp/net/tramp-docker.el (tramp-docker--completion-function):
Add ;;;###tramp-autoload cookie. Make implementation more robust.
(tramp-methods) Use `tramp-default-remote-shell'.
* lisp/doc-view.el (doc-view-imenu-enabled): user option to disable
imenu generation.
* lisp/doc-view.el (doc-view--outline-rx):
(doc-view--pdf-outline, doc-view--imenu-subtree, doc-view-imenu-index):
functions implementing the imenu index generation via mutool.
* lisp/doc-view.el (doc-view-imenu-setup, doc-view-mode): setup of the
new functionality in doc-view mode.
* lisp/imenu.el (imenu-submenus-on-top):
(imenu--split-menu): new local variable to optionally inhibit
grouping of entries with children at the top of imenu menus.
* doc/emacs/misc.texi: documentation for the new functionality
(bug#58103).
Richard Hansen [Mon, 26 Sep 2022 21:07:52 +0000 (17:07 -0400)]
ert-x: Improve realism of `ert-with-test-buffer-selected'
* lisp/emacs-lisp/ert-x.el (ert-with-test-buffer-selected): Set
`inhibit-read-only' and `buffer-read-only' to nil when executing the
body to provide a more realistic test environment.
Po Lu [Tue, 27 Sep 2022 02:50:34 +0000 (10:50 +0800)]
Optimize coordinate translation during event handling
These changes noticeably improve turning the mouse wheel on top of
scroll bars etc over slow network connections.
* src/xterm.c (x_dnd_note_self_position, x_dnd_note_self_wheel)
(x_dnd_note_self_drop): Use x_translate_coordinates.
(x_compute_root_window_offset): New function for calculating and
caching root window offsets of edit window.
(x_translate_coordinates): New function. Use cached values
whenever possible.
(xi_compute_root_window_offset)
(xi_compute_root_window_offset_pinch): New wrappers for XI2
events.
(x_construct_mouse_click, handle_one_xevent): Use
x_translate_coordinates wherever appropriate.
* src/xterm.h (struct x_output): New fields for keeping track of
the root window offset of the edit window.
Adjust zero-width grapheme clusters so they are displayed (Bug#50951)
* src/composite.c (composition_gstring_adjust_zero_width): New function.
* src/composite.h: Declare it.
* src/font.c (Ffont_shape_gstring): Use it before putting gstring to cache.
Stefan Kangas [Mon, 26 Sep 2022 19:26:50 +0000 (21:26 +0200)]
Set XFCE wallpaper also in single-workspace-mode
This fixes setting the wallpaper on XFCE whether or not the
"/backdrop/single-workspace-mode" setting is true or false.
That XFCE setting controls whether or not the same wallpaper is used
on all workspaces or not.
* lisp/image/wallpaper.el (wallpaper-setter)
(wallpaper-command-args, wallpaper-default-set-function): Allow
using a function for getting the command line arguments.
(wallpaper-xfce-command-args): New function.
(wallpaper--default-setters): Use above new function for XFCE.
Alan Mackenzie [Mon, 26 Sep 2022 19:16:33 +0000 (19:16 +0000)]
CC Mode: Handle C++20 concepts
* lisp/progmodes/cc-align.el (c-lineup-topmost-intro-cont): Amend so as not to
indent lines following a requires line.
* lisp/progmodes/cc-engine.el (c-forward-primary-expression)
(c-forward-c++-requires-clause): New functions.
(c-forward-declarator): Skip forward over any trailing requires clause.
(c-forward-decl-or-cast-1): Skip requires clauses before and after the type.
Amend the second element of the return list to include information on two
consecutive identifiers in <...>.
(c-looking-at-or-maybe-in-bracelist): Don't recognize braces in requires
expressions as brace lists.
(c-guess-basic-syntax): CASE 5D.7: New case to handle the continuation of a
"concept foo = " line.
* lisp/progmodes/cc-fonts.el (c-basic-matchers-before): Add a new clause to
handle the declaration of a concept.
(c-get-fontification-context): Treat the arglist of a requires construct as a
declaration arglist.
* lisp/progmodes/cc-langs.el (c-equals-nontype-decl-kwds/key)
(c-fun-name-substitute-kwds/key, c-pre-concept-<>-kwds/key): New
c-lang-consts/vars.
(c-constant-key): New c-lang-var.
(c-type-decl-suffix-key): Include "requires" in the keywords matched.
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix an off by one error. Use
equal rather than eq to compare two syntax contexts.
Stefan Kangas [Mon, 26 Sep 2022 12:38:25 +0000 (14:38 +0200)]
Fix setting the wallpaper in XFCE
* lisp/image/wallpaper.el (wallpaper-command-args)
(wallpaper-default-set-function): Support new format specifiers
%S for screen, %W for workspace, and %M for monitor.
(wallpaper--default-setters): Use above new specifiers for XFCE.
(wallpaper--format-arg): New defun broken out from...
(wallpaper-default-set-function): ...here.
(wallpaper--get-height-or-width): Support noninteractive use.
* test/lisp/image/wallpaper-tests.el (wallpaper--format-arg/filename)
(wallpaper--format-arg/filename-hex)
(wallpaper--format-arg/width, wallpaper--format-arg/screen)
(wallpaper--format-arg/monitor, wallpaper--format-arg/workspace):
New tests.
Stefan Kangas [Sun, 18 Sep 2022 09:48:24 +0000 (11:48 +0200)]
Rewrite wallpaper.el to use a cl-defstruct
* lisp/image/wallpaper.el
(wallpaper--default-commands): Delete variable.
(wallpaper-setter): New cl-defstruct.
(wallpaper--default-methods-create): New macro.
(wallpaper--default-setters):
(wallpaper--current-setter): New variables.
(wallpaper--find-setter): New defun to pick a wallpaper-setter.
(wallpaper--find-command, wallpaper--find-command-args):
Use 'wallpaper--find-setter'.
(wallpaper-command): Doc fix.
* test/lisp/image/wallpaper-tests.el
(wallpaper--find-command/return-string)
(wallpaper--find-command-args/return-list)
(wallpaper--image-file-regexp/return-string): New tests.
* lisp/vc/log-edit.el (log-edit-summary-separator): Add new face.
(log-edit-font-lock-keywords): Replace hardcoded face attributes with
named face.
* etc/NEWS: Announce the new face.
* lisp/net/eww.el (eww-tag-input): Don't claim to have an URL here
(bug#58091).
* lisp/net/shr.el (shr-next-link, shr-previous-link): Search for
shr-tab-stop instead of shr-url so that we can be more general.
(shr-urlify): Mark all links as tabbable-to.
Eli Zaretskii [Mon, 26 Sep 2022 06:35:10 +0000 (09:35 +0300)]
; Add commentary to disabled OTF support code in font.c
* src/font.c (check_gstring, check_otf_features, otf_tag_symbol)
(otf_open, font_otf_capability, generate_otf_features)
(font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor):
Move closer to the primitives that use them. Add commentary for
the purpose of this code.
Stefan Monnier [Sun, 25 Sep 2022 17:51:30 +0000 (13:51 -0400)]
tex-mode.el: Don't override AUCTeX modes
* lisp/textmodes/tex-mode.el (TeX-mode, plain-TeX-mode, LaTeX-mode):
Only define them as aliases in `lisp/loaddefs.el` so we don't
override AUCTeX's own definitions when we load `tex-mode.el`.
* lisp/emacs-lisp/byte-opt.el (byte-opt--bool-value-form):
`set` is boolean identity in its second argument.
(byte-compile-trueconstp): `set-marker` is always true.
Stefan Kangas [Sun, 25 Sep 2022 15:27:20 +0000 (17:27 +0200)]
Refactor system specific code in wallpaper.el
* lisp/image/wallpaper.el (wallpaper-set-function): New defvar
containing system specific function for setting wallpaper.
(wallpaper-default-set-function): Factor out function from...
(wallpaper-set): ...here. Use above new defvar.
(wallpaper-default-file-name-regexp): Delete defvar.
(wallpaper-image-file-extensions): New defvar.
(wallpaper--image-file-regexp): New defun that returns a regexp to
match for completion purposes.
(wallpaper--use-default-set-function-p): New defun.
(wallpaper--find-command, wallpaper--find-command-arguments):
Do nothing on MS-Windows and Haiku.
Stefan Kangas [Sun, 25 Sep 2022 14:16:51 +0000 (16:16 +0200)]
Add reasonable default to wallpaper-set
* lisp/image/wallpaper.el
(wallpaper-default-file-name-regexp): New variable.
(wallpaper--get-default-file): New function.
(wallpaper-set): Use above new function to set a default.
* test/lisp/image/wallpaper-tests.el: New file.
Stefan Kangas [Sun, 25 Sep 2022 14:16:30 +0000 (16:16 +0200)]
Add :buffer argument to ert-with-temp-file
* lisp/emacs-lisp/ert-x.el (ert-with-temp-file): Add new keyword
argument :buffer SYMBOL to visit the file with `find-file-literally'
before running the body, and cleaning up after.
Po Lu [Sun, 25 Sep 2022 13:22:45 +0000 (13:22 +0000)]
Implement font-use-system-font on Haiku
* doc/emacs/frames.texi (Fonts): Update documentation to say
what font-use-system-font really does and where it can be used.
* src/haiku_font_support.cc (language_code_points): Fix coding
style.
(font_style_to_flags, be_font_style_to_flags): Accept const char
*.
(be_send_font_settings, be_listen_font_settings)
(be_lock_font_defaults, be_unlock_font_defaults)
(be_get_font_default, be_get_font_size): New functions used to
retrieve default font data.
* src/haiku_io.c (haiku_len): Handle FONT_CHANGE_EVENT.
* src/haiku_support.h (enum haiku_event_type): New event type
FONT_CHANGE_EVENT.
(enum haiku_what_font): New enum.
(struct haiku_font_change_event): New struct.
* src/haikufont.c (Ffont_get_system_normal_font)
(Ffont_get_system_font, haiku_handle_font_change_event): New
functions.
(syms_of_haikufont): Provide `dynamic-setting' and define new
variables and subrs.
* src/haikuterm.c (haiku_default_font_parameter): Use system font.
(haiku_read_socket): Handle FONT_CHANGE_EVENTS.
(haiku_term_init): Start listening for font configuration changes.
* src/haikuterm.h: Update prototypes.
* src/xsettings.c (Ffont_get_system_normal_font)
(Ffont_get_system_font): Update doc string.
(syms_of_xsettings): Replace calls to intern with a static
string.