]> git.eshelyaron.com Git - emacs.git/log
emacs.git
11 months agoImprove `handler-bind` doc
Stefan Monnier [Thu, 4 Jan 2024 21:28:39 +0000 (16:28 -0500)]
Improve `handler-bind` doc

* doc/lispref/control.texi (Handling Errors) <handler-bind>: Expand.
* doc/lispref/variables.texi (Variable Scoping): Mention static scoping.

11 months ago(backtrace-on-redisplay-error): Use `handler-bind`
Stefan Monnier [Tue, 26 Dec 2023 02:41:08 +0000 (21:41 -0500)]
(backtrace-on-redisplay-error): Use `handler-bind`

Reimplement `backtrace-on-redisplay-error` using `push_handler_bind`.
This moves the code from `signal_or_quit` to `xdisp.c` and
`debug-early.el`.

* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):
Add `base` arg to strip "internal" frames.
(debug--early): New function, extracted from `debug-early`.
(debug-early, debug-early--handler): Use it.
(debug-early--muted): New function, extracted (translated) from
`signal_or_quit`; trim the buffer to a max of 10 backtraces.

* src/xdisp.c (funcall_with_backtraces): New function.
(dsafe_calln): Use it.
(syms_of_xdisp): Defsym `Qdebug_early__muted`.

* src/eval.c (redisplay_deep_handler): Delete var.
(init_eval, internal_condition_case_n): Don't set it any more.
(backtrace_yet): Delete var.
(signal_or_quit): Remove special case for `backtrace_on_redisplay_error`.
* src/keyboard.c (command_loop_1): Don't set `backtrace_yet` any more.
* src/lisp.h (backtrace_yet): Don't declare.

11 months ago(signal_or_quit): Preserve error object identity
Stefan Monnier [Wed, 27 Dec 2023 20:06:32 +0000 (15:06 -0500)]
(signal_or_quit): Preserve error object identity

Make sure we build the (ERROR-SYMBOL . ERROR-DATA) object only once
when signaling an error, so that its `eq` identity can be used.
It also gets us a tiny bit closer to having real "error objects"
like in most other current programming languages.

* src/eval.c (maybe_call_debugger): Change arglist to receive the error
object instead of receiving the signal and the data separately.
(signal_or_quit): Build the error object right at the beginning so it
stays `eq` to itself.
Rename the `keyboard_quit` arg to `continuable` so say what it does
rather than what it's used for.
(signal_quit_p): Change arg to be the error object rather than just the
error-symbol.

* src/keyboard.c (cmd_error_internal, menu_item_eval_property_1):
Adjust calls to `signal_quit_p` accordingly.

* test/src/eval-tests.el (eval-tests--error-id): New test.

11 months agoeval.c: Add new var `lisp-eval-depth-reserve`
Stefan Monnier [Wed, 27 Dec 2023 04:56:09 +0000 (23:56 -0500)]
eval.c: Add new var `lisp-eval-depth-reserve`

Rather than blindly increase `max-lisp-eval-depth` when entering the
debugger or running `signal-hook-function`, use this new "reserve"
to keep track of how much we have grown the stack for "debugger"
purposes so that for example recursive calls to `signal-hook-function`
can't eat up the whole C stack.

* src/eval.c (max_ensure_room): Rewrite.
(restore_stack_limits): Move before `max_ensure_room`.  Rewrite.
(call_debugger, signal_or_quit): Adjust calls accordingly.
Also grow `max-lisp-eval-depth` for `hander-bind` handlers.
(init_eval_once): Don't initialize `max_lisp_eval_depth` here.
(syms_of_eval): Initialize it here instead.
Add new var `lisp-eval-depth-reserve`.

* doc/lispref/eval.texi (Eval): Add `lisp-eval-depth-reserve`.

11 months ago(macroexp--with-extended-form-stack): Use plain `let`
Stefan Monnier [Tue, 26 Dec 2023 04:55:53 +0000 (23:55 -0500)]
(macroexp--with-extended-form-stack): Use plain `let`

`macroexp--with-extended-form-stack` used manual push/pop so that upon
non-local exits the "deeper" value is kept, so the error handler gets
to know what was the deeper value, so as to be able to compute more
precise error locations.
Replace this with a `handler-bind` which catches that "deeper" value
more explicitly.

* lisp/emacs-lisp/bytecomp.el (bytecomp--displaying-warnings):
Use `handler-bind` to catch the value of `byte-compile-form-stack`
at the time of the error.  Also consolidate the duplicated code.

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
Use a plain dynbound let-rebinding.

11 months agoMove batch backtrace code to `top_level_2`
Stefan Monnier [Thu, 21 Dec 2023 04:31:39 +0000 (23:31 -0500)]
Move batch backtrace code to `top_level_2`

Move ad-hoc code meant to ease debugging of bootstrap (and batch mode)
to `top_level_2` so it doesn't pollute `signal_or_quit`.

* src/lisp.h (pop_handler, push_handler_bind): Declare.
* src/keyboard.c (top_level_2): Setup an error handler to call
`debug-early` when noninteractive.
* src/eval.c (pop_handler): Not static any more.
(signal_or_quit): Remove special case for noninteractive use.
(push_handler_bind): New function, extracted from `Fhandler_bind_1`.
(Fhandler_bind_1): Use it.
(syms_of_eval): Declare `Qdebug_early__handler`.
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Weed out
frames below `debug-early`.
(debug-early--handler): New function.

11 months agostartup.el: Use `handler-bind` to implement `--debug-init`
Stefan Monnier [Wed, 20 Dec 2023 00:46:47 +0000 (19:46 -0500)]
startup.el: Use `handler-bind` to implement `--debug-init`

This provides a more reliable fix for bug#65267 since we don't
touch `debug-on-error` nor `debug-ignore-errors` any more.

* lisp/startup.el (startup--debug): New function.
(startup--load-user-init-file): Use it and `handler-bind` instead of
let-binding `debug-on-error`.

11 months agoemacs-module-tests.el (mod-test-non-local-exit-signal-test): Repair test
Stefan Monnier [Thu, 28 Dec 2023 05:49:39 +0000 (00:49 -0500)]
emacs-module-tests.el (mod-test-non-local-exit-signal-test): Repair test

That test relied on `debugger` and `debug-on-signal` in a way that
doesn't work with the new ERT code.

* test/src/emacs-module-tests.el (mod-test-non-local-exit-signal-test):
Use `handler-bind` rather than the debugger.

11 months agoUse handler-bind to repair bytecomp-tests
Mattias Engdegård [Wed, 27 Dec 2023 10:32:49 +0000 (11:32 +0100)]
Use handler-bind to repair bytecomp-tests

* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-tests--error-frame, bytecomp--byte-op-error-backtrace):
Make test pass again and simplify, using handler-bind instead
of the previous debugger hack.

