* lisp/erc/erc-compat.el (erc-compat--window-no-other-p): New function.
* lisp/erc/erc-speedbar.el (erc-speedbar-toggle-nicknames-window-lock):
Use compat adapter for `window-no-other-p'.
* lisp/erc/erc-match.el (erc-pal-highlight-type)
(erc-fool-highlight-type, erc-dangerous-host-highlight-type): Clarify
some areas in doc strings.
* test/lisp/erc/erc-match-tests.el: Require `erc-test-common' library.
(erc-match-tests--assert-face-absent)
(erc-match-tests--assert-face-present)
(erc-match-tests--assert-speaker-highlighted)
(erc-match-tests--assert-speaker-only-highlighted)
(erc-match-tests--perform)
(erc-match-tests--hl-type-nick): New functions.
(erc-match-message/pal/nick, erc-match-message/fool/nick)
(erc-match-message/dangerous-host/nick): New tests.
(erc-match-tests--hl-type-message): New function.
(erc-match-message/pal/message)
(erc-match-message/fool/message)
(erc-match-message/dangerous-host/message): New tests.
(erc-match-tests--hl-type-all): New function.
(erc-match-message/pal/all, erc-match-message/fool/all)
(erc-match-message/dangerous-host/all): New tests.
(erc-match-tests--hl-type-nick-or-keyword): New function.
(erc-match-message/current-nick/nick-or-keyword): New test.
(erc-match-tests--hl-type-keyword): New function.
(erc-match-message/keyword/keyword): New test.
(erc-match-tests--log-matches): New function.
(erc-log-matches): New test.
* test/lisp/erc/resources/erc-tests-common.el: Require `erc-d-i'.
(erc-tests-common-add-cmem, erc-tests-common-parse-line)
(erc-tests-common-simulate-line)
(erc-tests-common-simulate-privmsg): New functions.
* etc/ERC-NEWS: Mention changes to `erc-track-faces-normal-list' and
`erc-track-faces-priority-list'. Also mention new choice variant for
option `erc-nicks-track-faces', although that's arguably just a bug fix
because it makes good on previously unrealized behavior implied by the
doc strings.
* lisp/erc/erc-nicks.el (erc-nicks-skip-faces): Remove faces applied by
the `match' module, namely, `erc-current-nick-face', `erc-pal-face', and
`erc-fool-face'. That module runs its hooks after `button' on
`erc-insert-modify-hook', and because `nicks' piggybacks on `button', it
can never encounter those faces while assaying.
(erc-nicks-track-faces): Update doc, and introduce new `t' value choice.
(erc-nicks-mode, erc-nicks-disable): Update removals from
`erc-track--alt-normals-function' to reflect recent renamings.
(erc-nicks--reject-uninterned-faces): Use helper.
(erc-nicks--oursp, erc-nicks--ours-p): Rename former to latter to
respect project style guidelines regarding predicates.
(erc-nicks-track-normal-max-rank): New variable.
(erc-nicks--check-normals, erc-nicks--assess-track-faces): Rename former
to latter, and change purpose to checking for "normals" membership,
ranks position, and incumbent face ownership. Remove unused CONTENDERS
parameter. Additionally, change behavior to consider replacing the
current mode-line face when it's not `nicks' owned if it's explicitly
ranked lower than `erc-default-face'.
(erc-nicks--track-prioritize, erc-nicks--track-always): New
complementary functions implementing the t and `prioritize' variants of
`erc-nicks-track-faces'. Both make use of the factored-out
`erc-nicks--check-normals' logic.
(erc-nicks--setup-track-integration): Add `erc-nicks--track-always' to
`erc-track--alt-normals-function' when `erc-track-normal-faces' is t.
* lisp/erc/erc-track.el (erc-track--massage-nick-button-faces): Change
type of symbol property `erc-track--obsolete-faces' for options
`erc-track-faces-priority-list' and friends from a boolean to an alist.
(erc-track-faces-priority-list): Add new face for buttonized speakers.
(erc-track-faces-normal-list): Add new face for buttonized speakers.
Also add `erc-notice-face'.
(erc-track--priority-faces): New local variable to cache ranked faces
and complement `erc-track--normal-faces'.
(erc-track--setup): Initialize new `erc-track--priority-faces' variable,
and refactor.
(erc-track--alt-normals-function): Doc.
(erc-track--select-mode-line-face): Update expected type of `ranks'
parameter.
(erc-track-modified-channels): Fix wrong-type bug occurring when
`erc-track-ignore-normal-contenders-p' and
`erc-track-priority-faces-only' are both non-nil. Also fix subtle
compatibility oversight regarding an empty face list returned by
`erc-track--collect-faces-in'.
* test/lisp/erc/erc-nicks-tests.el: Load helpers and fixtures library.
(erc-nicks-tests--track-faces): New function.
(erc-nicks-track-faces/prioritize, erc-nicks-track-faces/defer)
(erc-nicks-track-faces/nil, erc-nicks-track-faces/t): New tests.
* test/lisp/erc/erc-track-tests.el
(erc-track-tests--select-mode-line-face): Update expected type of mocked
parameter.
(erc-track-tests--modified-channels/baseline): New function.
(erc-track-modified-channels/baseline)
(erc-track-modified-channels/baseline/mention)
(erc-track-modified-channels/baseline/ignore)
(erc-track-modified-channels/baseline/mention/ignore)
(erc-track-modified-channels/priority-only-all/baseline)
(erc-track-modified-channels/priority-only-all/sans-notice): New tests.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-track-modified-channels)
(erc-tests-common-track-modified-channels-sans-setup): New functions.
(Bug67767)
* lisp/erc/erc-log.el (erc-log--check-writable-nocreate-p): New variable.
(erc-logging-enabled): Use `erc-log--save-in-progress-p' flag to
conditionally avoid creating a directory when checking if the location
is writable.
(erc-log--call-when-logging-enabled-sans-module)
(erc-log--check-legacy-implicit-enabling-by-truncate): Rename former to
latter, and guard against creating a ~/log directory just to see if it's
writable when calling `erc-logging-enabled'.
(erc-truncate-mode): Explain legacy "implicit logging" behavior in doc
string.
* lisp/erc/erc-truncate.el (erc-truncate--warn-about-logging): Make more
concise, and defer to `erc-truncate-mode' doc string for particulars.
* lisp/erc/erc.el (erc-directory-writable-p): Add comment to rename on
next non-patch release.
* doc/misc/erc.texi (Sample Configuration): Move `erc-modules' twiddling
from a `use-package' :config section to a :custom section. In the past,
this would sometimes provoke module-loading issues, but it seems to work
fine on Emacs 30, even with repeated eval'ing of the `use-package' form.
This sample config is meant for users running the latest release anyhow.
Also add a new `use-package' block for `erc-match' showing how to
customize a face using inheritance. Add a corresponding section further
down showing the same via Customize.
* doc/lispref/display.texi (Making Buttons): Document it.
* lisp/button.el (unbuttonize-region): New function, removes all
buttons in the specified region.
* lisp/window.el (window-no-other-p): New function.
(window-in-direction, get-lru-window, get-mru-window)
(get-largest-window, other-window, window-at-x-y)
(delete-window-choose-selected, delete-window): Use it to check
whether 'ignore-window-parameters' should inhibit processing the
'no-other-window' parameter (Bug#73706).
* lisp/erc/erc-speedbar.el
(erc-speedbar-toggle-nicknames-window-lock): Use
'window-no-other-p'.
* doc/lispref/windows.texi (Windows and Frames)
(Deleting Windows, Cyclic Window Ordering): Describe new
function 'window-no-other-p' and use it in description of
functions that call it.
(Window Parameters): Add cross references for 'no-other-window'
parameter.
* lisp/doc-view.el (doc-view--outline): Pass the right file to
doc-view--pdf-outline.
* doc/emacs/misc.texi (DocView Navigation): Mention support for
Open Format Document (ODF) files too.
* etc/NEWS: Announce the change. (bug#73719)
The intentation behavior differed between c-mode/c++-mode
and *-ts-mode for initializer lists where the first element was
not at beginning-of-line. The anchor-prev-sibling function gave
up and returned nil, but it should (probably) anchor on the
first element in the initializer list, such as this:
return { v1, v2, ...,
y1, y2, ... };
c-ts-mode behaved better and figured out how to align, but I
added a test for a similar compound literal to prevent
regressions.
* lisp/progmodes/c-ts-mode.el (c-ts-mode--anchor-prev-sibling):
Anchor at first sibling unless bol is found.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New
initializer list and compound literal test.
Copyright-paperwork-exempt: yes
* lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression):
Fix AUTOWIRE etc. range simplification with subtraction of negative
number (#1879).
* lisp/vc/vc.el (vc-root-version-diff):
Don't try calling 'vc-deduce-fileset', instead construct a fileset
suitable for the root directory right away. This way the revision
completion for the root diff doesn't depend on the current buffer,
or the file at point (bug#73232).
(vc-diff-build-argument-list-internal): No special case when
invoked on a directory, or when the current file is not "dirty".
Make REV1-DEFAULT a string value.
* etc/NEWS: Mention the change.
Rmail-MIME decodes text of email, including removal of
CR characters, but that can segfault if the text of some
MIME part is empty.
* src/coding.c (decode_coding_raw_text):
* lisp/mail/rmailmm.el (rmail-mime-insert-decoded-text): Don't
attempt to decode empty text region.
* lisp/help-mode.el (help-setup-xref): Instead of killing all
local variables directly, call the current major mode function, to
preserve its own locals while dropping the rest (bug#73637).
Do away with parsing the output of "mutool show FILE outline"
since the URI reported in its output may not include the page
number of the heading, and instead may contained "nameddest"
elements which cannot be resolved using "mutool". Instead, use
a MuPDF JS script to generate the PDF outline allowing to
resolve such URIs.
* lisp/doc-view.el (doc-view--outline-rx): Remove as no longer
needed.
(doc-view--outline): Reflect that outline can be generated for
non-PDF files too.
(doc-view--mutool-pdf-outline-script): Add new variable to hold
the JS script used to generate the outline.
(doc-view--pdf-outline): Use the script. (bug#73638)
Implement drag-n-drop with IDropTarget for MS-Windows. This
allows for dropping files or text.
* lisp/term/w32-win.el (w32-drag-n-drop): Change to handle
files or strings.
* src/w32fns.c (process_dropfiles): New function to convert
DROPFILES struct to array of strings.
(w32_process_dnd_data): New function to process drop data.
(w32_try_get_data): Extract data from IDataObject.
(w32_createwindow): Assign an IDropTarget to each new frame.
(w32_name_of_message): New message.
(w32_msg_pump): Changed CoInitialize to OleInitialize, needed
by the drag-n-drop functions.
(w32_wnd_proc): New struct w32_drop_target, and
w32_drop_target_* functions to implement the IDropTarget
interface.
* src/w32term.c (w32_read_socket): Handle WM_EMACS_DROP and
remove WM_EMACS_DROPFILES.
* src/w32term.h: New message WM_EMACS_DROP.
(Bug#3468)
* etc/NEWS: Announce the new feature.
This adds '--no-fallback-lang' and '--no-empty-file-entries'
options, and their opposites '--fallback-lang' and
'--empty-file-entries'.
* lib-src/etags.c (fallback_lang, empty_files): New toggles.
(main): Initialize them to 'true'.
(longopts) [!CTAGS]: Add the '--(no-)fallback-lang' and
'--(no-)empty-file-entries' options.
(find_entries): If 'fallback_lang' is false, don't attempt Fortran
and C/C++ fallbacks.
(print_help): Add help for new options.
(main): If 'empty_files' is false, don't output file entries for
files that have no tags. (Bug#73484)
* doc/emacs/maintaining.texi (Create Tags Table):
* etc/NEWS:
* doc/man/etags.1: Document the new options.
* test/manual/etags/Makefile (check): Add test for new options.
* test/manual/etags/ETAGS.good_7: New file.
* lisp/progmodes/project.el (project--vc-list-files):
Check that the current Emacs is 31+, to avoid breakage on remote
hosts with older Git (bug#73320).
* lisp/vc/vc-git.el (vc-git--program-version): Detect Git version
on remote hosts separately from the local one (buf#73320).
(vc-git-connection-default-profile): Set up collection-local
profile. And use it for the 'vc-git' :application.
(vc-git--program-version): Operate on the connection-local value
of 'vc-git--program-version'.
* lisp/vc/diff-mode.el (diff-find-file-name): Allow entering
non-existing file name when the corresponding hunk is of type
"create file" (bug#62731). Default to file name with deleted
prefix if diff-buffer-type is Git or Hg. Make sure not to add
such input to diff-remembered-files-alist, it would be hard to
change otherwise in case of typo.
(diff-setup-buffer-type):
Match against the diff header common to 'hg diff' output.
(diff-find-source-location): Look at the other source when the
buffer is applied in reverse.
(diff-apply-hunk): Delect file deletion and pass a different
argument to 'diff-find-source-location' in such case. Bind
diff-vc-backend to nil to avoid older revision buffer being
returned. In the end, offer to delete the file if the hunk was of
corresponding type and matched the existing contents.
* etc/NEWS: Mention the new capability.
* lisp/progmodes/project.el (project-current): Treat being passed
a string in the MAYBE-CURRENT argument specially (bug#70833).
(project-prompt-project-dir, project-prompt-project-name):
Handle it.
* etc/NEWS: Mention that change.
* lisp/tmm.el (tmm-prompt): Add a shortcut to go up in the menu
hierarchy (bug#73498).
(tmm-completion-prompt): Document it in help message.
(tmm-define-keys): Add the shortcut in the keymap.
* etc/NEWS: Document the change.