Commit graph

180571 commits

Author SHA1 Message Date
Richard Lawrence
4db3be2001 Fix iCalendar macro (debug ...) forms and indentation
As discussed in Bug#74994.

* lisp/calendar/icalendar-ast.el (icalendar-make-param)
(icalendar-make-property, icalendar-make-component)
(icalendar-make-node-from-templates)
* lisp/calendar/icalendar-macs.el (icalendar-with-node-children)
(icalendar-with-node-value, icalendar-with-param)
(icalendar-with-child-of, icalendar-with-property-of): Remove extraneous
arguments in (debug ...) forms.
* lisp/calendar/icalendar-recur.el
* lisp/calendar/diary-icalendar.el: Fix indentation of calls to them.

Plus one other minor fix:

* lisp/calendar/diary-icalendar.el
(diary-icalendar-current-tz-to-vtimezone): Ignore unused error
variable (fixes a byte compiler warning).
2026-02-01 09:46:09 -05:00
Richard Lawrence
74750e269b Some minor code improvements in iCalendar library
* lisp/calendar/icalendar-mode.el: Update file header.

Fix error display in 'icalendar-errors-mode':

* lisp/calendar/icalendar.el (icalendar-error-regexp): Fix to allow
" *UNFOLDED:" prefix in buffer names.  (Extra colon was breaking match.)
(icalendar-format-error): Suppress this prefix preferentially in long
buffer names.

Add declarations to some iCalendar macros:

* lisp/calendar/icalendar-macs.el (icalendar-with-node-value)
(icalendar-with-child-of)
(icalendar-with-param-of)
(icalendar-with-node-children)
(icalendar-with-node-value)
(icalendar-with-param)
* lisp/calendar/icalendar-ast.el (icalendar-make-property)
(icalendar-make-component)
(icalendar-make-node-from-templates): Add (declare ...) forms.

Add `icalendar-trimp' to icalendar-utils.el:

* lisp/calendar/icalendar-utils.el (icalendar-trimp): New function.
* lisp/calendar/diary-icalendar.el
(diary-icalendar-format-entry)
(diary-icalendar-parse-attendees-and-organizer)
(diary-icalendar-parse-location)
(diary-icalendar-parse-url)
(diary-icalendar-parse-uid): Use it to replace diary-icalendar--nonempty.
(diary-icalendar--nonempty): Remove.

Move VTIMEZONE creation to icalendar-recur.el:

The following changes move `diary-icalendar-current-tz-to-vtimezone' and
associated code to icalendar-recur.el.  Library users are likely to need
this function, so it makes sense to keep it with other time zone-related
code in that file, instead of having them depend on diary-icalendar.

* lisp/calendar/icalendar-recur.el (icalendar-tz-data-insufficient)
(icalendar-tz-unsupported): New error types.
(icalendar-recur-current-tz-to-vtimezone): Rename from
`diary-icalendar-current-tz-to-vtimezone'; signal new error types.
(icalendar-recur--tz-warning): Rename from `diary-icalendar--tz-warning'.
(icalendar-recur--emacs-local-tzid): Rename from
`diary-icalendar--emacs-local-tzid'.
(icalendar-recur--tz-info-sexp-p): Rename from
`diary-icalendar--tz-info-sexp-p'.
* lisp/calendar/diary-icalendar.el
(diary-icalendar-current-tz-to-vtimezone): Reimplement with
`icalendar-recur-current-tz-to-vtimezone'.
(diary-icalendar--tz-warning)
(diary-icalendar--emacs-local-tzid)
(diary-icalendar--tz-info-sexp-p): Renamed and moved; see above.
(diary-time-zone-export-strategy): Update validation function name.
2026-01-03 15:31:01 -05:00
Richard Lawrence
cf20565e63 Change the format function calling conventions in diary-icalendar.el
This avoids `calendar-dlet' and unprefixed dynamic variable bindings
when calling user format functions, as discussed in Bug#74994.

