Commit graph

182873 commits

Author SHA1 Message Date
Stefan Monnier 201520c0f4 etc/NEWS: Document the change in intern and shorthands 2026-07-22 15:57:32 -04:00
Stefan Monnier 3f70cfde38 fund-func: Find definitions that use shorthands
* lisp/emacs-lisp/find-func.el (find-func--regexp-of-symbol-name):
New function.
(find-function-search-for-symbol): Use it to find shorthands.

* lisp/emacs-lisp/cl-generic.el (cl--generic-search-method):
Find method defined with shorthands (and funny chars).
2026-07-22 13:12:50 -04:00
Stefan Monnier 4b23583f60 doc/lispref/symbols.texi (Converting to/from shorthands): New subsection 2026-07-22 13:12:50 -04:00
Stefan Monnier 7c7616e3f0 (intern): Don't obey read-symbol-shorthands any more (bug#80574)
* src/lread.c (Fintern, Fintern_soft, Funintern): Don't obey
`read-symbol-shorthands` any more.

* lisp/emacs-lisp/shorthands.el (shorthands-of-symbol): New function,
adapted from `elisp--read-symbols-shorthands`.
(shorthands-to-longhand, shorthands-intern, shorthands-intern-soft)
(shorthands-unintern): New functions.
(shorthands-font-lock-shorthands): Use `shorthands-intern-soft`.

* lisp/progmodes/elisp-mode.el (elisp-context-menu)
(elisp--company-doc-buffer, elisp--company-doc-string)
(elisp--company-location, elisp--company-kind)
(elisp--company-deprecated, xref-backend-definitions)
(elisp--xref-find-definitions, eval-sexp-add-defvars)
(elisp--current-symbol): Use `shorthands-intern(-soft)`.
(elisp--read-symbol-shorthands): Use `shorthands-of-symbol`.
(elisp-completion-at-point): Use the `elisp--longhand` to simplify.
Use `shorthands-intern(-soft)`.

* lisp/minibuffer.el (completion-shorthand-try-completion):
Simplify using `shorthands-to-longhand`.

* lisp/emacs-lisp/lisp-mode.el (lisp-indent-function):
* lisp/thingatpt.el (symbol-at-point): Use `shorthands-intern(-soft)`.

* test/src/lread-tests.el (lread-unintern):
Use `shorthands-(un)intern(-soft)`.
2026-07-22 13:08:10 -04:00
Helmut Eller 6faf3cb68b Improve diff-unified->context
Preserve comments in hunk headers (usually a function name).

* lisp/vc/diff-mode.el (diff-unified->context): Parse the comment in the
hunk header and insert it in the corresponding hunk header in the
context diff.
(diff-context->unified): Change analogously.
* test/lisp/vc/diff-mode-tests.el (diff-mode-tests-undo-unified->context):
New test.
(diff-mode-tests--context-patch, diff-mode-tests--unified-patch): New
variables.
2026-07-22 17:46:01 +02:00
Harald Jörg ad23356910 ;cperl-mode.el: Do not take "=end" as an end of POD
Discovered by choroba, reported via GitHub:
https://github.com/HaraldJoerg/cperl-mode/issues/28

* lisp/progmodes/cperl-mode.el
(cperl-electric-pod, cperl-linefeed, cperl-find-pods-heres):
Remove "=end" from regular expressions.  "=end" is the end-of-POD
indicator in Raku (formerly called Perl6) but not in Perl.
2026-07-22 15:02:46 +02:00
Eli Zaretskii 0f086c307c Merge from origin/emacs-31
6107196a32 ; * etc/NEWS: Fix capitalization of arrow keys.
1a2fc844ca Revert "; * admin/authors.el (authors-aliases): Fix Borys...
cf6918c189 ; * admin/authors.el (authors-aliases): Fix Borys Buliha'...
eac0aaf7a1 ; * doc/misc/cl.texi (Modify Macros): Remove 'with-memoiz...
c6c8012d7a Fix 'mouse-drag-copy-region' = 'non-empty'

