* configure.ac (systemduserunitdir): New variable and option.
* Makefile.in (systemduserunitdir): New, set by configure.
(install-etc, uninstall): Don't install emacs.service when
systemduserunitdir is unspecified.
* etc/NEWS: Announce the new configure option. (Bug#76924)
The previous fix fixed the problem that treesit-parser-create
always use the current buffer, but that introduce another subtle
problem: if an indirect buffer creates a parser, the parser
saves the base buffer rather than the indirect buffer. In Emacs
29, if you create a parser in an indirect buffer, the parser
saves the indirect buffer. This change of behavior breaks some
existing use-cases for people using indirect buffer with
tree-sitter.
In Emacs 31, indirect buffers and base buffer get their own
parser list, so this problem doesn't exist anymore. The fix is
only for Emacs 30.
* src/treesit.c (Ftreesit_parser_create): Use the buffer that's
given to treesit-parser-create, even if it's an indirect buffer.
* lisp/treesit.el (treesit-forward-sentence): When no more
sentences are found, move to the end of the buffer or to
the range boundary at the 'treesit-parser' overlay's end.
* lisp/rect.el (rectangle-indicate-zero-width-rectangle): New user
option.
(rectangle--highlight-for-redisplay): Use it to decide whether to
indicate empty rectangles on display. (Bug#16403)
* etc/NEWS: Announce the feature.
* lisp/textmodes/remember.el (remember-initial-major-mode):
Major mode for remember buffer.
(remember-data-files-regex): Regular expression to filter files.
(remember-append-in-data-directory): Handler to append data to
files.
(remember-mode): Change to a minor mode.
(remember-prefix-map): New. (Bug#75543)
* lisp/time-stamp.el (time-stamp-string-preprocess): Move all of the
big 'while' loop to the end of the function, to better expose its
structure of iterating over the format string.
* lisp/emacs-lisp/find-func.el (find-function-mode): When
find-function-mode-lower-precedence is non-nil, apply the
bindings in such a way that we can also remove them when the
mode is deactivated. Approach due to Stefan Monnier.
* doc/lispref/variables.texi (File Local Variables):
<hack-local-variables>: Say that it applies directory-local
variables too. Add a cross-reference.
(Directory Local Variables): Document dir-local-variables-alist.
* lisp/files.el (hack-local-variables): Say that it always puts
into effect directory-local variables.
* lisp/erc/erc-compat.el (erc-compat--xml-escape-string): New macro to
call `xml-escape-string' sans the NO-ERROR argument on Emacs 27.
* lisp/erc/erc-desktop-notifications.el (erc-notifications-notify): Use
compat macro.
* lisp/erc/erc-log.el (erc-truncate-buffer-on-save): Use
`make-obsolete-variable' because `erc-truncate-buffer-on-save' is an
option, not a function. Already mentioned in etc/ERC-NEWS.
(erc-logging-enabled): Return nil if `log' appears in the `erc--skip'
msg prop.
* lisp/erc/erc-stamp.el (erc-stamp--defer-date-insertion-on-post-modify):
Add `log' to `erc--skip' msg prop. This tells the log module to defer
advancing the `erc-last-saved-position' marker until after stamps have
been inserted, thus ensuring they're included in logs when
`erc-log-write-after-insert' is non-nil.
* test/lisp/erc/erc-scenarios-log.el
(erc-scenarios-log--save-buffer-in-logs/truncate-on-save): Suppress
warning for `erc-truncate-buffer-on-save'.
(erc-scenarios-log--write-after-insert): New test. (Bug#76875)
* lisp/help-fns.el (help--recommend-setopt): New function to
automatically document the need to use `setopt` to set the values of
any defcustoms with a `:set` property.
(help-fns-describe-variable-functions): Add above new function to
hook.
* lisp/follow.el (follow-mode-prefix-key):
* lisp/minibuffer.el (minibuffer-regexp-prompts):
* lisp/register.el (register-use-preview):
* lisp/savehist.el (savehist-autosave-interval):
* lisp/saveplace.el (save-place-autosave-interval):
* lisp/tab-bar.el (tab-bar-define-keys):
* lisp/textmodes/text-mode.el (text-mode-ispell-word-completion):
Delete now redundant text from docstrings.
* lisp/follow.el (Commentary): Document modern keymap functions.
(follow-mode-prefix): Make obsolete in favor of...
(follow-mode-prefix-key): ...this new user option. Allow changing the
prefix using `setopt`.
(follow-mode-submap): New variable.
(follow-mode-map): Define using defvar-keymap.
Use `replace_range` rather than `delete+insert`.
* src/insdel.c (replace_range): Allow NEW to specify a chunk
of buffer text.
* src/editfns.c (Freplace_buffer_contents): Use it.
* test/src/editfns-tests.el (replace-buffer-contents-1): Remove
incorrect check which happened to succeed because point was not
preserved carefully enough. Make the replacement text share a bit
more content to make the test a bit more strict.
(editfns-tests--replace-region): Doesn't fail any more.