The old code set `expand-list` to a vector of "marks" but also
supported it being set by third party code to a list.
The code to build and use the vector was a internally using
a list, so we cut the middle man and just always use a list so
it doesn't matter whether we set it or a third party code did.
* lisp/expand.el (expand-add-abbrevs): Use `mapc` instead of recursion.
(expand-add-abbrev): Add dummy `rest` arg so we can `apply` it blindly
in `expand-add-abbrevs`.
(expand-abbrev-hook): `expand-list` is never set to a vector any more.
(expand-do-expansion): Set `expand-list` to a list rather than a vector.
(expand-abbrev-from-expand): Use `abbrev-symbol`.
(expand-build-list, expand-build-marks): Delete functions, not used
any more.
Update the `fill-region-as-paragraph-semlf' function to follow the
`fill-region-as-paragraph-function' protocol. This allows us to
reimplement the `fill-paragraph-semlf' function using `fill-paragraph'
and `fill-region-as-paragraph-function'.
* lisp/textmodes/fill.el (fill-region-as-paragraph-semlf): Make this
function compatible with `fill-region-as-paragraph-function'. Avoid
narrowing.
(fill-paragraph-semlf): Reimplement using `fill-paragraph' and
`fill-region-as-paragraph-function'.
* test/lisp/textmodes/fill-tests.el (fill-test-semlf-fill-region): Add
test.
(fill-test-fill-paragraph-semlf-fill-paragraph-function): Remove test.
(fill-test-fill-paragraph-semlf, fill-test-semlf)
(fill-test-fill-paragraph-semlf-justify, fill-test-semlf-justify)
(fill-test-fill-paragraph-semlf-sentence-end-double-space)
(fill-test-semlf-sentence-end-double-space)
(fill-test-fill-paragraph-semlf-fill-column, fill-test-semlf-fill-column)
(fill-test-fill-paragraph-semlf-punctuation-marks)
(fill-test-semlf-punctuation-marks, fill-test-fill-paragraph-semlf-twice)
(fill-test-semlf-twice, fill-test-fill-paragraph-semlf-fill-prefix)
(fill-test-semlf-fill-prefix)
(fill-test-fill-paragraph-semlf-indented-block)
(fill-test-semlf-indented-block, fill-test-fill-paragraph-semlf-revert)
(fill-test-semlf-revert, fill-test-fill-paragraph-semlf-emacs-lisp-mode)
(fill-test-semlf-emacs-lisp-mode, fill-test-fill-paragraph-semlf-c-mode)
(fill-test-semlf-c-mode, fill-test-fill-paragraph-semlf-org-mode)
(fill-test-semlf-org-mode, fill-test-fill-paragraph-semlf-markdown-mode)
(fill-test-semlf-markdown-mode): User shorter function names consistent
with erts file names.
* test/lisp/textmodes/fill-resources/semlf-fill-region.erts: Add test
data.
* test/lisp/textmodes/fill-resources/semlf-fill-paragraph-function.erts:
Delete file.
* test/lisp/textmodes/fill-resources/semlf-emacs-lisp-mode.erts: Remove
newlines around indented block.
* doc/lispref/text.texi (Filling): Highlight that
`fill-region-as-paragraph-function' changes the behavior of
`fill-paragraph'.
* lisp/vc/vc-git.el (vc-git-print-log): When LIMIT and
START-REVISION are both supplied, use START-REVISION as the
newest commit, and LIMIT as a base (problem was introduced in
the commit adding 'vc-diff-mergebase' and 'vc-log-mergebase').
* lisp/vc/vc.el (vc-default-log-incoming)
(vc-default-log-outgoing): Fix order of START-REVISION and LIMIT
arguments passed to 'print-log' backend function.
(vc-log-mergebase): Fix order of START-REVISION and LIMIT
arguments passed to 'vc-print-log-internal'.
Add the variable `fill-region-as-paragraph-function' to provide
a way to override how functions like `fill-region' fill text.
* doc/lispref/text.texi (Filling): Document
`fill-region-as-paragraph-function' variable.
* doc/emacs/text.texi (Fill Commands): Reference
`fill-region-as-paragraph-function' variable.
* lisp/textmodes/fill.el (fill-region-as-paragraph-function):
Add variable.
(fill-region-as-paragraph): Convert into
`fill-region-as-paragraph-function' wrapper.
(fill-region-as-paragraph-default): Rename old
`fill-region-as-paragraph' function.
(fill-region-as-paragraph-semlf): Update calls to
`fill-region-as-paragraph-default'.
(fill-region): Add reference to `fill-region-as-paragraph-function'
in doc string.
* test/lisp/textmodes/fill-tests.el (fill-test-fill-region): Add
test case for the `fill-region' function.
* test/lisp/textmodes/fill-resources/fill-region.erts: Add test
data. (Bug#78816)
Align the js-ts-mode entry with the javascript-mode entries in the
default auto-mode-alist value in lisp/files.el. Otherwise, js-ts-mode is
not associated with .js files.
* lisp/progmodes/js.el (js-ts-mode): Fix auto-mode-alist regexp.
Fixes: 2023-01-20 6b2f85caa6 "Make tree-sitter based modes optional"
(pcmpl-rpm-dnf-cache-file): Remove now unused variable.
(pcmpl-rpm--dnf-packages): Use dnf repoquery.
(pcomplete/dnf): Adjust regexps to allow for help format of
dnf5. New regexps works for both dnf4 and dnf5. Add
aliases for better subcommand completion. Better support
for dnf repoquery command. (Bug#78661)
* lisp/emulation/viper-cmd.el (viper-put-back, viper-Put-back):
Move setting the marker to after the call to
'viper-set-destructive-command'. Suggested by Michael Scott
<scott@cs.rochester.edu>. (Bug#78220)
* lisp/progmodes/peg.el (peg-parse): Be more careful when
testing if a symbol is the name of an existing rule. Improve docstring.
test/lisp/progmodes/peg-tests.el (peg-tests--peg-parse): New test.
`dump-mode` can be nil even if we're about to dump (this is
done in the Android build), so don't rely on it to distinguish
if `cus-start` is loaded from `loadup.el` vs loaded during
a "normal run".
* lisp/loadup.el (cus-start): Bind `cus-start--preload`.
* lisp/cus-start.el: <top-level>: Test it rather than `dump-mode`.
* lisp/vc/vc-annotate.el (vc-annotate): Rewrite code to generate
the buffer name so that when switching from annotating one
revision to annotating another, we don't embed the old name of
the vc-annotate buffer directly into its new one (bug#78890).
(tab-bar--update-tab-bar-lines): Don't set the frame parameter
'tab-bar-lines' in daemon's initial frame because it messes up the
frames when 'format-mode-line' called from 'tab-bar-format-global'
on daemon's initial frame forces focus switch to daemon's initial
frame. Also don't set 'default-frame-alist' in daemon mode because
'frame-notice-user-settings' copies the frame parameter 'tab-bar-lines'
from 'default-frame-alist' to daemon's initial frame. Here updating
'default-frame-alist' is not much needed anyway since the frame
parameter 'tab-bar-lines' for new frames is set in 'make_terminal_frame'
and 'x-create-frame'. 'default-frame-alist' might be need only
to handle non-default 'tab-bar-show', but this can be handled by
'toggle-frame-tab-bar' called from 'server-after-make-frame-hook'.
(toggle-frame-tab-bar): Document a useful case of calling it
from 'server-after-make-frame-hook'.
* lisp/textmodes/fill.el (set-fill-prefix): When called
interactively with a prefix argument, clear the fill prefix,
just like how 'C-u C-x C-n' clears the goal column.
* doc/emacs/text.texi (Fill Prefix):
* etc/NEWS: Document the change.
* lisp/net/eww.el (eww--walk-readability, eww-readable-dom): New
functions.
(eww-display-html): Call 'eww-readable-dom'.
(eww-readable): Call 'eww-readable-dom'. Don't copy over 'eww-data'
properties that our new readable page can handle on its own.
(eww-score-readability): Rewrite in terms of 'eww--walk-readability'.
Make obsolete.
(eww-highest-readability): Make obsolete.
* test/lisp/net/eww-tests.el (eww-test--lots-of-words)
(eww-test--wordy-page): New variables...
(eww-test/readable/toggle-display): ... use them.
(eww-test/readable/default-readable): Make sure that the readable page
includes the <title> and <link> tags (bug#77299).
* lisp/textmodes/yaml-ts-mode.el (yaml-ts-mode): Fix 'comment-start-skip'
value to resolve an issue when commenting/uncommenting using the
'comment-or-uncomment-region' function. The previous 'comment-start-skip'
value left some "-" uncommented after commenting and uncommenting
multiple YAML indented blocks (bug#78892).
Copyright-paperwork-exempt: yes
* lisp/progmodes/python.el (python--thing-settings):
For the 'sexp' thing use all nodes except top-level
grouping nodes, comments and parens. Add the 'list' thing.
(python-ts-mode): Use setq-local for treesit-thing-settings.
Modify 'forward-sexp-function' and 'treesit-sexp-thing'
after calling 'treesit-major-mode-setup'.
* lisp/cus-start.el (standard): Revert last change if (featurep
'android), as Android systems perform dumping during the
initialization of the first user session.
* doc/emacs/misc.texi (Interactive Shell, Shell Options):
* lisp/comint.el (comint-terminfo-terminal): Mention setting
comint-terminfo-terminal to "dumb-emacs-ansi" when the system's
terminfo database contains a definition for that terminal type.
* etc/NEWS: Announce changes.
* lisp/progmodes/project.el (project-prune-zombie-projects): New
user option.
(project-prune-zombies-default): New function.
(project-forget-zombie-projects): Rework.
(project--ensure-read-project-list, project-prompt-project-dir)
(project-prompt-project-name): Call
'project-forget-zombie-projects' but inhibit its message.
Also start using `symbols' as the PAREN argument to regexp-opt.
lisp/progmodes/cc-defs.el (c-make-keywords-re): Simplify,
remove the redundant `appendable' value of the ADORN parameter,
use the `symbols' value of the PAREN argument to regexp.
(c-emacs-features): Test that "\_<" and "\_>" work in regexps
before allowing CC Mode to start.
lisp/progmodes/cc-engine.el (c-looking-at-decl-block): When
GOTO-START is set, leave point at the _last_ Java annotation,
if any. Clarify this in the doc string.
(c-guess-basic-syntax CASE 5G): Replace a not needed t
GOTO-START argument to c-looking-at-decl-block with nil.
lisp/progmodes/cc-langs.el (c-make-mode-syntax-table): Make the
syntax of ?@ in Java Mode symbol for processing annotations.
(c-opt-identifier-concat-key, c-opt-identifier-prefix-key)
(c-opt-after-id-concat-key, c-identifier-key)
(c-cpp-message-directives-re, c-cpp-include-key, c-pack-key)
(c-brace-stack-thing-key, c-brace-stack-no-semi-key): Replace
the `appendable' value of the ADORN argument to
c-make-keywords-re with t.
(c-annotation-re): New lang const and lang var.
(c-keywords-obarray): Replace an explicit (apply 'nconc (mapcar
... )) with c--mapcan, now that the obscure bug with mapcan in
Emacs has been resolved.
lisp/progmodes/cc-align.el (c-lineup-gnu-DEFUN-intro-cont)
(c-lineup-java-throws, c-snug-do-while)
lisp/progmodes/cc-awk.el (c-awk-pre-exp-alphanum-kwd-re)
(c-awk-after-if-for-while-condition-p)
(c-awk-after-function-decl-param-list)
(c-awk-after-continue-token)
(c-awk-after-rbrace-or-statement-semicolon)
(awk-font-lock-keywords)
lisp/progmodes/cc-cmds.el (c-defun-name-1)
lisp/progmodes/cc-engine.el (c-beginning-of-statement-1)
(c-forward-<>-arglist, c-forward-label, c-skip-conditional)
(c-looking-at-c++-lambda-expression, c-add-stmt-syntax)
(c-guess-basic-syntax CASE 11, CASE 12, CASE 13, CASE 15)
(CASE 5C.3, CASE 5D.4, CASE 7D)
lisp/progmodes/cc-fonts.el (c-cpp-matchers)
(c-basic-matchers-before, c-font-lock-declarations)
(c-font-lock-c++-modules, c-simple-decl-matchers)
(c-complex-decl-matchers, c-basic-matchers-after)
lisp/progmodes/cc-langs.el (c-paragraph-start)
(c-stmt-block-only-keywords-regexp)
(c-type-decl-prefix-keywords-key, c-type-decl-prefix-key)
(c-type-decl-suffix-key, c-known-type-key)
(c-enum-clause-introduction-re)
lisp/progmodes/cc-menus.el (cc-imenu-c++-generic-expression)
lisp/progmodes/cc-vars.el (c-make-noise-macro-regexps)
(c-make-macro-with-semi-re): Replace explicit "\<" and "\>"
with "\_<" and "\_>". Replace explicit specification of
non-'_' character after word end with "\_>". Replace
concatenation of "\<" and "\>" with regexps with (regexp-opt
... 'symbols). Use (regexp-opt ... 'symbols) in general.
* etc/NEWS: Announce new user option.
* lisp/recentf.el (recentf-suppress-open-file-help): New defcustom.
(recentf-dialog-goto-first): Use it; otherwise, make calling
'widget-move' suppress message only for interactive recentf use.
(recentf-forward, recentf-backward): New commands, wrappers around
'widget-{forward, backward}' using 'recentf-suppress-open-file-help'.
(recentf-dialog): Use them in locally remapped key bindings.
* lisp/wid-edit.el (widget-forward, widget-backward): Add optional
argument to suppress :help-echo message and pass it to 'widget-move'.