# Conflicts:
#	etc/NEWS
2026-07-18 05:59:00 -04:00
Eli Zaretskii 72842af763 ; Merge from origin/emacs-31
The following commit was skipped:

f532313220 ; DUMP_RELOCATION_ALIGNMENT comment fix
2026-07-18 05:58:55 -04:00
Eli Zaretskii 5172d275c0 Merge from origin/emacs-31
39e1e9c367 ; * doc/lispref/keymaps.texi (Changing Key Bindings): Fix...
3b4cba3b68 Fix `with-tramp-local-environment'
2026-07-18 05:58:55 -04:00
Eli Zaretskii 036a2e7efc ; Merge from origin/emacs-31
The following commit was skipped:

82166cbd00 project.el: Bump version to 0.12
2026-07-18 05:58:55 -04:00
Eli Zaretskii 6107196a32 ; * etc/NEWS: Fix capitalization of arrow keys. 2026-07-18 12:36:13 +03:00
Eli Zaretskii 1a2fc844ca Revert "; * admin/authors.el (authors-aliases): Fix Borys Buliha's name."
This reverts commit cf6918c189.
It was a mistake, as Boris prefers the other spelling.
2026-07-18 12:27:38 +03:00
Eli Zaretskii cf6918c189 ; * admin/authors.el (authors-aliases): Fix Borys Buliha's name. 2026-07-18 12:25:13 +03:00
Boris Buliga b0d799c016 Don't build untranslated doc directories per language (bug#81332)
With DOCLANGS='default fr', the top-level doc targets ran a sub-make
in every doc directory once per language.  The Makefiles of the
directories without translations (emacs, lispintro, lispref) ignore
DOCLANG, so the non-default sub-make repeated the default-language
build, and under "make -j" two sub-makes produced the same outputs
concurrently, failing intermittently with:

  cp: cannot create regular file '../../info/cons-2a.txt': File exists

* Makefile.in (FILTER_DOCLANGS): New function: languages from
DOCLANGS to build for a doc directory, the default language when
present in DOCLANGS plus every language that has translations for
this directory (doc/translations/<lang>/<dir>).  Do not force the
default language when DOCLANGS omits it.  Suggested by Vincent
Belaiche <vincentb1@users.sourceforge.net>.
(MAKE_DOC): Take the list of languages as a second argument and use
it instead of DOCLANGS.
2026-07-18 12:21:25 +03:00
Boris Buliga 34436c11ca Fix info/dir generation in fresh checkouts (bug#81332)
The previous bug#81332 fix made info/dir depend on doc/misc/NAME.texi
names derived from INFO_COMMON.  For the manuals whose source is .org
(modus-themes, org), these .texi files are generated and do not exist
in a fresh checkout, and there is no rule to build them at this level,
so building Emacs fails with:

  make[1]: *** No rule to make target 'doc/misc/modus-themes.texi',
  needed by 'info/dir'.  Stop.

* Makefile.in (srcdir_doc_info_dir_inputs): For the default language,
depend on the actual sources reported by doc/misc echo-sources
(texi_misc_default), which lists .org sources for the org-based
manuals; make-info-dir extracts dir entries from both formats.
(GET_DOC_SRC): Only handle translated languages; drop the mapping of
default translation names to doc/misc .texi names.
2026-07-18 12:20:26 +03:00
Alan Mackenzie 9307284c69 Recognize non-alphanumeric characters in 'sh-script' defun names
Also amend the doc string of defun-prompt-regexp.  This fixes
bug#81401.
* lisp/progmodes/sh-script.el (sh-base-mode): Amend the value
of 'defun-prompt-regexp' to use a "negative" rather than a
"positive" list of characters.
* lisp/emacs-lisp/lisp.el (defun-prompt-regexp).  Amend the doc
string for clarity.
2026-07-18 12:07:29 +03:00
Eli Zaretskii eac0aaf7a1 ; * doc/misc/cl.texi (Modify Macros): Remove 'with-memoization' (bug#81381). 2026-07-18 12:01:27 +03:00
Eli Zaretskii c6c8012d7a Fix 'mouse-drag-copy-region' = 'non-empty'
* lisp/mouse.el (mouse-save-then-kill): Fix conditions for copying
when 'mouse-drag-copy-region' is 'non-empty'.  (Bug#81366)
2026-07-18 11:49:47 +03:00
Eli Zaretskii e3ec1cb8cc Fix MinGW build as followup to recent Gnulib changes
Gnulib added AT_EMPTY_PATH support to its 'fstatat', but
the MinGW build must use its own 'fstatat' implementation.
These changes avoid compiling Gnulib's fstatat.c, and add
support for AT_EMPTY_PATH to the MinGW implementation.
* src/w32.c (fstatat): Support AT_EMPTY_PATH.

* nt/inc/unistd.h (AT_EMPTY_PATH): Define.
* nt/mingw-cfg.site (gl_cv_func_fstatat_null_file): Set to 'yes'
to avoid compiling Gnulib's fstatat.
2026-07-18 09:25:21 +03:00
Paul Eggert d71a399fdd Remove lib/af_alg.h, to adjust to recent Gnulib
Gnulib deprecated the crypto/af_alg module,
following the deprecation of the AF_ALG API in Linux 7.2.
This means Emacs needs to do less work to avoid using it.
* admin/merge-gnulib (AVOIDED_MODULES):
Remove crypto/af_alg as we no longer need to avoid it.
* configure.ac (emacs_files): Omit lib/af_alg.h.
* lib/af_alg.h: Remove; no longer used.
* lib/gnulib.mk.in: Regenerate.
2026-07-17 14:09:18 -07:00
Paul Eggert 5249f84d8b Update from Gnulib by running admin/merge-gnulib 2026-07-17 14:09:18 -07:00
Filipp Gunbin 10fc4559e1 Fix end-of-defun with argument < -1
When end-of-defun is invoked with argument < -1 after the end of
defun, and there is some text between the end of defun and
point, the result is off by 1 (Bug#81305).
* lisp/emacs-lisp/lisp.el (end-of-defun): Always move point to
beg.
* test/lisp/emacs-lisp/lisp-tests.el (end-of-defun-twice): Add
test case.
2026-07-17 18:02:06 +03:00
Earl Hyatt 541f693ca2 Create macro 'pcase-let*-strict'
Create a version of 'pcase-let*' that signals an error when a 'pcase'
pattern does not match its corresponding value.

* lisp/emacs-lisp/pcase.el (pcase--let*): Add the optional argument
'strict' to generate code for signaling an error when a 'pcase'
pattern does not match its corresponding value.
* lisp/emacs-lisp/pcase.el (pcase-let*-strict): Add the new macro.
* test/lisp/emacs-lisp/pcase-tests.el (pcase-tests-let*-strict):
Add new test.
* etc/NEWS (Pcase): Add heading for 'pcase'.
* etc/NEWS (Add 'pcase-let*-strict'): Add news entry for new macro.
2026-07-16 16:33:04 -04:00
Paul Eggert f532313220 ; DUMP_RELOCATION_ALIGNMENT comment fix
* src/pdumper.c (DUMP_RELOCATION_ALIGNMENT):
Fix comment to match relocation alignment requirements.
Backported from master branch commit
3c0bc3f2eb.
2026-07-16 11:01:44 -07:00
Eli Zaretskii 39e1e9c367 ; * doc/lispref/keymaps.texi (Changing Key Bindings): Fix markup. 2026-07-16 18:53:14 +03:00
Michael Albinus 3b4cba3b68 Fix `with-tramp-local-environment'
* lisp/net/tramp.el (with-tramp-local-environment): Do not change the
global environment.  Reported by Daniel Kraus <daniel@kraus.my>.
(Bug#81409)
2026-07-16 15:50:32 +02:00
Eli Zaretskii ae2ce54a11 Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2026-07-16 13:39:24 +03:00
Eli Zaretskii 27771b1ca5 ; * etc/emacs-buffer.gdb (ybuffer-contents): Fix for MS-Windows. 2026-07-16 13:38:17 +03:00
Paul Eggert 3c0bc3f2eb Port pdumper back to 32-bit MinGW --with-wide-int
Problem reported by Eli Zaretskii (bug#44531#91).
* src/pdumper.c (DUMP_RELOCATION_ALIGNMENT):
Don’t make it larger than alignof (void *).
2026-07-16 00:51:53 -07:00
Eli Zaretskii 7113255b84 ; * src/pdumper.c (dump_reloc_set_offset): Improve error text (bug#44531). 2026-07-16 09:18:04 +03:00
Dmitry Gutov 82166cbd00 project.el: Bump version to 0.12
Do not merge to master.
2026-07-16 06:23:44 +03:00
Dmitry Gutov 094e2e5692 project.el: Bump the version 2026-07-16 06:16:27 +03:00
Paul Eggert 3b4dd7829f ; Fix typo in newsticker--decode-rfc822-date doc string
* lisp/net/newst-backend.el (newsticker--decode-rfc822-date):
"MET" is not a valid RFC 822 time zone abbreviation.
2026-07-15 13:43:30 -07:00
Paul Eggert f167bd0230 Update doc for North American time zone changes
This year British Columbia and Alberta moved one time zone east,
discarding daylight saving time, and it’s possible that more of North
America will follow suit.  Adjust doc strings and manual to be
more robust in the presence of these changes.
2026-07-15 13:39:59 -07:00
Paul Eggert ad0c340975 Bump DUMP_RELOCATION_ALIGNMENT to alignof (Lisp_Object)
* src/pdumper.c (DUMP_RELOCATION_ALIGNMENT): Now alignof
(Lisp_Object) on all platforms.  This supports larger offsets on
many platforms, and does not shrink the maximum supported offset
on any known platform.  See Bug#44531.
2026-07-15 12:53:15 -07:00
Paul Eggert 68a9c61fa9 Merge from origin/emacs-31
407de5142c Port pdumper to m68k
0818bb3eb3 ; * etc/NEWS: Presentational fixes and improvements.
f620924322 ; Improve doc-strings of window rotation commands
937de3fa92 ; Fix typos in preceding commit
48a481ac8d ; Improve documentation of window-rotation commands
afc5fc709b browse-url-with-browser-kind: Use strings for DEF
4be321d511 Fix issues related to window layout changes (Bug#81406)
86b65d82c7 Turn off combination resizing in 'window--transpose-1' (B...
7a9c004924 ; Clarify documentation of 'filter-buffer-substring'
b6412271e1 Fix copy-by-mouse in *Backtrace* buffers
eebc9c7fe7 ; * etc/DEBUG: Info about -g3 on OpenBSD (bug#81109).
2b8aa16b0b Support javascript "using" keyword (bug#81351)

# Conflicts:
#	etc/NEWS
2026-07-15 11:40:46 -07:00
Paul Eggert 71a81c9853 Fix benchmark failure when no native compilation
* test/lisp/emacs-lisp/benchmark-tests.el (benchmark-tests):
Run benchmark-run-compiled only if native compilation is available.
2026-07-15 11:39:50 -07:00
Paul Eggert 8c1345b48d Pacify gcc 16 -Wuseless-cast in oldXMenu
* oldXMenu/Create.c (XMenuCreate):
* oldXMenu/XCrAssoc.c (XCreateAssocTable):
Omit useless casts.
2026-07-15 11:39:50 -07:00
Paul Eggert 407de5142c Port pdumper to m68k
Problem reported by John Paul Adrian Glaubitz (bug#44531).
* src/pdumper.c (DUMP_RELOCATION_ALIGNMENT_BITS): Remove.  It’s
not needed for optimization, as today’s compilers deduce that
multiplying and dividing by the alignment can be done with shifts.
All uses changed to use DUMP_RELOCATION_ALIGNMENT.
(DUMP_RELOCATION_ALIGNMENT) [__mc68000__]:
Now min (4, alignof (Lisp_Object)), not 4.
(dump_reloc_set_offset): Change eassert to eassume to help
the compiler.
2026-07-15 10:01:48 -07:00
Michael Albinus 0818bb3eb3 ; * etc/NEWS: Presentational fixes and improvements. 2026-07-15 16:58:49 +02:00
Martin Rudalics f620924322 ; Improve doc-strings of window rotation commands
* lisp/window-x.el (rotate-windows, rotate-windows-back): In
doc-strings mention alternative functions.
2026-07-15 09:35:33 +02:00
Mike Kupfer 937de3fa92 ; Fix typos in preceding commit
* etc/NEWS: Fix key sequence for 'window-layout-rotate-anticlockwise'.

* lisp/window-x.el (window-layout-transpose):
(window-layout-rotate-clockwise):
(window-layout-rotate-anticlockwise):
(window-layout-flip-leftright):
(window-layout-flip-topdown): Add missing period.
2026-07-15 08:54:09 +02:00
Sean Whitton 36423e4572 ; * lisp/vc/vc-dir.el (vc-dir-headers): Use "DWIM next". 2026-07-14 14:05:28 +01:00
Eli Zaretskii 48a481ac8d ; Improve documentation of window-rotation commands
* lisp/window-x.el (window-layout-rotate-clockwise)
(window-layout-flip-leftright, window-layout-flip-topdown): Doc
fixes.
(rotate-windows-change-selected): Add :version.

* doc/lispref/windows.texi (Recombining Windows): Fix wording,
markup and indexing.

* etc/NEWS: Add key bindings for window-rotation commands and
document 'rotate-windows-change-selected'.
2026-07-14 14:19:41 +03:00
Mark Hindley afc5fc709b browse-url-with-browser-kind: Use strings for DEF
* lisp/net/browse-url.el (browse-url-with-browser-kind): Use
strings for DEF argument to completing-read (bug#81369).

Copyright-paperwork-exempt: yes
2026-07-14 12:05:21 +01:00
Martin Rudalics 4be321d511 Fix issues related to window layout changes (Bug#81406)
* src/window.c (Vwindow_combination_resize): In doc-string say
that binding this to nil may be necessary to produce specific,
predefined frame layouts (Bug#81406).
* lisp/window-x.el (window-layout-rotate-clockwise)
(window-layout-rotate-anticlockwise)
(window-layout-flip-leftright, window-layout-flip-topdown)
(window-layout-transpose, rotate-windows-change-selected)
(rotate-windows, rotate-windows-back): Rewrite doc-strings.
Make sure that non-interactive calls with nil or absent WINDOW
argument work on the frame's main window.  Fix infinite loop
when 'rotate-windows' is called for a non-selected frame.
* doc/lispref/windows.texi (Recombining Windows): Say that
binding 'window-combination-resize' to nil may be necessary to
produce specific, predefined frame layouts (Bug#81406).
(Changing Window Layouts): Minor rewrite.
* etc/NEWS: Announce names of new commands to change window
layout (Bug#81406).
2026-07-14 11:23:42 +02:00
Martin Rudalics 86b65d82c7 Turn off combination resizing in 'window--transpose-1' (Bug#81406)
* lisp/window-x.el (window--transpose-1): Bind
'window-combination-resize' to nil around splitting (Bug#81406).
2026-07-13 15:59:15 +02:00
Eli Zaretskii 7a9c004924 ; Clarify documentation of 'filter-buffer-substring'
* doc/lispref/text.texi (Buffer Contents): Clarify that the order
of buffer positions in arguments of 'filter-buffer-substring'
should not matter.

* lisp/simple.el (filter-buffer-substring-function):
(filter-buffer-substring): Doc fix.
2026-07-13 15:34:11 +03:00
Eli Zaretskii b6412271e1 Fix copy-by-mouse in *Backtrace* buffers
* lisp/emacs-lisp/backtrace.el (backtrace--filter-visible):
Support BEG and END in reverse order.  Patch by Jakub
T. Jankiewicz <jcubic@jcubic.pl>.  (Bug#81365)
2026-07-13 15:13:51 +03:00
Eli Zaretskii eebc9c7fe7 ; * etc/DEBUG: Info about -g3 on OpenBSD (bug#81109). 2026-07-12 09:57:01 +03:00