Juri Linkov [Fri, 4 Nov 2022 07:47:06 +0000 (09:47 +0200)]
* lisp/tab-bar.el (tab-bar-fixed-width): New user option.
(tab-bar-fixed-width-max): New user option.
(tab-bar-fixed-width-min): New variable.
(tab-bar-fixed-width-faces): New variable.
(tab-bar--fixed-width-hash): New function.
(tab-bar-make-keymap-1): Use 'tab-bar-fixed-width'.
Jim Porter [Mon, 19 Sep 2022 00:42:09 +0000 (17:42 -0700)]
Only strip newlines when stringifying a value for Eshell
* lisp/eshell/esh-util.el (eshell-stringify): Use 'string-trim-right'
instead of stripping the last character of the result of
'pp-to-string' (bug#58810).
Juri Linkov [Thu, 3 Nov 2022 17:35:45 +0000 (19:35 +0200)]
Fix overlays order in Flyspell (bug#58970)
Flyspell relies on the sorting order of overlays from 'overlays-in'
that returned the overlays sorted by decreased 'overlay-start'.
But after the recent merge of the noverlay branch, the order was reversed.
So need to change the order back to the expected by Flyspell.
* lisp/textmodes/flyspell.el (flyspell-auto-correct-previous-word):
Sort overlays returned from 'overlays-in' descending by 'overlay-start'.
Some names under the interval_* namespace were renamed under the
itree_* namespace in commits:
0. f421b58db5 of 2022-10-19
"Prefix all itree.h type names with itree_".
1. 37a1145410 of 2022-10-19
"Rename all exported itree.h functions with the itree_ prefix"
Further, some values still referenced in commentary were removed in
commits:
2. 258e618364 of 2022-10-17
"Delete the itree_null sentinel node, use NULL everywhere."
3. 2c4a3910b3 of 2022-10-02
"itree: Use a single iterator object"
* src/emacs.c (main): Allocate global itree iterator once and for
all.
* src/alloc.c (mark_overlay):
* src/buffer.c (set_overlays_multibyte):
* src/itree.c (itree_destroy): Update commentary.
(interval_stack_ensure_space, itree_insert_gap): Prefer
unsigned-to-unsigned comparisons over signed-to-unsigned.
(interval_stack_push_flagged, interval_tree_insert)
(interval_tree_contains, itree_iterator_start)
(itree_iterator_finish, itree_iterator_next, itree_iterator_narrow):
Improve assertions.
(itree_init): Rename...
(init_itree): ...to this, for consistency with other global init
functions.
(itree_create): Stop leaking a global iterator allocation on each
call.
(interval_tree_init): Complete renames of
interval_tree -> itree_tree and interval_tree_clear -> itree_clear.
(interval_tree_remove_fix): Fix indentation.
* src/itree.h: Declare init_itree.
(ITREE_FOREACH): Fix typo in commentary.
* src/pdumper.c [CHECK_STRUCTS]
(dump_interval_node): Use the correct name in the HASH condition
and #error message.
(dump_overlay, dump_buffer): Update HASH (bug#58975).
Po Lu [Thu, 3 Nov 2022 11:27:24 +0000 (19:27 +0800)]
Further simplify valuator reset code
* src/xterm.c (xi_reset_scroll_valuators_for_device_id): Minor
style adjustments.
(handle_one_xevent): Don't check frames; reset on all XI_Enter
and XI_Leave events.
Eli Zaretskii [Thu, 3 Nov 2022 09:25:50 +0000 (11:25 +0200)]
Fix 'text-property-search-backward' with 1-char long properties
* lisp/emacs-lisp/text-property-search.el
(text-property--find-end-backward): Don't miss the end of
text-property value at point. This fixes searches backward when
the property is on a single character position. (Bug#58937)
Paul Eggert [Wed, 2 Nov 2022 20:24:26 +0000 (13:24 -0700)]
Initialize child signal handling before posix_spawn too.
Problem reported by Tino Calancha (Bug#58960).
* src/callproc.c (call_process): Initialize SIGCHLD handling
before possibly creating a child with emacs_span. This need not
be in the critical section that calls emacs_spawn, so do it
outside the critical section.
* src/process.c (child_signal_init): Now extern.
Juri Linkov [Wed, 2 Nov 2022 18:22:10 +0000 (20:22 +0200)]
Add the parameter :noquery to open-network-stream (bug#58948)
* doc/lispref/processes.texi (Network): Add :noquery for open-network-stream.
* lisp/net/network-stream.el (open-network-stream): Pass the
parameter :noquery to make-network-process. Doc fix.
* lisp/progmodes/eglot.el (eglot--connect): Pass `:noquery t' to
eglot--inferior-bootstrap to use in open-network-stream call, like
`:noquery t' is passed to make-process in other places.
Po Lu [Wed, 2 Nov 2022 10:27:16 +0000 (18:27 +0800)]
Improve commentary in some parts of xterm.c
* src/xterm.c (x_probe_xfixes_extension): Rename to
`x_fixes_pointer_blanking_supported', as fixes is now used for
selection tracking as well. All callers changed.
(x_focus_changed): Document where this code is used.
Po Lu [Tue, 1 Nov 2022 04:51:38 +0000 (12:51 +0800)]
Fix leaks of XImage structures in image.c
* src/image.c (image_clear_image, lookup_image): Fix coding
style.
(x_destroy_x_image): Remove unnecessary assertion. Call
XDestroyImage, since otherwise only the image data is freed.
(image_from_emacs_colors): Rename variables to make more sense.
Dmitry Gutov [Mon, 31 Oct 2022 00:51:14 +0000 (02:51 +0200)]
Fix semantic-symref-perform-search when dir contains a space
* lisp/cedet/semantic/symref/grep.el (semantic-symref-grep--local-dir):
New variable.
(semantic-symref-perform-search): Use it. And use "." when
expanding the template to substitute for the current dir.
(semantic-symref-parse-tool-output-one-line): Use it (bug#55016)
Stefan Monnier [Sun, 30 Oct 2022 13:37:23 +0000 (09:37 -0400)]
dom-print: Fix missing entities quoting
Also use `?\s` for the space character.
* lisp/dom.el (dom-print): Properly quote special characters to avoid
generating invalid HTML/XML.
(dom-tag, dom-attributes, dom-children, dom-node)
(dom-add-child-before): Simplify.
(dom-set-attribute): Add at beginning rather than at end (slightly
more efficient and less destructive).
Stefan Kangas [Sun, 30 Oct 2022 13:30:56 +0000 (14:30 +0100)]
elide-head: Make trailing "/" in URL optional
* lisp/elide-head.el (elide-head-headers-to-hide): Make trailing
"/" in the gnu.org URL optional for the GPL.
* test/lisp/elide-head-tests.el
(elide-head--test-headers-to-hide/gpl3-5): New test.
Visuwesh [Mon, 10 Oct 2022 18:19:06 +0000 (23:49 +0530)]
Fix set-language-info-alist when multiple PARENTS are given
* lisp/international/mule-cmds.el (set-language-info-setup-keymap):
Function factored out from...
(set-language-info-alist): ...here. Do not mess up the keymaps when
multiple parents are given in PARENTS. (Bug#58376)
(tab-bar-select-tab): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t. Reselect the previously active minibuffer
and unselect unnecessarily selected minibuffer.
(tab-bar-history-back, tab-bar-history-forward): Set set-window-configuration
arg DONT-SET-MINIWINDOW to t.
Eli Zaretskii [Sat, 29 Oct 2022 15:59:04 +0000 (18:59 +0300)]
Set 'native-comp-debug' to zero on MS-Windows
* lisp/emacs-lisp/comp.el (native-comp-debug): Don't emit debug
symbols on MS-Windows. The default was originally made 1 because
without that, C backtraces on Windows would not show
natively-compiled functions correctly, or would even stop short of
reaching the topmost call frame. But that turned out to be due to
a bug in GDB, which was meanwhile fixed in GDB 12. So we can now
reset the value back to zero, and gain smaller *.eln files on
MS-Windows.
Alan Mackenzie [Sat, 29 Oct 2022 13:21:39 +0000 (13:21 +0000)]
Fix the subr-arity returned by native compiled functions with lots of args
This fixes bug #58739. Make subr-arity return, e.g., (12 . 12) rather than
(12 . many) for a function with a fixed number of arguments more than 8.
* lisp/emacs-lisp/comp.el (comp-prepare-args-for-top-level): Only return a cdr
of 'many when there are &rest arguments.
* src/eval.c (eval_sub): Also check for a fixed number of args over 8 when
using the nargs + *args calling convention.
(funcall_subr): Also check numargs <= 8 before using the fixed args calling
convention. Include the case numargs > 8 in the aMany calling convention.
* src/lisp.h (DEFUN): Amend the comment about MANY.
Po Lu [Sat, 29 Oct 2022 10:21:09 +0000 (18:21 +0800)]
Fix crash destroying NS frame tool bar
* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Work
around silly GCC bug causing splurious warnings.
([EmacsWindow dealloc]): Detach tool bar before dealloc'ing
window. (bug#58857)
Alan Mackenzie [Sat, 29 Oct 2022 10:04:37 +0000 (10:04 +0000)]
c-get-fontification-context: Refine the last non-default arm of the cond
This fixes bug #58772.
* lisp/progmodes/cc-fonts.el (c-get-fontification-context): Make the function
return (decl . nil) when MATCH-POS is in the second paren list of something
like DEFUN (..) (..). Tidy up untidy code with save-excursion's for greater
accuracy. Set a c-type text property value c-decl-arg-start to speed up
future calls. Reindent the entire function.