]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoitree.c: Get rid of the old iterator code scratch/noverlay
Stefan Monnier [Thu, 17 Nov 2022 23:09:37 +0000 (18:09 -0500)]
itree.c: Get rid of the old iterator code

Only use the new iterator which relies on a fixed size (and small)
state in the iterator.
This makes non-local exits safe within ITREE_FOREACH loops.

* src/itree.c (make_nav, nav_nodeptr, nav_flag, itree_stack_clear)
(itree_stack_push_flagged): Delete functions.
(nodeptr_and_flag): Delete type.
(struct itree_stack): Make the array hold plain pointers instead.
(itree_stack_push): Inline the former code of `itree_stack_push_flagged`.
(itree_stack_pop): Change return type.
(itree_contains): Don't call `ITREE_FOREACH_ABORT` any more.
(itree_insert_gap): Simplify access to the stack of nodes.
(itree_delete_gap, itree_insert_gap): Adjust code to new return type of
`itree_stack_pop`.
(itree_iterator_finish): Delete function.
(itree_iterator_start): Don't setup the `stack` field any more.
(itree_iterator_next): Delete function.
(itree_iter_next): Rename to `itree_iterator_next` and make it non-static.
(itree_iterator_narrow): Don't check the `running` flag any more.

* src/itree.h (itree_iterator_finish): Remove declaration.
(struct itree_iterator): Remove the `stack` and `running` fields.
(ITREE_FOREACH_ABORT): Delete macro.
(ITREE_FOREACH): Don't call `itree_iterator_finish` any more.

* src/xdisp.c (strings_with_newlines):
* src/buffer.c (overlays_in, next_overlay_change, overlay_touches_p):
Don't call `ITREE_FOREACH_ABORT` any more.