11 months agoFix ert-tests.el for the new `handler-bind` code
Stefan Monnier [Thu, 28 Dec 2023 05:46:36 +0000 (00:46 -0500)]
Fix ert-tests.el for the new `handler-bind` code

Now that `ert.el` uses `handler-bind` instead of `debugger`, some
details of the behavior have changed.  More specifically,
three tests are now broken, but these basically tested the failure
of ERT's machinery to record errors when ERT was run within
a `condition-case`.
AFAICT, these tests do not check for a behavior that we want,
so rather than "fix" them, I deleted them (bug#67862).

* test/lisp/emacs-lisp/ert-tests.el (ert-test-error-debug)
(ert-test-fail-debug-with-condition-case): Delete.
(ert-test-should-failure-debugging): Don't use `ert-debug-on-error`.
(ert-test-with-demoted-errors): It now passes.  Bug#11218 is fixed!

11 months agoert.el: Use `handler-bind` to record backtraces
Stefan Monnier [Tue, 19 Dec 2023 04:57:45 +0000 (23:57 -0500)]
ert.el: Use `handler-bind` to record backtraces

* lisp/emacs-lisp/ert.el (ert--should-signal-hook): Delete function.
(ert--expand-should-1): Don't bind `signal-hook-function`.
(ert--test-execution-info): Remove `next-debugger` slot.
(ert--run-test-debugger): Adjust to new calling convention.
Pass the `:backtrace-base` info to the debugger.
(ert--run-test-internal): Use `handler-bind` rather than let-binding
`debugger` and `debug-on-error`.

* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Don't
use `defconst` if it's not meant to stay constant (e.g. we let-bind it
in tramp-tests.el).

11 months ago(eval-expression): Fix bug#67196
Stefan Monnier [Tue, 19 Dec 2023 04:47:56 +0000 (23:47 -0500)]
(eval-expression): Fix bug#67196

* lisp/simple.el (eval-expression--debug): New function.
(eval-expression): Use it together with `handler-bind` instead of
let-binding `debug-on-error`.

11 months agoNew special form `handler-bind`
Stefan Monnier [Tue, 26 Dec 2023 03:32:17 +0000 (22:32 -0500)]
New special form `handler-bind`

AFAIK, this provides the same semantics as Common Lisp's `handler-bind`,
modulo the differences about how error objects and conditions are
represented.

* lisp/subr.el (handler-bind): New macro.