* lisp/calendar/diary-icalendar.el (diary-icalendar-time-format): Fix
whitespace.
(diary-icalendar-format-attendee)
(diary-icalendar-format-entry): Use fewer dynamic variables, prefix
them, replace `calendar-dlet' with `dlet', and call user format
functions with the node to be formatted.
(diary-icalendar-attendee-format-function)
(diary-icalendar-vevent-format-function)
(diary-icalendar-vjournal-format-function)
(diary-icalendar-vtodo-format-function): Document these changes.
(diary-icalendar-attendee-skeleton)
(diary-icalendar-vevent-skeleton)
(diary-icalendar-vjournal-skeleton)
(diary-icalendar-vtodo-skeleton): Use `defun' with `skeleton-insert'
instead of `define-skeleton'.  Update variable references.
(diary-icalendar-import-buffer-to-buffer)
(diary-icalendar-add-valarms): Replace `calendar-dlet' with `dlet'.
* doc/emacs/calendar.texi (Diary iCalendar Import): Update example in
manual.
2025-12-29 14:11:20 -05:00
Richard Lawrence
f37efe5e94 iCalendar code improvements
Thanks to Stefan Monnier for the comments in Bug#74994 leading to most
of these changes.

Improvements in diary-icalendar.el and related changes:

* lisp/calendar/diary-icalendar.el
(icalendar-save-binary-atttachment): Rename to
`diary-icalendar-save-binary-attachment'.  Document internal require.
(diary-icalendar-attendee-skeleton-command): Rename to
`diary-icalendar-attendee-format-function'.
(diary-icalendar-vevent-skeleton-command): Rename to
`diary-icalendar-vevent-format-function'.
(diary-icalendar-vjournal-skeleton-command): Rename to
`diary-icalendar-vjournal-format-function'.
(diary-icalendar-vtodo-skeleton-command): Rename to
`diary-icalendar-vtodo-format-function'.
* doc/emacs/calendar.texi (Diary iCalendar Import)
* lisp/calendar/icalendar.el (icalendar-import-format)
(icalendar-import-format-summary, icalendar-import-format-description)
(icalendar-import-format-location, icalendar-import-format-organizer)
(icalendar-import-format-url, icalendar-import-format-uid)
(icalendar-import-format-status, icalendar-import-format-class): Update
references to renamed functions.
(diary-icalendar-attendee-format-function): Fix quoted function name.
(diary-icalendar-attendee-format-function)
(diary-icalendar-vevent-format-function)
(diary-icalendar-vjournal-format-function)
(diary-icalendar-vtodo-format-function)
(diary-icalendar-after-mailcap-viewer-hook): Improve docstrings.
(diary-icalendar-skip-addresses-regexp): Ensure default value is a
regexp.
(diary-icalendar-description-regexp): Fix :type declaration to agree
with default.
(diary-icalendar-format-date): Replace unnecessary `calendar-dlet' with
`dlet'.
(diary-icalendar-vevent-format-function)
(diary-icalendar-vjournal-format-function)
(diary-icalendar-vtodo-format-function)
(diary-icalendar-format-entry)
(diary-icalendar-import-buffer-to-buffer)
(diary-icalendar--entry-import)
(diary-icalendar-import-buffer)
(diary-icalendar-import-file): Change "non-marking" to "nonmarking" in
variable names for consistency (cf. `diary-nonmarking-symbol').
(diary-icalendar-attendee-skeleton): Remove unnecessary call to
`skeleton-insert'.
(diary-icalendar-vevent-skeleton)
(diary-icalendar-vjournal-skeleton)
(diary-icalendar-vtodo-skeleton): Don't insert return values of `let'
forms.
(diary-icalendar-parse-entry): Call
`diary-icalendar-other-properties-parser' with type and properties as
arguments, instead of dynamic binding.
(diary-icalendar-other-properties-parser): Document the new calling
convention.
* test/lisp/calendar/diary-icalendar-tests.el
(diary-icalendar-test-parse-@-location): Accept the new arguments.

Clarify `declare-function' usage:

* lisp/calendar/icalendar-parser.el (icalendar-read-time)
(icalendar-period-end, icalendar-parse-calendar)
(icalendar-index-insert, icalendar-index-get)
* lisp/calendar/icalendar-ast.el (icalendar-printable-value-type-symbol-p)
(icalendar-ast-node-valid-value-p)
* lisp/calendar/icalendar-utils.el (icalendar-date-time-add)
(icalendar-dates-until, icalendar-date-time-variant): Move
`declare-function' forms to corresponding `require' forms.

Improve debugging with icalendar-ast.el macros:

