]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAdd :version tag for new tree-sitter custom options
Yuan Fu [Mon, 10 Oct 2022 03:54:19 +0000 (20:54 -0700)]
Add :version tag for new tree-sitter custom options

* lisp/progmodes/python.el (python-use-tree-sitter): Add version tag.
* lisp/treesit.el (treesit):
(treesit-max-buffer-size): Add version tag.

2 years agoMake python tree-sitter font-lock support decoration levels
Yuan Fu [Sun, 9 Oct 2022 22:19:36 +0000 (15:19 -0700)]
Make python tree-sitter font-lock support decoration levels

* lisp/progmodes/python.el (python--treesit-settings): Stratify into
three levels.

2 years agoMake tree-sitter font-lock support decoration levels
Yuan Fu [Sun, 9 Oct 2022 22:17:11 +0000 (15:17 -0700)]
Make tree-sitter font-lock support decoration levels

* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
Update.
* admin/notes/tree-sitter/html-manual/Parsing-Program-Source.html:
Update.
* doc/lispref/modes.texi: Mention the new :level option.
* lisp/treesit.el (treesit-font-lock-settings): Update docstring.
(treesit-font-lock-rules): Support :level.  Relayout the let form.
(treesit-font-lock-fontify-region): Support :level.

2 years agoAdd note on tree-sitter's naming convention
Yuan Fu [Sat, 8 Oct 2022 01:06:04 +0000 (18:06 -0700)]
Add note on tree-sitter's naming convention

* admin/notes/tree-sitter/starter-guide: Add note.
* doc/lispref/parsing.texi: Add note.

2 years agoAdd a :toggle option for tree-sitter font-lock
Yuan Fu [Fri, 7 Oct 2022 08:21:09 +0000 (01:21 -0700)]
Add a :toggle option for tree-sitter font-lock

* admin/notes/tree-sitter/html-manual/Parser_002dbased-Font-Lock.html:
Update html manual.
* admin/notes/tree-sitter/html-manual/build-manual.sh: Fix manual
path.
* admin/notes/tree-sitter/starter-guide: Mention :toggle.
* doc/lispref/modes.texi: Mention :toggle.
* lisp/treesit.el (treesit-font-lock-settings): Update docstring.
(treesit-font-lock-rules): Handle :toggle.  Also change
some wrong-type-argument signal to treesit-font-lock-error which is
easier to understand.
(treesit-font-lock-fontify-region): Handle :toggle.

2 years ago* src/treesit.c (syms_of_treesit): Add Streesit_language_version.
Yuan Fu [Thu, 6 Oct 2022 22:46:01 +0000 (15:46 -0700)]
* src/treesit.c (syms_of_treesit): Add Streesit_language_version.

2 years agoMerge branch 'master' into feature/tree-sitter
Yuan Fu [Thu, 6 Oct 2022 18:06:07 +0000 (11:06 -0700)]
Merge branch 'master' into feature/tree-sitter

2 years agoPass correct environment name to `reftex-label'
Arash Esbati [Thu, 6 Oct 2022 17:45:44 +0000 (19:45 +0200)]
Pass correct environment name to `reftex-label'

* lisp/textmodes/tex-mode.el (latex-block-body-alist): Pass
"figure" to `reftex-label' when inserting a figure float.
(bug#58329)

2 years agoetc/NEWS: Fix typo in seq-keep entry.
Lars Ingebrigtsen [Thu, 6 Oct 2022 12:56:47 +0000 (14:56 +0200)]
etc/NEWS: Fix typo in seq-keep entry.

2 years agoReplace aging OpenPGP artifacts in gnus' mml-sec tests.
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).

2 years agoReplace aging OpenPGP artifacts in the package-resources tests.
Justus Winter [Fri, 16 Sep 2022 10:24:26 +0000 (12:24 +0200)]
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.

2 years agoReplace aging OpenPGP artifacts in the epg tests.
Justus Winter [Fri, 16 Sep 2022 10:24:14 +0000 (12:24 +0200)]
Replace aging OpenPGP artifacts in the epg 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.

2 years agoFix epg's reliance on an implicit GnuPG command.
Justus Winter [Fri, 16 Sep 2022 10:23:39 +0000 (12:23 +0200)]
Fix epg's reliance on an implicit GnuPG command.

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.

2 years agoFix BSD battery mode over TRAMP (bug#58307)
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).

2 years agoFix calling `package-reinstall' just after quick initialization.
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).

