]> git.eshelyaron.com Git - emacs.git/log
emacs.git
22 months agoFix initialization of scroll valuator emacs_value
Po Lu [Fri, 4 Nov 2022 00:29:02 +0000 (08:29 +0800)]
Fix initialization of scroll valuator emacs_value

* src/xterm.c (xi_handle_device_changed): Initialize emacs_value
to 0, not DBL_MIN.  (bug#58980)

22 months agoOnly strip newlines when stringifying a value for Eshell
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).

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

22 months agoImprove suppression of bogus macOS warnings
Paul Eggert [Thu, 3 Nov 2022 18:09:53 +0000 (11:09 -0700)]
Improve suppression of bogus macOS warnings

* configure.ac: On macOS, always use -Wno-deprecated-declarations,
as the false alarms appear even if --disable-gcc-warnings is given
(Bug#58966).

22 months agoFix overlays order in Flyspell (bug#58970)
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'.

22 months agoPort interval trees to --enable-checking=structs
Basil L. Contovounesios [Wed, 2 Nov 2022 01:50:38 +0000 (03:50 +0200)]
Port interval trees to --enable-checking=structs

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

22 months ago* src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities.
Juanma Barranquero [Thu, 3 Nov 2022 13:41:28 +0000 (14:41 +0100)]
* src/gnutls.c (Fgnutls_available_p): Avoid duplicating capabilities.

22 months agoPrefer defvar-keymap in profiler.el
Stefan Kangas [Wed, 2 Nov 2022 14:43:35 +0000 (15:43 +0100)]
Prefer defvar-keymap in profiler.el

* lisp/profiler.el (profiler-report-mode-map): Prefer
defvar-keymap.

22 months ago; * emoji.el (emoji--define-transient): Adapt to recent changes in transient.
Jonas Bernoulli [Wed, 2 Nov 2022 22:33:59 +0000 (23:33 +0100)]
; * emoji.el (emoji--define-transient): Adapt to recent changes in transient.

22 months agoFurther simplify valuator reset code
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.

22 months agoSuppress deprecation warnings on macOS (bug#58966)
Gerd Möllmann [Thu, 3 Nov 2022 09:39:37 +0000 (10:39 +0100)]
Suppress deprecation warnings on macOS (bug#58966)

* configure.ac (CHECK_LISP_OBJECT_TYPE): Add
-Wno-deprecated-declarations for darwin.

22 months agoFix 'text-property-search-backward' with 1-char long properties
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)

22 months ago; Fix a typo in Eglot manual
dannyfreeman [Wed, 2 Nov 2022 17:24:30 +0000 (13:24 -0400)]
; Fix a typo in Eglot manual

* doc/mist/eglot.texi (Customizing Eglot): 'flymake-error' face
mistakenly appears twice.  (Bug#58969)

22 months ago; * doc/lispref/control.texi (Generators): Fix typo.
Juanma Barranquero [Thu, 3 Nov 2022 02:49:08 +0000 (03:49 +0100)]
; * doc/lispref/control.texi (Generators): Fix typo.

22 months agoInitialize child signal handling before posix_spawn too.
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.

22 months ago; Fix typo
Juri Linkov [Wed, 2 Nov 2022 18:36:49 +0000 (20:36 +0200)]
; Fix typo

22 months agoAdd the parameter :noquery to open-network-stream (bug#58948)
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.

22 months ago; * doc/misc/cl.texi (Mapping over Sequences): Fix typos.
Juanma Barranquero [Wed, 2 Nov 2022 16:19:46 +0000 (17:19 +0100)]
; * doc/misc/cl.texi (Mapping over Sequences): Fix typos.

22 months ago; * admin/git-bisect-start: Improve commentary.
Gregory Heytings [Wed, 2 Nov 2022 14:20:39 +0000 (14:20 +0000)]
; * admin/git-bisect-start: Improve commentary.

22 months ago* lisp/man.el (Man-mode-map): Prefer defvar-keymap.
Stefan Kangas [Wed, 2 Nov 2022 14:06:43 +0000 (15:06 +0100)]
* lisp/man.el (Man-mode-map): Prefer defvar-keymap.

22 months ago; * admin/git-bisect-start: Improve commentary.
Eli Zaretskii [Wed, 2 Nov 2022 13:47:58 +0000 (15:47 +0200)]
; * admin/git-bisect-start: Improve commentary.

22 months ago; * admin/git-bisect-start: Use a full reference.
Gregory Heytings [Wed, 2 Nov 2022 13:07:09 +0000 (13:07 +0000)]
; * admin/git-bisect-start: Use a full reference.

22 months agoImprove commentary in some parts of xterm.c
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.

22 months agoRemove unused local in simple_search
Paul Eggert [Wed, 2 Nov 2022 06:03:25 +0000 (23:03 -0700)]
Remove unused local in simple_search

* src/search.c (simple_search): Remove unused local.

22 months agosrc/buffer.c: Fix interaction between overlays & indirect buffers (bug#58928)
Stefan Monnier [Wed, 2 Nov 2022 01:38:55 +0000 (21:38 -0400)]
src/buffer.c: Fix interaction between overlays & indirect buffers (bug#58928)

* src/buffer.c (adjust_overlays_for_insert)
(adjust_overlays_for_delete): Repeat for all buffers sharing the same text.

* src/itree.c (itree_insert_gap, itree_delete_gap): Allow an empty tree.

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-bug58928):
New test.

22 months agoproject-switch-project: Avoid altering default-directory in cb
Dmitry Gutov [Tue, 1 Nov 2022 23:30:08 +0000 (01:30 +0200)]
project-switch-project: Avoid altering default-directory in cb

* lisp/progmodes/project.el (project-switch-project):
Avoid altering default-directory in the current buffer, even
temporarily (bug#58784).

22 months agovc-svn-ignore-completion-table: Ignore empty lines
Dmitry Gutov [Tue, 1 Nov 2022 22:46:02 +0000 (00:46 +0200)]
vc-svn-ignore-completion-table: Ignore empty lines

* lisp/vc/vc-svn.el (vc-svn-ignore-completion-table):
Make sure to ignore empty lines (bug#58889).

22 months agoAdd a script to ease bisecting.
Gregory Heytings [Tue, 1 Nov 2022 18:20:00 +0000 (18:20 +0000)]
Add a script to ease bisecting.

* admin/git-bisect-start: New script.

* admin/notes/repo (Bisecting): Mention the script.

* admin/emake: Add a Copyright blurb.

22 months ago* lisp/net/dbus.el (dbus-debug): Declare. (Bug#58865)
Michael Albinus [Tue, 1 Nov 2022 15:35:40 +0000 (16:35 +0100)]
* lisp/net/dbus.el (dbus-debug): Declare.  (Bug#58865)

22 months ago* src/xterm.c (x_term_init): Fix last change.
Po Lu [Tue, 1 Nov 2022 11:20:03 +0000 (19:20 +0800)]
* src/xterm.c (x_term_init): Fix last change.

22 months agoFix leak on Lucid build
Po Lu [Tue, 1 Nov 2022 11:11:19 +0000 (19:11 +0800)]
Fix leak on Lucid build

* src/xterm.c (x_term_init): Rectify wrong fix for bug#18403.

22 months agoMerge from origin/emacs-28
Stefan Kangas [Tue, 1 Nov 2022 09:30:09 +0000 (10:30 +0100)]
Merge from origin/emacs-28

1862df834c ; * src/search.c (Fmatch_data): Doc fix.
15fc5225b1 ; * lisp/whitespace.el (whitespace-trailing): Fix a typo.
9f3c896f7c ; * doc/emacs/text.texi (Quotation Marks): Typo fix.  (Bug...

# Conflicts:
# src/search.c

22 months ago; Mention git bisect's --first-parent in admin/notes/repo
Gerd Möllmann [Tue, 1 Nov 2022 09:25:28 +0000 (10:25 +0100)]
; Mention git bisect's --first-parent in admin/notes/repo

22 months agoPreven a buffer-overflow (bug#58850)
Gerd Möllmann [Tue, 1 Nov 2022 09:14:07 +0000 (10:14 +0100)]
Preven a buffer-overflow (bug#58850)

* src/print.c (print_vectorlike): Don't use sprintf.

22 months agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Tue, 1 Nov 2022 05:00:54 +0000 (06:00 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-10-29 17:48:52 UTC.

22 months agoFix leaks of XImage structures in image.c
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.

22 months ago; Auto-commit of loaddefs files.
Stefan Kangas [Tue, 1 Nov 2022 04:07:50 +0000 (05:07 +0100)]
; Auto-commit of loaddefs files.

22 months agoFix eglot-shutdown-all: Match current eglot-shutdown signature
Stephen Leake [Tue, 1 Nov 2022 00:30:02 +0000 (17:30 -0700)]
Fix eglot-shutdown-all: Match current eglot-shutdown signature

22 months agoFix tramp-handle-file-newer-than-file-p
Michael Albinus [Mon, 31 Oct 2022 15:48:15 +0000 (16:48 +0100)]
Fix tramp-handle-file-newer-than-file-p

* lisp/net/tramp.el (tramp-handle-file-newer-than-file-p): Don't use
fractions of seconds.  (Bug#58842)

22 months agoPrefer defvar-keymap in cus-edit.el
Stefan Kangas [Mon, 31 Oct 2022 15:42:26 +0000 (16:42 +0100)]
Prefer defvar-keymap in cus-edit.el

* lisp/cus-edit.el (custom-mode-map, custom-mode-link-map): Prefer
defvar-keymap.

22 months ago* lisp/emacs-lisp/multisession.el: Add Commentary. (Bug#58845)
Stefan Kangas [Mon, 31 Oct 2022 14:28:36 +0000 (15:28 +0100)]
* lisp/emacs-lisp/multisession.el: Add Commentary.  (Bug#58845)

22 months ago* lisp/vcursor.el (vcursor-map): Prefer defvar-keymap.
Stefan Kangas [Mon, 31 Oct 2022 14:19:32 +0000 (15:19 +0100)]
* lisp/vcursor.el (vcursor-map): Prefer defvar-keymap.

22 months agoFix semantic-symref-perform-search when dir contains a space
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)

22 months agoSpeed up vc-default-checkin-patch a little
Dmitry Gutov [Mon, 31 Oct 2022 00:48:16 +0000 (02:48 +0200)]
Speed up vc-default-checkin-patch a little

* lisp/vc/vc.el (vc-default-checkin-patch): Drop some
'revert-buffer' calls to speed up the process a little (bug#52349).

22 months agoPrefer defvar-keymap in simula.el
Stefan Kangas [Sun, 30 Oct 2022 20:30:41 +0000 (21:30 +0100)]
Prefer defvar-keymap in simula.el

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

22 months ago; Delete duplicate definition from simula.el
Stefan Kangas [Sun, 30 Oct 2022 20:26:45 +0000 (21:26 +0100)]
; Delete duplicate definition from simula.el

* lisp/progmodes/simula.el (simula-mode-menu): Delete duplicate
menu definition.

22 months ago; * src/search.c (Fmatch_data): Doc fix.
Eli Zaretskii [Sun, 30 Oct 2022 17:57:14 +0000 (19:57 +0200)]
; * src/search.c (Fmatch_data): Doc fix.

22 months ago* lisp/tab-line.el: Allow user-defined cache-key function (bug#57848)
Juri Linkov [Sun, 30 Oct 2022 17:38:41 +0000 (19:38 +0200)]
* lisp/tab-line.el: Allow user-defined cache-key function (bug#57848)

(tab-line-cache-key-default): New function.
(tab-line-cache-key-function): New variable.
(tab-line-format): Funcall tab-line-cache-key-function.

22 months ago* lisp/tab-line.el: Escape %-constructs in tab names (bug#57848)
Juri Linkov [Sun, 30 Oct 2022 17:36:06 +0000 (19:36 +0200)]
* lisp/tab-line.el: Escape %-constructs in tab names (bug#57848)

(tab-line-tab-name-format-default): Replace % with %% in tab name
to escape %-constructs from processing by mode-line-format.

22 months ago* lisp/url/url-util.el (url-insert-entities-in-string): Simplify
Stefan Monnier [Sun, 30 Oct 2022 13:39:45 +0000 (09:39 -0400)]
* lisp/url/url-util.el (url-insert-entities-in-string): Simplify

22 months agodom-print: Fix missing entities quoting
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).

22 months agoelide-head: Make trailing "/" in URL optional
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.

22 months agoMake previous-buffer and next-buffer repeatable
Damien Cassou [Wed, 26 Oct 2022 15:12:14 +0000 (17:12 +0200)]
Make previous-buffer and next-buffer repeatable

* lisp/bindings.el (buffer-navigation-repeat-map): Add new map.
* lisp/bindings.el (previous-buffer, next-buffer): Mark as
repeatable.  (Bug#58800)

22 months ago; Fix unclean code in w32fns.c
Eli Zaretskii [Sun, 30 Oct 2022 12:45:18 +0000 (14:45 +0200)]
; Fix unclean code in w32fns.c

* src/w32fns.c (setup_w32_kbdhook): Fix a typo and check errors
from the call to StringFromGUID2.  Reported by Juanma Barranquero
<lekktu@gmail.com>.

22 months agoMake winner key sequences repeatable in repeat-mode
Damien Cassou [Wed, 26 Oct 2022 14:53:23 +0000 (16:53 +0200)]
Make winner key sequences repeatable in repeat-mode

* lisp/winner.el (winner-repeat-map): New variable.
(winner-undo, winner-redo): Put 'repeat-map' property with
'winner-repeat-map'.  (Bug#58799)

22 months agoPrefer defvar-keymap in etags.el
Stefan Kangas [Sun, 30 Oct 2022 12:14:57 +0000 (13:14 +0100)]
Prefer defvar-keymap in etags.el

* lisp/progmodes/etags.el (select-tags-table-mode-map): Prefer
defvar-keymap.

22 months ago; Change parent language-environment of Kharoshthi
Eli Zaretskii [Sun, 30 Oct 2022 11:16:30 +0000 (13:16 +0200)]
; Change parent language-environment of Kharoshthi

* lisp/language/misc-lang.el ("Kharoshthi"): Change its parent to
"Indian".  (Bug#58376)
* lisp/international/mule-cmds.el (set-language-info-alist): Fix
indentation.

22 months agoFix set-language-info-alist when multiple PARENTS are given
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)

22 months ago; * src/sqlite.c (Fsqlite_select): Doc fix. (Bug#58885)
Eli Zaretskii [Sun, 30 Oct 2022 08:31:00 +0000 (10:31 +0200)]
; * src/sqlite.c (Fsqlite_select): Doc fix.  (Bug#58885)

22 months ago* lisp/tab-bar.el: Minibuffer follows selected tabs (bug#58728)
Juri Linkov [Sun, 30 Oct 2022 07:33:38 +0000 (09:33 +0200)]
* lisp/tab-bar.el: Minibuffer follows selected tabs (bug#58728)

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

22 months agoPlug big leaks upon display IO error
Po Lu [Sun, 30 Oct 2022 05:13:28 +0000 (13:13 +0800)]
Plug big leaks upon display IO error

Frame GCs are still leaked, but there is nothing that can be
done in that case because the display connection is dead.

* src/xterm.c (x_delete_terminal): Always free xkb desc and
modmap.

22 months ago; Silence warning in last hierarchy.el change.
Basil L. Contovounesios [Sat, 29 Oct 2022 21:44:44 +0000 (00:44 +0300)]
; Silence warning in last hierarchy.el change.

22 months ago; * lisp/dired.el (dired--make-directory-clickable): Fix typo.
Eli Zaretskii [Sat, 29 Oct 2022 16:52:48 +0000 (19:52 +0300)]
; * lisp/dired.el (dired--make-directory-clickable): Fix typo.

22 months agoSet 'native-comp-debug' to zero on MS-Windows
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.

22 months agoPrefer defvar-keymap in ps-mode.el
Stefan Kangas [Sat, 29 Oct 2022 15:08:51 +0000 (17:08 +0200)]
Prefer defvar-keymap in ps-mode.el

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

22 months ago; Remove redundant declares of w3m-minor-mode-map
Stefan Kangas [Sat, 29 Oct 2022 15:02:27 +0000 (17:02 +0200)]
; Remove redundant declares of w3m-minor-mode-map

* lisp/gnus/gnus-art.el (w3m-minor-mode-map):
* lisp/net/newst-backend.el (w3m-minor-mode-map): Don't declare.

22 months ago; * etc/NEWS: Add entry about more performant overlays.
Eli Zaretskii [Sat, 29 Oct 2022 13:34:08 +0000 (16:34 +0300)]
; * etc/NEWS: Add entry about more performant overlays.

22 months agoFix the subr-arity returned by native compiled functions with lots of args
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.

22 months agoMake Dired header clickable on non-Posix systems as well
Eli Zaretskii [Sat, 29 Oct 2022 13:16:06 +0000 (16:16 +0300)]
Make Dired header clickable on non-Posix systems as well

* lisp/dired.el (dired--make-directory-clickable): Support
MS-Windows and MS-DOS absolute directory names with drive letters
and UNCs.  (Bug#21973)

22 months agoDisplay the Dired buffer as unmodified initially
Eli Zaretskii [Sat, 29 Oct 2022 13:02:35 +0000 (16:02 +0300)]
Display the Dired buffer as unmodified initially

* lisp/dired.el (dired-readin): Make sure a newly-created Dired
buffer is shown as unmodified.  (Bug#58863)

22 months ago; * lisp/whitespace.el (whitespace-trailing): Fix a typo.
Eli Zaretskii [Sat, 29 Oct 2022 12:40:31 +0000 (15:40 +0300)]
; * lisp/whitespace.el (whitespace-trailing): Fix a typo.

22 months agoFix another GCC warning
Po Lu [Sat, 29 Oct 2022 10:21:51 +0000 (18:21 +0800)]
Fix another GCC warning

* src/nsterm.m (ns_draw_glyphless_glyph_string_foreground): Fix
another compiler warning.

22 months agoFix crash destroying NS frame tool bar
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)

22 months agoc-get-fontification-context: Refine the last non-default arm of the cond
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.

22 months ago; * doc/emacs/text.texi (Quotation Marks): Typo fix. (Bug#58822)
Matt Armstrong [Thu, 27 Oct 2022 20:46:38 +0000 (13:46 -0700)]
; * doc/emacs/text.texi (Quotation Marks): Typo fix.  (Bug#58822)

22 months agoPrefer defvar-keymap in help.el
Stefan Kangas [Sat, 29 Oct 2022 05:44:07 +0000 (07:44 +0200)]
Prefer defvar-keymap in help.el

* lisp/help.el (help-key): New function.
(help-map): Prefer defvar-keymap.

22 months agoPrefer defvar-keymap in page-ext.el
Stefan Kangas [Sat, 29 Oct 2022 01:57:55 +0000 (03:57 +0200)]
Prefer defvar-keymap in page-ext.el

* lisp/textmodes/page-ext.el (pages--ctl-x-ctl-p-map)
(pages-directory-mode-map): Prefer defvar-keymap.

22 months ago; Minor cleanups in make-mode.el
Stefan Kangas [Sat, 29 Oct 2022 01:42:46 +0000 (03:42 +0200)]
; Minor cleanups in make-mode.el

* lisp/progmodes/make-mode.el
(makefile-query-one-target-method-function)
(makefile-insert-macro, makefile-insert-target)
(makefile-insert-target-ref, makefile-backslash-region)
(makefile-browser-next-line, makefile-browser-previous-line)
(makefile-remember-target): Minor cleanups.

22 months agoFix last change
Po Lu [Sat, 29 Oct 2022 00:55:40 +0000 (08:55 +0800)]
Fix last change

* src/itree.c (struct itree_iterator):
(itree_iterator_next): Fix some fields and const confusion.

22 months agoFix function declarations in itree headers
Po Lu [Sat, 29 Oct 2022 00:48:58 +0000 (08:48 +0800)]
Fix function declarations in itree headers

* src/itree.h: Make all declarations `extern'.

22 months agoFix coding style of latest feature branch merge
Po Lu [Sat, 29 Oct 2022 00:47:16 +0000 (08:47 +0800)]
Fix coding style of latest feature branch merge

* src/itree.c (interval_stack_ensure_space)
(interval_stack_push_flagged, struct itree_iterator)
(struct check_subtree_result, check_subtree, check_tree)
(itree_newlimit, interval_tree_inherit_offset)
(interval_tree_propagate_limit, itree_node_init, itree_node_begin)
(itree_node_end, itree_create, interval_tree_rotate_left)
(interval_tree_rotate_right, interval_tree_insert_fix)
(interval_tree_insert, itree_insert, itree_node_set_region)
(interval_tree_contains, interval_tree_subtree_min)
(interval_tree_remove_fix, interval_tree_replace_child)
(interval_tree_transplant, itree_remove, itree_iterator_start)
(itree_insert_gap, itree_delete_gap, interval_node_intersects)
(itree_iterator_next, itree_iterator_narrow): Tabify.  Fix
comment and code coding style.

22 months agoInclude Cairo FreeType header when available
Po Lu [Sat, 29 Oct 2022 00:38:09 +0000 (08:38 +0800)]
Include Cairo FreeType header when available

* src/xsettings.c: Include cairo-ft.h if CAIRO_HAS_FT_FONT.
(bug#58830)

22 months agoMerge remote-tracking branch 'origin/feature/noverlay'
Stefan Monnier [Fri, 28 Oct 2022 21:44:44 +0000 (17:44 -0400)]
Merge remote-tracking branch 'origin/feature/noverlay'

22 months agoFix warning in xsettings.c
Stefan Kangas [Fri, 28 Oct 2022 21:08:36 +0000 (23:08 +0200)]
Fix warning in xsettings.c

* src/xsettings.c [USE_CAIRO]: Include cairo-ft.h.
Thanks to Vincent Bernat <bernat@luffy.cx>.

22 months ago; Fix sit-for calling convention in zone.el
Stefan Kangas [Fri, 28 Oct 2022 20:34:24 +0000 (22:34 +0200)]
; Fix sit-for calling convention in zone.el

* lisp/play/zone.el (zone-pgm-2nd-putz-with-case)
(zone-pgm-putz-with-case): Don't use obsolete calling convention for
'sit-for'.

22 months agoRemove redundant requires from make-mode.el
Stefan Kangas [Fri, 28 Oct 2022 20:30:31 +0000 (22:30 +0200)]
Remove redundant requires from make-mode.el

* lisp/progmodes/make-mode.el (imenu, dabbrev, add-log): Remove
redundant requires.

22 months agoUse new sit-for calling convention in zone.el
Stefan Kangas [Fri, 28 Oct 2022 20:20:56 +0000 (22:20 +0200)]
Use new sit-for calling convention in zone.el

* lisp/play/zone.el (zone-exploding-remove): Don't use obsolete
calling convention for 'sit-for'.

22 months agoMinor doc fixes in make-mode.el
Stefan Kangas [Fri, 28 Oct 2022 00:36:04 +0000 (02:36 +0200)]
Minor doc fixes in make-mode.el

* lisp/progmodes/make-mode.el:
(makefile-insert-macro, makefile-pickup-everything)
(makefile-backslash-region): Minor doc fixes.
(makefile-browse): Use substitute-command-keys.

22 months agoPrefer defvar-keymap in make-mode.el
Stefan Kangas [Fri, 28 Oct 2022 00:33:33 +0000 (02:33 +0200)]
Prefer defvar-keymap in make-mode.el

* lisp/progmodes/make-mode.el (makefile-mode-map)
(makefile-browser-map): Prefer defvar-keymap.

22 months agoPrefer make-temp-name in make-mode.el
Stefan Kangas [Fri, 28 Oct 2022 00:17:58 +0000 (02:17 +0200)]
Prefer make-temp-name in make-mode.el

* lisp/progmodes/make-mode.el
(makefile-generate-temporary-filename): Make obsolete in favor of
'make-temp-name'.  Simplify.
(makefile-save-temporary): Don't use above obsolete function.

22 months agoEnsure temp file is deleted in makefile overview
Stefan Kangas [Fri, 28 Oct 2022 00:26:44 +0000 (02:26 +0200)]
Ensure temp file is deleted in makefile overview

* lisp/progmodes/make-mode.el (makefile-create-up-to-date-overview):
Ensure temp file is always deleted.

22 months agoMerge from origin/emacs-28
Stefan Kangas [Fri, 28 Oct 2022 19:51:44 +0000 (21:51 +0200)]
Merge from origin/emacs-28

510020d30d ; Improve doc strings in whitespace.el

# Conflicts:
# lisp/whitespace.el

22 months ago; * doc/lispref/frames.texi (Drag and Drop): Fix typos and wording.
Eli Zaretskii [Fri, 28 Oct 2022 19:06:31 +0000 (22:06 +0300)]
; * doc/lispref/frames.texi (Drag and Drop): Fix typos and wording.

22 months agoCC Mode: Fontify cast types without adding them to c-found-types
Alan Mackenzie [Fri, 28 Oct 2022 17:50:33 +0000 (17:50 +0000)]
CC Mode: Fontify cast types without adding them to c-found-types

* lisp/progmodes/cc-engine.el (c-forward-type): Test for the special new
value `just-one' of c-promote-possible-types, and if found, fontify the type,
but don't add it to c-found-types.
(c-forward-decl-or-cast-1): Add the new &optional parameter inside-macro.
Whilst checking for a cast construct, analyze the text following the closing
paren more rigorously.
Check for, and allow, the closing paren of a macro arglist before the putative
cast construct.

* lisp/progmodes/cc-fonts.el (c-font-lock-declarations): In the lambda
function, pass the parameter inside-macro to c-forward-decl-or-cast-1.

* lisp/progmodes/cc-langs.el (c-primary-expr-regexp-details): New
c-lang-defvar which calculates `c-primary-expr-regexp' and three match
numbers for various sub-expressions in the regexp.
(c-primary-expr-regexp): Now extracted from `c-primary-expr-regexp-details'.
(c-per-++---match, c-per-&*+--match, c-per-\(-match): New
c-lang-defconsts/vars extracted from `c-primary-expr-regexp-details'.

22 months agocconv.el: Fix regression in cconv-tests-interactive-closure-bug51695
Stefan Monnier [Fri, 28 Oct 2022 15:33:24 +0000 (11:33 -0400)]
cconv.el: Fix regression in cconv-tests-interactive-closure-bug51695

The new code to make interpreted closures safe-for-space introduced
a regression in `cconv-tests-interactive-closure-bug51695`, only seen
when using TEST_LOAD_EL.
A few other issues were found and fixed along the way.

* lisp/emacs-lisp/cconv.el (cconv-fv): Change calling convention and
focus on finding the free variables.
(cconv-make-interpreted-closure): New function.

* lisp/loadup.el: Use `compiled-function-p` rather than
`byte-code-function-p` so we also use safe-for-space interpreted
closures when we build with native compilation.
(internal-make-interpreted-closure-function):
Use `cconv-make-interpreted-closure`.

* src/eval.c (syms_of_eval): Rename `internal-filter-closure-env-function`
to `internal-make-interpreted-closure-function`.
(Ffunction): Let that new var build the actual closure.

* test/lisp/emacs-lisp/cconv-tests.el
(cconv-tests-interactive-closure-bug51695): Test specifically the
interpreted case.

22 months ago* lisp/transient.el: Update to package version v0.3.7-173-g81b29ca
Jonas Bernoulli [Fri, 28 Oct 2022 14:16:27 +0000 (16:16 +0200)]
* lisp/transient.el: Update to package version v0.3.7-173-g81b29ca

22 months agoImprove Drag and Drop preamble in the Lisp reference manual
Po Lu [Fri, 28 Oct 2022 14:22:59 +0000 (22:22 +0800)]
Improve Drag and Drop preamble in the Lisp reference manual

* doc/lispref/frames.texi (Drag and Drop): Reword contents and
clear up some ambiguities and redundancies.

22 months ago* lisp/emacs-lisp/re-builder.el: Cosmetic changes
Stefan Monnier [Fri, 28 Oct 2022 13:36:40 +0000 (09:36 -0400)]
* lisp/emacs-lisp/re-builder.el: Cosmetic changes

(reb-valid-string): Declare it risky so the mode-line will obey its
text-properties.
(reb-lisp-syntax-p): No need to make it `defsubst`.
(reb-target-value): New function to replace the
`reb-target-binding` macro.  Adjust all callers.
(reb-auto-update): Give a more informative error message than just
"invalid" and give it a warning face.
(reb-update-regexp): Always update `reb-regexp-src` (it's harmless),
rather than only when it's necessary (reduces the need for advice in pcre.el).

22 months agoInclude more information in error data for sqlite errors
Jonas Bernoulli [Fri, 21 Oct 2022 20:55:53 +0000 (22:55 +0200)]
Include more information in error data for sqlite errors

Introduce a new 'sqlite-error' and use it for all errors signaled in
'src/sqlite.c', except those that already used 'sqlite-locked-error'.
Include the values of 'sqlite3_errcode', 'sqlite3_extended_errcode',
'sqlite3_errstr' and 'sqlite3_errmsg' in the error data.

* src/sqlite.c (load_dll_functions): Load 'sqlite3_extended_errcode'.
(sqlite-load-extension): Use 'xsignal1' as required by argument type.
(syms_of_sqlite): Introduce a new error type 'sqlite-error'.
(check_sqlite, sqlite-open, bind_values, sqlite-execute)
(sqlite-select, sqlite-load-extension, sqlite-next): Use it.
(sqlite_prepare_errdata): New function.
(sqlite_prepare_errmsg): Remove function.
(sqlite-execute, sqlite-select): Use new function.
(sqlite-locked-error): Derive from 'sqlite-error'.

22 months agoCC Mode: Fix wrong fontification of enum foo bar; in Objective C Mode
Alan Mackenzie [Fri, 28 Oct 2022 12:13:08 +0000 (12:13 +0000)]
CC Mode: Fix wrong fontification of enum foo bar; in Objective C Mode

This fixes bug #58795 and bug #58796.

* lisp/progmodes/cc-langs.el (c-type-prefix-kwds): Add the missing entry for
objc.

22 months agoSimplify scroll valuator reset handling
Po Lu [Fri, 28 Oct 2022 12:06:06 +0000 (20:06 +0800)]
Simplify scroll valuator reset handling

* src/xterm.c (xi_populate_device_from_info)
(xi_reset_scroll_valuators_for_device_id, xi_handle_device_changed)
(handle_one_xevent):
* src/xterm.h (struct xi_scroll_valuator_t): Get rid of
`pending_enter_reset', which was extremely convoluted and kept
hitting server bugs.  Now, valuators are reset upon all crossing
events.