2 years agoitree.c: Make the iterator reentrant (bug#59183)
Stefan Monnier [Thu, 17 Nov 2022 22:00:22 +0000 (17:00 -0500)]
itree.c: Make the iterator reentrant (bug#59183)

Get rid of the global iterator object and instead allocate
a separate iterator for every loop.  This still uses the "duplicate
iterator" code, including the old iterator which needs a stack,
make ITREE_FOREACH a bit more expensive than we'd like.

* src/itree.h (init_itree, forget_itree, itree_iterator_busy_p):
Delete declarations.
(itree_iterator_start): Add iterator arg and remove `line` and `file` args.
(struct itree_iterator): Move from `itree.c`.  Remove `line` and
`file` fields.
(ITREE_FOREACH): Stack allocate an iterator object and pass it to
`itree_iterator_start`.

* src/itree.c (struct itree_iterator): Move to itree.h.
(iter): Delete global variable.
(itree_iterator_create, init_itree, forget_itree, itree_iterator_busy_p):
Delete functions.
(itree_contains): Adjust assertion.
(itree_iterator_finish): Deallocate the iterator's stack.
(itree_iterator_start): Take the (uninitialized) iterator as argument.
Allocate a fresh new stack.  Remove `file` and `line` arguments.
Don't check `running` any more since the iterator is not expected to be
initialized at all.

* src/eval.c (signal_or_quit):
* src/alloc.c (garbage_collect): Don't check `itree_iterator_busy_p`
any more.

* src/emacs.c (main): No need to `init_itree` any more.
(Fdump_emacs): No need to `forget_itree` any more.

2 years agoitree.c: Add new "stateless" iterator code and post-order traversal
Stefan Monnier [Thu, 17 Nov 2022 14:08:24 +0000 (09:08 -0500)]
itree.c: Add new "stateless" iterator code and post-order traversal

This still uses the old iterator code, but runs the new code
alongside to make sure they behave identically.

* src/itree.c (struct itree_iterator): New field `node`.
(itree_iterator_create): Give it a sane default value.
(itree_iterator_busy_p, itree_iterator_start, itree_iterator_finish):
Move down to the "iterator" section of the file.
(itree_iter_next_in_subtree, itree_iterator_first_node)
(itree_iter_next): New functions.
(itree_iterator_start): Initialize the new `node` field.
(itree_iterator_next): Add post-order case.
Call the new "stateless" `itree_iter_next` function and check that it
agrees.

* src/itree.h (enum itree_order): New value for post-order traversals.

2 years agoFix two typos in a doc string
Karl Fogel [Thu, 17 Nov 2022 02:34:28 +0000 (20:34 -0600)]
Fix two typos in a doc string

2 years ago; * src/comp.c (Fnative_elisp_load): Fix typo in docstring
Juanma Barranquero [Thu, 17 Nov 2022 02:15:15 +0000 (03:15 +0100)]
; * src/comp.c (Fnative_elisp_load): Fix typo in docstring

2 years agoEUDC: Fix eudc-capf-message-expand-name nil result
Thomas Fitzsimmons [Thu, 17 Nov 2022 01:29:26 +0000 (20:29 -0500)]
EUDC: Fix eudc-capf-message-expand-name nil result

* lisp/net/eudc-capf.el (eudc-capf-message-expand-name): Return
nil if EUDC query returns no results.  (Bug#59314)

2 years ago* src/itree.c: Use more uniform names starting with `itree_`
Stefan Monnier [Wed, 16 Nov 2022 21:35:10 +0000 (16:35 -0500)]
* src/itree.c: Use more uniform names starting with `itree_`

(struct itree_stack, itree_stack_create, itree_stack_destroy)
(itree_stack_clear, itree_stack_push_flagged, interval_stack_push)
(itree_stack_pop): Rename from `interval_stack*`.
(itree_max_height, itree_update_limit, itree_inherit_offset)
(itree_propagate_limit, itree_validate, itree_init)
(itree_rotate_left, itree_rotate_right, itree_insert_fix)
(itree_contains, itree_subtree_min, itree_remove_fix)
(itree_replace_child, itree_transplant): Rename from `interval_tree_*`.
(itree_insert_node): Rename from `interval_tree_insert`.
(itree_node_intersects): Rename from `interval_node_insert`.

2 years agoCall xref--analyze with correct project
Stephen Leake [Wed, 16 Nov 2022 17:52:09 +0000 (09:52 -0800)]
Call xref--analyze with correct project

* lisp/progmodes/xref.el (xref-show-definitions-buffer-at-bottom):
Call xref--analyze with correct project.

2 years agoAdd flat-button to docstring of 'set-face-attribute'
Gabriel do Nascimento Ribeiro [Tue, 15 Nov 2022 22:42:01 +0000 (19:42 -0300)]
Add flat-button to docstring of 'set-face-attribute'

* lisp/faces.el (set-face-attribute): Add 'flat-button' to
COLOR and STYLE sections of docstring.  (Bug#59266)

2 years agoReduce buffer-tests noisiness even more
Eli Zaretskii [Wed, 16 Nov 2022 14:37:23 +0000 (16:37 +0200)]
Reduce buffer-tests noisiness even more

* test/src/buffer-tests.el (test-kill-buffer-auto-save-default)
(test-kill-buffer-auto-save-delete-yes)
(test-kill-buffer-auto-save-delete-no)
(test-buffer-modifications, test-restore-buffer-modified-p): Shut
up auto-save messages.  (Bug#59028)

2 years agoReduce buffer-tests noisiness when run in batch mode.
Matt Armstrong [Tue, 15 Nov 2022 18:33:00 +0000 (10:33 -0800)]
Reduce buffer-tests noisiness when run in batch mode.

* test/src/buffer-tests.el (overlay-modification-hooks): Remove noisy
`message' calls and use `ert-info' to log context of test
failures.  (bug#59028)
(overlay-tests-start-recording-modification-hooks): ditto.

2 years ago; * lisp/apropos.el (apropos): Doc fix. (Bug#59248)
Eli Zaretskii [Wed, 16 Nov 2022 14:13:45 +0000 (16:13 +0200)]
; * lisp/apropos.el (apropos): Doc fix.  (Bug#59248)

2 years agoSet vc-prepare-patches-separately to nil in .dir-locals.el
Philip Kaludercic [Wed, 16 Nov 2022 08:16:28 +0000 (09:16 +0100)]
Set vc-prepare-patches-separately to nil in .dir-locals.el

* .dir-locals.el (c-mode): Set 'vc-prepare-patches-separately'.

See https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00973.html.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 16 Nov 2022 07:41:29 +0000 (08:41 +0100)]
Merge from origin/emacs-28

56026242e4 Explain how to bind keys to non-ASCII sequences
7d592db0ab Document that 'transient-mark-mode' is off in batch mode

# Conflicts:
# doc/emacs/custom.texi
# doc/emacs/mark.texi

2 years agoFix calculation of tab bar lines during automatic height adjustment
Po Lu [Wed, 16 Nov 2022 03:19:20 +0000 (11:19 +0800)]
Fix calculation of tab bar lines during automatic height adjustment

* src/haikufns.c (haiku_change_tab_bar_height):
* src/nsfns.m (ns_change_tab_bar_height):
* src/pgtkfns.c (pgtk_change_tab_bar_height):
* src/w32fns.c (w32_change_tab_bar_height):
* src/xfns.c (x_change_tab_bar_height): Do not round tab bar
height up.  (bug#59285, bug#59271)

2 years agoFix error trapping in x_focus_frame
Po Lu [Wed, 16 Nov 2022 02:37:14 +0000 (10:37 +0800)]
Fix error trapping in x_focus_frame

* src/xterm.c (x_focus_frame): Improve commentary.  Dno not trap
errors around x_get_server_time.

2 years ago; * lisp/subr.el (match-buffers): Fix typo
Juanma Barranquero [Tue, 15 Nov 2022 10:27:56 +0000 (11:27 +0100)]
; * lisp/subr.el (match-buffers): Fix typo

2 years agoNew command 'project-list-buffers' bound to 'C-x p C-b' (bug#59153)
Juri Linkov [Tue, 15 Nov 2022 18:54:39 +0000 (20:54 +0200)]
New command 'project-list-buffers' bound to 'C-x p C-b' (bug#59153)

* doc/emacs/maintaining.texi (Project Buffer Commands):
Add 'project-list-buffers'.

* lisp/buff-menu.el (Buffer-menu-filter-predicate): New defvar-local.
(list-buffers-noselect): Add new optional arg 'filter-predicate'.
Set 'Buffer-menu-filter-predicate' to 'filter-predicate'.
(list-buffers--refresh): Use 'Buffer-menu-filter-predicate'.

* lisp/progmodes/project.el (project-prefix-map): Bind "\C-b" to
'project-list-buffers'.
(project-list-buffers): New command.

2 years ago; Fix some doc strings in elisp-mode.el
Eli Zaretskii [Tue, 15 Nov 2022 17:58:52 +0000 (19:58 +0200)]
; Fix some doc strings in elisp-mode.el

* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding)
(elisp--local-variables-1, elisp--expect-function-p)
(eval-print-last-sexp, eval-last-sexp, elisp--eval-defun-1)
(eval-defun, elisp--eldoc-last-data, elisp-eldoc-funcall)
(elisp-eldoc-var-docstring)
(elisp-eldoc-var-docstring-with-value)
(elisp-get-fnsym-args-string)
(elisp--highlight-function-argument): Doc fixes.

2 years ago; Improve doc strings in seq.el
Eli Zaretskii [Tue, 15 Nov 2022 17:36:49 +0000 (19:36 +0200)]
; Improve doc strings in seq.el

* lisp/emacs-lisp/seq.el (seq-doseq, seq-setq, seq-elt)
(seq-length, seq-rest, seq-do, seq-mapn, seq-drop, seq-take)
(seq-drop-while, seq-take-while, seq-sort, seq-sort-by)
(seq-concatenate, seq-into, seq-filter, seq-remove)
(seq-remove-at-position, seq-every-p, seq-some, seq-find)
(seq-count, seq-contains, seq-contains-p, seq-set-equal-p)
(seq-position, seq-positions, seq-uniq, seq-mapcat)
(seq-partition, seq-union, seq-intersection, seq-difference)
(seq--count-successive, seq--elt-safe, seq-random-elt)
(seq-split, seq-keep): Doc fixes.

2 years ago; .clang-format: Support macros in comp.c, align operands correctly.
Vibhav Pant [Tue, 15 Nov 2022 14:36:56 +0000 (20:06 +0530)]
; .clang-format: Support macros in comp.c, align operands correctly.

* .clang-format (WhitespaceSensitiveMacros): Add comp.c macros that
stringify arguments, telling clang-format to not format them.
(AlignOperands): Set to Align, to make clang-format correctly align
multi-line expressions involving binary and ternary expressions.
(ForEachMacros): Add FOR_EACH_ALIST_VALUE.

2 years agoFix last change again
Po Lu [Tue, 15 Nov 2022 13:42:59 +0000 (21:42 +0800)]
Fix last change again

* src/frame.c (Freconsider_frame_fonts): Apply value of default
face again.  (bug#59283)

2 years agoMore fixes to last change
Po Lu [Tue, 15 Nov 2022 11:45:28 +0000 (19:45 +0800)]
More fixes to last change

* lisp/dynamic-setting.el (font-setting-change-default-font):
Call `reconsider-frame-fonts'.
* src/frame.c (Freconsider_frame_fonts): New function.
(syms_of_frame): Add new function.

2 years agoFix recent Cairo xsettings changes
Po Lu [Tue, 15 Nov 2022 11:07:44 +0000 (19:07 +0800)]
Fix recent Cairo xsettings changes

* lisp/dynamic-setting.el (font-setting-change-default-font):
Instead of setting the font frame parameter, just clear the font
and face cache and redraw the display.  This will re-open all
fonts as well.
* src/ftcrfont.c (ftcrfont_get_default_font_options): New
function.
* src/ftfont.h: Export.
* src/xsettings.c (apply_xft_settings): Call that function to
obtain the default font settings on Cairo.  (bug#58912,
bug#59283, bug#59271)

2 years agoUse substitute-command-keys for buffer-menu help
Stefan Kangas [Tue, 15 Nov 2022 07:45:02 +0000 (08:45 +0100)]
Use substitute-command-keys for buffer-menu help

* lisp/buff-menu.el (buffer-menu--display-help): New function.
(buffer-menu, buffer-menu-other-window): Fontify key bindings
using substitute-command-keys.
(Buffer-menu-delete): Advertise key binding as 'd'.
(Buffer-menu-this-window): Advertise key binding as 'f'.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Tue, 15 Nov 2022 04:09:10 +0000 (05:09 +0100)]
; Auto-commit of loaddefs files.

2 years agoAdd face to key bindings suggested by M-x
Stefan Kangas [Tue, 15 Nov 2022 03:17:58 +0000 (04:17 +0100)]
Add face to key bindings suggested by M-x

* lisp/simple.el (execute-extended-command--describe-binding-msg):
Use 'help-key-binding' face for keybinding.

2 years agoExplain how to bind keys to non-ASCII sequences
Robert Pluim [Mon, 14 Nov 2022 16:12:49 +0000 (17:12 +0100)]
Explain how to bind keys to non-ASCII sequences

* doc/emacs/custom.texi (Init Rebinding): Explain how to use `kbd'
when binding keys to non-ASCII sequences.

2 years agoMake C-x 5 o work on GNOME Shell-like Wayland compositors
Po Lu [Mon, 14 Nov 2022 11:06:12 +0000 (19:06 +0800)]
Make C-x 5 o work on GNOME Shell-like Wayland compositors

* src/pgtkterm.c (pgtk_free_frame_resources)
(fill_background_by_face)
(pgtk_draw_glyphless_glyph_string_foreground)
(pgtk_draw_window_cursor): Fix coding style.
(pgtk_focus_frame): Use gtk_window_present_with_time whenever
possible.
(key_press_event): Set the last user time.
(pgtk_display_info_for_display): New function.
(key_release_event, construct_mouse_click, button_event): Set
the last user time.
(scroll_event, pgtk_parse_color, syms_of_pgtkterm)
(pgtk_begin_cr_clip): Fix coding style.
* src/pgtkterm.h (struct pgtk_output): New field
`last_user_time'.

2 years agoCC Mode: Prevent over-eager recognition of a variable as a found type
Alan Mackenzie [Mon, 14 Nov 2022 09:47:14 +0000 (09:47 +0000)]
CC Mode: Prevent over-eager recognition of a variable as a found type

This fixes bug #59233.  It occurred in the C source code fragment

    open_replies = alloca (nproviders )

, where typing a * before the closing parenthesis caused nproviders to be
prematurely recognized as a type.

* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): CASE 18 - set
unsafe-maybe to t, when needed.

2 years agoPrevent crashes upon trying to focus a child frame on click
Po Lu [Mon, 14 Nov 2022 06:07:04 +0000 (14:07 +0800)]
Prevent crashes upon trying to focus a child frame on click

* src/xterm.c (handle_one_xevent): Do not try to activate
override-redirect frames.  Explain why.
(x_focus_frame): Catch errors around XSetInputFocus.

2 years agoHardcode "-name" instead of using find-name-arg
Dmitry Gutov [Mon, 14 Nov 2022 00:18:56 +0000 (02:18 +0200)]
Hardcode "-name" instead of using find-name-arg

* lisp/progmodes/project.el (project--files-in-directory):
Hardcode "-name" instead of using find-name-arg (bug#59023).

2 years ago* lisp/minibuffer.el (set-message-functions): New user option.
Juri Linkov [Sun, 13 Nov 2022 18:57:50 +0000 (20:57 +0200)]
* lisp/minibuffer.el (set-message-functions): New user option.

(set-message-function): Change the default from
'set-minibuffer-message' to 'set-message-functions'.
'set-minibuffer-message' is set as the default value
of the user option 'set-message-functions'.
(set-message-functions): New function.
(inhibit-message-regexps): New customizable variable (bug#52314).
(inhibit-message): New function.
(multi-message-timeout, multi-message-max): New defcustoms.
(multi-message-separator, multi-message-list): New variables.
(set-multi-message): New function.

2 years agoFix suggest-key-bindings displaying key as command
Stefan Kangas [Sun, 13 Nov 2022 18:46:02 +0000 (19:46 +0100)]
Fix suggest-key-bindings displaying key as command

* lisp/simple.el (execute-extended-command--describe-binding-msg):
New function factored out from...
(execute-extended-command): ...here.  Fix bug where a key binding was
displayed as a command with 'suggest-key-bindings'.  (Bug#59247)
* test/lisp/simple-tests.el
(simple-execute-extended-command--describe-binding-msg): New test.

2 years ago* lisp/tab-bar.el: More improvements for tab-bar-auto-width (bug#59208)
Juri Linkov [Sun, 13 Nov 2022 18:16:17 +0000 (20:16 +0200)]
* lisp/tab-bar.el: More improvements for tab-bar-auto-width (bug#59208)

(tab-bar-auto-width): Use add-face-text-property instead of propertize.
Prevent from going into infinite loops.  More optimizations.
(tab-bar-format-align-right): Use add-face-text-property, not propertize.

2 years agoEglot: fix null scopeUri regression in workspace/configuration
Ingo Lohmar [Sun, 13 Nov 2022 16:27:12 +0000 (17:27 +0100)]
Eglot: fix null scopeUri regression in workspace/configuration

* lisp/progmodes/eglot.el (eglot-handle-request):
Commit 1a2d603bb3938ff68ed1a5412d131b41efd40a24 changed
`eglot--uri-to-path' to return a nil uri untouched.  (Before,
`url-unhex-string' turned the parsed all-nil uri record into the empty
string.)

A nil return value must now be handled in the caller, do that for the
workspace/configuration handler to avoid an uncaught error.

2 years ago; * lisp/simple.el (execute-extended-command): Improve comments.
Stefan Kangas [Sun, 13 Nov 2022 14:58:48 +0000 (15:58 +0100)]
; * lisp/simple.el (execute-extended-command): Improve comments.

2 years agoNew test for execute-extended-command helper defun
Stefan Kangas [Sun, 13 Nov 2022 14:34:02 +0000 (15:34 +0100)]
New test for execute-extended-command helper defun

* test/lisp/simple-tests.el
(simple-execute-extended-command--shorter): New test.

2 years agoPrefer defvar-keymap in sql.el
Stefan Kangas [Sat, 12 Nov 2022 20:14:23 +0000 (21:14 +0100)]
Prefer defvar-keymap in sql.el

* lisp/progmodes/sql.el (sql-interactive-mode-map, sql-mode-map):
Prefer defvar-keymap.

2 years agoAdd new Go modes to eglot-server-programs
Davide Masserut [Sun, 13 Nov 2022 11:30:43 +0000 (12:30 +0100)]
Add new Go modes to eglot-server-programs

* lisp/progmodes/eglot.el (eglot-server-programs): Add new major modes
for Go to be used with gopls.  (Bug#59245)

2 years agoFix bug#59075
Po Lu [Sun, 13 Nov 2022 09:30:37 +0000 (17:30 +0800)]
Fix bug#59075

* src/nsimage.m (ns_can_use_native_image_api): Do not use native
image APIs for SVG images when RSVG is present.  (bug#59075)

2 years agoFix warnings without XCB or XFixes
Po Lu [Sun, 13 Nov 2022 07:34:16 +0000 (15:34 +0800)]
Fix warnings without XCB or XFixes

* src/xterm.c (x_term_init): Don't USE_SAFE_ALLOCA or call
SAFE_FREE outside of where it is actually used.  For some reason
the compiler still emitted warnings despite the ((void)
SAFE_ALLOCA (0)) statement.

2 years ago; Improve documentation of text-scale adjust commands
Eli Zaretskii [Sun, 13 Nov 2022 06:56:35 +0000 (08:56 +0200)]
; Improve documentation of text-scale adjust commands

* lisp/face-remap.el (global-text-scale-adjust)
(text-scale-adjust): Doc fixes.  (Bug#59122)

2 years agoPrevent non-local exits from ns-in-echo-area
Po Lu [Sun, 13 Nov 2022 01:03:51 +0000 (09:03 +0800)]
Prevent non-local exits from ns-in-echo-area

* src/nsterm.m (ns_in_echo_area_1):
(ns_in_echo_area_2):
(ns_in_echo_area): New functions.
([EmacsView firstRectForCharacterRange:]): Call them instead.
(syms_of_nsterm): New defsym.

2 years agoeglot: Support signature labels without a function name
Michal Dubiel [Sun, 23 Oct 2022 17:54:31 +0000 (19:54 +0200)]
eglot: Support signature labels without a function name

* lisp/progmodes/eglot.el (eglot--sig-info): Support signature labels
without a function name.  (Bug#58777)

Copyright-paperwork-exempt: yes

2 years agovc-git: Ensure git doesn't try to colorize stashes
Morgan Smith [Wed, 9 Nov 2022 21:16:55 +0000 (16:16 -0500)]
vc-git: Ensure git doesn't try to colorize stashes

* lisp/vc/vc-git.el (vc-git-stash-show): Add --color=never to git
flags.  (Bug#59158)

2 years agoAdd cperl-mode to eglot-server-programs
Shohei YOSHIDA [Sat, 12 Nov 2022 13:13:57 +0000 (22:13 +0900)]
Add cperl-mode to eglot-server-programs

2 years ago.dir-locals.el (C entry). Add NO_INLINE to c-noise-macro-names
Alan Mackenzie [Sat, 12 Nov 2022 15:30:38 +0000 (15:30 +0000)]
.dir-locals.el (C entry).  Add NO_INLINE to c-noise-macro-names

2 years agoCorrectly handle key map updates on Haiku
Po Lu [Sat, 12 Nov 2022 13:11:00 +0000 (13:11 +0000)]
Correctly handle key map updates on Haiku

* src/haiku_support.cc (MessageReceived): Handle
B_KEY_MAP_LOADED by clearing the previous keymap.

2 years agoDocument that 'transient-mark-mode' is off in batch mode
Eli Zaretskii [Sat, 12 Nov 2022 11:10:24 +0000 (13:10 +0200)]
Document that 'transient-mark-mode' is off in batch mode

* doc/emacs/mark.texi (Mark, Disabled Transient Mark): Document,
belatedly, that 'transient-mark-mode' is turned on by default only
in interactive sessions.  (Bug#59201)

2 years agoHandle request serial wraparound more correctly
Po Lu [Sat, 12 Nov 2022 10:52:36 +0000 (18:52 +0800)]
Handle request serial wraparound more correctly

* src/xterm.c (X_COMPARE_SERIALS): Remove macro.
(x_is_serial_more_than, x_is_serial_more_than_or_equal_to)
(x_is_serial_less_than, x_is_serial_less_than_or_equal_to): New
functions.
(x_find_error_handler, x_request_can_fail)
(x_clean_failable_requests, x_stop_ignoring_errors): Use those
functions to perform request serial comparison.

2 years ago; * src/xselect.c (x_handle_selection_request): Fix typo in last change.
Po Lu [Sat, 12 Nov 2022 07:51:02 +0000 (15:51 +0800)]
; * src/xselect.c (x_handle_selection_request): Fix typo in last change.

2 years agoFix implementation of MULTIPLE
Po Lu [Sat, 12 Nov 2022 07:50:43 +0000 (15:50 +0800)]
Fix implementation of MULTIPLE

* src/xselect.c (x_handle_selection_request): Make sure the type
of a reply to a MULTIPLE request is ATOM_PAIR.

2 years ago* doc/lispref/intro.texi: Fix PDF output without VERSION. (Bug#59199)
Stefan Kangas [Sat, 12 Nov 2022 05:35:21 +0000 (06:35 +0100)]
* doc/lispref/intro.texi: Fix PDF output without VERSION.  (Bug#59199)

2 years ago; * lisp/dired.el (dired--unhide): Remove FIXME. (Bug#59047)
Eli Zaretskii [Sat, 12 Nov 2022 07:04:42 +0000 (09:04 +0200)]
; * lisp/dired.el (dired--unhide): Remove FIXME.  (Bug#59047)

2 years ago* lisp/xwidget.el: Improve Commentary.
Po Lu [Sat, 12 Nov 2022 06:06:26 +0000 (07:06 +0100)]
* lisp/xwidget.el: Improve Commentary.

2 years agoPrefer defvar-keymap in cus-theme.el
Stefan Kangas [Sat, 12 Nov 2022 06:02:30 +0000 (07:02 +0100)]
Prefer defvar-keymap in cus-theme.el

* lisp/cus-theme.el (custom-new-theme-mode-map)
(custom-theme-choose-mode-map): Prefer defvar-keymap.

2 years agoproject--buffer-list: Remove as unused
Dmitry Gutov [Sat, 12 Nov 2022 01:34:41 +0000 (03:34 +0200)]
project--buffer-list: Remove as unused

* lisp/progmodes/project.el (project--buffer-list):
Remove as unused (pointed out in bug#59153 by Juri).

2 years agoMention obsolete gnus/nnir package in Gnus manual
Eric Abrahamsen [Fri, 11 Nov 2022 18:59:00 +0000 (10:59 -0800)]
Mention obsolete gnus/nnir package in Gnus manual

* doc/misc/gnus.texi (nnir): Provide some hints for upgrade.

2 years agoMake Eglot consider FileSystemWatcher.kind when watching files
Brian Leung [Tue, 2 Feb 2021 19:23:25 +0000 (11:23 -0800)]
Make Eglot consider FileSystemWatcher.kind when watching files

bug#58677

* eglot.el (eglot-register-capability
  workspace/didChangeWatchedFiles): Rework

Only send notifications of interest, as determined by the optional LSP
FileSystemWatcher.kind bitmask provided by the server.

When the FileSystemWatcher.kind property is omitted, use the default
value of 7, which is computed from taking the bitwise OR operation
WatchKind.Create (1) | WatchKind.Change (2) | WatchKind.Delete (4).

2 years ago; Fix typos
Stefan Kangas [Fri, 11 Nov 2022 14:46:23 +0000 (15:46 +0100)]
; Fix typos

2 years ago; * lisp/xwidget.el: Improve Commentary.
Stefan Kangas [Fri, 11 Nov 2022 14:26:09 +0000 (15:26 +0100)]
; * lisp/xwidget.el: Improve Commentary.

2 years agoFix &key parameters called without arguments (bug#58714)
Gerd Möllmann [Sun, 23 Oct 2022 08:14:10 +0000 (10:14 +0200)]
Fix &key parameters called without arguments (bug#58714)

* lisp/emacs-lisp/cl-macs.el (cl--do-arglist): Check for missing
argument.
* test/lisp/emacs-lisp/cl-macs-tests.el (cl-&key-arguments): New test.

2 years agoeglot: Remove menu entry for manual
Stefan Kangas [Fri, 11 Nov 2022 12:55:11 +0000 (13:55 +0100)]
eglot: Remove menu entry for manual

* lisp/progmodes/eglot.el (eglot-manual): Make obsolete.  Open the
eglot info manual instead of the less exhaustive README.
(eglot-menu): Remove entry for reading the manual.  (Bug#58892)

2 years ago; Tweak comment in lisp/progmodes/eglot.el (bug#58790)
João Távora [Fri, 11 Nov 2022 09:30:49 +0000 (09:30 +0000)]
; Tweak comment in lisp/progmodes/eglot.el (bug#58790)

* lisp/progmodes/eglot.el (eglot--uri-to-path): Tweak comment.

2 years ago; Fix a typo in last change.
Eli Zaretskii [Fri, 11 Nov 2022 08:22:29 +0000 (10:22 +0200)]
; Fix a typo in last change.

2 years ago; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary.
Eli Zaretskii [Fri, 11 Nov 2022 08:21:45 +0000 (10:21 +0200)]
; * lisp/progmodes/eglot.el (eglot--path-to-uri): Improve commentary.

2 years ago; * CONTRIBUTE: Clarify the log message line width guidelines.
Eli Zaretskii [Fri, 11 Nov 2022 07:14:14 +0000 (09:14 +0200)]
; * CONTRIBUTE: Clarify the log message line width guidelines.

2 years agoRemove redundant library installation instructions
Stefan Kangas [Fri, 11 Nov 2022 03:29:29 +0000 (04:29 +0100)]
Remove redundant library installation instructions

* lisp/apropos.el:
* lisp/mail/feedmail.el:
* lisp/mail/mail-hist.el:
* lisp/org/org-ctags.el:
* lisp/org/org-protocol.el:
* lisp/progmodes/ebnf2ps.el:
* lisp/progmodes/mixal-mode.el:
* lisp/progmodes/perl-mode.el:
* lisp/savehist.el:
* lisp/textmodes/table.el:
* lisp/vc/smerge-mode.el: Remove redundant installation instructions
for packages bundled with Emacs.

2 years agoSlightly adjust EWMH frame activation code for child frames
Po Lu [Fri, 11 Nov 2022 02:31:14 +0000 (10:31 +0800)]
Slightly adjust EWMH frame activation code for child frames

* src/xterm.c (x_get_toplevel_parent): New function.
(x_focus_frame): Do not use EWMH activation in two cases: focus
transfers to child frames (this is not guaranteed to work if the
focus and the child frame do not share the same toplevel) or
focus transfers from child frames to their toplevel parents.

2 years ago* lisp/progmodes/hideshow.el: Improve Commentary.
Stefan Kangas [Fri, 11 Nov 2022 00:53:41 +0000 (01:53 +0100)]
* lisp/progmodes/hideshow.el: Improve Commentary.

2 years agoPrefer defvar-keymap in hideshow.el
Stefan Kangas [Fri, 11 Nov 2022 00:48:42 +0000 (01:48 +0100)]
Prefer defvar-keymap in hideshow.el

* lisp/progmodes/hideshow.el (hs-minor-mode-map): Prefer
defvar-keymap.

2 years agoEglot: Only handle URIs with the file:// scheme (bug#58790)
dannyfreeman [Thu, 3 Nov 2022 13:39:16 +0000 (09:39 -0400)]
Eglot: Only handle URIs with the file:// scheme (bug#58790)

Eglot will not attempt to parse URIs that are not file:// type at all.
Instead let 'file-name-handler-alist' entries to deal with those.  Not
parsing them at all allows the 'file-name-handler-alist' regexps to
identify them more accurately.

By also checking if Eglot received a URI in 'eglot--path-to-uri',
'file-name-handler-alist' can provide the non-file type URI back to
the lsp server, which presumably will know how to handle them since it
is also giving them out to clients.

This issue originated with clojure-lsp sending clients "jar:" type
URIs that Emacs is unable to handle out of the box.  Before this
change, "jar:" URIs were parsed once, but since they contain a nested
URI, this resulted in a file being dispatched with a partially parsed
path that looked like "file://path/to.jar!/path/in/jar".

* lisp/progmodes/eglot.el (eglot--path-to-uri): Noop if already an
URI.  (eglot--uri-to-path):  Only handle file:// URIs

2 years agoImprove Eglot's docstrings and manual
João Távora [Thu, 10 Nov 2022 21:06:33 +0000 (21:06 +0000)]
Improve Eglot's docstrings and manual

The examples in the manual can now be copy-pasted to user's init
files as-is.

* doc/misc/eglot.texi (Setting Up LSP Servers): Use
`with-eval-after-load'.  Add eglot-alternatives example.
(Customizing Eglot): Use 'require and fix  a typo.

* lisp/progmodes/eglot.el (eglot-server-programs): Mention
eglot-alternatives in eglot-server-program's docstring.

2 years ago; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848).
Juri Linkov [Thu, 10 Nov 2022 18:35:58 +0000 (20:35 +0200)]
; * lisp/tab-line.el (tab-line-cache-key-function): Fix docstring (bug#57848).

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 10 Nov 2022 17:18:28 +0000 (19:18 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoIgnore errors when shutting down all LSP servers (bug#59146)
Evgeni Kolev [Thu, 10 Nov 2022 17:17:44 +0000 (17:17 +0000)]
Ignore errors when shutting down all LSP servers (bug#59146)

eglot-shutdown-all has a bug that results in partially stopping
servers: when a server shutdown timeouts (1.5s), an error is
propagated and eglot-shutdown-all does not try to shutdown the rest of
the servers.

* eglot.el (eglot-shutdown-all): Ignore errors when shutting down
  servers, converting errors to messages.

2 years agoDon't reset the inbox buffer's modified status in Rmail
Eli Zaretskii [Thu, 10 Nov 2022 17:16:40 +0000 (19:16 +0200)]
Don't reset the inbox buffer's modified status in Rmail

* lisp/mail/rmail.el (rmail-get-new-mail-1): Don't mark the buffer
unmodified if it was modified before getting new mail.  (Bug#59108)

2 years agoSupport 'texlab' LSP server in Eglot OOTB
Arash Esbati [Thu, 10 Nov 2022 09:18:43 +0000 (10:18 +0100)]
Support 'texlab' LSP server in Eglot OOTB

* lisp/progmodes/eglot.el (eglot-server-programs): Add support for
'texlab' LSP server for tex-mode and similar languages.

2 years agoAdd to /etc/NEWS a mention of the new C++20 support in CC Mode
Alan Mackenzie [Thu, 10 Nov 2022 11:57:42 +0000 (11:57 +0000)]
Add to /etc/NEWS a mention of the new C++20 support in CC Mode

* etc/NEWS.  A new section about C++20 support.

* lisp/progmodes/cc-defs.el (c-version): Update to 5.35.2.

2 years agoFix initialization of module functions
Eli Zaretskii [Thu, 10 Nov 2022 10:55:16 +0000 (12:55 +0200)]
Fix initialization of module functions

* src/emacs-module.c (allocate_module_function): Fix
initialization of module functions.  Suggested by Richard Copley
<rcopley@gmail.com>.  (Bug#59104)

2 years agoFix indentation for multi-line block start in Python mode
kobarity [Mon, 7 Nov 2022 13:24:44 +0000 (22:24 +0900)]
Fix indentation for multi-line block start in Python mode

* lisp/progmodes/python.el
(python-info-dedenter-opening-block-positions): Fix for multi-line
block start.
* test/lisp/progmodes/python-tests.el
(python-info-dedenter-opening-block-positions-6): New test. (Bug#59009)

2 years ago; * etc/NEWS: Mention that order of overlays might change. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:21:10 +0000 (12:21 +0200)]
; * etc/NEWS: Mention that order of overlays might change.  (Bug#59067)

2 years ago; * src/buffer.c (Foverlays_in): Doc fix. (Bug#59067)
Eli Zaretskii [Thu, 10 Nov 2022 10:18:18 +0000 (12:18 +0200)]
; * src/buffer.c (Foverlays_in): Doc fix.  (Bug#59067)

2 years agoAvoid dumping core upon SIGHUP in non-interactive sessions
Eli Zaretskii [Thu, 10 Nov 2022 10:12:56 +0000 (12:12 +0200)]
Avoid dumping core upon SIGHUP in non-interactive sessions

* src/emacs.c (terminate_due_to_signal): Don't special-case
SIGINT.  Patch by Paul Eggert <eggert@cs.ucla.edu>.  (Bug#58956)

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 10 Nov 2022 10:09:39 +0000 (12:09 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.
Eli Zaretskii [Thu, 10 Nov 2022 10:08:47 +0000 (12:08 +0200)]
; * test/lisp/dired-tests.el (dired-test-bug59047): Rename.

2 years ago* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.
Alan Mackenzie [Thu, 10 Nov 2022 10:06:20 +0000 (10:06 +0000)]
* lisp/progmodes/cc-mode.el (c-fl-decl-start): Fix off-by-one error.

This fixes bug #59070.

2 years agoMake 'dired-hide-details-mode' work after 'dired-hide-subdir'
Gabriel do Nascimento Ribeiro [Sat, 5 Nov 2022 11:27:50 +0000 (08:27 -0300)]
Make 'dired-hide-details-mode' work after 'dired-hide-subdir'

* lisp/dired.el (dired--unhide): Restore text properties.
(Bug#59047)

* test/lisp/dired-tests.el (dired-test-bugXXXX): New test.

2 years agoRewrite the `kill-buffer-delete-auto-save' tests (bug#59028)
Matt Armstrong [Fri, 4 Nov 2022 19:43:30 +0000 (12:43 -0700)]
Rewrite the `kill-buffer-delete-auto-save' tests (bug#59028)

These tests had been annoying to me when run in interactive mode.
They failed to bind `kill-buffer-delete-auto-save' as needed, so they
depended on the user's settings, and they failed to mock out the
"Buffer modified, save?" prompt.

* test/src/buffer-tests.el (test-kill-buffer-auto-save): New helper
function that mocks the two different kinds of prompts that occur when
killing modified buffers that visit a file.  Tests fail if expected
prompts are not issued.
(test-kill-buffer-auto-save-default): Use it, and explicitly bind
`kill-buffer-delete-auto-save' to nil.
(test-kill-buffer-auto-save-delete): Delete it.
(test-kill-buffer-auto-save-delete-yes): New test for the "yes" half
of the old `test-kill-buffer-auto-save-delete'.
(test-kill-buffer-auto-save-delete-yes): Ditto for the "no" half.

2 years agoBetter support for 'textarea' and 'select' tags in EWW
Nicolas Graner [Wed, 2 Nov 2022 21:28:45 +0000 (22:28 +0100)]
Better support for 'textarea' and 'select' tags in EWW

* lisp/net/eww.el (eww-tag-textarea, eww-tag-select): Don't miss
'textarea' and 'select' tags.  (Bug#58973)

2 years agoBe a little more paranoid about XI 2.0 implementations
Po Lu [Thu, 10 Nov 2022 05:25:28 +0000 (13:25 +0800)]
Be a little more paranoid about XI 2.0 implementations

* src/xterm.c (xi_populate_device_from_info):
(xi_disable_devices): Do not restore valuator values if the
valuator info has a mode of Relative and a value of 0.0.

2 years agoMake 't' in bs-mode be more defensive
Juanma Barranquero [Thu, 10 Nov 2022 00:31:22 +0000 (01:31 +0100)]
Make 't' in bs-mode be more defensive

* lisp/bs.el (bs-visit-tags-table): Verify that the
buffer holds a tags-table file before using it as
such. This is identical to bug#54133 affecting
Buffer-menu, and this fix is copied from the one
by Eli Zaretskii in commit 794fbd1c07 of 2022-02-24.
Thanks to Bob Rogers <rogers@rgrjr.com> for noticing.

2 years agoOptimize c-bs-interval, changing its value from 5000 to 2000
Alan Mackenzie [Wed, 9 Nov 2022 21:28:18 +0000 (21:28 +0000)]
Optimize c-bs-interval, changing its value from 5000 to 2000

* lisp/progmodes/cc-engine.el (c-bs-interval): This optimization speeds
forward scrolling in a C Mode buffer by ~2.4%, backward scrolling by ~1.8%.

2 years ago* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.
Juri Linkov [Wed, 9 Nov 2022 17:29:37 +0000 (19:29 +0200)]
* lisp/tab-bar.el (tab-bar-auto-width): Add selected-frame to the cache key.

2 years agoAvoid assertion violations in matrix_row
Eli Zaretskii [Wed, 9 Nov 2022 14:25:02 +0000 (16:25 +0200)]
Avoid assertion violations in matrix_row

* src/xdisp.c (cursor_in_mouse_face_p): Avoid rare assertion
violations when the cursor's VPOS winds up being invalid for the
window.  (Bug#59147)

2 years ago* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.
Stefan Kangas [Wed, 9 Nov 2022 14:10:24 +0000 (15:10 +0100)]
* lisp/thread.el (thread-list-mode-map): Prefer defvar-keymap.

2 years agoDelete emacs < 26.2 workaround in eglot--apply-text-edits
Stephen Leake [Wed, 9 Nov 2022 14:00:40 +0000 (06:00 -0800)]
Delete emacs < 26.2 workaround in eglot--apply-text-edits

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Delete emacs <
26.2 workaround; fixes bug in ada-mode test.

2 years ago; Fix typos in help.texi
Eli Zaretskii [Wed, 9 Nov 2022 13:26:42 +0000 (15:26 +0200)]
; Fix typos in help.texi

* doc/lispref/help.texi (Documentation Groups): Fix typos.
Reported by Yuan Fu <casouri@gmail.com>.  (Bug#59136)

2 years agoTeach thing-at-point to recognize bracketed IPv6 URLs
F. Jason Park [Wed, 13 Jul 2022 08:54:19 +0000 (01:54 -0700)]
Teach thing-at-point to recognize bracketed IPv6 URLs

* lisp/thingatpt.el (thing-at-point-bounds-of-url-at-point): Allow
IPv6 addresses as hosts.  Overshoots in the case of bracketed markup
but is rescued by `thing-at-point--bounds-of-well-formed-url'.
* test/lisp/thingatpt-tests.el (thing-at-point-test-data): Add cases
for IPv6 URLs.  Bug#56514.