1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-12 17:21:54 -07:00
Commit graph

176784 commits

Author SHA1 Message Date
Helmut Eller
c2d0be1177 Call maybe_quit at a different point to the help the profiler.
* src/bytecode.c (exec_byte_code): In the docall sequence, move
the to maybe_quit forward immediately before lisp_eval_depth--.
This helps the profiler to see the function that was
interrupted by the SIGPROF signal.
2025-01-08 04:19:19 +01:00
Helmut Eller
f3ef8385dc Delay processing of SIGPROF to the next safepoint
* src/lisp.h (process_pending_profiler_signals): New function.
* src/profiler.c (pending_profiler_signals): New variable.
(handle_profiler_signal): Instead of calling add_sample,
set pending_signals and increment pending_profiler_signals.
(process_pending_profiler_signals): New function.
* src/keyboard.c (process_pending_signals): Call
process_pending_profiler_signals.
2025-01-08 04:19:19 +01:00
Gerd Möllmann
cabe8da3b6 Remove SAFE_ALLOCA_LISP_EXTRA because extra allocation is not done
* lisp.h (SAFE_ALLOCA_LISP_EXTRA): Removed.
(SAFE_ALLOCA_LISP): Move the rest of SAFE_ALLOCA_LISP_EXTRA here.
2025-01-08 04:19:19 +01:00
Gerd Möllmann
e70fe084e9 Make SAFE_NALLOCA allocate an ambiguous root
* src/igc.c (igc_xnmalloc_ambig): New function.
* src/igc.h: Declare it.
* src/lisp.h (SAFE_NALLOCA): Use it.
2025-01-08 04:19:19 +01:00
Gerd Möllmann
1ab3d610aa Don't use SAFE_NALLOCA for Lisp_Objects
* src/callproc.c (call_process, create_temp_file): Use SAFE_ALLOCA_LISP
instead of SAFE_NALLCA.
2025-01-08 04:19:18 +01:00
Gerd Möllmann
1d4386eb18 Reapply "Don't put string data pointers into xmalloc'd memory (bug#75292)"
This reverts commit b5c4da2ed8.
2025-01-08 04:17:07 +01:00
Gerd Möllmann
2838be3fd5 Merge branch 'master' into scratch/igc 2025-01-08 04:04:49 +01:00
F. Jason Park
601a1f1f27 ; Mark ERC keep-place-indicator test as :unstable
* test/lisp/erc/erc-scenarios-keep-place-indicator.el
(erc-scenarios-keep-place-indicator--follow): Don't run on EMBA pending
investigation of test timing out.
2025-01-07 17:34:42 -08:00
F. Jason Park
f9ecde75bb Improve use of Flyspell's API in erc-spelling
* etc/ERC-NEWS: Announce deprecation of `erc-spelling-flyspell-verify'
and `erc-spelling-unhighlight-word'.  A slight behavioral change not
worth mentioning is that, previously, ERC arranged for Flyspell to
ignore any word immediately following a forward slash anywhere in the
prompt input, even those for which the slash served as mere
punctuation (a "stroke"), as in "something/misspelt."  As of this
change, Flyspell only unconditionally exempts an initial slash-prepended
word, like "tableflip" in "ERC> /tableflip", and checks all others that
follow against known slash commands.
* lisp/erc/erc-spelling.el: Change top-level assignment of `erc-mode'
symbol-property `flyspell-mode-predicate' from
`erc-spelling-flyspell-verify' to `erc-spelling--flyspell-input-p'.
(erc-spelling-mode, erc-spelling-disable): Remove local member from
`flyspell-incorrect-hook'.
(erc-spelling-init): Add `erc-spelling--flyspell-check' to
`flyspell-incorrect-hook' locally.  Don't bother explicitly setting
`flyspell-generic-check-word-predicate' because Flyspell already does
that for clients using the `flyspell-mode-predicte' interface.
(erc-spelling-flyspell-verify, erc-spelling-unhighlight-word): Mark
obsolete.
(erc-spelling--flyspell-check, erc-spelling--flyspell-input-p): New
functions, essentially the two halves of a reworked and bifurcated
`erc-spelling-flyspell-verify'.  Though used as a predicate, the first
is not named as such because it performs side effects.
* test/lisp/erc/erc-scenarios-spelling.el: New file.
* test/lisp/erc/resources/spelling/auto-correct.eld: New file.
(Bug#75327)
2025-01-07 17:31:18 -08:00
F. Jason Park
c266c22b41 Fix regression in erc-nicks involving color pools
* lisp/erc/erc-nicks.el (erc-nicks-colors): Tweak doc.
(erc-nicks--create-pool-function): On graphic displays, set value to
`erc-nicks--create-culled-pool', the original default.  This fixes a bug
in which ERC mapped all pool members to a primary color, thus excluding
the bulk of them.  Thanks to Trevor Arjeski for discovering it.
(erc-nicks--create-coerced-pool): Mention the text-terminal-only
requirement in doc.
(erc-nicks-refresh): Improve doc.
* test/lisp/erc/erc-nicks-tests.el (erc-nicks-tests--track-faces):
Enable `erc-track-mode' prior to running body.
2025-01-07 17:27:44 -08:00
Arash Esbati
8d687695c5 Update RefTeX manual
* doc/misc/reftex.texi: (Builtin Label Environments): Mention
supported LaTeX packages ctable, minted and listings.
(Reference Styles): Update the supported reference styles and the
corresponding macros.
(Citation Styles): Mention support for biblatex package.
(Language Support): Describe usage of non-ASCII characters in the
LaTeX \label definition.
(Style Files): Mention biblatex.el as well.
(Options - Defining Label Environments): Add entry for
`reftex-label-regexps' option.
Other minor improvements.
2025-01-07 22:07:41 +01:00
Roland Winkler
1ef7deb2f7 bibtex-braced-string-syntax-table: fix bug #68477
* lisp/textmodes/bibtex.el (bibtex-braced-string-syntax-table):
Give all parentheses the syntax punctuation so that we do not
choke because of unbalanced parentheses other than braces (bug
2025-01-07 13:40:07 -06:00
Juri Linkov
4bf0f66551 Prefer %s format over %S for buffers
This restores the `%s` format` for buffers
after fba3c7ff3f.

* lisp/gnus/nnimap.el (nnimap-make-process-buffer):
* lisp/gnus/nntp.el (nntp-make-process-buffer):
* lisp/simple.el (next-error-internal):
Prefer more user-readable `%s` format over `%S` for buffers.
2025-01-07 20:44:09 +02:00
Juri Linkov
d5c3173366 Move calendar-month metadata to calendar-read-date (bug#68214)
* lisp/minibuffer.el (completion-category-defaults): Move the
'calendar-month' default value to the metadata in calendar-read-date.

* lisp/calendar/calendar.el (calendar-read-date): Add
display-sort-function moved from completion-category-defaults.
2025-01-07 20:22:14 +02:00
Stefan Kangas
e41a7d8127 Improve docstring of image-dired-show-all-from-dir
* lisp/image/image-dired.el (image-dired-show-all-from-dir):
Improve docstring.
2025-01-07 08:18:02 +01:00
Sacha Chua
d4503ccc27 image-dired-show-all-from-dir: Reuse dired's default-directory
* lisp/image/image-dired.el (image-dired-show-all-from-dir): Delegate
figuring out default-directory to dired.  This handles the case where
image-dired is called with a cons cell that has a directory in the car
and a list of files in the cdr, which dired can handle, and therefore
allows image-dired-show-all-from-dir to show an arbitrary list of
images.  It also means that image-dired-show-all-from-dir can handle
wildcards.
Ref: https://lists.gnu.org/r/emacs-devel/2025-01/msg00048.html
2025-01-07 08:04:44 +01:00
Eli Zaretskii
2117baac06 * src/callproc.c (call_process): Move encoding of 'path'. 2025-01-06 21:38:21 +02:00
Stefan Kangas
d98516a27b ; Silence byte-compiler 2025-01-06 20:06:49 +01:00
Stefan Kangas
15d940ad1f New test for finding C header files
The assumption here is that if there is a C compiler, there is also a
math.h header somewhere.  The test should fail if we can't find that
file, and hopefully that will provoke users to create bug reports.

Let's see how far we can take this idea; we might have to give up and
disable the test in some configurations.  But doing that now seems
premature, even if we had a list of affected systems (which we don't).

* lisp/man.el (man--find-header-file): Factor out new function...
(Man-view-header-file): ...from here.
* test/lisp/man-tests.el (man-tests-find-header-file): New test.
2025-01-06 20:04:20 +01:00
Stefan Kangas
3dc3dbc2e3 Fix finding C headers with clang
This fixes following "#include" references in 'M-x man' buffers, and
using ffap, both on macOS machines, and on systems where for some reason
clang is available but gcc is not.

* lisp/subr.el (internal--c-header-file-path): Fix finding C
headers with clang.
(internal--gcc-is-clang-p): New function factored out from...
* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): ...here.
* lisp/man.el (Man-header-file-path): Bump :version tag.

* test/lisp/subr-tests.el
(subr-tests-internal--c-header-file-path/clang-mocked): New test.
2025-01-06 20:04:20 +01:00
Stefan Kangas
888ff3755d New function internal--c-header-file-path
It is not clear to me where this function properly belongs, so let's put
it in subr.el for now.  This avoids code duplication without introducing
a dependency between man and ffap.  It can always be moved later.

* lisp/subr.el (internal--c-header-file-path): New function.
* lisp/man.el (Man-header-file-path):
* lisp/ffap.el (ffap-c-path): Use above new function.

* test/lisp/subr-tests.el (ert-x): Require.
(subr-tests-internal--c-header-file-path)
(subr-tests-internal--c-header-file-path/gcc-mocked): New tests.
2025-01-06 20:04:20 +01:00
Stephen Gildea
3de5fcd0a6 time-stamp: lower- and title-case weekday and month names
* lisp/time-stamp.el (time-stamp-string-preprocess): new formats for
lowercase weekday name, lowercase month name, and system name
* test/lisp/time-stamp.el: new tests
(formatz-generate-tests): Better doc strings for generated test fns.
2025-01-06 11:02:21 -08:00
Juri Linkov
997b9b8d38 * lisp/treesit.el: Use forward-list-default-function for C-M-n
(treesit--forward-list-with-default): New internal function
with body from 'treesit-forward-sexp-list' (bug#73404).
(treesit-forward-sexp-list, treesit-forward-list):
Replace body with a call to the shared implementation
'treesit--forward-list-with-default' using the
corresponding default function as an argument.
2025-01-06 20:02:18 +02:00
João Távora
c3ec174a6c Eglot: new eglot--format to fix quote substitution woes (bug#73472)
* lisp/progmodes/eglot.el (eglot--guess-contact): Use eglot--format.
(eglot--format): New helper.
(eglot--error, eglot--message, eglot--warn)
(eglot--apply-text-edits, eglot-rename): Use eglot--format.
2025-01-06 10:47:13 +00:00
Stefan Kangas
da5df90fad Improve integer file mode options docstrings
* lisp/eshell/esh-util.el (eshell-private-file-modes)
(eshell-private-directory-modes):
* lisp/gnus/mail-source.el (mail-source-default-file-modes):
* lisp/printing.el (pr-file-modes):
* lisp/gnus/mm-decode.el (mm-attachment-file-modes):
* lisp/gnus/nnmail.el (nnmail-default-file-modes):
* lisp/recentf.el (recentf-save-file-modes):
* lisp/vc/ediff-init.el (ediff-temp-file-mode):
* lisp/vc/emerge.el (emerge-temp-file-mode): Better document the fact
that these are integer and not octal values.

* lisp/epg.el (epg--start):
* lisp/emacs-lisp/package.el (package-import-keyring): Use octal values
to make the code more self-documenting.
2025-01-06 11:10:10 +01:00
Peter Oliver
6a389d5be4 Try harder to stabilize dired-test-bug27243-02
* test/lisp/dired-tests.el (dired-test-bug27243-02): Don't rely on the
expected point, since columns will move if the size of the parent directory
changes order of magnitude.  (Bug#72120)
2025-01-06 10:17:35 +01:00
Stefan Kangas
f652566af5 ; Silence byte-compiler
* test/lisp/net/browse-url-tests.el
(browse-url-tests-delete-temp-file): Suppress warning.
2025-01-06 10:15:25 +01:00
Stefan Kangas
1096d9afaa Improve Commentary in man.el
* lisp/man.el (Commentary): Move "Features" above "Credits and History".
The former is more likely to be relevant.
2025-01-06 07:13:03 +01:00
Stefan Kangas
fe6a28acac ; Quote function symbols in man.el
* lisp/man.el (Man-init-defvars, Man-translate-references)
(Man-highlight-references, Man-page-from-arguments)
(Man-follow-manual-reference): Quote function symbols.
2025-01-06 07:12:35 +01:00
João Távora
04a8faef09 Eglot: fix signature precedence based on provenance (bug#74914)
* lisp/progmodes/eglot.el (eglot--sig-info): Reverse order of
activeParameter and sig-active.
2025-01-05 20:39:51 +00:00
Stefan Monnier
127fc98308 (hack-one-local-variable): Fix bug#74964
* lisp/files.el (hack-local-variables--inhibit): New var.
(hack-one-local-variable): Use it to avoid infinite recursion in a more
targeted manner.
2025-01-05 10:03:40 -05:00
Michael Albinus
672a5f2b82 * lisp/net/tramp-sh.el (tramp-get-remote-pipe-buf): Make it more robust. 2025-01-05 15:24:21 +01:00
viliaapro
bc1a544b52 Fix bug in 'rng-valid' that unnecessarily marks buffer as modified
* lisp/nxml/rng-valid.el (rng-do-some-validation-1): Use
'with-silent-modifications'.  (Bug#75224)

Copyright-paperwork-exempt: yes
2025-01-05 15:39:50 +02:00
Eli Zaretskii
c6d0c2eec3 ; * admin/authors.el (authors-aliases): Add William O'Brien. 2025-01-05 14:41:43 +02:00
w08r
ac3b678607 Enable extra flags in 'go-ts-mode' test commands
* lisp/progmodes/go-ts-mode.el (go-ts-mode-test-flags):
(go-ts-mode--get-test-flags): New custom variable and function
for controlling test behaviour.
(go-ts-mode--compile-test): Updated to use new test flags
variable for passing extra information to the go test command
line.
(go-ts-mode-test-this-package): Updated to use new test flags
variable for passing extra information to the go test command
line.  Removed incorrect use of -run flag.

* etc/NEWS: Announce the new user option.  (Bug#74786)
2025-01-05 14:37:55 +02:00
Eli Zaretskii
dc41ddb4d6 Allow to remap 'header-line' face
* src/xfaces.c (realize_basic_faces): Bind 'face-remapping-alist'
to nil while realizing basic faces.
(lookup_basic_face): Force realizing a face whose 'inherit'
attribute is non-nil.  (Bug#73862)
2025-01-05 12:40:39 +02:00
Eli Zaretskii
7eb8596ff5 ; Fix warnings in a tty-only build on MS-Windows
* lisp/org/org.el (dnd-open-local-file):
* lisp/dired.el (tool-bar--image-expression):
* lisp/term/android-win.el (x-handle-args): Declare.
* lisp/w32-fns.el (w32-system-shells):
(w32-allow-system-shell):
* lisp/net/shr.el (image-scaling-factor):
* lisp/net/eww.el (image-scaling-factor):
* lisp/image.el (image-scaling-factor): Defvar.
(image-recompute-map-p): Move to before the first use.
Reported by Angelo Graziosi <angelo.g0@libero.it>.
2025-01-05 11:03:07 +02:00
Juri Linkov
47ff8ab307 * lisp/treesit.el: Fix treesit-show-paren-data (bug#75198)
(treesit-show-paren-data--categorize): Use 'treesit-thing-defined-p'
to check if the thing exists for the language at POS before calling
'treesit-parent-until' that raises an error for an undefined thing.
(treesit-thing-defined-p): Add the alias signature to the docstring.
2025-01-05 09:43:22 +02:00
Eli Zaretskii
cc5cd4de93 Fix setup of coding-systems on MS-Windows
* src/emacs.c (main) [HAVE_PDUMPER] [WINDOWSNT]: Call
'w32_init_file_name_codepage' again after loading the pdumper
file.
* src/w32.c (w32_init_file_name_codepage) [HAVE_PDUMPER]:
Reinitialize additional variables.  (Bug#75207)
2025-01-05 07:56:27 +02:00
Stefan Kangas
441788e06d Delete duplicate note on ancient platforms
* etc/MACHINES: Delete note on platforms removed in Emacs 23.1 from the
introduction, since it is duplicated again at the end of the file.
2025-01-05 05:32:01 +01:00
Yuan Fu
87f83f1c17
Fix tsx-ts-mode syntax propertize function (bug#73978)
* lisp/progmodes/typescript-ts-mode.el:
(tsx-ts--syntax-propertize-captures): Apply punctuation syntax
on balanced pairs, instead of using string syntax.
2025-01-04 11:53:39 -08:00
Juri Linkov
d9a0e78197 * lisp/treesit.el (treesit-transpose-sexps): Improve (bug#60655).
Use 'treesit-thing-next' and 'treesit-thing-prev' with
'treesit-node-named' to transpose named siblings that leaves the right
punctuation in anonymous nodes between named siblings.  Fall back
to 'transpose-sexps-default-function' inside strings and comments.
(treesit-node-named): New helper function.
2025-01-04 20:30:07 +02:00
Eli Zaretskii
6814ab06f2 Merge from origin/emacs-30
6468c3f7a7 Update doc string of 'insert'
6d8c3c0cbe Use `keymap*-set' over `global-set-key'/`define-key' in e...
4b2bb63b7a Fix documentation and prompt in 'package-isolate'
55f43f5b22 ; Fix typo in treesit-explore-mode
921f454f50 Update fontification for attribute values in heex-ts-mode
ae2589ea7a Add expression handling to heex-ts-mode
0cacf80639 ; * etc/NEWS: Document change of 'make-cursor-line-fully-...
f47a29da5c * lisp/man.el (Man-mode): Improve docstring.

# Conflicts:
#	etc/NEWS
2025-01-04 09:59:55 -05:00
Eli Zaretskii
a1b687568f ; Merge from origin/emacs-30
The following commits were skipped:

cd6e2a0828 Fix copyright years by hand
7fa975adbc Update copyright year to 2025
2025-01-04 09:59:53 -05:00
Eli Zaretskii
d63767995e Merge from origin/emacs-30
afe776051e [project-vc]: Make project-buffers more consistent with p...
a720458fdd (elisp-flymake-byte-compile): Improve UX with `debug-on-e...
7acfea1935 ; * doc/lispref/modes.texi (Customizing Keywords): Fix ty...
d47a7d6f0f ; Add missing parameters in keymap doc
07e9f27c3e ; * doc/misc/calc.texi: Fix makeinfo warnings (bug#75166).
43a8f0de5e Always match underscore variables for elixir-ts-mode
2025-01-04 09:59:52 -05:00
Ulrich Müller
6468c3f7a7 Update doc string of 'insert'
* src/editfns.c (Finsert): Mention 'decode-coding-string' instead
of the obsolete 'string-as-multibyte' in doc string.  (Bug#75345)
2025-01-04 15:31:24 +02:00
Jared Finder
ba6429081a Don't always enable xterm-mouse-mode (bug#74833)
Many terminals set the environment variable TERM to "xterm" even when they
don't support all functionality in xterm.  This means that enabling
xterm-mouse-mode can break critical editing workflows like copy/paste.  This
adds checks for the specific terminal Emacs is run in and only enables
xterm-mouse-mode on terminals knows to support all critical editing workflows.

* etc/NEWS: Update announcement
* lisp/term/xterm.el (xterm--auto-xt-mouse-allowed-names)
(xterm--auto-xt-mouse-allowed-types): New variables to control
what terminals automatically enable xterm-mouse-mode.
(xterm--report-background-handler, xterm--version-handler): Use
xterm--read-string.
(xterm--read-string, xterm--query-name-and-version): New
function.
(xterm--init): Check what terminal is running and if
xterm-mouse-mode was manually called.
* lisp/xt-mouse.el (xterm-mouse-mode-called): New variable.
(xterm-mouse-mode): Set xterm-mouse-mode-called.  Mention
automatic call by xterm--init.  Delete outdated comment text.
2025-01-04 15:14:36 +02:00
Eli Zaretskii
b63ba892f9 Update eln-cache when --init-directory is used
* lisp/startup.el (normal-top-level): Update eln-cache after
'user-emacs-directory' is set by --init-directory.  Patch by
Jordan Isaacs <jordan@snowytrees.dev>.  (Bug#75022)
2025-01-04 14:44:10 +02:00
Lin Sun
5fe7f86367 * lisp/vc/ediff-util.el: Loop the ediff-session-registry instead of buffers
This avoids aborting the loop if an error happens in some buffer.
(Bug#74881)
2025-01-04 14:37:42 +02:00
Hong Xu
6d8c3c0cbe Use keymap*-set' over global-set-key'/`define-key' in elisp intro
* doc/lispintro/emacs-lisp-intro.texi (Key Bindings): Since
`global-set-key' and `define-key' are considered legacy, we encourage
`keymap-global-set' and `keymap-set' now.  (Bug#74999)
2025-01-04 14:33:10 +02:00