2 years agoAdd missing staticpro (bug#58327)
Gerd Möllmann [Thu, 6 Oct 2022 08:18:59 +0000 (10:18 +0200)]
Add missing staticpro (bug#58327)

* src/window.c (init_window_once): staticpro old_selected_window.

2 years agoInhibit GC in probably_quit (bug#58042)
Gerd Möllmann [Thu, 6 Oct 2022 07:09:04 +0000 (09:09 +0200)]
Inhibit GC in probably_quit (bug#58042)

2 years ago* etc/NEWS: Document how to continue using 'linum'. (Bug#58220)
Stefan Kangas [Thu, 6 Oct 2022 06:54:54 +0000 (08:54 +0200)]
* etc/NEWS: Document how to continue using 'linum'.  (Bug#58220)

2 years ago; * src/xterm.c (x_term_init): Fix typo.
Po Lu [Thu, 6 Oct 2022 02:57:43 +0000 (10:57 +0800)]
; * src/xterm.c (x_term_init): Fix typo.

2 years agoMinor fixes to IM locale handling
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.

2 years agoFix nsmenu crash when exiting popup dialog
Po Lu [Thu, 6 Oct 2022 02:52:34 +0000 (10:52 +0800)]
Fix nsmenu crash when exiting popup dialog

* src/nsmenu.m (pop_down_menu): Do not discard menu items here.
(ns_popup_dialog): Call discard_menu_items after
unuse_menu_items.  (bug#58296)

2 years ago* etc/NEWS: Add instructions for replacing 'linum'. (Bug#58220)
Stefan Kangas [Wed, 5 Oct 2022 23:32:59 +0000 (01:32 +0200)]
* etc/NEWS: Add instructions for replacing 'linum'.  (Bug#58220)

2 years agoMerge branch 'master' into feature/tree-sitter
Yuan Fu [Wed, 5 Oct 2022 21:22:03 +0000 (14:22 -0700)]
Merge branch 'master' into feature/tree-sitter

2 years agoAdd tree-sitter admin notes
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.

2 years ago* lisp/repeat.el (repeat-exit): Add autoload cookie.
Juri Linkov [Wed, 5 Oct 2022 19:47:42 +0000 (22:47 +0300)]
* lisp/repeat.el (repeat-exit): Add autoload cookie.

2 years ago* etc/tutorials/TUTORIAL.uk: Fix typos.
Juri Linkov [Wed, 5 Oct 2022 19:43:12 +0000 (22:43 +0300)]
* etc/tutorials/TUTORIAL.uk: Fix typos.

2 years agoAdapt Tramp manual
Michael Albinus [Wed, 5 Oct 2022 15:11:33 +0000 (17:11 +0200)]
Adapt Tramp manual

* doc/misc/tramp.texi (Inline methods): Method "kubernetes" does
not support user names.

2 years agoNew command 'world-clock-copy-time-as-kill'
Stefan Kangas [Wed, 5 Oct 2022 14:33:18 +0000 (16:33 +0200)]
New command 'world-clock-copy-time-as-kill'

* lisp/time.el (world-clock-copy-time-as-kill): New command.
(world-clock-mode-map): Bind above new command to "w".

2 years agoAdd face help-key-binding in help-char echo
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.

2 years ago; * lisp/files.el (find-file-noselect): Minor simplification.
Stefan Kangas [Wed, 5 Oct 2022 13:08:01 +0000 (15:08 +0200)]
; * lisp/files.el (find-file-noselect): Minor simplification.

2 years agoFix bug in "macintization" of x_draw_glyph_string
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>.

2 years agoAdd tramp-kubernetes integration
Filipp Gunbin [Tue, 4 Oct 2022 23:46:40 +0000 (02:46 +0300)]
Add tramp-kubernetes integration

* doc/misc/tramp.texi (Inline methods): Add kubernetes.
(Customizing Methods): Remove kubernetes-tramp.
* etc/NEWS: Mention new Tramp method "kubernetes".
* lisp/net/tramp-compat.el (kubernetes-tramp): Warn if that package is
used.
* lisp/net/tramp-container.el (tramp-kubernetes-program): New
defcustom.
(tramp-kubernetes-method): New defconst.
(tramp-kubernetes--completion-function): New function.

2 years agoRename lisp/net/tramp-docker.el to lisp/net/tramp-container.el
Filipp Gunbin [Tue, 4 Oct 2022 23:16:36 +0000 (02:16 +0300)]
Rename lisp/net/tramp-docker.el to lisp/net/tramp-container.el

2 years agoAdd :override flag for python tree-sitter font-lock settings
Yuan Fu [Tue, 4 Oct 2022 20:30:00 +0000 (13:30 -0700)]
Add :override flag for python tree-sitter font-lock settings

* lisp/progmodes/python.el (python--treesit-settings): Add :override.

2 years agoAdd :override flag for tree-sitter font-lock
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.

2 years ago; * doc/lispref/parsing.texi (Language Definitions): Fix typo.
Yuan Fu [Tue, 4 Oct 2022 20:02:07 +0000 (13:02 -0700)]
; * doc/lispref/parsing.texi (Language Definitions): Fix typo.

2 years agoFix python tree-sitter font-lock
Yuan Fu [Tue, 4 Oct 2022 19:18:53 +0000 (12:18 -0700)]
Fix python tree-sitter font-lock

Add fontification for lhs attribute and some operators.

* lisp/progmodes/python.el (python--treesit-keywords): Add operators.
(python--treesit-settings): Add lhs attribute.

2 years agoAdd treesit-language-version
Yuan Fu [Tue, 4 Oct 2022 19:16:47 +0000 (12:16 -0700)]
Add treesit-language-version

* doc/lispref/parsing.texi (Language Definitions): Update manual.
* src/treesit.c (Ftreesit_language_version): New function

2 years agoImprove documentation of tree-sitter search functions
Yuan Fu [Sun, 2 Oct 2022 03:29:35 +0000 (20:29 -0700)]
Improve documentation of tree-sitter search functions

* doc/lispref/parsing.texi (Retrieving Node): Update manual.
* src/treesit.c (treesit-search-subtree)
(treesit-search-forwardn)
(treesit-induce-sparse-tree): Mention case-insensitivity.
* lisp/treesit.el (treesit-simple-indent): Mention case-insensitivity.

2 years agoIgnore some capture name in treesit-font-lock-fontify-region
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.

2 years agoRemove treesit-query-in
Yuan Fu [Sat, 1 Oct 2022 00:20:34 +0000 (17:20 -0700)]
Remove treesit-query-in

Because treesit-query-capture can now do everything it does.

* doc/lispref/parsing.texi (Pattern Matching): Update manual.
* lisp/treesit.el (treesit-query-in): Remove function.
* src/treesit.c (Ftreesit_query_capture): Accept parser and language
symbol as NODE.

2 years agoAdd comment explaining gcc_jit_context_new_bitcast usage.
Vibhav Pant [Tue, 4 Oct 2022 19:31:50 +0000 (01:01 +0530)]
Add comment explaining gcc_jit_context_new_bitcast usage.

2 years agoAddress styling comments.
Vibhav Pant [Sun, 2 Oct 2022 16:45:33 +0000 (22:15 +0530)]
Address styling comments.

2 years agocomp.c: Add declaration for gcc_jit_type_is_pointer.
Vibhav Pant [Tue, 27 Sep 2022 18:01:06 +0000 (23:31 +0530)]
comp.c: Add declaration for gcc_jit_type_is_pointer.

2 years agosrc/comp.c: Use libgccjit's bitcast API for type coercion, when available.
Vibhav Pant [Tue, 27 Sep 2022 17:08:45 +0000 (22:38 +0530)]
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.

2 years agoPut all seq.el news into one section
Lars Ingebrigtsen [Tue, 4 Oct 2022 19:46:09 +0000 (21:46 +0200)]
Put all seq.el news into one section

2 years agoAdd 'seq-keep'
Lars Ingebrigtsen [Tue, 4 Oct 2022 19:44:52 +0000 (21:44 +0200)]
Add 'seq-keep'

* doc/lispref/sequences.texi (Sequence Functions): Document it.
* lisp/emacs-lisp/seq.el (seq-keep): New function (bug#58278).

2 years ago; * lisp/simple.el (cursor-face-highlight-mode): Doc fix.
Eli Zaretskii [Tue, 4 Oct 2022 19:25:20 +0000 (22:25 +0300)]
; * lisp/simple.el (cursor-face-highlight-mode): Doc fix.

2 years agoAdd method description for podman in Tramp
Brian Cully [Tue, 4 Oct 2022 19:19:05 +0000 (21:19 +0200)]
Add method description for podman in Tramp

* doc/misc/tramp.texi (Inline methods): Adapt docker method.
Describe podman method.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 4 Oct 2022 18:04:19 +0000 (20:04 +0200)]
Merge from origin/emacs-28

a78af3018e * src/emacs.c (load_pdump): Propery handle case when execu...

# Conflicts:
# src/emacs.c

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Tue, 4 Oct 2022 17:23:24 +0000 (19:23 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

b560ce3560 Avoid assertion violations in STRING_CHAR

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 4 Oct 2022 17:23:24 +0000 (19:23 +0200)]
Merge from origin/emacs-28

78c262e1c2 ; * lisp/progmodes/glasses.el (glasses-face): Expand the d...

2 years agoCC Mode: A new operator and some new keywords for C++20
Alan Mackenzie [Tue, 4 Oct 2022 17:13:56 +0000 (17:13 +0000)]
CC Mode: A new operator and some new keywords for C++20

* lisp/progmodes/cc-langs.el (c-operators, c-overloadable-operators)
(c-arithmetic-operators): Add the "spaceship" operator for C++.
(c-primitive-type-kwds): Add char8_t for C++.
(c-decl-hangon-kwds, c-paren-nontype-kwds): Add alignas for C++.

2 years ago* etc/NEWS: Mention new Tramp method "podman". Fix typos.
Michael Albinus [Tue, 4 Oct 2022 16:56:34 +0000 (18:56 +0200)]
* etc/NEWS: Mention new Tramp method "podman".  Fix typos.

2 years agoProvide Podman containers on their own method in Tramp
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.

2 years ago* src/emacs.c (load_pdump): Propery handle case when executable
Andreas Schwab [Tue, 4 Oct 2022 16:22:58 +0000 (18:22 +0200)]
* src/emacs.c (load_pdump): Propery handle case when executable
wasn't found.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 4 Oct 2022 16:25:18 +0000 (19:25 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoCC Mode: Optimize c-fontify-new-found-type and amend a debug spec
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.

2 years agoRevert "Improve manual display tests of undisplayable chars (bug#58168)"
Eli Zaretskii [Tue, 4 Oct 2022 16:15:17 +0000 (19:15 +0300)]
Revert "Improve manual display tests of undisplayable chars (bug#58168)"

This reverts commit 849b7756fd31a69791e67dfe010b1e10f0168c83.
Please don't rush installing changes that are still being
discussed.

2 years ago* lisp/subr.el (y-or-n-p): Use substitute-command-keys.
Stefan Kangas [Tue, 4 Oct 2022 15:39:28 +0000 (17:39 +0200)]
* lisp/subr.el (y-or-n-p): Use substitute-command-keys.

2 years agoimage-dired: Shorten several long names
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.

2 years agoImprove manual display tests of undisplayable chars (bug#58168)
Mattias Engdegård [Tue, 4 Oct 2022 14:13:12 +0000 (16:13 +0200)]
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.

2 years agoimage-dired: Fix arrow keys in thumbs buffer
Stefan Kangas [Tue, 4 Oct 2022 14:18:13 +0000 (16:18 +0200)]
image-dired: Fix arrow keys in thumbs buffer

* lisp/image/image-dired.el (image-dired-thumbnail-mode-map): Also
remap 'left-char' and 'right-char'.

2 years agoFix recent changes for Ukrainian language
Eli Zaretskii [Tue, 4 Oct 2022 14:15:47 +0000 (17:15 +0300)]
Fix recent changes for Ukrainian language

* etc/HELLO:
* lisp/language/cyrillic.el ("Ukrainian"): Fix greetings and
remove redundant Ukrainian entry in cyrillic.el.

2 years agoMake cropping of images work in message-mode
Lars Ingebrigtsen [Tue, 4 Oct 2022 13:40:53 +0000 (15:40 +0200)]
Make cropping of images work in message-mode

* 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.

2 years agoCC Mode: Make c-forward-declarator move over a suffix after parens, e.g. const
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.

2 years agoMove image commands to the 'i' sub map
Lars Ingebrigtsen [Tue, 4 Oct 2022 13:09:33 +0000 (15:09 +0200)]
Move image commands to the 'i' sub map

* 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.

2 years agoFix the arguments in tags--compat-initialize
Lars Ingebrigtsen [Tue, 4 Oct 2022 12:31:24 +0000 (14:31 +0200)]
Fix the arguments in tags--compat-initialize

* lisp/progmodes/etags.el (tags--compat-initialize): Fix argument
order -- swap the last two arguments (bug#58272).

2 years agoUpdate Ukrainian language info alist
Po Lu [Tue, 4 Oct 2022 12:26:37 +0000 (20:26 +0800)]
Update Ukrainian language info alist

* lisp/language/cyrillic.el ("Ukrainian"): Replace "Glory to
Ukraine" with "hello".  See
www.gnu.org/prep/maintain/html_node/Other-Politics.html.

2 years agoAdd Ukrainian tutorial
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).

2 years agoFix NEWS item about obsoleting the `eq' gv
Lars Ingebrigtsen [Tue, 4 Oct 2022 12:12:22 +0000 (14:12 +0200)]
Fix NEWS item about obsoleting the `eq' gv

2 years agoMake `eq' obsolete as a generalized variable
Lars Ingebrigtsen [Tue, 4 Oct 2022 12:11:04 +0000 (14:11 +0200)]
Make `eq' obsolete as a generalized variable

* lisp/emacs-lisp/gv.el (eq): Make obsolete as a generalized
variable.

2 years agoMention cond/if as generalized variables in the manual
Lars Ingebrigtsen [Tue, 4 Oct 2022 11:57:45 +0000 (13:57 +0200)]
Mention cond/if as generalized variables in the manual

* doc/lispref/variables.texi (Setting Generalized Variables):
Mention cond and if (bug#52290).

2 years agoAvoid assertion violations in STRING_CHAR
Eli Zaretskii [Tue, 4 Oct 2022 11:23:20 +0000 (14:23 +0300)]
Avoid assertion violations in STRING_CHAR

* src/xdisp.c (handle_composition_prop):
* src/editfns.c (styled_format): Don't call 'STRING_CHAR' on
unibyte strings.  This avoids assertion violation in
'string_char_and_length'.

(cherry picked from commit d52d6e1e106117eb4bba81a65e256e2e793037b6)

2 years agoAvoid assertion violations in STRING_CHAR
Eli Zaretskii [Tue, 4 Oct 2022 11:23:20 +0000 (14:23 +0300)]
Avoid assertion violations in STRING_CHAR

* src/xdisp.c (handle_composition_prop):
* src/editfns.c (styled_format): Don't call 'STRING_CHAR' on
unibyte strings.  This avoids assertion violation in
'string_char_and_length'.

2 years agoMake loaddefs-generate more resilient
Lars Ingebrigtsen [Tue, 4 Oct 2022 11:04:16 +0000 (13:04 +0200)]
Make loaddefs-generate more resilient

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Don't bug
out when there's an existing loaddefs file that's not formatted
properly (bug#58280).

2 years agoDon't bug out in advice--make-docstring when there's not doc string
Lars Ingebrigtsen [Tue, 4 Oct 2022 10:49:49 +0000 (12:49 +0200)]
Don't bug out in advice--make-docstring when there's not doc string

* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Don't bug
out on functions with no documentation (bug#58284).

2 years agoAvoid errors in interactive calls of 'calendar-goto-day-of-year'
Eli Zaretskii [Tue, 4 Oct 2022 09:57:04 +0000 (12:57 +0300)]
Avoid errors in interactive calls of 'calendar-goto-day-of-year'

* lisp/calendar/cal-move.el (calendar-goto-day-of-year): Fix the
default value of DAY; doc fix.  (Bug#58283)

2 years ago; * lisp/progmodes/glasses.el (glasses-face): Expand the doc string.
Eli Zaretskii [Tue, 4 Oct 2022 07:32:06 +0000 (10:32 +0300)]
; * lisp/progmodes/glasses.el (glasses-face): Expand the doc string.

2 years ago; * etc/NEWS: Improve wording.
Eli Zaretskii [Tue, 4 Oct 2022 05:34:59 +0000 (08:34 +0300)]
; * etc/NEWS: Improve wording.

2 years ago* etc/NEWS: Clarify confusing Image-Dired entry. (Bug#58279)
Stefan Kangas [Tue, 4 Oct 2022 05:32:04 +0000 (07:32 +0200)]
* etc/NEWS: Clarify confusing Image-Dired entry.  (Bug#58279)

2 years agoFix deiconification handling on FVWM and possibly other window managers
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)

2 years ago; * lisp/proced.el (proced-mode): Manually reflow docstring.
Stefan Kangas [Tue, 4 Oct 2022 00:15:51 +0000 (02:15 +0200)]
; * lisp/proced.el (proced-mode): Manually reflow docstring.

2 years ago; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory'
Jim Porter [Mon, 3 Oct 2022 01:19:56 +0000 (18:19 -0700)]
; Fix logic of $HOME adjustment for 'ert-remote-temporary-file-directory'

* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Only
adjust $HOME when it doesn't exist (bug#58265).

2 years agoMerge from origin/emacs-28
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'

# Conflicts:
# src/emacs.c

2 years ago; * etc/NEWS: Minor copy editing.
Stefan Kangas [Mon, 3 Oct 2022 21:06:15 +0000 (23:06 +0200)]
; * etc/NEWS: Minor copy editing.

2 years ago* lisp/repeat.el (repeat-exit-key): Replace type 'key-sequence' with 'key'.
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).

2 years ago* lisp/repeat.el (repeat-exit): New command.
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.

2 years ago* lisp/textmodes/tex-mode.el (tex--redirect-to-submode): Fix last change
Stefan Monnier [Mon, 3 Oct 2022 19:03:57 +0000 (15:03 -0400)]
* lisp/textmodes/tex-mode.el (tex--redirect-to-submode): Fix last change

2 years agoImprove messaging in ecomplete-remove
Lars Ingebrigtsen [Mon, 3 Oct 2022 19:40:27 +0000 (21:40 +0200)]
Improve messaging in ecomplete-remove

* lisp/ecomplete.el (ecomplete-remove): Make messaging better.

2 years agoFix typo in last help-fns--insert-menu-bindings change
Lars Ingebrigtsen [Mon, 3 Oct 2022 19:35:43 +0000 (21:35 +0200)]
Fix typo in last help-fns--insert-menu-bindings change

* lisp/help-fns.el (help-fns--insert-menu-bindings): Fix typo in
last change.

2 years agoImprove help-fns--insert-menu-bindings formatting
Lars Ingebrigtsen [Mon, 3 Oct 2022 19:32:01 +0000 (21:32 +0200)]
Improve help-fns--insert-menu-bindings formatting

* 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.

2 years agoAdd commands to edit/remove ecomplete entries
Lars Ingebrigtsen [Mon, 3 Oct 2022 18:27:17 +0000 (20:27 +0200)]
Add commands to edit/remove ecomplete entries

* lisp/ecomplete.el (ecomplete-add-item): Allow forcing new values.
(ecomplete--remove-item):
(ecomplete--prompt-type): New functions.
(ecomplete-edit, ecomplete-remove): New commands.

2 years agoRename to inhibit-automatic-native-compilation
Lars Ingebrigtsen [Mon, 3 Oct 2022 17:49:53 +0000 (19:49 +0200)]
Rename to inhibit-automatic-native-compilation

* src/comp.c (maybe_defer_native_compilation):
(syms_of_comp):
* lisp/subr.el (native-comp-deferred-compilation):
* lisp/startup.el (inhibit-native-compilation):
(normal-top-level):
* lisp/progmodes/elisp-mode.el (emacs-lisp-native-compile-and-load):
* lisp/emacs-lisp/comp.el (comp-trampoline-compile):
* etc/NEWS:
* doc/lispref/compile.texi (Native-Compilation Variables): Rename
inhibit-native-compilation to inhibit-automatic-native-compilation.

2 years ago; * src/menu.c: remove unused lwlib include
Manuel Giraud [Mon, 3 Oct 2022 17:14:26 +0000 (19:14 +0200)]
; * src/menu.c: remove unused lwlib include

* src/menu.c: remove unused lwlib include (bug#58275).

2 years agofiles.el (major-mode-remap-alist): New custom var (bug#58075)
Stefan Monnier [Mon, 3 Oct 2022 15:17:51 +0000 (11:17 -0400)]
files.el (major-mode-remap-alist): New custom var (bug#58075)

* lisp/files.el (major-mode-remap-alist): New custom var.
(set-auto-mode--last): New var.
(set-auto-mode-0): Obey `major-mode-remap-alist`.

* doc/emacs/modes.texi (Choosing Modes): Document `major-mode-remap-alist`.

* lisp/progmodes/cperl-mode.el: Recommend the use of
`major-mode-remap-alist` over the crude `defalias` solution.

* lisp/textmodes/tex-mode.el (tex--guess-mode): Simplify.
(tex--redirect-to-submode): Obey `major-mode-remap-alist`.

2 years agoAdd new variable 'inhibit-native-compilation'
Lars Ingebrigtsen [Mon, 3 Oct 2022 13:26:04 +0000 (15:26 +0200)]
Add new variable 'inhibit-native-compilation'

* doc/lispref/compile.texi (Native-Compilation Variables):
Document it.

* lisp/startup.el (normal-top-level): Set
inhibit-native-compilation from environment variable.

* lisp/subr.el (native-comp-deferred-compilation): Make obsolete.

* lisp/emacs-lisp/comp.el (comp-trampoline-compile): Don't write
trampolines to disk.

* lisp/progmodes/elisp-mode.el
(emacs-lisp-native-compile-and-load): Adjust.

* src/comp.c (syms_of_comp): New variable
inhibit-native-compilation.
(maybe_defer_native_compilation): Use it.

2 years agoFix coding systems used for X input methods
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.

2 years agoAdd --with-native-compilation=aot configuration option
Lars Ingebrigtsen [Mon, 3 Oct 2022 10:45:21 +0000 (12:45 +0200)]
Add --with-native-compilation=aot configuration option

* configure.ac: Allow --with-native-compilation=aot to switch full
ahead-of-time on.

* lisp/Makefile.in: Use the setting from configure.

2 years agoRevert "keymap.el: Ease up support for non-`kbd` formats."
Lars Ingebrigtsen [Mon, 3 Oct 2022 09:04:16 +0000 (11:04 +0200)]
Revert "keymap.el: Ease up support for non-`kbd` formats."

This reverts commit 570a11052be6178954956a1c59c8ebcbdb77d38e.

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.