* lisp/calendar/icalendar-ast.el
(icalendar-make-value-node-of): Add explanatory comment to require.
(icalendar--make-param--list, icalendar--make-param--nonlist)
(icalendar--make-property--list, icalendar--make-property--nonlist): New
functions.
(icalendar-make-param, icalendar-make-property): Use them to reduce code
generated by these macros.  Add (declare (debug ...)) forms.
(icalendar-make-component, icalendar-make-node-from-templates):
Add (declare (debug ...)) forms.
* test/lisp/calendar/icalendar-ast-tests.el: New file.

Various other minor changes:

* lisp/calendar/icalendar-macs.el (icalendar-define-type): Improve
docstring.
(icalendar-define-property): Fix deprecation warning: replace 'any' with
'not-newline' in rx definition.
*
test/lisp/calendar/icalendar-recur-tests.el (icalendar-test-rrule-test):
Pass tags on to `ert-deftest' and mark several tests as expensive.
* lisp/calendar/calendar.el (diary-date-insertion-form): Remove
constants from :set-after list.
* lisp/calendar/diary-lib.el (diary-time-regexp): Clarify FIXME comment.
* lisp/calendar/icalendar-parser.el
(icalendar-x-name): Fix indentation.
(icalendar-cal-address): Improve docstring.
2025-12-29 14:11:17 -05:00
Richard Lawrence
004479e052 Allow CRLF line endings in iCalendar (.ics) test files
Thanks to Jim Porter for feedback in Bug#74994.

* .gitattributes: Allow CRLF endings in iCalendar test files.
2025-12-29 14:11:11 -05:00
Richard Lawrence
c685cf336a Add full support for iCalendar (RFC5545) data
This is a fix for Bug#74994 that replaces the existing support
in icalendar.el.  It implements a full parser, recurrence rule
and time zone calculations, diary import and export, and a
major mode with syntax highlighting for iCalendar data.  It
obsoletes most of the code in icalendar.el.

In addition to Bug#74994, the proposal to update Emacs' iCalendar
support was discussed on emacs-devel in this thread:
https://lists.gnu.org/archive/html/emacs-devel/2024-10/msg00425.html

icalendar.el pre-dates the current standard (RFC5545), contains numerous
bugs, is not well documented, and could not easily be updated or
extended; starting fresh was the simplest path to creating an iCalendar
library that other Emacs applications and packages can rely on.  It was
decided to leave icalendar.el's code in place for posterity, but declare
it obsolete.  Most of the changes in icalendar.el simply consist of such
declarations.  The old To Do list has also been deleted.

A few changes in icalendar.el, however, consist of new code for
library-wide functions and options, especially error handling.  In
particular:

* lisp/calendar/icalendar.el: Log iCalendar library errors in a single
buffer.
(icalendar-errors-mode): New mode for it.
(icalendar-uid-format): Change the default value to "%h", a hash
value (for privacy).
(icalendar-make-uid): New function, to replace 'icalendar--create-uid'.
(icalendar-debug-level, icalendar-vcalendar-prodid): New option.
(icalendar-vcalendar-version): New constant.
* lisp/calendar/icalendar.el (icalendar-import-format)
(icalendar-import-format-summary, icalendar-import-format-description)
(icalendar-import-format-location, icalendar-import-format-organizer)
(icalendar-import-format-url, icalendar-import-format-uid)
(icalendar-import-format-status, icalendar-import-format-class)
(icalendar-recurring-start-year, icalendar-export-hidden-diary-entries)
(icalendar-export-sexp-enumerate-all, icalendar-export-alarms,
icalendar-debug, icalendar--weekday-array, icalendar--dmsg)
(icalendar--get-unfolded-buffer icalendar--clean-up-line-endings)
(icalendar--rris, icalendar--read-element)
(icalendar--get-event-property, icalendar--get-event-properties)
(icalendar--get-event-property-attributes)
(icalendar--get-children, icalendar--all-events, icalendar--split-value)
(icalendar--convert-tz-offset, icalendar--parse-vtimezone)
(icalendar--get-most-recent-observance)
(icalendar--convert-all-timezones, icalendar--find-time-zone)
(icalendar--decode-isodatetime)
(icalendar--decode-isoduration, icalendar--add-decoded-times)
(icalendar--datetime-to-american-date)
(icalendar--datetime-to-european-date, icalendar--datetime-to-iso-date)
(icalendar--datetime-to-diary-date, icalendar--datetime-to-colontime)
(icalendar--get-month-number, icalendar--get-weekday-number)
(icalendar--get-weekday-numbers, icalendar--get-weekday-abbrev)
(icalendar--date-to-isodate, icalendar--datestring-to-isodate)
(icalendar--diarytime-to-isotime, icalendar--convert-string-for-export)
(icalendar--convert-string-for-import, icalendar-export-file)
(icalendar-export-region, icalendar--create-uid)
(icalendar--parse-summary-and-rest, icalendar--create-ical-alarm)
(icalendar--do-create-ical-alarm, icalendar--convert-ordinary-to-ical)
(icalendar-first-weekday-of-year, icalendar--convert-weekly-to-ical)
(icalendar--convert-yearly-to-ical, icalendar--convert-sexp-to-ical)
(icalendar--convert-block-to-ical, icalendar--convert-float-to-ical)
(icalendar--convert-date-to-ical, icalendar--convert-cyclic-to-ical)
(icalendar--convert-anniversary-to-ical, icalendar-import-file)
(icalendar-import-buffer, icalendar--format-ical-event)
(icalendar--convert-to-ical, icalendar--convert-ical-to-diary)
(icalendar--convert-recurring-to-diary)
(icalendar--convert-non-recurring-all-day-to-diary)
(icalendar--convert-non-recurring-not-all-day-to-diary)
(icalendar--add-diary-entry, icalendar-import-format-sample): Mark them
as obsolete.

In addition to the changes above, the new iCalendar library consists of
the following:

* lisp/calendar/diary-icalendar.el:
* lisp/calendar/icalendar-ast.el:
* lisp/calendar/icalendar-macs.el:
* lisp/calendar/icalendar-mode.el:
* lisp/calendar/icalendar-parser.el:
* lisp/calendar/icalendar-recur.el:
* lisp/calendar/icalendar-utils.el: New files

A few changes were made to existing files dealing with the calendar and
diary:

* lisp/calendar/calendar.el (calendar-date-from-day-of-year): New
function, extracted from calendar-goto-day-of-year.
* lisp/calendar/cal-move.el (calendar-goto-day-of-year): Use it.
* lisp/calendar/cal-dst.el (calendar-dst-find-data): Improve docstring.
* lisp/calendar/calendar.el (diary-date-insertion-form): New option.
(diary-american-date-insertion-form, diary-european-date-insertion-form)
(diary-iso-date-insertion-form): New constants.
* lisp/calendar/diary-lib.el (diary-insert-entry): Use the new
'diary-date-insertion-form' option.
(diary-time-regexp): Add FIXME to an existing comment.

The user-facing aspects of the above changes are documented in the Emacs
manual and the NEWS file:

* doc/emacs/calendar.texi (Diary Conversion): Update manual section to
describe the new importer and exporter.
* doc/emacs/emacs.texi (Detailed node listing): Update to include the
new nodes in docs/emacs/calendar.texi.
* etc/NEWS: Briefly describe the new library, major mode, and options.

The remainder of the changes apply to test files.

The following changes introduce new test files related to the new diary
importer and exporter:

* test/lisp/calendar/diary-icalendar-tests.el (Diary import and export):
Tests for diary-icalendar.  In addition to new tests for the exporter,
the existing import tests for icalendar.el have been ported here; these
use the existing iCalendar files in
test/lisp/calendar/icalendar-resources.  (A few new input .ics files
have also been added to this directory; see below.)
* test/lisp/calendar/diary-icalendar-resources: New directory containing
expected outputs for the import tests in diary-icalendar-tests.el.
(These have the same or similar names to the output files for the old
importer, in test/lisp/calendar/icalendar-resources, but different
contents.  Thus they live in a new directory.)
* test/lisp/calendar/icalendar-resources/import-legacy-function.ics: New
input file to test backward compatibility of the new importer with a
function as the value of 'icalendar-import-format', now obsolete.
* test/lisp/calendar/icalendar-resources/import-legacy-vars.ics: New
input file to test backward compatibility of the new importer with
values for options provided by icalendar.el which are now obsolete.
* test/lisp/calendar/icalendar-resources/import-with-attachment.ics: New
input file to test import of base64-encoded attachments.
* icalendar-resources/import-time-format-12hr-blank.ics: New input file
to test import with a custom value of 'diary-icalendar-time-format'.

Two other new test files provide unit tests for the main functions of
the library:

* test/lisp/calendar/icalendar-parser-tests.el (Parser): Tests for
icalendar-parser.  Most of these are derived from examples in RFC5545,
to ensure the parser implements the standard.
* test/lisp/calendar/icalendar-recur-tests.el (Recurrence rules): Tests
for icalendar-recur.  Most of these are derived from examples in RFC5545,
to ensure the recurrence rule interpreter implements the standard.

A few of the existing test files for icalendar.el have also been
modified.  Besides the specific changes mentioned below, the modified
.ics files also now use CR-LF line endings, as required by RFC5545:

* test/lisp/calendar/icalendar-tests.el (icalendar-deftest-obsolete):
New macro.
* test/lisp/calendar/icalendar-resources/import-non-recurring-all-day.ics:
Correct a malformed VALUE parameter.
* test/lisp/calendar/icalendar-resources/import-rrule-anniversary.ics:
Correct representation of a recurring event.
*
test/lisp/calendar/icalendar-resources/import-rrule-daily-with-exceptions.ics:
Add a required VALUE parameter.
* test/lisp/calendar/icalendar-resources/import-rrule-daily.ics:
* test/lisp/calendar/icalendar-resources/import-rrule-monthly-no-end.ics:
* test/lisp/calendar/icalendar-resources/import-rrule-monthly-with-end.ics:
* test/lisp/calendar/icalendar-resources/import-rrule-weekly.ics:
Correct a malformed RRULE property.
2025-12-20 13:38:02 -05:00
Jens Schmidt
0aabe62b64 Improve handling of non-ASCII characters in 'transpose-regions'
* src/editfns.c (Ftranspose_regions): Separate code related to character
semantics from that related to byte semantics and in that way leverage
optimizations for regions of equal length with respect to both
semantics.  Move and update comments dating back to the initial
implementation.
* test/src/editfns-tests.el (editfns-tests--transpose-regions-tests)
(editfns-tests--transpose-regions-markups)
(editfns-tests--transpose-regions): New test and accompanying variables.
2025-12-20 13:23:29 -05:00
Jens Schmidt
875e42d501 Fix byte-vs-char length issue in 'transpose-regions'
* src/editfns.c (Ftranspose_regions): Calculate length of range between
regions both in units of bytes and characters and use these values as
appropriate.
2025-12-20 13:23:21 -05:00
Elías Gabriel Pérez
e93a9a9057 hideshow: Support nested comment block in 'hs-hide-level-recursive'
bug#80009

* doc/emacs/programs.texi (Hideshow): Update documentation.
* lisp/progmodes/hideshow.el (hs-hide-level-recursive): Rework.
(hs-get-first-block-on-line): Minor changes.
(hs--add-indicators, hs-hide-comments-when-hiding-all)
(hs-minor-mode-menu, hs-hide-level, hs-cycle): Update code.
* test/lisp/progmodes/hideshow-tests.el
(hideshow-hide-levels-with-comments-1): New test.
2025-12-20 20:09:41 +02:00
Stéphane Marks
c989d096f1 Add vtable buffer slot (bug#79982)
This solves for background vtable mutations, i.e., updates
initiated from buffers other than the vtable buffer, and for
buffer-adjusted string-pixel-width computations.

* lisp/emacs-lisp/vtable.el (vtable): New '-buffer' slot.
(vtable-buffer, vtable-set-buffer): New function.
(vtable-update-object, vtable-remove-object)
(vtable-insert-object): Wrap operation with the vtable buffer.
(vtable--insert): Split from old 'vtable-insert'.
(vtable-insert): Insert table and record the buffer.
(vtable--insert-line, vtable--insert-header-line): Use
'vtable-buffer' for pixel-width computation.
(vtable--limit-string, vtable--char-width): Pass buffer to
'string-pixel-width'.
(vtable-revert): New optional table argument.
(vtable--alter-column-width, vtable-revert-command)
(vtable-sort-by-current-column): Call 'vtable-revert' with the
table.

* test/lisp/emacs-lisp/vtable-tests.el
(vtable-tests--make-no-header-2-object-table): New helper
function.
(test-vstable-compute-columns): Correct typo in test name.  Use
new helper function.
(test-vtable-unique-buffer)
(test-vtable-non-current-buffer-insert-object)
(test-vtable-non-current-buffer-remove-object)
(test-vtable-non-current-buffer-update-object)
(test-vtable--limit-string-with-face-remapped-buffer): New test.
2025-12-20 18:23:25 +02:00
Martin Rudalics
cf2e676eca Don't change visibility of tty root frames (Bug#80032)
* src/frame.c (Fmake_frame_visible, Fmake_frame_invisible):
* doc/lispref/frames.texi (Visibility of Frames): Don't change
visibility of tty root frames.  (Bug#80032)
2025-12-20 15:12:39 +01:00
Eli Zaretskii
69ca26996c ; Update lisp/ldefs-boot.el 2025-12-20 08:43:09 -05:00
Jostein Kjønigsen
e3883144ae csharp-mode: Fix fontification of catch-expressions
* lisp/progmodes/csharp-mode.el
(csharp-ts-mode--font-lock-settings): Improve specificity
of selectors.  Don't let type-selector bleed into
name-selector.  (Bug#80038)
2025-12-20 15:12:50 +02:00
Rudolf Adamkovič
985e942d1c hi-lock: Use active region for default values in more places
* lisp/hi-lock.el (hi-lock-line-face-buffer, hi-lock-face-buffer)
(hi-lock-face-phrase-buffer): Use the new function
`hi-lock-read-regexp' to read font-lock patterns, mirroring
`hi-lock-read-face-name' used to read face names.  For end users,
all three functions now get the default value from the active
region, rather than just `hi-lock-face-buffer'.
(hi-lock-read-regexp): Extract font-lock pattern reading
functionality from `hi-lock-face-buffer' into this function, to
mirror how faces are read with `hi-lock-read-face-name' and to
promote reuse.  (Bug#79976)
2025-12-20 14:21:42 +02:00
Michael Albinus
9e16010686 Fix problem in Tramp completion
* lisp/net/tramp.el (tramp-completion-handle-expand-file-name):
Expand FILENAME also when it is absolute.  (Bug#80031)
2025-12-20 08:58:26 +01:00
Eli Zaretskii
54eae320f5 ; * lisp/vc/vc-git.el (vc-git-registered): Fix remote files (bug#80035). 2025-12-20 09:47:39 +02:00
Paul Eggert
4d11449c96 Revert to simpler (and we hope faster) TAGGEDP
Suggested by Mattias Engdegård (bug#80021#17).
* src/lisp.h (lisp_h_FIXNUMP, lisp_h_TAGGEDP):
Go back to the simpler (X&7) == TAG approach for checking object tags.
This reverses my commit ccdb08ef4e
“Improve performance of CONSP, FIXNUMP, etc.”
dated 2018-08-25 13:39:18 -0700,
though it keeps the TAGGEDP function the older commit introduced.
Although the older commit improved performance on its circa 2010
platform, when I ran today’s ‘make -C lisp compile-always’
benchmark on Ubuntu 25.10 which uses gcc (Ubuntu 15.2.0-4ubuntu4)
on an circa-2021 Intel Xeon W-1350, this patch makes the
‘make -C lisp compile-always’ benchmark 3.1% faster.  Although the
patch unfortunately also makes the Emacs text segment 0.6% larger,
in this case speed and simplicity beat text size in importance.
2025-12-19 09:10:31 -08:00
Gerd Möllmann
a6c2ae3a3f Don't make tty child frames visible when selected (bug#80020)
* src/frame.c (do_switch_frame): Don't change visibility of tty
child frames.
(Fraise_frame): Doc string fix.
2025-12-19 14:12:33 +01:00
João Távora
cfb4bace26 ; Eglot: mention relativePatternSupport in /etc/EGLOT-NEWS
* etc/EGLOT-NEWS (Changes to upcoming Eglot): Mention
relativePatternSupport.
2025-12-19 09:43:53 +00:00
Eli Zaretskii
4fe28df3cd ; * lisp/progmodes/project.el (vc-git-project-list-files): Fix a typo. 2025-12-19 09:56:58 +02:00
Paul Eggert
5e6df127a9 Fix ‘make compile-always’ with native compilation
Without the fix, ‘make compile-always’ failed nearly immediately
in a native compilation build, with ‘ELC+ELN
emacs-lisp/loaddefs-gen.elc’ outputting “Error: file-missing
("Cannot open load file" "No such file or directory" "comp")...”.
* lisp/Makefile.in (compile-always):
Build ../src first, since the ‘find ... -delete’ removes files
needed by ‘make compile’.
2025-12-18 22:17:45 -08:00
Paul Eggert
f6f85dd3be Remove stray references to $(LOADDEFS)
They became obsolete some time ago.
* lisp/Makefile.in (compile, compile-one-process):
Don’t depend on $(LOADDEFS).
2025-12-18 22:17:45 -08:00
Dmitry Gutov
976e3d3d51 Merge remote-tracking branch 'origin/master' 2025-12-19 02:52:29 +02:00
João Távora
4cc4c9cffc ; Eglot: fix oversight and add back essential delete-dups
Else will make a number of file-notify descriptors proportional to
the number of files in a directory (though this doesn't apply to
out-of-root watchers).

* lisp/progmodes/eglot.el (eglot--watch-globs): Tweak.
2025-12-19 00:48:38 +00:00
João Távora
ee481d30f9 Eglot: remove "face" suffix for semtok-specific faces
* lisp/progmodes/eglot.el (eglot--semtok-define-things)
(eglot--semtok-decode-token): Remove "face" suffix for semtok faces.
2025-12-19 00:48:38 +00:00
Dmitry Gutov
500f1478f7 Re-introduce fallback to 'find' for extra ignores with older Git
* lisp/progmodes/project.el (vc-git-project-list-files):
Fall back to 'find' when Git is older than 1.13 and EXTRA-IGNORES
is non-nil (bug#79809).
2025-12-19 02:47:36 +02:00
Dmitry Gutov
de5b8c70fb Revert "vc-git-project-list-files: Restore support for Git < 2.13"
This reverts commit 821c0d36df.

Despite re-enacting what the modern Git versions seem to do under the
covers, the effect is not the same: filtering works differently.
2025-12-19 02:26:59 +02:00
Sean Whitton
83e8acf19a ; * etc/NEWS: Fix last change. 2025-12-18 21:51:15 +00:00
Sean Whitton
f9172be29a Make VC-Dir's 'd' able to delete unregistered files
* lisp/vc/vc.el (vc-delete-file): Simplify.
* lisp/vc/vc-dir.el (vc-dir-delete-file): Handle deleting
unregistered files, too.
(vc-dir-menu-map, vc-dir-mode-map): Replace bindings for
vc-dir-clean-files with ones for vc-dir-delete-file.
* doc/emacs/maintaining.texi (VC Directory Commands):
* etc/NEWS: Document the bindings change.
2025-12-18 21:46:49 +00:00
Sean Whitton
1cd6428bce ; * lisp/vc/vc-dir.el (vc-dir-menu-map): Delete obsolete comment. 2025-12-18 21:43:57 +00:00
João Távora
998584eaad Eglot: fallback to project-files if no 'find' available (bug#79809)
When find-based directory listing fails, fallback to project-files
strategy for robustness.

* lisp/progmodes/eglot.el (eglot--watch-globs): Inline directory
listing and add error handling with fallback.  Rename BASE-PATH to DIR,
add IN-ROOT parameter.
(eglot--list-directories): Delete
(eglot-register-capability): Adjust caller, group by both DIR and
IN-ROOT.
2025-12-18 17:04:01 +00:00
Sean Whitton
bd6bb96220 vc-diff-internal: Call into backend with old current buffer
* lisp/vc/vc.el (vc-diff-internal): Call into the backend with
the original current buffer, not BUFFER (see bug#80005).
2025-12-18 17:01:57 +00:00
Sean Whitton
94aab3b602 ; * lisp/vc/vc-git.el (vc-git-region-history): Fix backend name. 2025-12-18 13:06:19 +00:00
Sean Whitton
495843d9eb ; cond* docs: Update match* operator name to cdr-ignore (bug#79998). 2025-12-18 10:48:12 +00:00
Dmitry Gutov
75a1403ff3 Fix "No such file or directory" "vc-nil" in project-files
* lisp/progmodes/project.el (project-files):
Fix vc-nil backend error (bug#80013).
2025-12-18 03:48:58 +02:00
F. Jason Park
22719d64e9 ; Tweak failing autojoin display-context test for ERC
* test/lisp/erc/erc-scenarios-join-display-context.el
(erc-scenarios-join-display-context--errors): Attempt to indirectly fix
a reoccurring failure on EMBA.  Instead of asserting the membership of
`erc-join--requested-channels', have the client attempt to manually join
an autojoined channel previously denied by an error response.  But this
time assert that the display context for the now successfully joined
channel doesn't indicate it originated from the autojoin module.
* test/lisp/erc/resources/base/gapless-connect/barnet.eld: Increase
timeout.
* test/lisp/erc/resources/join/buffer-display/mode-context.eld: Update
accordingly.
2025-12-17 17:36:42 -08:00
Dmitry Gutov
821c0d36df vc-git-project-list-files: Restore support for Git < 2.13
* lisp/progmodes/project.el (vc-git-project-list-files):
Restore support for Git < 2.13 (discussed in bug#79809).
2025-12-18 01:43:28 +02:00
Sean Whitton
7425e33287 New M-RET, M-p, M-n commands in Log View mode
* lisp/vc/log-view.el (log-view-msg-and-diff-next)
(log-view-msg-and-diff-prev, log-view-display-entry-and-diff):
New commands.
(log-view-mode-map): Bind them.
* doc/emacs/maintaining.texi (VC Change Log):
* etc/NEWS: Document them.
2025-12-17 13:22:39 +00:00
Sean Whitton
7844710e87 log-view-toggle-entry-display: Don't deactivate the mark
* lisp/vc/log-view.el (log-view-toggle-entry-display): Bind
inhibit-read-only instead of buffer-read-only.  Bind
deactivate-mark to nil.
2025-12-17 13:21:37 +00:00
Sean Whitton
6d7ff7478f ; Log View beg and end of defun functions: Style improvements. 2025-12-17 13:20:50 +00:00
Eli Zaretskii
b7601bfb70 Fix 'mode-line-format-right-align' in Olivetti mode
* lisp/bindings.el (mode--line-format-right-align): Account for
the left fringe.  (Bug#80019)
2025-12-17 15:14:25 +02:00
Sean Whitton
0c7420fe38 ; * lisp/bookmark.el (bookmark-after-load-file-hook): Fix quotation. 2025-12-17 12:43:00 +00:00
Liu Hui
f26068dac7 calendar-mode-line-format: Fix regexp
* lisp/calendar/calendar.el (calendar-mode-line-format): Replace
'*' with '\\*'.
(calendar-get-buffer, calendar-exit):
* lisp/calendar/diary-lib.el (diary-mark-entries): Improve
comment and doc string.
2025-12-17 12:43:00 +00:00
João Távora
f0912d5cb0 Eglot: speed up file watching outside project (bug#79809)
Use find-based directory listing when watching outside project root,
avoiding the expensive delete-dups/file-name-directory/project-files
combo.

* lisp/progmodes/eglot.el (eglot--list-directories): New helper.
(eglot--watch-globs): Use it for directories outside project root.
2025-12-17 12:06:07 +00:00
Sean Whitton
a8b9f2daf1 ; * etc/NEWS: Elisp -> Lisp. 2025-12-17 12:02:33 +00:00
Stéphane Marks
d76e61d218 New bookmark-after-load-file-hook (bug#80003)
* lisp/bookmark.el (bookmark-after-load-file-hook): New
defcustom (bug#80003).
(bookmark-load): Call the new hook.
* etc/NEWS: Announce the new hook.
2025-12-17 12:01:29 +00:00
Stéphane Marks
91d4120289 ; lisp/saveplace.el, etc/NEWS: Refinements to bug#75837. 2025-12-17 11:58:05 +00:00
Stéphane Marks
2b1440946e New optional recentf autosave timer (bug#80002)
* etc/NEWS: Announce the new user option.
* lisp/recentf.el (recentf-auto-cleanup): When canceling the
auto-cleanup timer, set recentf-auto-cleanup-timer to nil to
avoid false positive timerp.
(recentf-autosave-interval): New defcustom.
(recentf--autosave-timer, recentf--cancel-autosave-timer)
(recentf--manage-autosave-timer): New defun.
(recentf-mode): Call recentf--manage-autosave-timer.
2025-12-17 11:57:26 +00:00
Christoph Wedler
14f16535ed Fix init of auto/not-auto buffer-local vars in antlr-mode
* progmodes/antlr-mode.el (antlr-mode): Fix initialization of
variables, some are actually auto buffer-local and others not.
Patch by Arash Esbati <arash@gnu.org>.
2025-12-17 12:27:46 +01:00
João Távora
118b88dd22 Eglot: fix thinko, group file watchers by base URI (bug#79809)
It's fairly important to do this to reduce both the number of
file-notify watches and the number of expensive project-files among
"watcher" items pertaining to the same baseUri.

* lisp/progmodes/eglot.el (eglot--watch-globs): Rename from
eglot--watch-glob.  Accept list of compiled glob/kind pairs.
(eglot-register-capability): Group watchers by base-path before
setting up watches.
2025-12-17 10:01:00 +00:00