* src/xselect.c (x_handle_selection_request): Use
display-specific pending DND time.
(x_set_pending_dnd_time): Delete function.
* src/xterm.c (x_dnd_do_unsupported_drop, handle_one_xevent):
Set dpyinfo->pending_dnd_time instead.
* src/xterm.h (struct x_display_info): New field
`pending_dnd_time'. Make handling pending drops
display-specific to avoid interference when there are multiple
displays.
* src/haiku_select.cc (be_handle_clipboard_changed_message):
Include current clipboard count.
(be_selection_outdated_p): New function.
* src/haikuselect.c (haiku_handle_selection_clear): Ignore
outdated events.
(haiku_selection_disowned): New argument `count'. Include it in
the timestamp field of the selection clear event.
* src/haikuselect.h: Update prototypes.
* src/systime.h: Define `Time' to an appropriate value on Haiku.
* doc/emacs/killing.texi (Primary Selection): Document new minor
mode `lost-selection-mode'.
* etc/NEWS: Announce new minor mode.
* lisp/select.el (lost-selection-function): New function.
(lost-selection-mode): New global minor mode.
* src/xterm.c (handle_one_xevent): Clear net_supported_window if
it is destroyed.
(x_get_wm_check_window): New function.
(x_wm_supports_1): First try net_supported_window. If it still
exists, don't ask for _NET_SUPPORTING_WM_CHECK.
(isearch-search-fun-in-text-property): Refactor body to
'search-within-boundaries', then call it (bug#14013).
(search-within-boundaries): New function refactored from
isearch-search-fun-in-text-property.
* test/lisp/isearch-tests.el: Add tests for new search functions.
(isearch--test-search-within-boundaries): New function.
(isearch--test-search-fun-in-text-property)
(isearch--test-search-fun-in-noncontiguous-region): New tests.
* lisp/isearch.el (lazy-count-invisible-format): New variable.
(isearch-mode): Set isearch-lazy-count-invisible to nil.
(isearch-lazy-count-format): Use lazy-count-invisible-format and
isearch-lazy-count-invisible.
(isearch-range-invisible): Handle the value 'can-be-opened' of
'search-invisible' and don't open overlays for it, just check
if these overlays can be opened.
(isearch-lazy-count-invisible): New variable.
(isearch-lazy-highlight-new-loop): Set isearch-lazy-count-invisible to nil.
(isearch-lazy-highlight-search): Let-bind search-invisible either to t
for non-nil isearch-lazy-count, or to 'can-be-opened'.
(isearch-lazy-highlight-match): Don't highlight matches intended
to be counted only, not highlighted.
(isearch-lazy-highlight-buffer-update): Separately count invisible
matches by isearch-lazy-count-invisible.
* lisp/info.el (Info-isearch-filter): Check if search-invisible is t.
Don't crash if the file name argument to file-name-case-insensitive-p,
after expansion, doesn't have a parent directory. This occurs
when calling ffap on something that looks like an email address.
* src/fileio.c (Ffile_name_case_insensitive_p): Return nil if no file
or parent directory could be found.
* test/src/fileio-tests.el (fileio-tests--identity-expand-handler)
(fileio--file-name-case-insensitive-p): New test.
Having this on by default is highly problematic from a security and
privacy standpoint, as it risks having outgoing traffic that could
potentially reveal sensitive data (passwords, names, etc.).
It also seems to be causing issues for users, see e.g.
https://github.com/emacs-helm/helm/issues/648
* lisp/ffap.el (ffap-machine-p-known): Change default to 'accept'.
* src/xterm.c (x_set_frame_alpha): Don't synchronize while
setting alpha property, and don't ask for the current value of
the opacity property, which is much more expensive than changing
it.
By separating the code paths for append and vconcat, each becomes
simpler and faster.
* src/fns.c (concat_strings): Rename to...
(concat_to_string): ...this.
(concat): Split into concat_to_list and concat_to_vector.
(concat_to_list, concat_to_vector): New, specialised and
streamlined from earlier combined code.
(concat2, concat3, Fappend, Fconcat, Fvconcat): Adjust calls.
This is relevant for bug #56305, and might solve that bug. The code being
removed went into Emacs between 1992 and 1994, and looks to have been a
workaround for switching frames, before the command 'other-frame' had been
written. Nowadays, that code has harmful effects, causing frames' focus to be
redirected at random, sometimes back to the frame itself.
* src/frame.c (do_switch_frame): Remove 53 lines of code.
* lisp/net/net-utils.el (net-utils-machine-at-point)
(net-utils-url-at-point): Redefine as obsolete function alias for
'ffap-machine-at-point' and 'ffap-url-at-point'. Update callers.
* lisp/ffap.el (ffap-machine-at-point, ffap-url-at-point): Autoload.
* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args): Make obsolete. The corresponding command
'browse-url-w3-gnudoit' is already obsolete since 25.1.
* src/xterm.c (x_dnd_process_quit): New function.
(x_dnd_begin_drag_and_drop): Use it instead. Also quit if
quit-flag is true immediately after a selection converter is
run.
* lisp/net/net-utils.el (run-dig): Redefine in terms of `dig' and make
obsolete. (Bug#56432).
(dig-program): Delete duplicate defcustom; it is also in dig.el.
(dig-program-options): Move from here...
* lisp/net/dig.el (dig-program-options): ...to here.
(dig-invoke): Respect 'dig-program-options'.
(dig): Prompt for DNS server when given double prefix argument.
* lisp/simple.el (primitive-undo): If the visited-modtime of the
indirect buffer's file is bogus, use the modtime of the file
visited by its base buffer.
* src/undo.c (record_first_change): Call
'buffer_visited_file_modtime' with the correct buffer, instead of
always calling 'Fvisited_file_modtime', which returns possibly
bogus values for indirect buffers.
* src/fileio.c (Fset_visited_file_modtime): Signal a meaningful
error for indirect buffers.
(buffer_visited_file_modtime): New function, with implementation
taken from 'Fvisited_file_modtime'.
(Fvisited_file_modtime): Call 'buffer_visited_file_modtime'.
* src/lisp.h: Add prototype for 'buffer_visited_file_modtime'.
(Bug#56397)