* src/eval.c (pop_handler): New function.
(Fhandler_Bind_1): New function.
(signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`.
(find_handler_clause): Simplify.
(syms_of_eval): Defsubr `Fhandler_bind_1`.

* doc/lispref/control.texi (Handling Errors): Add `handler-bind`.

* test/src/eval-tests.el (eval-tests--handler-bind): New test.

* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords):
Move 'handler-bind' from CL-only to generic Lisp.
(handler-bind): Remove indentation setting, it now lives in the macro
definition.

11 months agoAdd file completion for "git blame" to pcomplete
Antero Mejr [Thu, 4 Jan 2024 19:49:23 +0000 (19:49 +0000)]
Add file completion for "git blame" to pcomplete

* lisp/pcmpl-git.el (pcomplete/git): Add "blame" to the tracked files
clause.  (Bug#68245)

11 months ago; Fix documentation of last change
Eli Zaretskii [Thu, 4 Jan 2024 18:47:06 +0000 (20:47 +0200)]
; Fix documentation of last change

* lisp/minibuffer.el (completion-category-overrides): Doc fix.

* doc/emacs/mini.texi (Completion Options): Update documentation
of 'completions-sort'.
* doc/lispref/minibuf.texi (Completion Variables): Fox wording.
Add a cross-reference to where 'completions-sort' is documented.

11 months agoSupport display-sort-function in completion-category-overrides (bug#68214)
Juri Linkov [Thu, 4 Jan 2024 17:20:30 +0000 (19:20 +0200)]
Support display-sort-function in completion-category-overrides (bug#68214)

* doc/lispref/minibuf.texi (Completion Variables):
Add 'display-sort-function' to the table of
'completion-category-overrides'.

* lisp/calendar/calendar.el (calendar-read-date): Add metadata
category 'calendar-month' for completing-read reading a month name.

* lisp/minibuffer.el (completion-category-defaults):
Add 'display-sort-function' with identity for the category 'calendar-month'.
(completion-category-overrides): Add customization for completion sorting
with 'display-sort-function' and a choice like in 'completions-sort'.
(completion-metadata-override-get): New function.
(minibuffer-completion-help): Use 'completion-metadata-override-get'
instead of 'completion-metadata-get' to get sort-fun from
'display-sort-function'.

11 months agoFix last change in tempo.el
Morgan Willcock [Sun, 31 Dec 2023 20:47:17 +0000 (20:47 +0000)]
Fix last change in tempo.el

* lisp/tempo.el: Set marker type for tempo-region-start to
move when text is inserted at its position.  This prevents
the template from inserting text into the region.  (Bug#68185)

11 months agoEnsure indent-region argument order in tempo.el is correct
Morgan Willcock [Sun, 31 Dec 2023 20:47:17 +0000 (20:47 +0000)]
Ensure indent-region argument order in tempo.el is correct

* lisp/tempo.el (tempo-insert): Call 'indent-region' with the
stored region markers to ensure that the start and end arguments
are used in the correct order.  (Bug#68185)

11 months agoDocument 'etags-regen-mode' in the Emacs user manual
Eli Zaretskii [Thu, 4 Jan 2024 09:34:21 +0000 (11:34 +0200)]
Document 'etags-regen-mode' in the Emacs user manual

* doc/emacs/maintaining.texi (Create Tags Table): Document
'etags-regen-mode'.

11 months agoRemove semantic patch for adjusting `XSAVE_*`
Stefan Kangas [Thu, 4 Jan 2024 01:41:22 +0000 (02:41 +0100)]
Remove semantic patch for adjusting `XSAVE_*`

* admin/coccinelle/xsave.cocci: Delete file.  The corresponding macros
were removed in 4139c98eb5f 2018-06-14 "Remove Lisp_Misc_Save_Value".

11 months agoPrefer build_unibyte_string where applicable
Stefan Kangas [Thu, 4 Jan 2024 01:24:13 +0000 (02:24 +0100)]
Prefer build_unibyte_string where applicable

* src/fns.c (syms_of_fns):
* src/image.c (slurp_image): Prefer build_unibyte_string (str) to
make_unibyte_string (str, strlen (str)).
* admin/coccinelle/unibyte_string.cocci: Support string literals.

11 months agoPrefer NILP (x) to EQ (x, Qnil)
Stefan Kangas [Thu, 4 Jan 2024 00:49:34 +0000 (01:49 +0100)]
Prefer NILP (x) to EQ (x, Qnil)

* src/image.c (anim_prune_animation_cache):
Prefer NILP (x) to EQ (x, Qnil).
* admin/coccinelle/nilp.cocci: Semantic patch for above change.

11 months agoNew feature: etags-regen-mode
Dmitry Gutov [Thu, 4 Jan 2024 01:44:23 +0000 (03:44 +0200)]
New feature: etags-regen-mode

* lisp/progmodes/etags-regen.el: New file (bug#67687).

* etc/NEWS: Mention the addition.

* .dir-locals.el: Add this project's settings for
etags-regen-regexp-alist and etags-regen-ignores.

11 months ago; * etc/themes/manoj-dark-theme.el (manoj-dark): Fix :box faces.
Eli Zaretskii [Wed, 3 Jan 2024 17:21:56 +0000 (19:21 +0200)]
; * etc/themes/manoj-dark-theme.el (manoj-dark): Fix :box faces.

11 months ago; * lisp/vc/vc.el (vc-deduce-fileset): Add commentary for bug#68174.
Eli Zaretskii [Wed, 3 Jan 2024 12:39:30 +0000 (14:39 +0200)]
; * lisp/vc/vc.el (vc-deduce-fileset): Add commentary for bug#68174.

11 months agoDon't magnify extent of shifts by variable glyph interpolation
Po Lu [Wed, 3 Jan 2024 05:42:27 +0000 (13:42 +0800)]
Don't magnify extent of shifts by variable glyph interpolation

* src/sfnt.c (sfnt_infer_deltas_2): Correctly index
x_coordinates and y_coordinates computing deltas for plain
shift.
(sfnt_vary_simple_glyph): Copy glyph contents to original_x and
original_y not the first time is create, but before each tuple
is applied.

11 months agoDon't include sheap.h in sysdep.c
Stefan Kangas [Wed, 3 Jan 2024 04:22:15 +0000 (05:22 +0100)]
Don't include sheap.h in sysdep.c

The symbol we used from sheap.h (bss_sbrk_did_unexec) was removed with
the introduction of the portable dumper.

* src/sysdep.c: Don't include "sheap.h".

11 months agoDelete obsolete GC debugging code
Stefan Kangas [Wed, 3 Jan 2024 04:11:10 +0000 (05:11 +0100)]
Delete obsolete GC debugging code

This code was introduced in 2014 to catch a GC bug that, according to
Paul Eggert in 2019, "seems to have been fixed" (see 2b552f34892
2019-08-21 "Don’t debug fset by default").  It has been marked
obsolete since that time, and no one has mentioned it on our mailing
lists since.  Let's just get rid of it.

* src/alloc.c
(SUSPICIOUS_OBJECT_CHECKING) [ENABLE_CHECKING]: Don't define.
(suspicious_free_record, suspicious_objects, suspicious_object_index)
(suspicious_free_history, suspicious_free_history_index)
(note_suspicious_free) [SUSPICIOUS_OBJECT_CHECKING]: Delete.
(find_suspicious_object_in_range)
(detect_suspicious_free): Delete functions.
(cleanup_vector)
(allocate_vectorlike): Don't call above deleted functions.
(Fsuspicious_object): Delete DEFUN.
(syms_of_alloc) <Ssuspicious_object>: Delete defsubr.

11 months ago(vc-deduce-fileset): Handle log-view-mode derivatives specially
Dmitry Gutov [Wed, 3 Jan 2024 00:11:56 +0000 (02:11 +0200)]
(vc-deduce-fileset): Handle log-view-mode derivatives specially

* lisp/vc/vc.el (vc-deduce-fileset):
Handle log-view-mode derivatives specially, that helps after
switching projects (bug#68174).

11 months ago; * lisp/mail/rmail.el (rmail-epa-decrypt): Fix whitespace.
Eli Zaretskii [Tue, 2 Jan 2024 17:13:55 +0000 (19:13 +0200)]
; * lisp/mail/rmail.el (rmail-epa-decrypt): Fix whitespace.

11 months ago; Fix compilation errors in completion-preview.el
Eli Zaretskii [Tue, 2 Jan 2024 17:10:33 +0000 (19:10 +0200)]
; Fix compilation errors in completion-preview.el

* lisp/completion-preview.el (mouse-wheel-up-event)
(mouse-wheel-up-alternate-event, mouse-wheel-down-event)
(mouse-wheel-down-alternate-event): Defvar, to avoid warnings and
errors in builds --without-x.  (Bug#68213)

11 months agoFix non-permenent decryption to show up temperarily.
Richard Stallman [Tue, 2 Jan 2024 14:45:45 +0000 (09:45 -0500)]
Fix non-permenent decryption to show up temperarily.

In a decrypted mime part, replace CRLF with newline,

* lisp/mail/rmail.el (rmail-epa-decrypt-1): If NOT descrypting permanently,
put the decrypts into the view buffer.
(rmail-epa-decrypt, rmail-epa-decrypt-1):
In a decrypted mime part, replace CRLF with newline,

11 months agoDon't include sheap.h from alloc.c
Stefan Kangas [Tue, 2 Jan 2024 05:57:17 +0000 (06:57 +0100)]
Don't include sheap.h from alloc.c

The symbol we used from sheap.h (bss_sbrk_did_unexec) was removed with
the introduction of the portable dumper.

* src/alloc.c: Don't include sheap.h.

11 months agoImprove rounding of projection vector versors
Po Lu [Tue, 2 Jan 2024 04:26:57 +0000 (12:26 +0800)]
Improve rounding of projection vector versors

* src/sfnt.c (sfnt_short_frac_dot): New function.
(sfnt_validate_gs): Guarantee dot product of freedom and
projection vectors are properly rounded.  If the final product
is short of 1/16th of a vector, reset it to an entire vector.

11 months ago; Clarify two comments in byte-optimize-letX
Stefan Kangas [Tue, 2 Jan 2024 03:08:43 +0000 (04:08 +0100)]
; Clarify two comments in byte-optimize-letX

* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Clarify comments.

11 months ago; Update copyright years in more files
Po Lu [Tue, 2 Jan 2024 02:31:42 +0000 (10:31 +0800)]
; Update copyright years in more files

11 months ago; Add 2024 to copyright years
Po Lu [Tue, 2 Jan 2024 02:30:05 +0000 (10:30 +0800)]
; Add 2024 to copyright years

11 months agoMerge from savannah/emacs-29
Po Lu [Tue, 2 Jan 2024 02:28:14 +0000 (10:28 +0800)]
Merge from savannah/emacs-29

dc4e6b13296 ; Update copyright years in more files
64b37776318 ; Run set-copyright from admin.el
8e1c56ae467 ; Add 2024 to copyright years

# Conflicts:
# doc/misc/modus-themes.org
# doc/misc/texinfo.tex
# etc/NEWS
# etc/refcards/ru-refcard.tex
# etc/themes/modus-operandi-theme.el
# etc/themes/modus-themes.el
# etc/themes/modus-vivendi-theme.el
# lib/alloca.in.h
# lib/binary-io.h
# lib/c-ctype.h
# lib/c-strcasecmp.c
# lib/c-strncasecmp.c
# lib/careadlinkat.c
# lib/cloexec.c
# lib/close-stream.c
# lib/diffseq.h
# lib/dup2.c
# lib/filemode.h
# lib/fpending.c
# lib/fpending.h
# lib/fsusage.c
# lib/getgroups.c
# lib/getloadavg.c
# lib/gettext.h
# lib/gettime.c
# lib/gettimeofday.c
# lib/group-member.c
# lib/malloc.c
# lib/md5-stream.c
# lib/md5.c
# lib/md5.h
# lib/memmem.c
# lib/memrchr.c
# lib/nanosleep.c
# lib/save-cwd.h
# lib/sha1.c
# lib/sig2str.c
# lib/stdlib.in.h
# lib/strtoimax.c
# lib/strtol.c
# lib/strtoll.c
# lib/time_r.c
# lib/xalloc-oversized.h
# lisp/auth-source-pass.el
# lisp/emacs-lisp/lisp-mnt.el
# lisp/emacs-lisp/timer.el
# lisp/info-look.el
# lisp/jit-lock.el
# lisp/loadhist.el
# lisp/mail/rmail.el
# lisp/net/ntlm.el
# lisp/net/webjump.el
# lisp/progmodes/asm-mode.el
# lisp/progmodes/project.el
# lisp/progmodes/sh-script.el
# lisp/textmodes/flyspell.el
# lisp/textmodes/reftex-toc.el
# lisp/textmodes/reftex.el
# lisp/textmodes/tex-mode.el
# lisp/url/url-gw.el
# m4/alloca.m4
# m4/clock_time.m4
# m4/d-type.m4
# m4/dirent_h.m4
# m4/dup2.m4
# m4/euidaccess.m4
# m4/fchmodat.m4
# m4/filemode.m4
# m4/fsusage.m4
# m4/getgroups.m4
# m4/getloadavg.m4
# m4/getrandom.m4
# m4/gettime.m4
# m4/gettimeofday.m4
# m4/gnulib-common.m4
# m4/group-member.m4
# m4/inttypes.m4
# m4/malloc.m4
# m4/manywarnings.m4
# m4/mempcpy.m4
# m4/memrchr.m4
# m4/mkostemp.m4
# m4/mktime.m4
# m4/nproc.m4
# m4/nstrftime.m4
# m4/pathmax.m4
# m4/pipe2.m4
# m4/pselect.m4
# m4/pthread_sigmask.m4
# m4/readlink.m4
# m4/realloc.m4
# m4/sig2str.m4
# m4/ssize_t.m4
# m4/stat-time.m4
# m4/stddef_h.m4
# m4/stdint.m4
# m4/stdio_h.m4
# m4/stdlib_h.m4
# m4/stpcpy.m4
# m4/strnlen.m4
# m4/strtoimax.m4
# m4/strtoll.m4
# m4/time_h.m4
# m4/timegm.m4
# m4/timer_time.m4
# m4/timespec.m4
# m4/unistd_h.m4
# m4/warnings.m4
# nt/configure.bat
# nt/preprep.c
# test/lisp/register-tests.el

11 months agoMerge from origin/emacs-29
Po Lu [Tue, 2 Jan 2024 02:19:48 +0000 (10:19 +0800)]
Merge from origin/emacs-29

3204825f560 Fix mangled Subject header field when forwarding (Bug#67360)
7591acfe38e Update to Org 9.6.15
240b4594f11 ; * etc/TODO: Add an item about 'Info-hide-note-references'.
01be4fe39d7 * doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#...
55555a6a0d1 org-protocol: Minor copy-edits to Commentary
4696869d3d5 Improve syntax highlighting for python-ts-mode

11 months ago; Update copyright years in more files
Po Lu [Tue, 2 Jan 2024 02:17:39 +0000 (10:17 +0800)]
; Update copyright years in more files

11 months ago; Run set-copyright from admin.el
Po Lu [Tue, 2 Jan 2024 01:53:43 +0000 (09:53 +0800)]
; Run set-copyright from admin.el

11 months ago; Add 2024 to copyright years
Po Lu [Tue, 2 Jan 2024 01:47:10 +0000 (09:47 +0800)]
; Add 2024 to copyright years

11 months agoEglot: filter by prefix in narrow-scope eglot-code-actions
João Távora [Mon, 1 Jan 2024 21:12:28 +0000 (15:12 -0600)]
Eglot: filter by prefix in narrow-scope eglot-code-actions

Github-reference: https://github.com/joaotavora/eglot/issues/847

Servers like typescript-language-server, when asked for {"only" :
"source.organizeImports"}, return actions with the
"source.organizeImports.ts" kind.  Eglot rejected these actions, but
according to the spec:

  Kinds are a hierarchical list of identifiers separated by `.` [...]
  The set of kinds is open.

So I guess we can use string-prefix-p

* lisp/progmodes/eglot.el (eglot-code-actions): Use string-prefix-p.

11 months agoAvoid race condition in parallel native-compilation
Aaron Jensen [Sat, 30 Dec 2023 23:06:45 +0000 (18:06 -0500)]
Avoid race condition in parallel native-compilation

* lisp/emacs-lisp/comp.el (comp-delete-or-replace-file): Avoid
race condition by relying on 'rename-file' being an atomic
operation on Posix filesystems.  (Bug#68083)

11 months agoSES manual clean-up any « ignore »'d text to be translated
Vincent Belaïche [Mon, 1 Jan 2024 18:49:29 +0000 (19:49 +0100)]
SES manual clean-up any « ignore »'d text to be translated

Remove from the English version any ignore'd chunk of text that has
been contributed yet only in the French version, and let only the
comment indicating re-alignment is needed.

11 months agoFix mangled Subject header field when forwarding (Bug#67360)
Mike Kupfer [Sun, 31 Dec 2023 17:11:23 +0000 (09:11 -0800)]
Fix mangled Subject header field when forwarding (Bug#67360)

* lisp/mh-e/mh-comp.el (mh-forward): Overwrite subject when
forwarding.

11 months agoFix vg-hg-annotate-time bug
Kjetil Orbekk [Fri, 29 Dec 2023 13:59:23 +0000 (08:59 -0500)]
Fix vg-hg-annotate-time bug

* lisp/vc/vc-hg.el (vc-hg-annotate-time): Fix extraction of timestamp
from string.
* test/lisp/vc/vc-hg-tests.el (vc-hg-annotate-time): Test that the
correct timestamp is found.

Copyright-paperwork-exempt: yes

11 months agoUpdate to Org 9.6.15
Kyle Meyer [Mon, 1 Jan 2024 17:47:27 +0000 (12:47 -0500)]
Update to Org 9.6.15

11 months agoSES manual: fix explanation why B1 remains displayed empty
Vincent Belaïche [Mon, 1 Jan 2024 15:53:43 +0000 (16:53 +0100)]
SES manual: fix explanation why B1 remains displayed empty

* doc/lang/fr/misc/ses-fr.texi (Quick Tutorial): Fix explanation
why B1 remains empty

* doc/misc/ses.texi (Quick Tutorial):
* doc/lang/fr/misc/ses-fr.texi (Quick Tutorial): @samp{...} cell
references.

11 months agoTypoes in SES manual.
Vincent Belaïche [Mon, 1 Jan 2024 12:06:07 +0000 (13:06 +0100)]
Typoes in SES manual.

Also @samp{...}-ify cell/row/column reference given as in-line examples.

11 months agoBring GX point interpolation further into standards compliance
Po Lu [Mon, 1 Jan 2024 03:27:59 +0000 (11:27 +0800)]
Bring GX point interpolation further into standards compliance

* src/sfnt.c (sfnt_infer_deltas_2): New function; factor much of
sfnt_infer_deltas_1 into this function, then modify its
treatment of untouched points positioned at their reference
points to align with standard GX treatment.
(sfnt_infer_deltas_1): Remove all code not concerning anchor
point discovery.
(main): Adjust tests.

11 months agoTranslate SES manual to French
Vincent Belaïche [Fri, 22 Dec 2023 18:21:22 +0000 (19:21 +0100)]
Translate SES manual to French

11 months agoUse advertised PREFIX when formatting nicks in ERC
F. Jason Park [Fri, 29 Dec 2023 04:20:55 +0000 (20:20 -0800)]
Use advertised PREFIX when formatting nicks in ERC

* lisp/erc/erc-speedbar.el (erc-speedbar-insert-user): Run
`erc-get-channel-membership-prefix' in associated buffer if possible.
* lisp/erc/erc.el (erc-get-channel-membership-prefix): Use known
prefix mappings when determining status chars.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Use common helpers
for initializing buffers, and use a more realistic example for PREFIX
value.
(erc--update-channel-modes): Add current buffer to `erc-server-user'
object to maintain essential invariant, even though this doesn't
affect the test's outcome.
(erc-tests--equal-including-properties): Move to `erc-tests-common'
and rename `erc-tests-common-equal-with-props'.
(erc--merge-prop, erc--remove-from-prop-value-list,
erc--remove-from-prop-value-list/many): Use new name for
`erc-tests-common-equal-with-props'.
(erc-get-channel-membership-prefix): New test.
(erc--determine-speaker-message-format-args,
erc--determine-speaker-message-format-args/queries-as-channel,
erc--determine-speaker-message-format-args/queries): Use new name
for `erc-tests-common-equal-with-props'.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): New macro, originally
`erc-tests--equal-including-properties' from erc-tests.el.
(erc-tests-common-make-server-buf): Initialize tables and make NAME
argument optional.  (Bug#67677)

11 months agoFix regression in erc-button-add-button
F. Jason Park [Fri, 29 Dec 2023 04:21:13 +0000 (20:21 -0800)]
Fix regression in erc-button-add-button

* lisp/erc/erc-button.el (erc-button--nick): Abide by recommended
internal naming convention and use "cusr" instead of "cuser" for
referring to an `erc-channel-user' object.
(erc-button--fallback-cmem-function,
erc-button--get-user-from-spkr-prop): Use new, preferred name
`erc-channel-members' for `erc-channel-users' table.
(erc-button-add-nickname-buttons): Use "cmem" instead of "cuser" to
refer to values of the `erc-channel-members' table, which are cons
cells, not `erc-channel-user' objects.  Use updated slot name `cusr'
when initializing `erc-button--nick' object.
(erc-button-add-button): Honor wishes of
`erc-button--modify-nick-function' advice members when they set the
`nickname-face' slot of the passed-around `erc-button--nick' object to
nil to indicate a desire to forgo adding a face while still
buttonizing the inserted nick with `erc-data', etc.  (Bug#67767)

11 months agoMake erc-update-channel-current-member stricter
F. Jason Park [Fri, 29 Dec 2023 04:21:30 +0000 (20:21 -0800)]
Make erc-update-channel-current-member stricter

* lisp/erc/erc.el (erc--update-cusr-status-if-changed): Remove unused
macro.
(erc-update-current-channel-member): Redo doc string and abide by its
original language to the letter by not honoring a value of t for the
five channel-membership status parameters, even though this may break
user code that accidentally passes t instead of `on'.  Avoid double
lookup for nick in `erc-server-users'.  Rename some variables as per
recommended conventions for `erc-channel-user' objects.  Stash
downcased nick for further reuse.  Don't bother factoring in `addp' to
return value because `cusr-changed-p' is always non-nil when `addp'
is.

11 months agoDon't discard trimmed args in erc-cmd-MODE
F. Jason Park [Thu, 28 Dec 2023 05:13:45 +0000 (21:13 -0800)]
Don't discard trimmed args in erc-cmd-MODE

* lisp/erc/erc.el (erc-cmd-MODE): Use matched non-whitespace portion
of input line instead of the original line.  Otherwise, when the user
types "/MODE #chan", the server sees "MODE  #chan", with twos spaces.
(erc--parse-nuh): Improve doc.

11 months agoUse format-prompt in erc-select-read-args
F. Jason Park [Sun, 31 Dec 2023 00:27:08 +0000 (16:27 -0800)]
Use format-prompt in erc-select-read-args

* lisp/erc/erc-button.el (erc-button-cmd-KICK, erc-button-cmd-MSG):
Use `read-string' instead of `read-from-minibuffer'.
* lisp/erc/erc.el (erc-select-read-args): Use `format-prompt', which
isn't normally available in Emacs 27 without Compat.

11 months agoRestore predicate for detecting date stamps in ERC
F. Jason Park [Sun, 31 Dec 2023 00:39:18 +0000 (16:39 -0800)]
Restore predicate for detecting date stamps in ERC

* etc/ERC-NEWS: Mention function `erc-stamp-inserting-date-stamp-p'.
* lisp/erc/erc-stamp.el (erc-stamp-inserting-date-stamp-p): New
function for third parties to detect whether the message being
inserted is a date stamp.  Date stamps as independent messages were
originally introduced as part of bug#60936.

11 months agoFix regression in erc-keep-place-indicator-mode
F. Jason Park [Sun, 31 Dec 2023 01:09:17 +0000 (17:09 -0800)]
Fix regression in erc-keep-place-indicator-mode

* lisp/erc/erc-goodies.el (erc-keep-place): Revert portion of
65735efdca0 "Improve multi-window erc-keep-place-indicator-mode" that
skipped modifying `window-prev-buffers' when the indicator's minor
mode was enabled.
* test/lisp/erc/erc-scenarios-keep-place-indicator.el: Modify test to
assert that point's place is preserved after switching away from a
buffer with the indicator enabled.
* test/lisp/erc/resources/keep-place/follow.eld: Update.
This feature was originally introduced by bug#59943.

11 months ago; * etc/TODO: Add an item about 'Info-hide-note-references'.
Eli Zaretskii [Sun, 31 Dec 2023 13:17:18 +0000 (15:17 +0200)]
; * etc/TODO: Add an item about 'Info-hide-note-references'.

11 months agoCC Mode. Preserve space syntax-table props in open strings
Alan Mackenzie [Sun, 31 Dec 2023 11:02:50 +0000 (11:02 +0000)]
CC Mode.  Preserve space syntax-table props in open strings

This fixes bug#68111, allowing, e.g., backward-kill-word to
work properly.

* lisp/progmodes/cc-mode.el (c-clear-string-fences): On an open
string which isn't followed by another string, remove the
syntax-table properties just from template delimiters rather
than setting the syntax-table properties of all the string to
punctuation.

11 months agoRevert "Get NS screen resolution from system"
Alan Third [Sun, 31 Dec 2023 10:28:29 +0000 (10:28 +0000)]
Revert "Get NS screen resolution from system"

This reverts commit f3dec3439fd5aee885a76622f384f6c7ca67d128.

11 months ago; Remove needless .lldbinit settings from lldb NEWS entry
Gerd Möllmann [Sun, 31 Dec 2023 08:41:11 +0000 (09:41 +0100)]
; Remove needless .lldbinit settings from lldb NEWS entry

11 months ago* doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#68164).
Eli Zaretskii [Sun, 31 Dec 2023 07:44:32 +0000 (09:44 +0200)]
* doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#68164).

Suggested by Jens Quade <jq@qdevelop.de>.

11 months agoPrevent overlapping sections of glyphs from being misaligned
Po Lu [Sun, 31 Dec 2023 03:34:28 +0000 (11:34 +0800)]
Prevent overlapping sections of glyphs from being misaligned

* src/xdisp.c (gui_fix_overlapping_area): Offset all glyphs by
ROW->x.

11 months ago; * src/buffer.c (Ffind_buffer): Fix coding style in recent change.
Po Lu [Sun, 31 Dec 2023 03:21:34 +0000 (11:21 +0800)]
; * src/buffer.c (Ffind_buffer): Fix coding style in recent change.

11 months agoDelete unused macros (SF#494)
Bill Wohler [Sun, 31 Dec 2023 01:30:34 +0000 (17:30 -0800)]
Delete unused macros (SF#494)

* lisp/mh-e/mh-acros.el (mh-do-in-gnu-emacs, mh-do-in-xemacs,
mh-funcall-if-exists, defun-mh, defmacro-mh, mh-make-local-hook,
mh-mark-active-p): Delete unused macros.

11 months ago; * src/alloc.c (garbage_collect): Fix typo.
Stefan Kangas [Sat, 30 Dec 2023 22:24:16 +0000 (23:24 +0100)]
; * src/alloc.c (garbage_collect): Fix typo.

11 months ago; cperl-mode.el: Improve discoverability of cperl-file-styles
Harald Jörg [Sat, 30 Dec 2023 20:50:22 +0000 (21:50 +0100)]
; cperl-mode.el: Improve discoverability of cperl-file-styles

* lisp/progmodes/cperl-mode.el (cperl-indentation-details):
Mention the option `cperl-file-style' in the docstring.
(cperl-file-style): Describe the available styles, and move the
option to the group `cperl-indentatino-details'.

11 months agoSlightly clarify "Start Emacs maximized" in FAQ
Stefan Kangas [Sat, 30 Dec 2023 20:06:14 +0000 (21:06 +0100)]
Slightly clarify "Start Emacs maximized" in FAQ

* doc/misc/efaq.texi (Start Emacs maximized): Clarify why the early init
file is used.

11 months ago; * doc/emacs/buffers.texi (Icomplete): Use "Icomplete mode"
Sean Whitton [Sat, 30 Dec 2023 19:40:00 +0000 (19:40 +0000)]
; * doc/emacs/buffers.texi (Icomplete): Use "Icomplete mode"

11 months ago; Clean up some Keyword headers
Stefan Kangas [Sat, 30 Dec 2023 17:59:56 +0000 (18:59 +0100)]
; Clean up some Keyword headers

11 months agoDocument `wp` defgroup as obsolete instead of deprecated
Stefan Kangas [Sat, 30 Dec 2023 17:10:25 +0000 (18:10 +0100)]
Document `wp` defgroup as obsolete instead of deprecated

This opens up for its removal at some point in the future.  It has
been deprecated for the better part of a decade by now.

* lisp/cus-edit.el (wp): Document group "wp" as obsolete.
* lisp/finder.el (finder-known-keywords): Document keyword "wp" as obsolete.

11 months ago; Prefer finder keyword "text" to deprecated keyword "wp"
Stefan Kangas [Sat, 30 Dec 2023 17:01:48 +0000 (18:01 +0100)]
; Prefer finder keyword "text" to deprecated keyword "wp"

11 months agoAdd `text` to `finder-known-keywords`
Stefan Kangas [Sat, 30 Dec 2023 16:56:39 +0000 (17:56 +0100)]
Add `text` to `finder-known-keywords`

`finder-known-keywords` is "supposed to correspond to top-level
customization groups".  However, the customize group "wp" is now
deprecated in favor of "text".

* lisp/finder.el (finder-known-keywords): Add new "text" keyword.
Deprecate the "wp" keyword.

11 months agoorg-protocol: Minor copy-edits to Commentary
Stefan Kangas [Sat, 30 Dec 2023 16:53:26 +0000 (17:53 +0100)]
org-protocol: Minor copy-edits to Commentary

* lisp/org/org-protocol.el: Minor copy-edits to Commentary.

11 months ago; Jsonrpc: fix spurious unintended change
João Távora [Sat, 30 Dec 2023 12:10:31 +0000 (06:10 -0600)]
; Jsonrpc: fix spurious unintended change

* lisp/jsonrpc.el (jsonrpc--log-event): Fix spurious unintended
change.

11 months agoSimplify Objective C autorelease pool handling
Alan Third [Mon, 9 Oct 2023 21:21:05 +0000 (22:21 +0100)]
Simplify Objective C autorelease pool handling

* src/emacs.c: Remove ns_pool.
(main): Replace ns_pool stuff with call to ns_init_pool.
(Fkill_emacs): The pools are drained automatically when the
application exits, so it's probably not worth draining the pool here.
(decode_env_path): No longer required as this is handled by
`outerpool' defined in nsterm.m.
* src/nsterm.h:
* src/nsterm.m (ns_init_pool): New function.

11 months agoGet NS screen resolution from system
Alan Third [Sun, 8 Oct 2023 22:11:46 +0000 (23:11 +0100)]
Get NS screen resolution from system

* src/nsterm.m (ns_initialize_display_info): Query the screen
deviceDescription for the resolution instead of hard-coding it.

11 months ago; Improve documentation of SVG image loading
Alan Third [Sat, 30 Dec 2023 11:15:17 +0000 (11:15 +0000)]
; Improve documentation of SVG image loading

* src/image.c (svg_load_image): Add comments explaining the process.

11 months agoRemove redundant pdmp file copy (bug#66022)
Alan Third [Sun, 8 Oct 2023 22:14:24 +0000 (23:14 +0100)]
Remove redundant pdmp file copy (bug#66022)

* nextstep/Makefile.in (${ns_applibexecdir}/Emacs.pdmp): The pdmp file
is not required in the app bundle for a non-self-contained install.

11 months agoImprove syntax highlighting for python-ts-mode
Denis Zubarev [Sat, 11 Nov 2023 01:55:44 +0000 (04:55 +0300)]
Improve syntax highlighting for python-ts-mode

Fix fontification of strings inside of f-strings interpolation, e.g. for
f"beg {'nested'}" - 'nested' was not fontified as string.  Do not
override the face of builtin functions (all, bytes etc.) with the
function call face.  Add missing assignment expressions (:= *=).
Fontify built-ins (dict,list,etc.) as types when they are used in type
hints.  Highlight union types (type1|type2).  Highlight base class names
in the class definition.  Fontify class patterns in case statements.
Highlight the second argument as a type in isinstance/issubclass call.
Highlight dotted decorator names.

* lisp/progmodes/python.el (python--treesit-keywords): Add compound
keyword "is not".
(python--treesit-builtin-types): New variable that stores all python
built-in types.
(python--treesit-type-regex): New variable.  Regex matches if text is
either built-in type or text starts with capital letter.
(python--treesit-builtins): Extract built-in types to other variable.
(python--treesit-fontify-string): fix f-string interpolation.  Enable
interpolation highlighting only if string-interpolation is presented
on the enabled levels of treesit-font-lock-feature-list.
(python--treesit-fontify-string-interpolation): Remove function.
(python--treesit-fontify-union-types): Fontify nested union types.
(python--treesit-fontify-union-types-strict): Fontify nested union
types, only if type identifier matches against
python--treesit-type-regex.
(python--treesit-fontify-dotted-decorator): Fontify all parts of
dotted decorator name.
(python--treesit-settings): Change/add rules.  (Bug#67061)

* test/lisp/progmodes/python-tests.el
(python-ts-tests-with-temp-buffer): Function for setting up test
buffer.
(python-ts-mode-compound-keywords-face)
(python-ts-mode-named-assignement-face-1)
(python-ts-mode-assignement-face-2)
(python-ts-mode-nested-types-face-1)
(python-ts-mode-union-types-face-1)
(python-ts-mode-union-types-face-2)
(python-ts-mode-types-face-1)
(python-ts-mode-types-face-2)
(python-ts-mode-types-face-3)
(python-ts-mode-isinstance-type-face-1)
(python-ts-mode-isinstance-type-face-2)
(python-ts-mode-isinstance-type-face-3)
(python-ts-mode-superclass-type-face)
(python-ts-mode-class-patterns-face)
(python-ts-mode-dotted-decorator-face-1)
(python-ts-mode-dotted-decorator-face-2)
(python-ts-mode-builtin-call-face)
(python-ts-mode-interpolation-nested-string)
(python-ts-mode-disabled-string-interpolation)
(python-ts-mode-interpolation-doc-string): Add tests.

11 months ago; * lisp/files.el (find-buffer-visiting): Fix whitespace of last change.
Eli Zaretskii [Sat, 30 Dec 2023 11:04:58 +0000 (13:04 +0200)]
; * lisp/files.el (find-buffer-visiting): Fix whitespace of last change.

11 months agofind-buffer-visiting: Fix test breakage introduced in b7a737ef49
Ihor Radchenko [Sat, 30 Dec 2023 10:31:51 +0000 (11:31 +0100)]
find-buffer-visiting: Fix test breakage introduced in b7a737ef49

* lisp/files.el (find-buffer-visiting): Fix code branch checking for
buffers referring to the same file number.  We should check the found
buffer with the file number, not current.

Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#412
11 months agoDocument icomplete-in-buffer incompatible changes
Sean Whitton [Sat, 30 Dec 2023 10:38:43 +0000 (10:38 +0000)]
Document icomplete-in-buffer incompatible changes

* etc/NEWS: Document icomplete-in-buffer incompatible
changes (bug#67661).

11 months ago* doc/emacs/buffers.texi (Icomplete): Document icomplete-in-buffer.
Sean Whitton [Sat, 30 Dec 2023 10:38:22 +0000 (10:38 +0000)]
* doc/emacs/buffers.texi (Icomplete): Document icomplete-in-buffer.

11 months ago; Auto-commit of loaddefs files.
Eli Zaretskii [Sat, 30 Dec 2023 09:56:52 +0000 (04:56 -0500)]
; Auto-commit of loaddefs files.

11 months agoMerge from origin/emacs-29
Eli Zaretskii [Sat, 30 Dec 2023 09:51:17 +0000 (04:51 -0500)]
Merge from origin/emacs-29

53031528725 Revert "Fix treesit-node-field-name and friends (bug#66674)"
fa0bb88302b ; * src/buffer.c (syms_of_buffer) <default-directory>: Do...
44517037aed ; Fix typo
ccf46acefd2 ; Fix last change.
c86b039dffc ; * etc/DEBUG: Improve advice for debugging native-compil...
9afba605bbc Explain status "r" in `epa-list-keys`
62714221968 ; * lisp/dired.el (dired--make-directory-clickable): Refo...
fcbb0044899 Fix mouse clicks on directory line in Dired
be8a7155b48 Fix 'split-root-window-right' and 'split-root-window-below'
eb19984c4db Mark icalendar.el as maintained by emacs-devel
03dc914fd37 ; Fix footnotes in ELisp Intro manual
ceacf753958 Fix usage of `setq-default' and offer more suggestions
2701da0eee5 Fix python-ts-mode triple quote syntax (bug#67262)
683c7c96871 Increment parser timestamp when narrowing changes (bug#67...
8ae42c825e1 ruby-ts-mode: Fix indentation for string_array closer
9cfa498e0ab treesit-major-mode-setup: Use 'treesit--syntax-propertize...
da2e440462b ruby-ts-mode: Fix an out-of-bounds error with heredoc at eob
6ea507296a7 Correctly refontify changed region in tree-sitter modes (...

11 months agoImprove performance let-binding `case-fold-search' (bug#66117)
Ihor Radchenko [Fri, 15 Dec 2023 10:47:45 +0000 (11:47 +0100)]
Improve performance let-binding `case-fold-search' (bug#66117)

* src/buffer.h: Remove case_fold_search_ buffer object slot.
* src/buffer.c (bset_case_fold_search): Remove - no longer needed.
(init_buffer_once): Remove removed buffer slot init.
(syms_of_buffer): Use DEFVAR_LISP to define `case-fold-search' and
declare it buffer-local.
* src/minibuf.c (syms_of_minibuf): Remove DEFSYM call for
`case-fold-search' symbol.  It now lives in `syms_of_buffer'.
* src/editfns.c (Fcompare_buffer_substrings):
(Fchar_equal):
* src/search.c (looking_at_1):
(string_match_1):
(search_command):
(Fre__describe_compiled): Adjust C queries to `case-fold-search' value
to use C globals instead of BVAR macro.
* doc/lispref/internals.texi (Buffer Internals): Do not list
`case_fold_search' slot.

See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66117#259

When used as buffer slot, let-binding `case-fold-search' would scale
with the number of live buffers and can be slow.  This change makes
let-binding much faster at the cost of slightly slower `set-buffer'.

11 months ago; Fix last change
Eli Zaretskii [Sat, 30 Dec 2023 08:01:31 +0000 (10:01 +0200)]
; Fix last change

* src/buffer.c (Ffind_buffer): Doc fix.  (Bug#66117)

* test/manual/etags/c-src/emacs/src/lisp.h (get_truename_buffer):
Revert removal of prototype: that breaks the test results.

11 months agoImprove performance of `find-buffer-visiting' (bug#66117)
Ihor Radchenko [Sun, 8 Oct 2023 08:48:42 +0000 (11:48 +0300)]
Improve performance of `find-buffer-visiting' (bug#66117)

* src/buffer.c (Fget_truename_buffer): Expose `get_truename_buffer' to
Elisp.
(Ffind_buffer): New subr searching for a live buffer with a given
value of buffer-local variable.
(syms_of_buffer): Register the new added subroutines.
* src/filelock.c (lock_file): Use the new `Fget_truename_buffer' name.
* src/lisp.h:
* test/manual/etags/c-src/emacs/src/lisp.h: Remove no-longer-necessary
extern declarations for `get_truename_buffer'.
* lisp/files.el (find-buffer-visiting): Refactor, using subroutines to
search for buffers instead of slow manual Elisp iterations.

11 months ago* lisp/textmodes/remember.el: Remove org-remember support.
Ihor Radchenko [Thu, 28 Dec 2023 10:58:42 +0000 (11:58 +0100)]
* lisp/textmodes/remember.el: Remove org-remember support.

org-remember has been removed from Org mode proper and then from
org-contrib 10 years ago in
https://git.sr.ht/~bzg/org-contrib/commit/be8736195e
(Bug#68076)

11 months agoFix previous page and next page tooltips in doc-view.el
Daniel Martín [Mon, 25 Dec 2023 10:43:39 +0000 (11:43 +0100)]
Fix previous page and next page tooltips in doc-view.el

* lisp/doc-view.el (doc-view-tool-bar-map): Fix toolbar items to go to
next and previous pages in a document.  (Bug#68018)

11 months agoAdd tests for `let' (bug#66117)
Ihor Radchenko [Sat, 23 Dec 2023 14:29:36 +0000 (15:29 +0100)]
Add tests for `let' (bug#66117)

* test/src/eval-tests.el (eval-tests/default-value): New test.

11 months agoRevert "Fix treesit-node-field-name and friends (bug#66674)"
Yuan Fu [Sat, 30 Dec 2023 03:52:07 +0000 (19:52 -0800)]
Revert "Fix treesit-node-field-name and friends (bug#66674)"

This reverts commit 9874561f39e62c1c9fada6c2e013f93d9ea65729.

See bug#67990.  Basically our original code is correct, the error is
in libtree-sitter, which only manifests in certain cases.

https://github.com/tree-sitter/tree-sitter/pull/2104

11 months agoSimplify code relating to UI thread synchronization
Po Lu [Sat, 30 Dec 2023 02:57:11 +0000 (10:57 +0800)]
Simplify code relating to UI thread synchronization

* java/org/gnu/emacs/EmacsContextMenu.java (display):

* java/org/gnu/emacs/EmacsDialog.java (display):

* java/org/gnu/emacs/EmacsService.java (getEmacsView)
(getLocationOnScreen, getClipboardManager)
(requestDirectoryAccess): Replace manual synchronization within
Runnable objects by usage of FutureTask.
(syncRunnable): Accept FutureTask<V> in place of Runnables, and
obtain and return results from calls to its get method.

11 months agoRevert "Silence warning when requiring ruby-ts-mode"
Stefan Kangas [Sat, 30 Dec 2023 00:06:41 +0000 (01:06 +0100)]
Revert "Silence warning when requiring ruby-ts-mode"

This reverts commit bf81706988f6b1b9d6e8033c8227f0129e04ef03.

We deliberately don't silence these warnings, so that a user who loads
the mode without having the grammar installed sees the warning and
realizes the problem in time to fix it.

11 months agoImprove documentation of 'require-with-check'
Eli Zaretskii [Fri, 29 Dec 2023 19:19:50 +0000 (21:19 +0200)]
Improve documentation of 'require-with-check'

* doc/lispref/loading.texi (Named Features): Document
'require-with-check'.

* etc/NEWS: Fix wording of entry about 'require-with-check'.

11 months agopcomplete--entries: In predicate, check file exists
Sean Whitton [Fri, 29 Dec 2023 17:41:35 +0000 (17:41 +0000)]
pcomplete--entries: In predicate, check file exists

* lisp/pcomplete.el (pcomplete--entries): In the predicate passed to
completion-table-with-predicate, when PREDICATE is nil, take ourselves
to be responsible for calling file-exists-p (bug#67661).

11 months ago* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo
Stefan Monnier [Fri, 29 Dec 2023 16:21:38 +0000 (11:21 -0500)]
* lisp/progmodes/eglot.el (toplevel): Fix usual last minute typo