Justus Winter [Wed, 5 Oct 2022 10:36:39 +0000 (12:36 +0200)]
Replace aging OpenPGP artifacts in gnus' mml-sec tests.
This replaces the old OpenPGPv4 keys that are used in the test suite
with more modern OpenPGPv4 keys.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations (bug#58301).
Replace aging OpenPGP artifacts in the package-resources tests.
This replaces the old OpenPGPv4 key that is used in the test suite
with a more modern OpenPGPv4 key. The key is the Alice key from
https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/. All
cryptographic artifacts in the test suite are updated accordingly.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations.
This replaces the old OpenPGPv4 key that is used in the test suite
with a more modern OpenPGPv4 key. The key is the Alice key from
https://datatracker.ietf.org/doc/draft-bre-openpgp-samples/. All
cryptographic artifacts in the test suite are updated accordingly.
Having old cryptographic artifacts in the test suite presents a
problem once the old algorithms are rejected by contemporary
implementations.
Previously, epg invoked GnuPG without an explicit command to verify
signatures. Make that operation explicit. Happily, this aligns how
gpg and gpgsm is invoked, so it actually makes the code simpler.
Manuel Giraud [Thu, 6 Oct 2022 12:46:39 +0000 (14:46 +0200)]
Fix BSD battery mode over TRAMP (bug#58307)
* lisp/battery.el (battery--call-process-to-string): Simple wrapper
to `call-process' that outputs to a string.
(battery-bsd-apm): Use it instead of `shell-command-to-string'
(bug#58307).
Matt Armstrong [Thu, 6 Oct 2022 12:08:20 +0000 (14:08 +0200)]
Fix calling `package-reinstall' just after quick initialization.
* lisp/emacs-lisp/package.el (package-reinstall): call
`package--archives-initialize', just like `package-install' does.
This populates `package-alist', and so fixes calling
`package-reinstall' as the first thing done after package "quick
init" (Bug#53527).
Po Lu [Thu, 6 Oct 2022 02:55:25 +0000 (10:55 +0800)]
Minor fixes to IM locale handling
* lisp/term/x-win.el (x-get-input-coding-system): Translate locales.
* src/xterm.c (x_term_init): If the X library doesn't support
the current locale, don't set up input methods.
Yuan Fu [Wed, 5 Oct 2022 21:11:33 +0000 (14:11 -0700)]
Add tree-sitter admin notes
starter-guide: Guide on writing major mode features.
build-module: Script for building official language definitions.
html-manual: HTML version of the manual for easy access.
* admin/notes/tree-sitter/build-module/README: New file.
* admin/notes/tree-sitter/build-module/batch.sh: New file.
* admin/notes/tree-sitter/build-module/build.sh: New file.
* admin/notes/tree-sitter/starter-guide: New file.
* admin/notes/tree-sitter/html-manual/Accessing-Node.html: New file.
* admin/notes/tree-sitter/html-manual/Language-Definitions.html: New file.
* admin/notes/tree-sitter/html-manual/Multiple-Languages.html: New file.
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
New file.
* admin/notes/tree-sitter/html-manual/Parser_002dbased-Indentation.html:
New file.
* admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html: New
file.
* admin/notes/tree-sitter/html-manual/Pattern-Matching.html: New file.
* admin/notes/tree-sitter/html-manual/Retrieving-Node.html: New file.
* admin/notes/tree-sitter/html-manual/Tree_002dsitter-C-API.html: New
file.
* admin/notes/tree-sitter/html-manual/Using-Parser.html: New file.
* admin/notes/tree-sitter/html-manual/build-manual.sh: New file.
* admin/notes/tree-sitter/html-manual/manual.css: New file.
Stefan Kangas [Wed, 5 Oct 2022 13:23:39 +0000 (15:23 +0200)]
Add face help-key-binding in help-char echo
* src/keyboard.c (echo_add_key): Add help-key-binding face to the
"?" key in 'help-char' echo. (Bug#57906)
(syms_of_keyboard) <Qhelp_key_binding>: New DEFSYM.
Po Lu [Wed, 5 Oct 2022 00:31:44 +0000 (08:31 +0800)]
Fix bug in "macintization" of x_draw_glyph_string
* src/nsterm.m (ns_draw_stretch_glyph_string): Restore text decoration
drawing code ommitted during "macintization" to convert the X function
into NS code. Reported by Qiantan Hong <qthong@stanford.edu>.
Yuan Fu [Tue, 4 Oct 2022 20:28:46 +0000 (13:28 -0700)]
Add :override flag for tree-sitter font-lock
* doc/lispref/modes.texi (Parser-based Font Lock): Update manual.
* lisp/treesit.el (treesit-font-lock-settings): Update docstring.
(treesit-font-lock-rules): Handle :override.
(treesit-font-lock-fontify-region): Handle :override. Also set
inhibit-point-motion-hooks to t.
Yuan Fu [Sun, 2 Oct 2022 03:25:25 +0000 (20:25 -0700)]
Ignore some capture name in treesit-font-lock-fontify-region
* doc/lispref/modes.texi (Parser-based Font Lock): Update manual.
* lisp/treesit.el: (treesit-font-lock-fontify-region): Ignore names
that are not face nor function.
(treesit-font-lock-rules): Update docstring.
src/comp.c: Use libgccjit's bitcast API for type coercion, when available.
* (type_to_cast_index, define_type_punning, define_cast_from_to,
define_cast_functions): Define functions when
gcc_jit_context_new_bitcast is not available.
* (emit_coerce): Use gcc_jit_context_new_bitcast to coerce types, when
available.
Brian Cully [Tue, 4 Oct 2022 16:56:23 +0000 (18:56 +0200)]
Provide Podman containers on their own method in Tramp
* lisp/net/tramp-docker.el (tramp-podman-program): New defcustom.
(tramp-podman-method): New defconst.
(tramp-docker-program): Remove "podman" from option list.
(top): Update comments to refer to Docker-alike where necessary.
Add description for how to use the podman method.
Alan Mackenzie [Tue, 4 Oct 2022 16:19:33 +0000 (16:19 +0000)]
CC Mode: Optimize c-fontify-new-found-type and amend a debug spec
* lisp/progmodes/cc-fonts.el (c-fontify-new-found-type): Write the `face'
property directly, rather than removing `fontified' properties and letting
font-lock do the work.
* lisp/progmodes/cc-defs.el (cc-eval-when-compile): Amend the debug spec from
t to (&rest body), in line with the fix to bug #16184.
Stefan Kangas [Tue, 4 Oct 2022 15:36:09 +0000 (17:36 +0200)]
image-dired: Shorten several long names
* lisp/image/image-dired.el (image-dired-image-mode-map)
(image-dired-image-mode): Rename from
'image-dired-display-image-mode-map' and
'image-dired-display-image-mode'. Update all uses and make old
names into obsolete aliases.
(image-dired-display-this, image-dired-display-next)
(image-dired-display-previous): Rename from
'image-dired-display-thumbnail-original-image',
'image-dired-display-next-thumbnail-original', and
'image-dired-display-previous-thumbnail-original'. Update all uses
and make old names into obsolete aliases.
* doc/emacs/dired.texi (Image-Dired): Update documentation for the
above changes, and improve indexing.
Improve manual display tests of undisplayable chars (bug#58168)
Test display of multibyte raw bytes, as well as undisplayable
multibyte chars (C1 controls and other values).
The test still assumes that raw bytes should be displayed identically
to undisplayable characters (such as C1 controls) because that is how
the display code currently works.
* test/manual/redisplay-testsuite.el (test-redisplay-5-toggle)
(test-redisplay-5): Fix likely typo (#x3fffc) of raw byte value.
(test-redisplay-6): New.
* lisp/gnus/message.el (message-mode): Set the image cropping function.
(message--yank-media-image-handler): Factor out...
(message--image-part-string): ... here for reuse.
(message--update-image-crop): Update the cropped data.
Alan Mackenzie [Tue, 4 Oct 2022 13:22:32 +0000 (13:22 +0000)]
CC Mode: Make c-forward-declarator move over a suffix after parens, e.g. const
Also tidy up several inaccuracies in the code.
* lisp/progmodes/cc-engine.el (c-forward-decl-arglist): Move point for modes
other than C++ Mode.
(c-forward-declarator): Move over a suffix following arglist parens
(e.g. const). Set the ARGLIST element of the return value to non-nil on
encountering an unbalanced open parenthesis. Don't move forward out of
enclosing parens.
* lisp/progmodes/cc-mode.el (c-fl-decl-end): Handle being in a multi-line
string. Move forward over token after declarator.
* doc/lispref/display.texi (Showing Images): Adjust.
* lisp/image.el (image-map): Move all keys under the "i" prefix.
(image--repeat-map): New map.
(image-increase-size, image-rotate, image-decrease-size): Make
repeatable.
(image--delayed-change-size): New function.
Denys Nykula [Tue, 4 Oct 2022 12:17:38 +0000 (14:17 +0200)]
Add Ukrainian tutorial
* etc/tutorials/TUTORIAL.uk: Create the translation.
* lisp/language/cyrillic.el: Link "Emacs Tutorial"
to the translation if the system is Ukrainian, and
add our modern greeting as a sample text.
* etc/NEWS:
* etc/tutorials/TUTORIAL.translators: Attribute my work (bug#55250).
Po Lu [Tue, 4 Oct 2022 01:25:06 +0000 (09:25 +0800)]
Fix deiconification handling on FVWM and possibly other window managers
I can't believe we weren't doing this before.
* src/xterm.c (x_handle_wm_state): New function.
(handle_one_xevent): Handle window state changes in WM_STATE
messages, and use them for signalling deiconification.
(bug#58164)
Stefan Kangas [Mon, 3 Oct 2022 22:07:22 +0000 (00:07 +0200)]
Merge from origin/emacs-28
992611b10a Fix documentation of 'TAB' in cc-mode 08e485a2a5 Fix 'org-export-dispatch' command name in manual e5a49f44ff * src/emacs.c (load_pdump): Fix use of xpalloc. 7ff5207624 Avoid assertion violation in 'xpalloc'
Juri Linkov [Mon, 3 Oct 2022 19:54:16 +0000 (22:54 +0300)]
* lisp/repeat.el (repeat-exit-key): Replace type 'key-sequence' with 'key'.
(repeat-post-hook, repeat-echo-message-string): Add backward-compatibility
code for repeat-exit-key to keep support for 'key-sequence' type (bug#55986).
Juri Linkov [Mon, 3 Oct 2022 19:51:33 +0000 (22:51 +0300)]
* lisp/repeat.el (repeat-exit): New command.
(repeat-exit-function): New variable.
(repeat-post-hook): Set repeat-exit-function.
Call repeat-exit from run-with-idle-timer.
Also use repeat--exit.
(repeat--exit): New internal function.
* lisp/help-fns.el (help-fns--insert-menu-bindings): Make this
work better for menus that turn out to not be reachable after all
-- i.e., don't insert " and " before the heading in certain cases.
* lisp/ecomplete.el (ecomplete-add-item): Allow forcing new values.
(ecomplete--remove-item):
(ecomplete--prompt-type): New functions.
(ecomplete-edit, ecomplete-remove): New commands.
Po Lu [Mon, 3 Oct 2022 12:18:22 +0000 (20:18 +0800)]
Fix coding systems used for X input methods
* doc/emacs/mule.texi (International): Refer to X Coding as
well.
(Communication Coding): Document that locale-coding-system is
not always used on X to decode keyboard input.
(X Coding): New node.
* etc/NEWS: Announce change to input method coding resolution.
* lisp/term/x-win.el (x-get-input-coding-system): New function.
* src/coding.c (syms_of_coding): Update doc string of
locale-coding-system.
* src/xfns.c (struct x_xim_text_conversion_data)
(x_xim_text_to_utf8_unix_1, x_xim_text_to_utf8_unix_2)
(x_xim_text_to_utf8_unix): Accept dpyinfo. Use the coding
system specified inside if possible.
(xic_preedit_draw_callback): Pass dpyinfo.
* src/xterm.c (handle_one_xevent): Use XIM coding system for IM
input.
(xim_open_dpy): Try to determine the input method coding system.
(mark_xterm): Mark `xim_coding'.
(syms_of_xterm): New variable `x-input-coding-system'.
* src/xterm.h (struct x_display_info): New field `xim_coding'.
(FRAME_X_XIM_CODING): New macro.
We do not want to support several keymap formats in
`keymap-set' and friends -- the point is to have an
interface with easy-to-understand semantics that
give good feedback on valid/invalid key sequences.