]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAdd 'slovak-querty' input method (bug#58642)
Rudolf Adamkovič [Wed, 19 Oct 2022 18:57:03 +0000 (20:57 +0200)]
Add 'slovak-querty' input method (bug#58642)

* lisp/leim/quail/slovak.el ("slovak-querty"): New input method.
* etc/NEWS: Mention the new 'slovak-querty' input method.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 20 Oct 2022 04:31:29 +0000 (06:31 +0200)]
Merge from origin/emacs-28

4b2c83eeaf ; * doc/lispref/modes.texi (Defining Minor Modes): Explain...

2 years ago* Fix async native compilation (bug#58637)
Andrea Corallo [Wed, 19 Oct 2022 20:08:41 +0000 (22:08 +0200)]
* Fix async native compilation (bug#58637)

* lisp/emacs-lisp/comp.el (comp--native-compile): Fix gate condition.
(comp-run-async-workers): Add assetion.

2 years ago; * test/lisp/image/wallpaper-tests.el: Simplify last change.
Stefan Kangas [Wed, 19 Oct 2022 18:53:36 +0000 (20:53 +0200)]
; * test/lisp/image/wallpaper-tests.el: Simplify last change.

2 years agoCC Mode: Cease adding types to found-types too eagerly
Alan Mackenzie [Wed, 19 Oct 2022 14:52:14 +0000 (14:52 +0000)]
CC Mode: Cease adding types to found-types too eagerly

This fixes bug #58537 and bug #58539.

* lisp/progmodes/cc-engine.el (c-forward-type): Remove trailing whitespace
from an identifier before passing it to c-add-type.
(c-forward-decl-or-cast-1): CASE 3: Do not recognize two consecutive
identifiers as type + variable/function unless certain conditions are met.
CASE 10: Do not recognize the "type" as a found type unless certain condtions
are met.  (Near end): Do not recognize the identifier in a cast as a type
unless certain conditions are met.

* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Recognize being
in declaration parens when there is a syntactially wrong "foo ((bar))"
preceding the match position.

* lisp/progmodes/cc-mode.el (c-update-new-id): Set c-new-id-is-type
unconditionally to nil to prevent a second identifier being wrongly marked as
a type.

2 years ago; Delete file after wallpaper test
Stefan Kangas [Wed, 19 Oct 2022 14:15:02 +0000 (16:15 +0200)]
; Delete file after wallpaper test

* test/lisp/image/wallpaper-tests.el
(wallpaper-set/calls-init-action): Don't leave temp file behind.

2 years agoFix various builds
Po Lu [Wed, 19 Oct 2022 13:31:54 +0000 (21:31 +0800)]
Fix various builds

* src/xterm.c (x_handle_selection_monitor_event): Adjust for
build without XInput2.
(x_maybe_clear_preedit, xim_destroy_callback): Make conditional
on Release 6 XIM.
(x_get_keyboard_modifiers): Adjust for build without XCB.

2 years agoFix build warning without XKB, Xmb, and XInput 2
Po Lu [Wed, 19 Oct 2022 13:19:08 +0000 (21:19 +0800)]
Fix build warning without XKB, Xmb, and XInput 2

* src/xterm.c (handle_one_xevent): Avoid defining
USE_SAFE_ALLOCA when SAFE_ALLOCA is not actually used.

2 years ago; * doc/lispref/modes.texi (Defining Minor Modes): Explain TURN-ON.
Eli Zaretskii [Wed, 19 Oct 2022 11:50:23 +0000 (14:50 +0300)]
; * doc/lispref/modes.texi (Defining Minor Modes): Explain TURN-ON.

2 years ago; Fix last change
Eli Zaretskii [Wed, 19 Oct 2022 11:40:11 +0000 (14:40 +0300)]
; Fix last change

* lisp/leim/quail/indian.el ("tamil99"):
* etc/NEWS: Minor copyedits of the tamil99 documentation.

2 years agoAdd tamil99 input method (bug#58070)
Arun Isaac [Tue, 18 Oct 2022 18:00:59 +0000 (23:30 +0530)]
Add tamil99 input method (bug#58070)

* lisp/leim/quail/indian.el: Require pcase and seq.
("tamil99"): New input method.
* etc/NEWS: Mention new tamil99 input method.

2 years agoAdd admin/emacs-shell-lib for shared bash code
Stefan Kangas [Wed, 19 Oct 2022 11:26:54 +0000 (13:26 +0200)]
Add admin/emacs-shell-lib for shared bash code

* admin/emacs-shell-lib: New file for shared bash code.
* admin/automerge:
* admin/diff-tar-files:
* admin/emacs-shell-lib:
* admin/make-manuals:
* admin/update_autogen:
* admin/upload-manuals: Simplify and improve using above new library.

2 years ago* lib-src/rcs2log: Add fallback for $TMPDIR.
Stefan Kangas [Wed, 19 Oct 2022 06:02:36 +0000 (08:02 +0200)]
* lib-src/rcs2log: Add fallback for $TMPDIR.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 19 Oct 2022 04:31:16 +0000 (06:31 +0200)]
Merge from origin/emacs-28

efd3ef3ceb ; * src/window.c: Fix some comments.  (Bug#58550)

2 years ago; * src/xterm.c (mark_xterm): Fix x11 with i18n build
Randy Taylor [Tue, 18 Oct 2022 01:29:30 +0000 (21:29 -0400)]
; * src/xterm.c (mark_xterm): Fix x11 with i18n build

2 years ago(sit-for): Add compiler-macro to warn about obsolete calling convention
Stefan Monnier [Tue, 18 Oct 2022 22:43:50 +0000 (18:43 -0400)]
(sit-for): Add compiler-macro to warn about obsolete calling convention

* lisp/subr.el (sit-for): Add compiler-macro.
* lisp/eshell/esh-util.el (eshell-redisplay):
* lisp/play/zone.el (zone, zone-pgm-jitter, zone-pgm-whack-chars):
(zone-remove-text): Avoid obsolete calling convention.

2 years agoFix functions.texi syntax error
Lars Ingebrigtsen [Tue, 18 Oct 2022 20:17:12 +0000 (22:17 +0200)]
Fix functions.texi syntax error

* doc/lispref/functions.texi (Function Documentation): Fix syntax
error.

2 years agofunctions.texi: Fix bug#58602
Stefan Monnier [Tue, 18 Oct 2022 20:06:42 +0000 (16:06 -0400)]
functions.texi: Fix bug#58602

* doc/lispref/functions.texi (Function Documentation): Document
`:documentation` and `function-documentation`.

2 years ago* lisp/outline.el (outline-minor-mode-insert-buttons): New defvar-local.
Juri Linkov [Tue, 18 Oct 2022 18:13:29 +0000 (21:13 +0300)]
* lisp/outline.el (outline-minor-mode-insert-buttons): New defvar-local.

(outline--make-button-overlay, outline--insert-open-button)
(outline--insert-close-button): Insert button when
outline-minor-mode-insert-buttons is non-nil, otherwise
put an overlay with before-string.  (bug#57813)

* lisp/help.el (describe-bindings): Set buffer-local
outline-minor-mode-insert-buttons to t.

* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Set buffer-local outline-minor-mode-use-margins to t.  Don't set
outline-regexp for leading spaces because now spaces are not added
in the NEWS buffer.

2 years ago* lisp/outline.el: Use one character wide strings for margins (bug#57813)
Juri Linkov [Tue, 18 Oct 2022 18:05:15 +0000 (21:05 +0300)]
* lisp/outline.el: Use one character wide strings for margins (bug#57813)

(outline-open-in-margins, outline-close-in-margins)
(outline-close-rtl-in-margins): Add 1-char emoji, symbol, text
for margins that are 1-column wide.
(outline-minor-mode): Force display of margins only for the selected buffer.

2 years ago* lisp/net/tramp.el (tramp-file-name-equal-p): Fix docstring.
Michael Albinus [Tue, 18 Oct 2022 17:39:34 +0000 (19:39 +0200)]
* lisp/net/tramp.el (tramp-file-name-equal-p): Fix docstring.

2 years ago* etc/NEWS: Adapt connection-local variables entries.
Michael Albinus [Tue, 18 Oct 2022 17:39:23 +0000 (19:39 +0200)]
* etc/NEWS: Adapt connection-local variables entries.

2 years ago* .gitignore: Unignore the tests/manual directory. (Bug#58611)
Matt Armstrong [Tue, 18 Oct 2022 15:29:49 +0000 (08:29 -0700)]
* .gitignore: Unignore the tests/manual directory.  (Bug#58611)

2 years ago(byte-compile--first-symbol-with-pos): Fix bug#58601
Stefan Monnier [Tue, 18 Oct 2022 14:49:43 +0000 (10:49 -0400)]
(byte-compile--first-symbol-with-pos): Fix bug#58601

* lisp/emacs-lisp/bytecomp.el: Require `subr-x`.
(byte-compile--first-symbol-with-pos): Avoid inf-loops on circular data.

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Tue, 18 Oct 2022 11:17:59 +0000 (13:17 +0200)]
Regenerated ldefs-boot.el

2 years agoFix previous loaddefs-gen fix
Lars Ingebrigtsen [Tue, 18 Oct 2022 11:17:52 +0000 (13:17 +0200)]
Fix previous loaddefs-gen fix

2 years agoFix faulty loaddefs detection
Lars Ingebrigtsen [Tue, 18 Oct 2022 11:14:08 +0000 (13:14 +0200)]
Fix faulty loaddefs detection

* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--emacs-batch): Fix faulty loaddefs detection.

2 years ago* lisp/progmodes/cc-defs.el Remove setting of inhibit-point-motion-hooks
Alan Mackenzie [Tue, 18 Oct 2022 10:00:26 +0000 (10:00 +0000)]
* lisp/progmodes/cc-defs.el Remove setting of inhibit-point-motion-hooks

2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Tue, 18 Oct 2022 09:18:16 +0000 (11:18 +0200)]
Regenerate ldefs-boot.el

2 years ago* Prevent potential native compilation infinite recursions
Andrea Corallo [Fri, 14 Oct 2022 22:59:55 +0000 (00:59 +0200)]
* Prevent potential native compilation infinite recursions

* lisp/emacs-lisp/comp.el (comp-no-spawn): New var.
(comp-subr-trampoline-install, comp-final, comp-run-async-workers)
(comp--native-compile): Update.

2 years ago; Fix some invalid Eshell syntax in an example
Jim Porter [Tue, 18 Oct 2022 04:25:37 +0000 (21:25 -0700)]
; Fix some invalid Eshell syntax in an example

* doc/misc/eshell.texi (Expansion):
* etc/NEWS: Fix invalid Eshell syntax.

2 years agoPrint the correct $PATH when Eshell's 'which' fails to find a command
Jim Porter [Thu, 15 Sep 2022 19:32:02 +0000 (12:32 -0700)]
Print the correct $PATH when Eshell's 'which' fails to find a command

* lisp/eshell/esh-cmd.el (eshell/which): Use 'eshell-get-path'
(bug#20008).

2 years agoImprove handling of $PATH in Eshell for remote directories
Jim Porter [Thu, 15 Sep 2022 19:24:37 +0000 (12:24 -0700)]
Improve handling of $PATH in Eshell for remote directories

* lisp/eshell/esh-util.el (eshell-path-env, eshell-parse-colon-path):
Make obsolete.
(eshell-path-env-list): New variable.
(eshell-connection-default-profile): New connection-local profile.
(eshell-get-path): Reimplement using 'eshell-path-env-list'; add
LITERAL-P argument.
(eshell-set-path): New function.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Add entry for
$PATH.
(eshell-var-initialize): Add 'eshell-path-env-list' to
'eshell-subcommand-bindings'.

* lisp/eshell/esh-ext.el (eshell-search-path): Use 'file-name-concat'
instead of 'concat'.
(eshell/addpath): Use 'eshell-get-path' and 'eshell-set-path'.

* lisp/net/tramp-integration.el: Only apply Eshell hooks when
'eshell-path-env-list' is unbound.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/path-var/local-directory)
(esh-var-test/path-var/remote-directory, esh-var-test/path-var/set)
(esh-var-test/path-var/set-locally)
(esh-var-test/path-var-preserve-across-hosts): New tests.

* test/lisp/eshell/esh-ext-tests.el: New file.

* test/lisp/eshell/eshell-tests-helpers.el
(with-temp-eshell): Set 'eshell-last-dir-ring-file-name' to nil.
(eshell-tests-remote-accessible-p, eshell-last-input)
(eshell-last-output): New functions.
(eshell-match-output, eshell-match-output--explainer): Use
'eshell-last-input' and 'eshell-last-output'.

* doc/misc/eshell.texi (Variables): Document $PATH.

* etc/NEWS: Announce this change (bug#57556).

2 years agoAllow setting the values of variable aliases in Eshell
Jim Porter [Mon, 26 Sep 2022 04:47:26 +0000 (21:47 -0700)]
Allow setting the values of variable aliases in Eshell

This makes commands like "COLUMNS=40 some-command" work as expected.

* lisp/eshell/esh-cmd.el (eshell-subcommand-bindings): Remove
'process-environment' from here...

* lisp/eshell/esh-var.el (eshell-var-initialize): ... and add to here,
along with 'eshell-variable-aliases-list'.
(eshell-inside-emacs): Convert to a 'defvar-local' to make it settable
in a particular Eshell buffer.
(eshell-variable-aliases-list): Make $?, $$, and $* read-only and
update docstring.
(eshell-set-variable): New function...
(eshell-handle-local-variables, eshell/export, eshell/unset): ... use
it.
(eshell/set, pcomplete/eshell-mode/set): New functions.
(eshell-get-variable): Get the variable alias's getter function when
appropriate and use a safer method for checking function arity.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/set/env-var)
(esh-var-test/set/symbol, esh-var-test/unset/env-var)
(esh-var-test/unset/symbol, esh-var-test/setq, esh-var-test/export)
(esh-var-test/local-variables, esh-var-test/alias/function)
(esh-var-test/alias/function-pair, esh-var-test/alias/string)
(esh-var-test/alias/string/prefer-lisp, esh-var-test/alias/symbol)
(esh-var-test/alias/symbol-pair, esh-var-test/alias/export)
(esh-var-test/alias/local-variables): New tests.

* doc/misc/eshell.texi (Built-ins): Add 'set' and update 'unset'
documentation.
(Variables): Expand documentation of how to get/set variables.

2 years ago; Obsolete 'eshell/define'
Jim Porter [Wed, 28 Sep 2022 16:34:38 +0000 (09:34 -0700)]
; Obsolete 'eshell/define'

* lisp/eshell/esh-var.el (eshell/define): Make obsolete, and explain
its current state.

* doc/misc/eshell.texi (Built-ins): Remove 'define'.

2 years ago; Allow ignoring errors when calling 'eshell-match-command-output'
Jim Porter [Sun, 25 Sep 2022 01:13:03 +0000 (18:13 -0700)]
; Allow ignoring errors when calling 'eshell-match-command-output'

* test/lisp/eshell/eshell-tests-helpers.el
(eshell-match-command-output): New argument IGNORE-ERRORS.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/last-status-var-lisp-command)
(esh-var-test/last-status-var-lisp-form)
(esh-var-test/last-status-var-lisp-form-2): Ignore errors when calling
'eshell-match-command-output'.

2 years agoAdd helpers to dynamically assign connection-local values
Jim Porter [Wed, 12 Oct 2022 05:11:04 +0000 (22:11 -0700)]
Add helpers to dynamically assign connection-local values

* lisp/files-x.el (connection-local-criteria)
(connection-local-profile-name-for-setq): New variables.
(with-connection-local-variables-1): ... let-bind them here.
(connection-local-update-profile-variables)
(connection-local-profile-name-for-criteria): New functions.
(with-connection-local-application-variables, setq-connection-local):
New macros.

* test/lisp/files-x-tests.el: Require 'tramp-integration'
(files-x-test--variable5, remote-lazy-var): New variables.
(files-x-test-hack-connection-local-variables-apply): Expand checks.
(files-x-test-with-connection-local-variables): Remove
'hack-connection-local-variables-apply' check (it belongs in the above
test), and expand some other checks.
(files-x-test--get-lazy-var, files-x-test--set-lazy-var): New
functions.
(files-x-test-connection-local-update-profile-variables)
(files-x-test-setq-connection-local): New tests.

* doc/lispref/variables.texi (Connection Local Variables): Split into
two subsections and document the new features.

* etc/NEWS: Announce 'setq-connection-local'.

2 years ago; Remove over-quoting of :application values in connection-local variables
Jim Porter [Wed, 12 Oct 2022 18:28:05 +0000 (11:28 -0700)]
; Remove over-quoting of :application values in connection-local variables

* test/lisp/files-x-tests.el (files-x-test--application)
(files-x-test--another-application):
* doc/lispref/variables.texi (Connection Local Variables): Remove
extra quotes.

2 years agoImprove ‘random’ doc re nonces
Paul Eggert [Mon, 17 Oct 2022 04:35:47 +0000 (21:35 -0700)]
Improve ‘random’ doc re nonces

* doc/lispref/numbers.texi (Random Numbers): Improve coverage of
random seed, entropy pools, and why one shouldn’t use ‘random’ for
nonces.  See Bug#58472.

2 years agoFix bug#58584
Po Lu [Tue, 18 Oct 2022 00:52:01 +0000 (08:52 +0800)]
Fix bug#58584

* src/xterm.c (x_handle_selection_monitor_event): Return if
selection event is one Emacs asked for.
(handle_one_xevent): In that case, drop the event and don't let
it reach GTK.

2 years ago; Fix comment
Dmitry Gutov [Mon, 17 Oct 2022 23:49:21 +0000 (02:49 +0300)]
; Fix comment

2 years agoFollow-up fixes for vc-default-checkin-patch
Dmitry Gutov [Mon, 17 Oct 2022 23:33:43 +0000 (02:33 +0300)]
Follow-up fixes for vc-default-checkin-patch

* lisp/vc/vc.el (vc-default-checkin-patch):
Call vc-revert-file on buffer-file-name (vc-backend failed on
relative name sometimes).  Delete the tmp dir after copying all
files back, not just the first one.  Bug#52349,
https://lists.gnu.org/archive/html/emacs-devel/2022-10/msg01446.html.

2 years agoCC Mode: Don't fontify as types variables with the same names as struct tags
Alan Mackenzie [Mon, 17 Oct 2022 20:33:26 +0000 (20:33 +0000)]
CC Mode: Don't fontify as types variables with the same names as struct tags

This fixes bug #58534.

* lisp/progmodes/cc-engine.el (c-forward-type): Only regard "struct" keywords
which create self contained types (e.g. C++'s "typename") as creating found
types.

* lisp/progmodes/cc-langs.el (c-self-contained-typename-kwds
(c-self-contained-typename-key): New language consts and variable.

2 years agoPrefer defvar-keymap in fortran.el
Stefan Kangas [Mon, 17 Oct 2022 18:21:05 +0000 (20:21 +0200)]
Prefer defvar-keymap in fortran.el

* lisp/progmodes/fortran.el (fortran-mode-map): Prefer
defvar-keymap.

2 years agoUpdate version information in Gnus manual
Stefan Kangas [Mon, 17 Oct 2022 18:10:40 +0000 (20:10 +0200)]
Update version information in Gnus manual

* doc/misc/gnus.texi (Gnus Versions): Update with some information
from https://www.gnus.org/history.html
(Ma Gnus): Explain that Gnus is now developed together with
Emacs.  (Bug#58161)

2 years agoSilence recent comp-tests.el lexvar warnings
Basil L. Contovounesios [Mon, 17 Oct 2022 15:40:45 +0000 (18:40 +0300)]
Silence recent comp-tests.el lexvar warnings

* test/lisp/emacs-lisp/comp-tests.el: Mark used native-compile
variables as special to pacify unknown lexvar warnings in the
default build.
(with-test-native-compile-prune-cache): Instrument macro arguments
for debugging and indent conventionally.  Reindent all callers.
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Simplify file name expansion.

2 years agoImprove native-compile-prune-cache messages
Stefan Kangas [Mon, 17 Oct 2022 13:26:56 +0000 (15:26 +0200)]
Improve native-compile-prune-cache messages

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Quote name of
pruned directory.

2 years agoDon't prune *.eln files in parent of eln-load-path
Stefan Kangas [Mon, 17 Oct 2022 13:26:21 +0000 (15:26 +0200)]
Don't prune *.eln files in parent of eln-load-path

* lisp/emacs-lisp/comp.el (native-compile-prune-cache): Don't
prune *.eln files in parent directory of `native-comp-eln-load-path'.
* test/lisp/emacs-lisp/comp-tests.el
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
New test.

2 years agoAdd tests for native-compile-prune-cache
Stefan Kangas [Mon, 17 Oct 2022 08:37:08 +0000 (10:37 +0200)]
Add tests for native-compile-prune-cache

* test/lisp/comp-tests.el: New file.

2 years agoFix pieces of code being too expensive over slow network connections
Po Lu [Mon, 17 Oct 2022 12:56:20 +0000 (20:56 +0800)]
Fix pieces of code being too expensive over slow network connections

* lisp/menu-bar.el (menu-bar-edit-menu): Test buffer-read-only
before gui-backend-selection-exists-p.  This places the less
expensive condition before the more expensive one.
* src/xfns.c (compute_tip_xy): Use cached monitor attributes
whenever available.
(Fx_show_tip): Remove code that really did nothing.
(Fx_backspace_delete_keys_p): Do not download the entire keymap
from the server upon creating a frame.
* src/xmenu.c (create_and_show_popup_menu): Use
x_translate_coordinates_to_root.
(x_menu_show): Use x_translate_coordinates_to_root.
* src/xselect.c (Fx_selection_exists_p): If a temporary
selection owner can be found, use it.
* src/xterm.c (x_translate_coordinates_to_root)
(x_handle_selection_monitor_event, x_find_selection_owner): New
functions.  These functions try to avoid downloading data from
the X server in places that are called very often (i.e. during
tool bar updates.)
(handle_one_xevent): Handle selection notify events.  Also catch
some mistakes found.  Fetch all kinds of key names as well.
(x_create_special_window): New function.
(x_term_init, x_delete_display): Ask for all key names.  Also,
passively monitor selections that are given to
`x-selection-exists-p' during redisplay, so we do not have to
ask the server about them upon each redisplay.
(syms_of_xterm): New variable `x-fast-selection-list'.
* src/xterm.h (struct x_monitored_selection): New structure.
(X_INVALID_WINDOW): New define.
(struct x_display_info): New fields for selection monitoring.
Also, record the fixes extension base.

2 years agoFix spurious "Compilation finished" native-comp messages
Lars Ingebrigtsen [Mon, 17 Oct 2022 12:30:54 +0000 (14:30 +0200)]
Fix spurious "Compilation finished" native-comp messages

* lisp/emacs-lisp/comp.el (native--compile-async): Don't start the
async compilation if we didn't add anything.  This avoids spurious
"Compilation finished" messages in the *Async* buffer when it
turned out that all the files we considered nativecomping were
skipped.

2 years ago; * src/window.c: Fix some comments. (Bug#58550)
Manuel Giraud [Sat, 15 Oct 2022 16:58:56 +0000 (18:58 +0200)]
; * src/window.c: Fix some comments.  (Bug#58550)

2 years agoAvoid having the async compile log saying it's compiling loaddefs
Lars Ingebrigtsen [Mon, 17 Oct 2022 08:48:12 +0000 (10:48 +0200)]
Avoid having the async compile log saying it's compiling loaddefs

* lisp/loadup.el (featurep): Define the hash table in nativecomp
builds (but not otherwise).  A more natural place to define this
would be in comp.el, but comp.el isn't loaded yet when we load the
.elc file that updates comp--no-native-compile.  We could change
the load order and move the definition to comp.el, though.

* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Allow
inhibiting nativecomp earlier (bug#57627).

* lisp/emacs-lisp/comp.el (native-compile-async-skip-p): Use the data.

2 years agoMake `message-canlock-generate' faster
Stefan Kangas [Mon, 17 Oct 2022 06:01:51 +0000 (08:01 +0200)]
Make `message-canlock-generate' faster

* lisp/gnus/message.el (message-canlock-generate): Improve performance
by several orders of magnitude.

2 years agoAdd default implementation for 'checkin-patch'
Dmitry Gutov [Sun, 16 Oct 2022 23:46:02 +0000 (02:46 +0300)]
Add default implementation for 'checkin-patch'

* lisp/vc/vc.el (vc-default-checkin-patch):
Add default implementation for 'checkin-patch' (bug#52349).
The first attempt was here:
https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg01464.html

2 years agocl-generic: Fix `advertised-calling-convention` declarations
Stefan Monnier [Sun, 16 Oct 2022 16:01:47 +0000 (12:01 -0400)]
cl-generic: Fix `advertised-calling-convention` declarations

* lisp/emacs-lisp/cl-generic.el (cl-generic-define-method):
Preserve the `advertised-calling-convention`, if any (bug#58563).

* lisp/subr.el (declare): Warn when we hit this.

* lisp/emacs-lisp/byte-run.el (get-advertised-calling-convention): New fun.
* lisp/progmodes/elisp-mode.el (elisp-get-fnsym-args-string):
* lisp/help-fns.el (help-fns--signature):
* lisp/emacs-lisp/bytecomp.el (byte-compile-fdefinition): Use it.

* test/lisp/emacs-lisp/cl-generic-tests.el (cl-generic-tests--acc): New fun.
(cl-generic-tests--advertised-calling-convention-bug58563): New test.

2 years agoMove and rename Python completion ERTs
kobarity [Sun, 16 Oct 2022 13:26:29 +0000 (15:26 +0200)]
Move and rename Python completion ERTs

* test/lisp/progmodes/python-tests.el
(python-shell-completion-at-point-1)
(python-shell-completion-at-point-native-1)
(python-completion-at-point-1)
(python-completion-at-point-2, python-completion-at-point-pdb-1)
(python-completion-at-point-native-1)
(python-completion-at-point-native-2)
(python-completion-at-point-native-with-ffap-1)
(python-completion-at-point-native-with-eldoc-1): Renamed tests
(bug#58565).

2 years agoPrefer defvar-keymap in ansi-osc.el
Stefan Kangas [Sun, 16 Oct 2022 11:53:37 +0000 (13:53 +0200)]
Prefer defvar-keymap in ansi-osc.el

* lisp/ansi-osc.el (ansi-osc-hyperlink-map): Prefer defvar-keymap.

2 years agoMake help-for-help echo key on failure
Stefan Kangas [Sun, 16 Oct 2022 11:02:24 +0000 (13:02 +0200)]
Make help-for-help echo key on failure

* lisp/help-macro.el (make-help-screen): Echo key on failure.

2 years agoBind "home"/"end" in help-for-help
Stefan Kangas [Sun, 16 Oct 2022 11:01:00 +0000 (13:01 +0200)]
Bind "home"/"end" in help-for-help

* lisp/help-macro.el (make-help-screen): Bind "home"/"end" keys to
scrolling up/down.

2 years agoDon't ding when exiting help-for-help with C-g
Stefan Kangas [Sun, 16 Oct 2022 10:59:13 +0000 (12:59 +0200)]
Don't ding when exiting help-for-help with C-g

* lisp/help-macro.el (make-help-screen): Don't ding on "C-g".

2 years agoClear misleading message in help-quit-or-quick
Lars Ingebrigtsen [Sun, 16 Oct 2022 09:52:56 +0000 (11:52 +0200)]
Clear misleading message in help-quit-or-quick

* lisp/help.el (help-quit-or-quick): Clear misleading message
(bug#58542).

2 years ago; * lisp/vc/vc.el (vc-prepare-patch): Fix pluralisation
Philip Kaludercic [Sun, 16 Oct 2022 09:16:52 +0000 (11:16 +0200)]
; * lisp/vc/vc.el (vc-prepare-patch): Fix pluralisation

2 years ago; * lisp/vc/vc.el (vc-prepare-patch): Remove 'exit-recursive-edit'
Philip Kaludercic [Sun, 16 Oct 2022 09:10:34 +0000 (11:10 +0200)]
; * lisp/vc/vc.el (vc-prepare-patch): Remove 'exit-recursive-edit'

2 years agoFix invalid search bound error in python-shell-completion-at-point
kobarity [Sun, 16 Oct 2022 09:26:29 +0000 (11:26 +0200)]
Fix invalid search bound error in python-shell-completion-at-point

* lisp/progmodes/python.el (python-shell-completion-at-point): Add
check if point is before line-start.
* test/lisp/progmodes/python-tests.el (python-shell-completion-shell-buffer-1)
(python-shell-completion-shell-buffer-native-1): New tests
(bug#58548).

2 years agoSignal an error in dictionary lookup if there's no word at point
Daniel Martín [Sun, 16 Oct 2022 09:25:17 +0000 (11:25 +0200)]
Signal an error in dictionary lookup if there's no word at point

* lisp/net/dictionary.el (dictionary-lookup-definition): Signal an
error when there is no word at point (bug#58552).

2 years agoDisable completion when PDB is active in Python Shell buffer
kobarity [Sun, 16 Oct 2022 09:15:22 +0000 (11:15 +0200)]
Disable completion when PDB is active in Python Shell buffer

* lisp/progmodes/python.el (python-shell-completion-at-point): Disable
completion in Python buffer when PDB is active in Python Shell buffer.
* test/lisp/progmodes/python-tests.el (python-shell-completion-pdb-1):
New test (bug#58562).

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 16 Oct 2022 06:27:16 +0000 (08:27 +0200)]
Merge from origin/emacs-28

067361f3a2 ; Improve documentation of 'C-M-i'
fdb6f7cf26 ; Fix documentation of 'comp-enable-subr-trampolines'
be30369e01 ; Avoid incorrect indentation in an @example.
4bd3dd505e Document how to control where the *.eln files are written
b7d7c2d9e9 Add cross-reference to alternative syntaxes for Unicode

# Conflicts:
# doc/emacs/custom.texi

2 years agoExpand 'random' testsuite
Stefan Kangas [Sun, 16 Oct 2022 06:23:35 +0000 (08:23 +0200)]
Expand 'random' testsuite

* test/src/fns-tests.el (ert): Require.
(fns-tests-random): Expand test.

2 years agoAdapt last change to Haiku port
Po Lu [Sun, 16 Oct 2022 06:19:12 +0000 (06:19 +0000)]
Adapt last change to Haiku port

* src/haikuterm.c (haiku_frame_up_to_date):
(haiku_clear_frame):
(haiku_update_begin):
(haiku_flush):
(haiku_flush_dirty_back_buffer_on):
(haiku_read_socket):
* src/haikuterm.h (struct haiku_output):
(FRAME_COMPLETE_P): Synchronize logic with X.

2 years ago; Improve documentation of 'C-M-i'
Eli Zaretskii [Sun, 16 Oct 2022 06:10:14 +0000 (09:10 +0300)]
; Improve documentation of 'C-M-i'

* doc/emacs/programs.texi (Symbol Completion): Remove redundant
text, rephrase, and improve indexing and markup.

2 years agoFix multiple sources of flicker under X
Po Lu [Sun, 16 Oct 2022 06:02:31 +0000 (14:02 +0800)]
Fix multiple sources of flicker under X

Fix three kinds of flicker.  The first is if you do:

  (while t (sit-for 1) (redraw-display))

and press a key, the frame will turn blank until you C-g.  The
second is where handling async input happens in the middle of
drawing and causes a buffer flip to happen.  The third is where
unmapping the hourglass window causes exposures.

* src/dispnew.c (redraw_frame): Garbage the frame if it is a
window system frame.
* src/xterm.c (x_update_begin): Clear complete flag.
(x_flip_and_flush, XTframe_up_to_date): Set complete flag.
(x_show_hourglass): Fix hourglass window class.
(flush_dirty_back_buffer_on): Rename to
x_flush_dirty_back_buffer_on.
(x_flush_dirty_back_buffer_on): Check if the frame is complete
before trying to flip.
(handle_one_xevent): Flush frames in a more detailed fashion.
* src/xterm.h (struct x_output): New flag `complete'.
(FRAME_X_COMPLETE_P): New macro.

2 years agoFix ‘make bootstrap’ when the *.m4 files change
Paul Eggert [Sat, 15 Oct 2022 18:59:11 +0000 (11:59 -0700)]
Fix ‘make bootstrap’ when the *.m4 files change

This should help avoid problems like Bug#58535.
* Makefile.in (bootstrap-clean): Also remove autom4te.cache.

2 years agoMinor Tramp fixes
Michael Albinus [Sat, 15 Oct 2022 16:21:13 +0000 (18:21 +0200)]
Minor Tramp fixes

* lisp/net/tramp-sh.el (tramp-perl-id): Fix Perl script.
(tramp-sh-handle-expand-file-name):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-expand-file-name):
Check, that there's really a Tramp file name.

2 years ago* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined
Philip Kaludercic [Fri, 14 Oct 2022 22:06:25 +0000 (00:06 +0200)]
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Use --no-undefined

2 years ago* lisp/vc/vc-git.el (vc-git-symbolic-commit): Add argument FORCE
Philip Kaludercic [Thu, 13 Oct 2022 20:29:23 +0000 (22:29 +0200)]
* lisp/vc/vc-git.el (vc-git-symbolic-commit): Add argument FORCE

(Bug#57400)

2 years ago* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits
Philip Kaludercic [Tue, 11 Oct 2022 19:11:20 +0000 (21:11 +0200)]
* lisp/vc/vc-git.el (vc-git--rev-parse): Allow abbreviating commits

* lisp/vc/vc-git.el (vc-git-working-revision): Use abbreviated comment
references.  (Bug#57400)

2 years agoHandle ;;;###theme-autoload comments in etc/themes
Philip Kaludercic [Thu, 13 Oct 2022 08:43:36 +0000 (10:43 +0200)]
Handle ;;;###theme-autoload comments in etc/themes

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--emacs-batch):
Extract the autoloads and have them loaded along with loaddefs.el.
* etc/NEWS: Mention the new feature.  (Bug#57639)

2 years agoTag themes with properties
Philip Kaludercic [Sat, 17 Sep 2022 18:11:42 +0000 (20:11 +0200)]
Tag themes with properties

* doc/emacs/custom.texi (Custom Themes): Document 'theme-choose-variant'.
* doc/lispref/customize.texi (Custom Themes): Document the new
optional argument to 'deftheme'.
(Autoload): Mention that 'deftheme' is not copied verbatim.
* etc/themes/adwaita-theme.el (adwaita): Add properties.
* etc/themes/deeper-blue-theme.el (deeper-blue): Add properties.
* etc/themes/dichromacy-theme.el (dichromacy): Add properties.
* etc/themes/light-blue-theme.el (light-blue): Add properties.
* etc/themes/manoj-dark-theme.el (manoj-dark): Add properties.
* etc/themes/misterioso-theme.el (misterioso): Add properties.
* etc/themes/tango-dark-theme.el (tango-dark): Add properties.
* etc/themes/tango-theme.el (tango): Add properties.
* etc/themes/tsdh-dark-theme.el (tsdh-dark): Add properties.
* etc/themes/tsdh-light-theme.el (tsdh-light): Add properties.
* etc/themes/wheatgrass-theme.el (wheatgrass): Add properties.
* etc/themes/whiteboard-theme.el (whiteboard): Add properties.
* etc/themes/wombat-theme.el (wombat): Add properties.
* etc/themes/modus-operandi-theme.el: Add properties.
* etc/themes/modus-vivendi-theme.el: Add properties.
* etc/themes/leuven-dark-theme.el (leuven-dark): Add properties.
* etc/themes/leuven-theme.el (leuven): Add properties.
* lisp/custom.el (deftheme): Allow for optional arguments to set the
property list.
(custom-declare-theme): Accept the same optional arguments as 'deftheme'.
(theme-list-variants): Add new function.
(theme-choose-variant): Add new command for switching between members
of a theme family.
(toggle-theme): Add an alias for 'theme-choose-variant'.
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--make-autoload):
Handle 'defcustom's by extracting the properties.  (Bug#57639)

2 years ago; Fix message-server-alist :type (Bug#58546)
Mauro Aranda [Sat, 15 Oct 2022 13:56:43 +0000 (10:56 -0300)]
; Fix message-server-alist :type (Bug#58546)

2 years ago; Improve message text in xref.el
Eli Zaretskii [Sat, 15 Oct 2022 11:43:21 +0000 (14:43 +0300)]
; Improve message text in xref.el

* lisp/progmodes/xref.el (xref--query-replace-1): Improve text of
user-error.

2 years agoAdd no-byte-compile to the ".dir-locals.el" auto-insert template
Stefan Kangas [Sat, 15 Oct 2022 11:07:29 +0000 (13:07 +0200)]
Add no-byte-compile to the ".dir-locals.el" auto-insert template

* lisp/autoinsert.el (auto-insert-alist): Add the no-byte-compile
cookie to the ".dir-locals.el" template.

2 years ago; Prefer HTTPS to HTTP in many URLs
Stefan Kangas [Sat, 15 Oct 2022 09:17:51 +0000 (11:17 +0200)]
; Prefer HTTPS to HTTP in many URLs

2 years ago; Delete commented out reference to ancient org-mode
Stefan Kangas [Sat, 15 Oct 2022 10:32:11 +0000 (12:32 +0200)]
; Delete commented out reference to ancient org-mode

* doc/misc/remember.texi (Org): Delete commented out reference to an
ancient version of org-mode.

2 years agoDelete broken link to Network Theory Ltd.
Stefan Kangas [Sat, 15 Oct 2022 08:52:13 +0000 (10:52 +0200)]
Delete broken link to Network Theory Ltd.

Sadly, their website has been down for several months already.
I was unable to find a new link, but it seems like they haven't
published anything new for over a decade.
* doc/misc/org.org (Summary): Remove broken link to Network Theory Ltd.

2 years agoFix encoding and decoding of process I/O in Eshell on Windows
Eli Zaretskii [Sat, 15 Oct 2022 10:59:49 +0000 (13:59 +0300)]
Fix encoding and decoding of process I/O in Eshell on Windows

* lisp/eshell/esh-proc.el (eshell-gather-process-output): Set up
encoding and decoding of text to/from the subprocess for
MS-Windows.  (Bug#58281)

2 years ago; Fix documentation of ecomplete
Eli Zaretskii [Sat, 15 Oct 2022 09:52:49 +0000 (12:52 +0300)]
; Fix documentation of ecomplete

* lisp/ecomplete.el (ecomplete-sort-predicate)
(ecomplete-filter-regexp, ecomplete-edit, ecomplete-remove): Doc
fixes.

* etc/NEWS: Fix wording of the 'ecomplete-filter-regexp' entry.

2 years ago; Fix documentation of 'comp-enable-subr-trampolines'
Eli Zaretskii [Sat, 15 Oct 2022 09:15:17 +0000 (12:15 +0300)]
; Fix documentation of 'comp-enable-subr-trampolines'

* src/comp.c (syms_of_comp) <comp-enable-subr-trampolines>:
Explain better what it means to disable trampoline synthesis.

2 years agoRemove redundant call to expensive function XOpenDisplay
Po Lu [Sat, 15 Oct 2022 08:25:22 +0000 (16:25 +0800)]
Remove redundant call to expensive function XOpenDisplay

* src/xterm.c (x_term_init): Speed up opening Emacs over a slow
network connection by an order of magnitude on no toolkit builds
by avoiding a redundant call to XOpenDisplay.

2 years ago; Avoid incorrect indentation in an @example.
Eli Zaretskii [Sat, 15 Oct 2022 07:44:12 +0000 (10:44 +0300)]
; Avoid incorrect indentation in an @example.

* doc/lispref/modes.texi (Search-based Fontification): Avoid
incorrect indentation in an @example.  Reported by Akib Azmain
Turja <akib@disroot.org>.

2 years agoFix XDS file name expansion
Po Lu [Sat, 15 Oct 2022 05:27:05 +0000 (13:27 +0800)]
Fix XDS file name expansion

* lisp/x-dnd.el (x-dnd-handle-xds-drop): Expand file names
again.  That code was mistakenly removed.

2 years ago; improve test coverage of time-stamp-pattern parsing
Stephen Gildea [Sat, 15 Oct 2022 03:46:38 +0000 (20:46 -0700)]
; improve test coverage of time-stamp-pattern parsing

* test/lisp/time-stamp-tests.el (time-stamp-test-pattern-multiply,
time-stamp-test-pattern-sequential): broaden range of test data

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Sat, 15 Oct 2022 03:07:35 +0000 (05:07 +0200)]
; Auto-commit of loaddefs files.

2 years agoUse file-size-human-readable in memory-report--format
Stefan Kangas [Sat, 15 Oct 2022 01:02:17 +0000 (03:02 +0200)]
Use file-size-human-readable in memory-report--format

* lisp/emacs-lisp/memory-report.el (memory-report--format): Use
file-size-human-readable.

2 years agoUpdate image-circular-tests.el
Basil L. Contovounesios [Mon, 3 Oct 2022 20:34:07 +0000 (23:34 +0300)]
Update image-circular-tests.el

* test/manual/image-circular-tests.el
(image-test-duplicate-keywords): Skip unless images are supported.
(image-test-circular-plist, image-test-:type-property-value): Ditto.
Wrap only failing forms in should[-error] rather than entire test
bodies.  Use simpler printed notation in place of function calls.
(image-test-circular-specs): Ditto.  Wrap overly wide docstring.
Mark as failing since shortly after its introduction (bug#36403#63).

2 years agoRename `file-attribute-file-number' to `file-attribute-file-identifier'
Michael Albinus [Fri, 14 Oct 2022 19:32:15 +0000 (21:32 +0200)]
Rename `file-attribute-file-number' to `file-attribute-file-identifier'

* doc/lispref/files.texi (File Attributes):
* etc/NEWS:
* lisp/files.el (find-buffer-visiting, find-file-noselect)
(set-visited-file-name, basic-save-buffer)
(file-attribute-file-identifier):
* lisp/startup.el (normal-top-level-add-subdirs-to-load-path):
* lisp/eshell/em-unix.el (eshell-shuffle-files):
* src/dired.c (Ffile_attributes):
Rename `file-attribute-file-number' to `file-attribute-file-identifier'.

2 years agoDocument how to control where the *.eln files are written
Eli Zaretskii [Fri, 14 Oct 2022 18:57:18 +0000 (21:57 +0300)]
Document how to control where the *.eln files are written

* doc/lispref/compile.texi (Native Compilation): Document the
trick of pointing $HOME to a non-existent directory.
(Native-Compilation Variables): Document the role of
'native-comp-eln-load-path' in determining where *.eln files are
written.

2 years agoCorrectly fontify C++'s operator"" _tag (...)
Alan Mackenzie [Fri, 14 Oct 2022 17:40:26 +0000 (17:40 +0000)]
Correctly fontify C++'s operator"" _tag (...)

Give both the "" and _tag font-lock-function-name-face.  Also correct the
fontification of an inherited class name when there is an attribute between
the class name being declared and the colon introducing the inheritance.

* lisp/progmodes/cc-engine.el (c-forward-over-colon-type-list): New function.
(c-forward-keyword-clause): Use the above new function instead of a
looking-at.
(c-forward-name, c-forward-declarator): Accept both the "" and the tag as part
of the name.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarators): Fontify the "" (which
already has font-lock-string-face) and the tag with
font-lock-function-name-face.

* lisp/progmodes/cc-langs.el (c-overloadable-operators): Add "" to this list.
(c-sub-colon-type-list-re): New lang-const and lang-var.

2 years agoAdd a quick-help menu
Philip Kaludercic [Sat, 17 Sep 2022 14:52:01 +0000 (16:52 +0200)]
Add a quick-help menu

* lisp/help.el (help-map): Bind 'help-quit-or-quick' instead of 'help-quit'.
(help-quick-sections): Add variable.
(help-quick): Add main command.
(cheat-sheet): Add alias for 'help-quick'.
(help-quit-or-quick): Add auxiliary command.
lisp/help.el (help-for-help):  Mention 'help-quit-or-quick'.
* etc/NEWS (https): Mention 'help-quit'.

2 years ago* lisp/net/rcirc.el (rcirc-bridged-nick): Inherit from highlight
Philip Kaludercic [Fri, 14 Oct 2022 07:39:45 +0000 (09:39 +0200)]
* lisp/net/rcirc.el (rcirc-bridged-nick): Inherit from highlight