]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months ago; Merge from origin/emacs-29
Eli Zaretskii [Thu, 8 Dec 2022 17:51:54 +0000 (12:51 -0500)]
; Merge from origin/emacs-29

The following commit was skipped:

508b0c1b22 Fix crash on Windows 9X

21 months ago* Enable native speed 2 EMBA build and tests and disable speed 0
Andrea Corallo [Thu, 8 Dec 2022 15:40:54 +0000 (16:40 +0100)]
* Enable native speed 2 EMBA build and tests and disable speed 0

* test/infra/gitlab-ci.yml (build-native-comp-speed2): Uncomment.
(build-native-comp-speed0): Comment.
(test-native-comp-speed0): Remove.
(test-native-comp-speed2): Add.

21 months agoMake 'server-stop-automatically' into a defcustom
Jim Porter [Mon, 28 Nov 2022 06:21:10 +0000 (22:21 -0800)]
Make 'server-stop-automatically' into a defcustom

This changes the meaning of the (formerly internal) variable
'server-stop-automatically': it now always holds the requested
configuration, even when Emacs was not started as a daemon
(bug#59668).

* lisp/server.el (server-stop-automatically): Convert the variable to
a defcustom, and make the function simply set the defcustom.
(server-stop-automatically--timer): New variable.
(server-apply-stop-automatically): New function...
(server-stop, server-start): ... call it.
(server-save-buffers-kill-terminal): Adjust the conditions for
stopping automatically to account for the change of meaning for
'server-stop-automatically'.
(server-stop-automatically--handle-delete-frame): Remove unnecessary
test of the 'server-stop-automatically' option; this hook is only set
when it should do its job.
(server-stop-automatically--maybe-kill-emacs): Update docstring.

* doc/emacs/misc.texi (Emacs Server): Update documentation.

21 months agoRemove conversion_fail_tag from selection requests
Po Lu [Thu, 8 Dec 2022 02:30:50 +0000 (10:30 +0800)]
Remove conversion_fail_tag from selection requests

* src/xselect.c (struct x_selection_request): Delete
`conversion_fail_tag'.
(x_push_current_selection_request, x_start_selection_transfer):
Stop checking against conversion_fail_tag.
(x_handle_selection_request): Adjust callers.
(x_convert_selection): Remove arg `for_multiple'.  Never link
nonconvertible data onto frame->converted_selections.

21 months agoFix crash on Windows 9X
Po Lu [Tue, 6 Dec 2022 01:30:00 +0000 (09:30 +0800)]
Fix crash on Windows 9X

* src/emacs.c (main): Call init_bignum before init_window_once.

21 months agoAdd recursion limit to treesit--children-covering-range-recurse
Yuan Fu [Thu, 8 Dec 2022 00:36:07 +0000 (16:36 -0800)]
Add recursion limit to treesit--children-covering-range-recurse

* lisp/treesit.el (treesit--children-covering-range-recurse): Add
limit.

21 months agoImprove tree-sitter fontification in edge-cases (bug#59738)
Yuan Fu [Thu, 8 Dec 2022 00:02:53 +0000 (16:02 -0800)]
Improve tree-sitter fontification in edge-cases (bug#59738)

* lisp/treesit.el (treesit-font-lock-fontify-region): Use
treesit--children-covering-range-recurse.

21 months agoFont lock Commit: and CommitDate: lines in Git logs
Sean Whitton [Wed, 7 Dec 2022 20:12:13 +0000 (13:12 -0700)]
Font lock Commit: and CommitDate: lines in Git logs

* lisp/vc/vc-git.el (vc-git-log-view-mode): Additionally recognize and
font lock Commit: and CommitDate: lines.  This is relevant when, for
example, the user has added "--format=fuller" to vc-git-log-switches.

21 months agoAdd c-ts-mode-indent-defun (bug#59662)
Theodor Thornhill [Fri, 2 Dec 2022 15:05:35 +0000 (16:05 +0100)]
Add c-ts-mode-indent-defun (bug#59662)

Add in this function to mimic 'c-indent-defun'.

* lisp/progmodes/c-ts-mode.el (c-ts-mode-indent-defun): New function.
(c-ts-mode-map): New mode map that uses said function.

21 months agoFix syntax-table for tree-sitter modes
Theodor Thornhill [Mon, 5 Dec 2022 12:37:58 +0000 (13:37 +0100)]
Fix syntax-table for tree-sitter modes

When adapting the 'c-populate-syntax-table' for tree-sitter, I misread
the code, and thus some crucial entries were missing.  For the
relevant modes we use the same table as specified in the
non-tree-sitter major mode.

* lisp/progmodes/c-ts-mode.el (c-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/csharp-mode.el (csharp-ts-mode): Add new entries.
* lisp/progmodes/java-ts-mode.el (java-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/json-ts-mode.el (json-ts-mode--syntax-table): Add new
entries.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--syntax-table): Add new entries.
* lisp/textmodes/css-mode.el (css-ts-mode): Add new entries.

21 months agoc++-ts-mode: Highlight nullptr as a constant
Brian Leung [Wed, 7 Dec 2022 10:12:05 +0000 (02:12 -0800)]
c++-ts-mode: Highlight nullptr as a constant

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings): Add
nullptr.

21 months agoImprove parameter checking in tree-sitter functions
Yuan Fu [Wed, 7 Dec 2022 03:56:25 +0000 (19:56 -0800)]
Improve parameter checking in tree-sitter functions

* src/treesit.c (treesit_check_position): Extract out new function.
(Ftreesit_node_first_child_for_pos)
(Ftreesit_node_descendant_for_range): Replace code with the new
function.
(Ftreesit_query_capture): Add missing check for node and parser.  Add
check for range for BEG and END.  Move treesit_initialize to the
beginning of the function.

* test/src/treesit-tests.el (treesit-node-api)
(treesit-query-api): Add tests for out-of-range error.

21 months ago; * test/lisp/comint-tests.el (w32-application-type): Fix typo.
Eli Zaretskii [Wed, 7 Dec 2022 19:52:00 +0000 (21:52 +0200)]
; * test/lisp/comint-tests.el (w32-application-type): Fix typo.

21 months agoFix comint-tests on MS-Windows
Eli Zaretskii [Wed, 7 Dec 2022 19:23:42 +0000 (21:23 +0200)]
Fix comint-tests on MS-Windows

* test/lisp/comint-tests.el (comint-tests/test-password-function):
On MS-Windows, call 'w32-native-executable-find' instead of
'executable-find', to find the native version of the 'cat'
program.
(w32-native-executable-p, w32-native-executable-find): New
functions.

21 months agoUse new external-completion.el in Eglot
João Távora [Wed, 7 Dec 2022 10:59:30 +0000 (10:59 +0000)]
Use new external-completion.el in Eglot

This refactor simplifies Eglot's source code.

* lisp/progmodes/eglot.el:
(Package-Requires): Require external-completion.
(external-completion): Require it.
(xref-backend-identifier-completion-table): Use external-completion-table.
(completion-category-overrides): No longer set it.
("Backend Completion"): Delete section.

21 months agoDon't override completion-category-defaults in fido-mode
João Távora [Wed, 7 Dec 2022 10:43:59 +0000 (10:43 +0000)]
Don't override completion-category-defaults in fido-mode

To more closely emulate ido-mode, fido-mode and fido-vertical-mode
strongly lean to the 'flex completion style.  But overriding
completion-category-defaults is not the correct way to do it, since
sometimes even the 'flex style isn't possible.

* lisp/icomplete.el (icomplete--fido-mode-setup): Don't set
completion-category-defaults here.

21 months agoAdd lisp/external-completion.el for completions from external tools
João Távora [Fri, 25 Nov 2022 13:03:45 +0000 (13:03 +0000)]
Add lisp/external-completion.el for completions from external tools

This table uses a new 'external' completion style which has been in
use in Eglot and other third-party extensions for a long time.  It's
meant for libraries that interface with an external tool which
provides completions, such as a shell utility, an inferior process, an
http server.

The new file lisp/external-completion.el provides a helper function,
external-completion-table which is given an interfacing function to
the external tool and returns a "programmed completion" table that is
bound to the 'external' completion style.  That table can then be used
with completing-read or any other facility expecting a completion
table.

When the 'external' is in use, the usual styles configured by the user
or other in 'completion-styles' are completely overriden.  This
relatively minor inconvenience is the price to pay for responsive
completion where the full set of completion candidates doesn't need to
be transfered into Emacs's address space.

* lisp/external-completion.el: New file.

* etc/NEWS: (Lisp Changes in Emacs 29.1): Mention
  external-completion-table.

21 months agoCapitalize unit names in Calc uniformly
Rudolf Adamkovič [Wed, 30 Nov 2022 00:01:43 +0000 (01:01 +0100)]
Capitalize unit names in Calc uniformly

* lisp/calc/calc-units.el (math-unit-prefixes): Unify the
inconsistent capitalization of the metric prefixes to
lowercase.  (Bug#59706)

21 months agocomint-fontify-input: Fix field boundary issue (bug#59626)
Miha Rihtaršič [Sat, 26 Nov 2022 22:01:24 +0000 (23:01 +0100)]
comint-fontify-input: Fix field boundary issue (bug#59626)

* lisp/comint.el (comint--intersect-regions): Don't call
'field-end' if we are on a field boundary already.

Copyright-paperwork-exempt: yes

21 months ago; Minor copyedits of the latest xterm change
Eli Zaretskii [Wed, 7 Dec 2022 14:54:47 +0000 (16:54 +0200)]
; Minor copyedits of the latest xterm change

* src/xterm.h (struct x_display_info): Fix a comment.
* src/xterm.c (syms_of_xterm) <x-detect-server-trust>: Doc fix.

21 months ago; * etc/NEWS: Fix the 'bs-default-action-list' entry.
Eli Zaretskii [Wed, 7 Dec 2022 12:50:41 +0000 (14:50 +0200)]
; * etc/NEWS: Fix the 'bs-default-action-list' entry.

21 months agoEglot: fix setting of flymake-list-only-diagnostics (bug#59824)
João Távora [Wed, 7 Dec 2022 11:30:34 +0000 (11:30 +0000)]
Eglot: fix setting of flymake-list-only-diagnostics (bug#59824)

When Eglot receives diagnostics for a file not yet visited in Emacs,
it stores them in flymake-list-only-diagnostics, which feed M-x
flymake-show-project-diagnostics.  If the file is eventually visited
in a buffer and Eglot starts receibing diagnostics for it, the
flymake-list-only-diagnostics database has to be updated accordingly,
since the previous diagnostics are now stale.

* lisp/progmodes/eglot.el (eglot-handle-notification): Reset
flymake-list-only-diagnostics

21 months agoFix some more problems with running Emacs as untrusted
Po Lu [Wed, 7 Dec 2022 11:19:34 +0000 (19:19 +0800)]
Fix some more problems with running Emacs as untrusted

* etc/PROBLEMS (X security problems): Describe new variable.
* src/xfns.c (append_wm_protocols): Don't support ping when it
does not work.
* src/xterm.c (x_wm_supports_1): Don't support anything when
untrusted.
(x_term_init): Implement Vx_detect_server_trust.
(syms_of_xterm): New variable `x-detect-server-trust'.
* src/xterm.h (struct x_display_info): New field `untrusted'.

21 months ago* test/src/sqlite-tests.el (sqlite-version): Declare.
Mattias Engdegård [Tue, 6 Dec 2022 21:21:00 +0000 (22:21 +0100)]
* test/src/sqlite-tests.el (sqlite-version): Declare.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Wed, 7 Dec 2022 05:30:51 +0000 (06:30 +0100)]
Merge from origin/emacs-29

9ae1c2762d7 EUDC: Outline deprecation plans in NEWS
6acf95cbea6 Fix admin/notes/tree-sitter/build-module/build.sh (bug#59...
cc63c086971 * doc/misc/eww.texi (Overview): Improve introduction.
b8790e320e1 Consistent fontification of using-directives in csharp-ts...
5257b9cda43 ; Rename c-ts-fontify-error to c-ts-mode--fontify-error
c6b454df339 ; Improve docstring of c-ts-mode--fontify-variable
6187d001f28 Fontify some keywords in type face in c-ts-mode
b3847c02083 ; Minor cleanup in treesit.c
40af27859e0 ; * lib-src/etags.c (escape_shell_arg_string): Minor doc ...
43b7e7efbf4 Fix etags builds on non-Windows non-MS-DOS machines
7e6d1d1c471 ; Fix last change in etags.c.
01a4035c869 Fix etags local command injection vulnerability
ed4734405df Avoid crashes in a build --without-modules
70a2eb4a0b3 Fix 'add-display-text-property' when OBJECT is non-nil
d58d1dd48ac Do not run slow tests on EMBA
9b9b39a2d89 Lisp reader undefined behaviour excision

# Conflicts:
# etc/NEWS

21 months agoEUDC: Outline deprecation plans in NEWS
Thomas Fitzsimmons [Wed, 7 Dec 2022 02:41:51 +0000 (21:41 -0500)]
EUDC: Outline deprecation plans in NEWS

* etc/NEWS (EUDC): Mention deprecation plans.

21 months ago* etc/NEWS: Mention new bs option
Juanma Barranquero [Wed, 7 Dec 2022 01:36:41 +0000 (02:36 +0100)]
* etc/NEWS: Mention new bs option

21 months ago* lisp/bs.el: Improve compatibility with previous version
Juanma Barranquero [Wed, 7 Dec 2022 01:27:06 +0000 (02:27 +0100)]
* lisp/bs.el: Improve compatibility with previous version

* lisp/bs.el (bs-default-action-list):
Remove display-buffer-reuse-window.
Ask for a minimum height window, not maximum.
(bs-show-in-buffer): Create window here, and afterwards make
sure it's the only window showing the *bs-selection* buffer.
(bs--show-with-configuration): Move window creation to
bs-show-in-buffer.

21 months ago; * lisp/serve.el: Silence unused arg warning in previous commit
Juanma Barranquero [Wed, 7 Dec 2022 01:08:28 +0000 (02:08 +0100)]
; * lisp/serve.el: Silence unused arg warning in previous commit

21 months agoFix admin/notes/tree-sitter/build-module/build.sh (bug#59789)
Yuan Fu [Tue, 6 Dec 2022 23:55:14 +0000 (15:55 -0800)]
Fix admin/notes/tree-sitter/build-module/build.sh (bug#59789)

Besides the problem mentioned by Juri, which is fixed by removing

-cp tree-sitter-lang.in "tree-sitter-${lang}/src"
-cp emacs-module.h "tree-sitter-${lang}/src"

(we removed those files in an earlier commit, because they are not
used anymore.)

Now it also more parameterized and builds typescript and tsx
separately.

* admin/notes/tree-sitter/build-module/build.sh (topdir)
(repo, sourcedir, grammardir): New variables.
(Build): Make it parametric.
(Copy out): Use absolute path.

* admin/notes/tree-sitter/build-module/batch.sh (languages): Add tsx.

21 months ago* doc/misc/eww.texi (Overview): Improve introduction.
Stefan Kangas [Wed, 7 Dec 2022 00:02:48 +0000 (01:02 +0100)]
* doc/misc/eww.texi (Overview): Improve introduction.

21 months ago; Remove dead code from 'server-stop-automatically--handle-delete-frame'
Jim Porter [Fri, 2 Dec 2022 20:15:46 +0000 (12:15 -0800)]
; Remove dead code from 'server-stop-automatically--handle-delete-frame'

* lisp/server.el (server-stop-automatically--handle-delete-frame):
Since 'this-command' is never 'save-buffers-kill-terminal' in this
function, we can remove the second 'if' block and it's then-form,
leaving only the else-form.  Additionally, remove the 'delete-frame'
call; it's not necessary, since we just killed Emacs on the prior
line.

21 months agoConsistent fontification of using-directives in csharp-ts-mode
Jostein Kjønigsen [Tue, 6 Dec 2022 08:40:03 +0000 (09:40 +0100)]
Consistent fontification of using-directives in csharp-ts-mode

* lisp/progmodes/csharp-mode.el (csharp-ts-mode--font-lock-settings):
New rules.

21 months ago; Rename c-ts-fontify-error to c-ts-mode--fontify-error
Yuan Fu [Tue, 6 Dec 2022 08:26:51 +0000 (00:26 -0800)]
; Rename c-ts-fontify-error to c-ts-mode--fontify-error

* lisp/progmodes/c-ts-mode.el (c-ts-mode--font-lock-settings)
(c-ts-fontify-error): Rename.

21 months ago; Improve docstring of c-ts-mode--fontify-variable
Yuan Fu [Tue, 6 Dec 2022 08:17:04 +0000 (00:17 -0800)]
; Improve docstring of c-ts-mode--fontify-variable

* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-variable): Improve
docstring.

21 months agoFontify some keywords in type face in c-ts-mode
Yuan Fu [Tue, 6 Dec 2022 08:15:30 +0000 (00:15 -0800)]
Fontify some keywords in type face in c-ts-mode

* lisp/progmodes/c-ts-mode.el (c-ts-mode--keywords): Remove some keywords.
(c-ts-mode--type-keywords): New variables.
(c-ts-mode--font-lock-settings): New rule.

21 months ago; Minor cleanup in treesit.c
Eli Zaretskii [Tue, 6 Dec 2022 17:28:02 +0000 (19:28 +0200)]
; Minor cleanup in treesit.c

* src/treesit.c (Ftreesit_query_capture)
(Ftreesit_parser_set_included_ranges): Minor cleanups.

21 months ago; * lib-src/etags.c (escape_shell_arg_string): Minor doc fix.
Stefan Kangas [Tue, 6 Dec 2022 17:05:08 +0000 (18:05 +0100)]
; * lib-src/etags.c (escape_shell_arg_string): Minor doc fix.

21 months agoFix etags builds on non-Windows non-MS-DOS machines
Mattias Engdegård [Tue, 6 Dec 2022 16:37:22 +0000 (17:37 +0100)]
Fix etags builds on non-Windows non-MS-DOS machines

* lib-src/etags.c: In this file, MSDOS is always defined but can be
either `true` or `false`, so don't used `defined MSDOS` as a condition.

21 months ago; Fix last change in etags.c.
Eli Zaretskii [Tue, 6 Dec 2022 16:13:41 +0000 (18:13 +0200)]
; Fix last change in etags.c.

21 months agoFix etags local command injection vulnerability
lu4nx [Tue, 6 Dec 2022 07:42:40 +0000 (15:42 +0800)]
Fix etags local command injection vulnerability

* lib-src/etags.c: (escape_shell_arg_string): New function.
(process_file_name): Use it to quote file names passed to the
shell.  (Bug#59817)

21 months agoAvoid crashes in a build --without-modules
Eli Zaretskii [Tue, 6 Dec 2022 15:15:35 +0000 (17:15 +0200)]
Avoid crashes in a build --without-modules

* src/lread.c (syms_of_lread): Move the definitions of
'dynamic-library-suffixes' outside of the HAVE_MODULES
conditional.  (Bug#59832)

21 months ago* lisp/bs.el: Adapt to modern display-buffer-alist window setup
Juanma Barranquero [Tue, 6 Dec 2022 12:44:09 +0000 (13:44 +0100)]
* lisp/bs.el: Adapt to modern display-buffer-alist window setup

* lisp/bs.el (bs--window-config-coming-from): Delete.
(bs-default-action-list): New user customizable option.
(bs--restore-window-config): Delete.
(bs-kill, bs-select, bs-select-other-window)
(bs-select-other-frame): Use `quit-window' instead.
(bs--show-with-configuration): Use `pop-to-buffer' to display
the "*buffer-selection*" buffer.

21 months agoFix 'add-display-text-property' when OBJECT is non-nil
Eli Zaretskii [Tue, 6 Dec 2022 12:41:36 +0000 (14:41 +0200)]
Fix 'add-display-text-property' when OBJECT is non-nil

* lisp/emacs-lisp/subr-x.el (add-display-text-property): Fix the
case where OBJECT is not nil.  (Bug#59857)

* test/lisp/emacs-lisp/subr-x-tests.el
(subr-x-test-add-display-text-property): Add test for this case.

21 months agoDo not run slow tests on EMBA
Michael Albinus [Tue, 6 Dec 2022 11:36:15 +0000 (12:36 +0100)]
Do not run slow tests on EMBA

* test/infra/gitlab-ci.yml (.filenotify-gio-template): Do not run
scheduled.
(build-native-comp-speed1, build-native-comp-speed2): Comment out.

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-part1): Skip also on EMBA.

21 months agoWork around sample server bug
Po Lu [Tue, 6 Dec 2022 11:30:15 +0000 (19:30 +0800)]
Work around sample server bug

* src/xterm.c (XTring_bell): Catch Access errors from XBell when
Emacs is running as an untrusted client.

21 months agoLisp reader undefined behaviour excision
Mattias Engdegård [Tue, 6 Dec 2022 11:13:18 +0000 (12:13 +0100)]
Lisp reader undefined behaviour excision

* src/lread.c (read_bool_vector, skip_lazy_string):
Replace `|` with `||` to explicitly introduce sequence points since
the variables, `length` and `nskip`, are mutated more than once.

The `|` was just a weak attempt at micro-optimisation in any case;
sorry about that.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Tue, 6 Dec 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-29

717f8477284 ; Fix typo in js--treesit-imenu
c26fe45cb80 Fix treesit-query-capture
318bf42b410 Improve fontification of typescript-ts-mode (bug#59831)
64271bbb7d9 Add back pair feature in json-ts-mode fontification (bug#...
16b94888429 Fix mouse clicks on a non-selected frame
ca0da3b83df ; Clarify description of display on the margins

21 months ago; Fix typo in js--treesit-imenu
Randy Taylor [Tue, 6 Dec 2022 01:30:56 +0000 (20:30 -0500)]
; Fix typo in js--treesit-imenu

* lisp/progmodes/js.el (js--treesit-imenu): Fix a typo.  (Bug#59849)

21 months agoFix treesit-query-capture
Yuan Fu [Tue, 6 Dec 2022 02:37:47 +0000 (18:37 -0800)]
Fix treesit-query-capture

Before this change Ftreesit_query_capture doesn't convert character
position to byte position for BEG and END parameters.  I observed
fontification issue in css files but couldn't figure out why, now I
know :-)

I decide to keep treesit--font-lock-query-expand-range, since it might
provide a escape hatch for problems we discover in the future, and it
should be very cheap so no downside of keeping it.

* lisp/textmodes/css-mode.el (css-ts-mode): Stop setting
treesit--font-lock-query-expand-range.
* lisp/treesit.el (treesit--font-lock-query-expand-range): Update
docstring.
* src/treesit.c (Ftreesit_query_capture): Convert BEG and END to byte
position.  Also added parentheses wround "beg_byte - visible_beg" in
the call to ts_query_cursor_set_byte_range (i.e., style change).

21 months agoFix crash on Windows 9X
Po Lu [Tue, 6 Dec 2022 01:30:00 +0000 (09:30 +0800)]
Fix crash on Windows 9X

* src/emacs.c (main): Call init_bignum before init_window_once.

21 months agoImprove fontification of typescript-ts-mode (bug#59831)
Jostein Kjønigsen [Mon, 5 Dec 2022 08:31:58 +0000 (09:31 +0100)]
Improve fontification of typescript-ts-mode (bug#59831)

- Highlight property and field definitions in class declaration.
- Highlight property-keys in object initializaters.
- Highlight variable-names in function/method return-statements.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings): Add fontification rules.

21 months agoAdd back pair feature in json-ts-mode fontification (bug#59833)
Theodor Thornhill [Mon, 5 Dec 2022 14:59:41 +0000 (15:59 +0100)]
Add back pair feature in json-ts-mode fontification (bug#59833)

* lisp/progmodes/json-ts-mode.el (json-ts-mode--font-lock-settings):
Add back in removed pair feature.  Also alphabetize features.
(json-ts-mode): Use the new feature.

21 months agoFix mouse clicks on a non-selected frame
Eli Zaretskii [Mon, 5 Dec 2022 19:55:25 +0000 (21:55 +0200)]
Fix mouse clicks on a non-selected frame

* lisp/mouse-drag.el (mouse-drag-drag): Skip switch-frame events
while tracking mouse.  (Bug#59785)

21 months ago; Clarify description of display on the margins
Eli Zaretskii [Mon, 5 Dec 2022 19:45:01 +0000 (21:45 +0200)]
; Clarify description of display on the margins

* doc/lispref/display.texi (Display Margins): More accurate
explanation of how to show text in the display margin without
concealing buffer text.  (Bug#59841)

21 months ago; * src/xfns.c: Actually remove "#include <xcb/xcb_aux.h>".
Eli Zaretskii [Mon, 5 Dec 2022 16:55:19 +0000 (18:55 +0200)]
; * src/xfns.c: Actually remove "#include <xcb/xcb_aux.h>".

21 months agoFix build with old XCB
Po Lu [Mon, 5 Dec 2022 12:41:37 +0000 (20:41 +0800)]
Fix build with old XCB

* src/xfns.c (x_get_net_workarea):
* src/xterm.c (x_dnd_compute_toplevels, x_dnd_get_proxy_proto)
(x_dnd_get_wm_state_and_proto, handle_one_xevent): Do not
include xcb_aux.h.  Use XA_ constants instead of XCB_ATOM_ ones.

21 months ago; * etc/NEWS: Fix entry for 'vc-git-shortlog-switches'.
Eli Zaretskii [Mon, 5 Dec 2022 12:21:36 +0000 (14:21 +0200)]
; * etc/NEWS: Fix entry for 'vc-git-shortlog-switches'.

21 months agoDon't excessively sync in some other code
Po Lu [Mon, 5 Dec 2022 11:55:04 +0000 (19:55 +0800)]
Don't excessively sync in some other code

* configure.ac (USE_XCB): Remove xcb-util dependency.
* src/frame.h: Remove x_sync.
* src/gtkutil.c (xg_frame_restack, xg_update_scrollbar_pos)
(xg_update_horizontal_scrollbar_pos): Call XSync manually
instead of x_sync.
* src/xfns.c (x_sync): Delete unused function.
* src/xterm.c (x_send_hourglass_message): New function.
(x_show_hourglass, x_hide_hourglass): Avoid XSync in these two
pieces of frequently used code.
(handle_one_xevent): Handle hourglass messages.
(x_make_frame_invisible): Stop using x_sync.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 5 Dec 2022 05:30:21 +0000 (06:30 +0100)]
Merge from origin/emacs-29

ec00d292ec0 Improve treesit-fontify-with-override
4bcdb1cc65b Make killing a non-last client work the same no matter th...
a27f61f6f48 Use the function 'window-system' on the tab-bar/tab-line ...
432b9655ae0 Restore font-lock-type-face for lisp mode &symbols

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 5 Dec 2022 05:30:21 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

029988d4a51 Prevent a segfault when deleting a fullscreen frame on Ne...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 5 Dec 2022 05:30:21 +0000 (06:30 +0100)]
Merge from origin/emacs-29

3768b100777 ; * lisp/pcomplete.el (pcomplete-allow-modifications): Fi...
84214578f5a Fix markup in ERC manual

21 months agoImprove passing user switches to Git log commands (bug#59414)
Sean Whitton [Sun, 4 Dec 2022 22:56:35 +0000 (15:56 -0700)]
Improve passing user switches to Git log commands (bug#59414)

* lisp/vc/vc-git.el (vc-git-log-switches): Revise docstring.
(vc-git-shortlog-switches): New defcustom.
(vc-git-print-log): Use vc-git-log-switches or
vc-git-shortlog-switches depending on whether printing a shortlog.
(vc-git-log-outgoing, vc-git-log-incoming): Use
vc-git-shortlog-switches.
(vc-git-log-search, vc-git-expanded-log-entry): Use
vc-git-log-switches.
* etc/NEWS: Document the new defcustom.

21 months agoImprove treesit-fontify-with-override
Yuan Fu [Sun, 4 Dec 2022 08:22:28 +0000 (00:22 -0800)]
Improve treesit-fontify-with-override

This also fixes fontification problem with c-ts-mode--fontify-defun.

Now treesit-fontify-with-override clips the fontification region for
the user, so no need for (max start node-start) shenanigans anymore.
More importantly it doesn't fontify unless the region between
node-start and node-end intersects with the region between start and
end, which fixes the problem with c-ts-mode--fontify-defun.

* lisp/treesit.el (treesit-fontify-with-override): Add optional
parameter BOUND-START and BOUND-END.  Wrap the function body in a
when-form.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--fontify-declarator)
(c-ts-mode--fontify-variable)
(c-ts-mode--fontify-defun)
(c-ts-fontify-error)
* lisp/progmodes/js.el (js--fontify-template-string)
* lisp/progmodes/python.el (python--treesit-fontify-string): Use the
new signature.

21 months agoMake killing a non-last client work the same no matter the auto-stop setting
Jim Porter [Fri, 2 Dec 2022 20:14:50 +0000 (12:14 -0800)]
Make killing a non-last client work the same no matter the auto-stop setting

Previously, if 'server-stop-automatically' was configured for
'kill-terminal' or 'delete-frame', killing a client via
'save-buffers-kill-terminal' wouldn't prompt about the saving files in
the client's buffer list (as it does when not using those settings).
This change ensures that those settings only apply when killing the
last client, as described in the manual (bug#51993).

* lisp/server.el (server-save-buffers-kill-terminal): Handle
'server-stop-automatically' behavior in this function, rather than
calling 'server-stop-automatically--handle-delete-frame'.

21 months agoUse the function 'window-system' on the tab-bar/tab-line (bug#59620)
Juri Linkov [Sun, 4 Dec 2022 19:30:34 +0000 (21:30 +0200)]
Use the function 'window-system' on the tab-bar/tab-line (bug#59620)

* lisp/tab-bar.el (tab-bar-separator)
(tab-bar-format-align-right, tab-bar-auto-width):
* lisp/tab-line.el (tab-line-format-template): Replace the variable
'window-system' with the function call '(window-system)'.

21 months agoRestore font-lock-type-face for lisp mode &symbols
Tom Gillespie [Sun, 4 Dec 2022 06:41:15 +0000 (22:41 -0800)]
Restore font-lock-type-face for lisp mode &symbols

* lisp/emacs-lisp/lisp-mode.el (lisp-cl-font-lock-keywords-2)
(lisp-el-font-lock-keywords-2): Restore use of type face instead of
builtin face for &symbol keywords.  This fixes what appears to be
a copy paste error that changed the face for common lisp and emacs
lisp &symbol style keywords that was introduced in commit
a498e5f83 by restoring the type face to font-lock-type-face as
consistent with the comments.

21 months agoFix potential crash deselecting for property change notifications
Po Lu [Sun, 4 Dec 2022 13:54:52 +0000 (21:54 +0800)]
Fix potential crash deselecting for property change notifications

* src/xselect.c (x_cancel_selection_transfer): Catch errors
around XSelectInput.

21 months agoPrevent a segfault when deleting a fullscreen frame on NextStep.
Kai Ma [Sat, 3 Dec 2022 10:17:26 +0000 (18:17 +0800)]
Prevent a segfault when deleting a fullscreen frame on NextStep.

* nsterm.m ([EmacsView resetCursorRects:]): Be defensive when
accessing FRAME_OUTPUT_DATA.  [resetCursorRects:] can be called
from the event loop after the frame is deleted.  When this
happens, emacsframe is NULL.  This means there is an underlying
leak of the EmacsView object!  (Bug#59794)
Do not merge to master.

Copyright-paperwork-exempt: yes

21 months agoMake a boxed menu bar have a shadow at its right end (bug#59778)
Manuel Giraud [Sat, 3 Dec 2022 21:47:02 +0000 (22:47 +0100)]
Make a boxed menu bar have a shadow at its right end (bug#59778)

* src/xdisp.c (display_menu_bar) [HAVE_X_WINDOWS]: Make a boxed
menu bar have a shadow at its right end in non-toolkit X builds.

21 months ago; * lisp/pcomplete.el (pcomplete-allow-modifications): Fix a typo.
Eli Zaretskii [Sun, 4 Dec 2022 12:42:07 +0000 (14:42 +0200)]
; * lisp/pcomplete.el (pcomplete-allow-modifications): Fix a typo.

21 months agoFix markup in ERC manual
Eli Zaretskii [Sun, 4 Dec 2022 12:31:50 +0000 (14:31 +0200)]
Fix markup in ERC manual

* doc/misc/erc.texi (SASL): Use @table instead of simulating it
with @indentedblock.  Fix markup.  (Bug#59815)

21 months agoMake Emacs build with Xfixes support on old versions of the library
Po Lu [Sun, 4 Dec 2022 12:01:31 +0000 (20:01 +0800)]
Make Emacs build with Xfixes support on old versions of the library

* src/xterm.c (xfixes_toggle_visible_pointer):
(x_toggle_visible_pointer):
(XTtoggle_invisible_pointer, x_term_init): Disable code
requiring fixes 4.0 or later when the fixes library is older.
* src/xterm.h: Define missing types needed by other extensions
when the fixes library is too old.
* configure.ac: Allow building with any version of the Xfixes
extension library.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 4 Dec 2022 05:31:24 +0000 (06:31 +0100)]
Merge from origin/emacs-29

96af584af6c Fix comment-start-skip in tree-sitter modes (bug#59690)
520a4e12f8e ; * lisp/treesit.el (treesit-end-of-defun): Guard against...
2c4d92d30f6 ; * lisp/subr.el (posn-col-row): Revert inadvertent change.
6fb9a03cbdf ; Remove debugging leftover message
c5ba47c889e Speed up Unicode normalisation tests by a factor of 5
afa4fcb95b4 Fix "C-h k" when clicking on another frame
f6e2f30f394 ; Fix typos
bd58dcedfb9 Fix and expand tests broken by commit 2772ebe366 of 2022-...
a0dd9fdebe3 ; Add cross-reference to string-equal docstring
11c3c54d8ad Fix handling of relative directories in "--init-directory...
401f76cc3d6 Make sure 'user-emacs-directory' ends in a slash

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Sun, 4 Dec 2022 05:31:24 +0000 (06:31 +0100)]
; Merge from origin/emacs-29

The following commits were skipped:

641ef36403b Fix gud-minor-mode-menu
3623d5c195d Revert "Make easy-mmode-defmap obsolete and adjust only c...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sun, 4 Dec 2022 05:31:24 +0000 (06:31 +0100)]
Merge from origin/emacs-29

17d40c163e0 vc-git-print-log: Don't assume vc-git-log-switches is a list

21 months agoFix comment-start-skip in tree-sitter modes (bug#59690)
Yuan Fu [Sat, 3 Dec 2022 01:03:21 +0000 (17:03 -0800)]
Fix comment-start-skip in tree-sitter modes (bug#59690)

* lisp/progmodes/c-ts-mode.el (c-ts-mode)
(c++-ts-mode)
* lisp/progmodes/csharp-mode.el (csharp-ts-mode)
* lisp/progmodes/java-ts-mode.el (java-ts-mode)
* lisp/progmodes/js.el (js-ts-mode)
* lisp/progmodes/typescript-ts-mode.el (tsx-ts-mode): Remove the group
from the regexp.

21 months ago; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value.
Yuan Fu [Fri, 2 Dec 2022 05:19:14 +0000 (21:19 -0800)]
; * lisp/treesit.el (treesit-end-of-defun): Guard against nil value.

21 months ago; * lisp/subr.el (posn-col-row): Revert inadvertent change.
Eli Zaretskii [Sat, 3 Dec 2022 20:09:16 +0000 (22:09 +0200)]
; * lisp/subr.el (posn-col-row): Revert inadvertent change.

21 months ago; Remove debugging leftover message
Eli Zaretskii [Sat, 3 Dec 2022 20:06:34 +0000 (22:06 +0200)]
; Remove debugging leftover message

* lisp/emacs-lisp/comp.el (comp--native-compile): Remove
unnecessary call to 'message'.  (Bug#59766)

21 months agoSpeed up Unicode normalisation tests by a factor of 5
Mattias Engdegård [Sat, 3 Dec 2022 18:19:28 +0000 (19:19 +0100)]
Speed up Unicode normalisation tests by a factor of 5

After this change, ucs-normalize-tests are still very slow but
somewhat less disastrously so (from 100 to 20 min on this machine).

* test/lisp/international/ucs-normalize-tests.el
(ucs-normalize-tests--normalization-equal-p)
(ucs-normalize-tests--normalization-chareq-p)
(ucs-normalize-tests--rule1-holds-p)
(ucs-normalize-tests--rule2-holds-p)
(ucs-normalize-tests--part1-rule2):
Run only over the Unicode code space.
Hoist `with-current-buffer` to reduce overhead.

21 months agoFix "C-h k" when clicking on another frame
Eli Zaretskii [Sat, 3 Dec 2022 19:43:36 +0000 (21:43 +0200)]
Fix "C-h k" when clicking on another frame

* lisp/help.el (help--analyze-key): Don't barf if the key sequence
includes a switch-frame event.  (Bug#59785)

21 months ago; Fix typos
Stefan Kangas [Sat, 3 Dec 2022 14:31:07 +0000 (15:31 +0100)]
; Fix typos

21 months agoImprove performance of other_frames and XTfullscreen_hook
Po Lu [Sat, 3 Dec 2022 13:05:05 +0000 (21:05 +0800)]
Improve performance of other_frames and XTfullscreen_hook

* src/frame.c (other_frames):
* src/xterm.c (XTfullscreen_hook, x_check_fullscreen)
(x_set_window_size_1): Avoid extraneous calls to x_sync.

21 months agoFix and expand tests broken by commit 2772ebe366 of 2022-11-28
Juanma Barranquero [Sat, 3 Dec 2022 11:01:10 +0000 (12:01 +0100)]
Fix and expand tests broken by commit 2772ebe366 of 2022-11-28

* test/lisp/emacs-lisp/comp-tests.el
(with-test-native-compile-prune-cache)
(test-native-compile-prune-cache)
(test-native-compile-prune-cache/delete-only-eln)
(test-native-compile-prune-cache/dont-delete-in-parent-of-cache):
Check that the last directory in `native-comp-eln-load-path' is
not affected by `native-compile-prune-cache'.

21 months ago; Add cross-reference to string-equal docstring
Stefan Kangas [Sat, 3 Dec 2022 10:29:37 +0000 (11:29 +0100)]
; Add cross-reference to string-equal docstring

* lisp/subr.el (string-equal-ignore-case):
* src/fns.c (Fstring_equal): Doc fix; add cross-references.

21 months agoFix handling of relative directories in "--init-directory=DIR"
Eli Zaretskii [Sat, 3 Dec 2022 10:21:00 +0000 (12:21 +0200)]
Fix handling of relative directories in "--init-directory=DIR"

* lisp/startup.el (command-line): Interpret non-absolute file
names in '--init-directory' relative to the directory from
which Emacs is started.  (Bug#59795)

21 months agoMake sure 'user-emacs-directory' ends in a slash
Eli Zaretskii [Sat, 3 Dec 2022 10:03:13 +0000 (12:03 +0200)]
Make sure 'user-emacs-directory' ends in a slash

* lisp/startup.el (command-line): Make sure 'user-emacs-directory'
has the form of a directory.

21 months agoFix gud-minor-mode-menu
Eli Zaretskii [Sat, 3 Dec 2022 09:32:00 +0000 (11:32 +0200)]
Fix gud-minor-mode-menu

* lisp/emacs-lisp/easy-mmode.el (define-minor-mode)
(easy-mmode-define-keymap): Don't declare obsolete, since we are
still using it in gud.el.  (Bug#59769)  (Bug#59605)
Do not merge to master.

21 months agoRevert "Make easy-mmode-defmap obsolete and adjust only caller"
Eli Zaretskii [Sat, 3 Dec 2022 09:16:41 +0000 (11:16 +0200)]
Revert "Make easy-mmode-defmap obsolete and adjust only caller"

This reverts commit 8bb5c1bfec0929f2ba419e1c503f5acc01c336c2.
That commit lost too many useful features in the GUD menus
and caused several bugs, the last of them bug#59769.

Do not merge to master.

21 months agovc-git-print-log: Don't assume vc-git-log-switches is a list
Sean Whitton [Sat, 3 Dec 2022 06:42:10 +0000 (23:42 -0700)]
vc-git-print-log: Don't assume vc-git-log-switches is a list

* lisp/vc/vc-git.el (vc-git-print-log): Call ensure-list on
vc-git-log-switches to handle the case where it's a singular string.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 3 Dec 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-29

1e36ad9458 ; server-tests: remove CI debugging
54633fcd76 ; * lisp/subr.el (string-equal-ignore-case): Doc fix (bug#...
8413e95138 ; server-test CI debugging
4b3eb928fe Fix server-tests run noninteractively (bug#59742)
1b567f5a67 Use file-name-nondirectory to determine default project-name
f72cda2b82 Speed up auto-completion in 'sh-script-mode'
e5b0141b0d Fix error editing multisession variables (bug#59710)

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Sat, 3 Dec 2022 05:30:29 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commits were skipped:

24ca490d7d ; Fix a typo in .clang-format.
a48cd7bb9f ; Make clang-format format indent preprocessor blocks corr...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Sat, 3 Dec 2022 05:30:29 +0000 (06:30 +0100)]
Merge from origin/emacs-29

2b9cd50f93 Add tsx-ts-mode to eglot-server-programs

21 months ago* lisp/bindings.el (bound-and-true-p): Verify argument is a symbol
Juanma Barranquero [Sat, 3 Dec 2022 01:04:48 +0000 (02:04 +0100)]
* lisp/bindings.el (bound-and-true-p): Verify argument is a symbol

21 months ago* lisp/emacs-lisp/cl-macs.el (cl-flet): Optimize a bit more
Stefan Monnier [Sat, 3 Dec 2022 00:15:46 +0000 (19:15 -0500)]
* lisp/emacs-lisp/cl-macs.el (cl-flet): Optimize a bit more

Also optimize the case where we use `cl-flet` to introduce a local alias.

21 months ago; server-tests: remove CI debugging
Mattias Engdegård [Fri, 2 Dec 2022 17:26:04 +0000 (18:26 +0100)]
; server-tests: remove CI debugging

21 months ago; * lisp/subr.el (string-equal-ignore-case): Doc fix (bug#59779).
Eli Zaretskii [Fri, 2 Dec 2022 17:08:08 +0000 (19:08 +0200)]
; * lisp/subr.el (string-equal-ignore-case): Doc fix (bug#59779).

21 months ago; server-test CI debugging
Mattias Engdegård [Fri, 2 Dec 2022 17:06:00 +0000 (18:06 +0100)]
; server-test CI debugging

21 months agoFix server-tests run noninteractively (bug#59742)
Mattias Engdegård [Fri, 2 Dec 2022 16:27:16 +0000 (17:27 +0100)]
Fix server-tests run noninteractively (bug#59742)

This may or may not fix the test run from CI.

* test/lisp/server-tests.el (server-tests/can-create-frames-p):
Don't attempt to create frames if TERM=dumb, which what we have
if run from M-x compile (for instance).
(server-tests/server-force-stop/keeps-frames): Delete created frame so
that it doesn't cause trouble for other tests.