Commit graph

181128 commits

Author SHA1 Message Date
Martin Rudalics
0ff45e9ca6 Scale position values in xg_frame_set_size_and_position
* src/gtkutil.c (xg_frame_set_size_and_position): Scale
position values.
2026-02-12 09:43:04 +01:00
Dmitry Gutov
cf83dad395 Revise the paragraph about project-vc's caching
* doc/emacs/maintaining.texi (VC-Aware Project Backend):
Rephrase and mention a way to force invalitation (bug#78545).
2026-02-12 05:15:48 +02:00
Richard Lawrence
0f0a632028 * doc/emacs/calendar.texi (Diary iCalendar Import): Doc fix. 2026-02-11 16:04:32 -05:00
Stefan Monnier
451d5c6f05 (describe-mode): Fix bug#80170
* lisp/help-fns.el (describe-mode--minor-modes): Add argument `buffer`.
(describe-mode): Use it to fix call to `documentation` so the
docstrings are computed in the right buffer and thus show
correctly when bindings are shadowed by minor modes.
2026-02-11 15:53:09 -05:00
Morgan Willcock
a1e32130de Fix typo in smie-rules-function documentation
Fix a typo in the documentation for the expected arguments when
calling smie-rules-function to set the indentation offset of
function arguments.

* doc/lispref/modes.texi (SMIE Indentation):
* lisp/emacs-lisp/smie.el (smie-rules-function): Fix typo in
documentation for smie-rules-function arguments.
2026-02-11 15:35:29 -05:00
Stefan Monnier
bc9a53616a make-mode.el: Avoid obsolete font-lock-*-face` variables
* lisp/progmodes/make-mode.el (makefile-make-font-lock-keywords)
(makefile-makepp-font-lock-keywords): Use `font-lock-*-face`
faces rather than variables.
2026-02-11 15:35:03 -05:00
Mattias Engdegård
badef58d0a Better 'prog1' optimisation
* lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker):
Always evaporate 'prog1' when the tail is effect-free, even
when the value expression isn't.
2026-02-11 18:47:20 +01:00
Sean Whitton
2e7a066d56 icomplete-ret: Ignore icomplete-show-matches-on-no-input
* lisp/icomplete.el (icomplete-ret): No longer conditionalize on
icomplete-show-matches-on-no-input.
Suggested by Juri Linkov <juri@linkov.net> in bug#62108.
(icomplete-show-matches-on-no-input, icomplete-ret):
* etc/NEWS: Improve documentation.
2026-02-11 15:04:18 +00:00
Sean Whitton
90fbadb3b1 cond*: bind-and* is not always a non-exit clause!
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p)
(cond*-non-exit-clause-substance): Don't consider a bind-and*
clause without ':non-exit' to be a non-exit clause (bug#80376).
(cond*):
* doc/lispref/control.texi (cond* Macro): Fix docs accordingly.
2026-02-11 14:23:38 +00:00
Stéphane Marks
6967a8ac54 ; system-sleep texi markup fix (bug#80348)
* doc/lispref/os.texi (System Sleep): Minor markup fixes.
2026-02-11 14:32:02 +01:00
Michael Albinus
17fb8a45f7 ; * test/lisp/net/dbus-tests.el: Remove obsolete function declarations. 2026-02-11 14:17:30 +01:00
Eli Zaretskii
e464052a28 ; Fix recently installed changes
* src/w32fns.c (w32_register_for_sleep_notifications)
(sleep_notification_callback): Fix signatures.
* src/w32term.h (w32_register_for_sleep_notifications): Fix
prototype.  These changes avoid compilation warnings.

* lisp/system-sleep.el: Remove stray non-ASCII character.

* doc/lispref/os.texi (System Sleep): Remove non-ASCII character,
and fix wording and markup.

* etc/NEWS: Fix wording of recently-added entry.
2026-02-11 14:44:09 +02:00
Mattias Engdegård
37891d1a1e ; * test/lisp/net/dbus-tests.el: no warnings for non-dbus configs 2026-02-11 11:06:54 +01:00
Stéphane Marks
0bee754a72 system-sleep sleep blocker and sleep/wake event package (bug#80348)
This package provides platform-neutral interfaces to block your
system from entering idle sleep and a hook to process pre-sleep
and post-wake events.

Implementations are for D-Bus on GNU/Linux, macOS/GNUstep, and
MS-Windows.

* lisp/system-sleep.el: New package.
* src/fns.c: Qpre_sleep, Qpost_wake: New DEFSYM.
* src/nsfns.m (Fns_block_system_sleep, Fns_unblock_system_sleep)
(syms_of_nsfns): New functions.
* src/nsterm.m (applicationDidFinishLaunching): Subscribe to
pre-sleep and post-wake notifications.
(systemWillSleep, systemDidWake): New function.
* src/w32fns.c (Fw32_block_system_sleep)
(Fw32_unblock_system_sleep, Fw32_system_sleep_block_count)
(sleep_notification_callback)
(w32_register_for_sleep_notifications): New function.
(syms_of_w32fns): Sw32_unblock_system_sleep
Sw32_block_system_sleep Sw32_system_sleep_block_count: New
defsubr.
* src/w32term.h (Fw32_block_system_sleep): New extern.
* src/w32term.c (w32_initialize): Call
w32_register_for_sleep_notifications.
* doc/lispref/os.texi: Document the system-sleep package.
* doc/lispref/commands.texi: Update sleep-event special
documentation.
* etc/NEWS: Announce the new package.
2026-02-11 09:52:38 +01:00
Juri Linkov
f13ab20f04 Don't remap RET to 'icomplete-ret' in 'icomplete-mode' (bug#62108)
* lisp/icomplete.el (icomplete-show-matches-on-no-input): Fix docstring.
(icomplete-minibuffer-map): Don't remap 'minibuffer-complete-and-exit' (RET)
to 'icomplete-ret'.
(icomplete-ret): Improve docstring.
2026-02-11 09:50:34 +02:00
Juri Linkov
79fda66327 Revert "New key 'M-j' for 'icomplete-mode' (bug#62108)"
This reverts commit 3584a762b8.
Another fix follows shortly after this commit.
2026-02-11 09:19:52 +02:00
Dmitry Gutov
d62370a0ec Improve project-vc-*cache-timeout docstrings
* lisp/progmodes/project.el: (project-vc-cache-timeout)
(project-vc-non-essential-cache-timeout): Improve docstrings (bug#78545).
2026-02-10 18:56:49 +02:00
Eli Zaretskii
d91d8c98f8 * src/process.c (server_accept_connection): Fix assertion (bug#80237). 2026-02-10 17:09:56 +02:00
Sean Whitton
f2b81c38c2 vc-git--deduce-files-for-stash: Use file-relative-name (bug#80278)
* lisp/vc/vc-git.el (vc-git--deduce-files-for-stash): Use
file-relative-name (bug#80278).
2026-02-10 11:46:25 +00:00
Dmitry Gutov
583a112169 Do cache and timed invalidation in "VC-aware" project backend
* lisp/progmodes/project.el: Describe the new cache in Commentary,
the "VC-aware project" section.
(project-vc-cache-timeout)
(project-vc-non-essential-cache-timeout): New variables.
(project--get-cached, project--set-cached):
New functions.
(project-try-vc, project--value-in-dir): Use them.
(project--read-dir-locals): New function, extracted from the
above.  Return the full alist, to be saved to cache at once.
(project--clear-cache): New function.
(project-remember-projects-under)
(project-forget-zombie-projects, project-forget-projects-under):
Use it.
(project-uniquify-dirname-transform, project-mode-line-format):
Bind 'non-essential' to choose the longer caching strategy.
(project-name-cache-timeout, project-name-cached): Remove.
(project-mode-line-format): Switch to calling 'project-name'
directly, with the new caching in use.

Co-authored-by: Juri Linkov <juri@linkov.net>
2026-02-10 02:54:14 +02:00
Dmitry Gutov
8cb9aaec0f Amend previous to avoid remote call in project--remove-from-project-list
* lisp/progmodes/project.el (project--remove-from-project-list):
Don't call 'abbreviate-file-name', expect it to be abbreviated
already.  The file might be on an inaccessible filesystem.
(project-current): Call abbreviate-file-name here (bug#80340).
2026-02-10 02:54:14 +02:00
Michael Albinus
9fd2fd5225 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2026-02-09 18:32:06 +01:00
Michael Albinus
c65a4e6a43 ; * doc/lispref/os.texi (Timers): Fix typo. 2026-02-09 18:31:04 +01:00
Stefan Monnier
3c2351f2dc (loaddefs-generate--print-form): Fix bug#80222
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--print-form):
Remove the "\\\n" hack we used to use together with
`src/lread.c` code to avoid allocating heap space for docstrings
that were going to be replaced by `Snarf-documentation`.
We don't keep ELisp docstrings in DOC any more anyway.
2026-02-09 12:30:35 -05:00
Manuel Giraud
8325809896 Fix selected group sort with topics (bug#80341)
* lisp/gnus/gnus-topic.el (gnus-group-sort-selected-topic): New
function to sort selected groups into topic.
(gnus-topic-mode): Use it as sort selected function in topic
mode.
* etc/NEWS: Announce the change.
2026-02-09 18:28:08 +01:00
Manuel Giraud
ed158fb8fc Add missing symbolic prefix keybinding
* lisp/gnus/gnus-group.el (:keymap): Add symbolic prefix to
group keymap.
* etc/NEWS: Announce the change.
2026-02-09 18:27:36 +01:00
Stefan Monnier
1e7dae37b8 lisp/calendar: Style changes
Fix some misuses of `defconst` and `%s`, avoid uses of the old
dynbound dialect of `eval`, delete redundant `:group` arguments,
and prefer #' to quote function names.
And stop creating alists for completion tables since lists of
strings work just as well.

* lisp/calendar/appt.el: Delete redundant `:group` arguments.
Prefer #' to quote function names.

* lisp/calendar/cal-hebrew.el (solar-time-string): Declare function.
(calendar-hebrew-read-date, calendar-hebrew-list-yahrzeits):
* lisp/calendar/cal-persia.el (calendar-persian-read-date):
* lisp/calendar/cal-mayan.el (calendar-mayan-read-haab-date)
(calendar-mayan-read-tzolkin-date):
* lisp/calendar/cal-julian.el (calendar-julian-goto-date):
* lisp/calendar/cal-islam.el (calendar-islamic-read-date):
* lisp/calendar/cal-coptic.el (calendar-coptic-read-date):
* lisp/calendar/cal-bahai.el (calendar-bahai-read-date):
Completion tables can be lists of strings for decades.

* lisp/calendar/cal-china.el: Delete redundant `:group` arguments.
(calendar-chinese-zodiac-sign-on-or-after)
(calendar-chinese-new-moon-on-or-after): Use lexical dialect also
for `eval`.

* lisp/calendar/cal-dst.el: Delete redundant `:group` arguments.
Use lexical dialect also for `eval`.

* lisp/calendar/cal-html.el: Delete redundant `:group` arguments.

* lisp/calendar/cal-menu.el: Prefer #' to quote function names.

* lisp/calendar/cal-tex.el: Delete redundant `:group` arguments.
(cal-tex-weekly-common): Use lexical dialect also for `eval`.

* lisp/calendar/calendar.el (calendar-mode-map):
Prefer #' to quote function names.

* lisp/calendar/diary-icalendar.el (di:rrule-sexp-to-recurrence)
(di:other-sexp-to-recurrence): Use lexical dialect also for `eval`.

* lisp/calendar/diary-lib.el: Delete redundant `:group` arguments.
Prefer #' to quote function names.
(diary-sexp-entry, diary-offset, diary-remind): Use lexical dialect
also for `eval`.

* lisp/calendar/icalendar-macs.el (ical:define-param): Fix misuse of
`%s` in `format`.

* lisp/calendar/icalendar-parser.el (ical:value-types)
(ical:param-types, ical:property-types, ical:component-types):
Don't use `defconst` on variables we mutate.

* lisp/calendar/icalendar-recur.el (icr:current-tz-to-vtimezone)
(icr:current-tz-to-vtimezone): Use lexical dialect also for `eval`.

* lisp/calendar/icalendar.el: Delete redundant `:group` arguments.

* lisp/calendar/lunar.el: Prefer #' to quote function names.

* lisp/calendar/solar.el (solar-sunrise-sunset-string)
(calendar-sunrise-sunset-month): Use lexical dialect also for `eval`.

* lisp/calendar/timeclock.el: Prefer #' to quote function names.
2026-02-08 23:39:13 -05:00
Paul Eggert
59eb80a03a butttonTrans need not be extern
* lwlib/lwlib-Xaw.c (buttonTrans) [USE_CAIRO || HAVE_XFT]:
Now static.  This pacifies gcc -Wmissing-variable-declarations.
2026-02-08 17:02:55 -08:00
Dmitry Gutov
8ddf2d2925 project--delete-zombie-projects: Handle "Tramp failed to connect"
* lisp/progmodes/project.el (project--delete-zombie-projects):
Handle file-error when DIR is remote and unreachable (bug#80340).
2026-02-09 00:56:08 +02:00
Stefan Monnier
f39eaad491 Merge branch 'main' into icalendar 2026-02-08 16:05:31 -05:00
Daniel Mendler
c86094057b completing-read-multiple: Implement on top of completing-read
Avoid code duplication during minibuffer setup.

* lisp/emacs-lisp/crm.el (completing-read-multiple): Call
`completing-read' instead of duplicating the setup code of
`completing-read-default'.
2026-02-08 16:02:41 -05:00
Sean Whitton
7fd6fa4a8b Revert "Extend emacs server protocol for empty arguments"
This reverts this change:

  Author:     Andreas Schwab <schwab@linux-m68k.org>
  AuthorDate: Sun Feb 8 12:34:02 2026 +0100

    Extend emacs server protocol for empty arguments

    An empty argument is represented by &0.  On the receiving side, &0 is
    replaced by nothing.

    * lisp/server.el (server-unquote-arg): Replace "&0" by nothing.
    (server-quote-arg): Produce "&0" for an empty string.
    * lib-src/emacsclient.c (quote_argument): Produce "&0" for an
    empty string.
    (unquote_argument): Replace "&0" by nothing.   (Bug#80356)

The bug in question was already fixed by this change:

  Author:     Sean Whitton <spwhitton@spwhitton.name>
  AuthorDate: Fri Nov 7 12:33:21 2025 +0000

    Don't discard empty string arguments from emacsclient

    * lisp/server.el (server--process-filter-1): Don't discard empty
    string arguments from emacsclient.
    (server-eval-args-left):
    * doc/emacs/misc.texi (emacsclient Options):
    * etc/NEWS: Document the change.
2026-02-08 16:52:12 +00:00
Sean Whitton
01d8abea04 cond*: Fix handling of :non-exit keywords
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p): Don't
return nil for clauses ending with ':non-exit'.
(cond*-non-exit-clause-substance): Don't accept just any
keyword, require ':non-exit'.
2026-02-08 15:28:37 +00:00
Sean Whitton
ec8d82f53b cond*: Fix handling bind-and* in two places
* lisp/emacs-lisp/cond-star.el (cond*-non-exit-clause-p)
(cond*-non-exit-clause-substance): Handle bind-and* the same as
bind*.
2026-02-08 15:20:49 +00:00
Sean Whitton
2437a45144 ; Further fixes to core documentation for cond*. 2026-02-08 15:11:08 +00:00
Sean Whitton
51b883719b ; Fix some issues in core documentation for cond*. 2026-02-08 15:06:00 +00:00
Andreas Schwab
7586a5474c Extend emacs server protocol for empty arguments
An empty argument is represented by &0.  On the receiving side, &0 is
replaced by nothing.

* lisp/server.el (server-unquote-arg): Replace "&0" by nothing.
(server-quote-arg): Produce "&0" for an empty string.
* lib-src/emacsclient.c (quote_argument): Produce "&0" for an
empty string.
(unquote_argument): Replace "&0" by nothing.   (Bug#80356)
2026-02-08 13:21:28 +01:00
Matthew Bauer
78fc5e2833 Eglot: Add "static-ls" to Haskell LSP list
This is an alternative language server for Haskell.  Intended to be
faster and not use as much memory as haskell-language-server.
Making it a backup with lower precedence if both exist.
* lisp/progmodes/eglot.el (eglot-server-programs): Add "static-ls".
(Bug#80351)
2026-02-08 08:38:08 +02:00
Eli Zaretskii
f430166f7d ; * doc/lispref/commands.texi (Special Events): Add cross-reference. 2026-02-08 08:34:36 +02:00
Stéphane Marks
e0ce881be9 ; Minor changes to 'truncate-string-pixelwise' (bug#80244)
Fix two bugs and add tests for them.
2026-02-07 14:49:15 +02:00
kobarity
3107c66c84 Change the type of 'python-eldoc-function-timeout' to number
* etc/NEWS: Announce the change.
* lisp/progmodes/python.el (python-eldoc-function-timeout):
Change the type.  (Bug#80045)
2026-02-07 14:44:27 +02:00
kobarity
482748592f Use 'project-name-cached' in 'python-shell-get-process-name'
* lisp/progmodes/python.el
(python-shell-get-project-name): New function.
(python-shell-get-process-name): Use it.  (Bug#80045)

Co-authored-by: Liu Hui <liuhui1610@gmail.com>
2026-02-07 14:41:48 +02:00
kobarity
3d7e78b810 Revert "Performance improvement of 'python-shell-get-process'"
This reverts commit 83b4f1ba26.
We concluded that it is better to use 'project-name-cached'.
(Bug#80045)
2026-02-07 14:41:10 +02:00
Eli Zaretskii
419ac8148f ; Document creation of strings from copies of other strings
* doc/lispref/strings.texi (Creating Strings): Document how to
create a string from N copies of another string.  (Bug#80256)
2026-02-07 14:22:12 +02:00
Michael Albinus
04bb557d7e ; * lisp/doc-view.el (doc-view-mode-p): Fix docstring. 2026-02-07 11:33:14 +01:00
Michael Albinus
89209a83b6 Support D-Bus file descriptor manipulation
* doc/misc/dbus.texi (Synchronous Methods): Adapt `dbus-call-method'.
(Asynchronous Methods): Adapt `dbus-call-method-asynchronously'.
(File Descriptors): New chapter, replaces Inhibitor Locks.

* etc/NEWS: Replace "New D-Bus functions to support systemd
inhibitor locks" by "Support D-Bus file descriptor manipulation".
Presentational fixes and improvements.

* lisp/net/dbus.el (dbus-call-method)
(dbus-call-method-asynchronously): Adapt docstring.
(dbus-list-hash-table): Return (nreverse result).
(dbus-monitor-goto-serial): Declare `completion'.

* src/dbusbind.c (Fdbus_message_internal, xd_read_message_1):
Handle `:keep-fd'.
(xd_registered_inhibitor_locks, Fdbus_make_inhibitor_lock)
(Fdbus_close_inhibitor_lock, Fdbus_registered_inhibitor_locks): Delete.
(xd_registered_fds): New variable.
(Fdbus__fd_open, Fdbus__fd_close, Fdbus__registered_fds):
New DEFUNs.  (Bug#79963)
(syms_of_dbusbind_for_pdumper): Initialize `xd_registered_fds'.
(syms_of_dbusbind): Remove subroutines
`Sdbus_make_inhibitor_lock', `Sdbus_close_inhibitor_lock' and
`Sdbus_registered_inhibitor_locks'.  Remove symbol `Qdbus_call_method'.
Declare subroutines `Sdbus__fd_open', `Sdbus__fd_close' and
`Sdbus__registered_fds'.  Declare symbol `QCkeep_fd'.  staticpro
`xd_registered_fds'.

* test/lisp/net/dbus-tests.el (dbus-test10-inhibitor-locks): Delete.
(dbus-test10-keep-fd, dbus-test10-open-close-fd): New tests.
2026-02-07 11:32:54 +01:00
Eli Zaretskii
e1524740be ; Fix documentation of widget commands
* doc/misc/widget.texi (Widgets and the Buffer): Fix the
signatures of 'widget-forward' and 'widget-backward'.  Reported by
Tim Landscheidt <tim@tim-landscheidt.de>.

* lisp/wid-edit.el (widget-forward, widget-backward)
(widget-move): Doc fixes.
2026-02-07 11:45:00 +02:00
Eli Zaretskii
cdc390d992 ; Improve documentation of 'etags-regen-mode'
* doc/emacs/maintaining.texi (Xref, Tags Tables)
(Create Tags Table, Select Tags Table): Improve documentation and
cross-references for 'etags-regen-mode'.
2026-02-07 09:12:42 +02:00
Dmitry Gutov
df517aa958 etags-regen--build-program-options: Expand the error message text
* lisp/progmodes/etags-regen.el (etags-regen--build-program-options):
Expand the error message text.
2026-02-07 02:07:30 +02:00
Dmitry Gutov
cc9fea52a3 etags--xref-backend: Move the definition to autoloads
* lisp/progmodes/etags.el (etags--xref-backend):
Move the definition to autoloads, so that etags.el doesn't have to
be loaded before it really is used.
2026-02-07 02:06:52 +02:00