1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 19:10:37 -08:00
Commit graph

155198 commits

Author SHA1 Message Date
Po Lu
b4fc5bedb8 Use _NET_CLIENT_LIST_STACKING to optimize drag and drop window discovery
* src/xterm.c (struct x_client_list_window): New struct.
(x_dnd_free_toplevels, x_dnd_compute_toplevels)
(x_dnd_get_target_window_1): New functions.
(x_dnd_get_target_window): Search in the toplevel list if it
exists.
(x_dnd_cleanup_drag_and_drop): Clean up toplevel list.
(x_dnd_begin_drag_and_drop): Compute toplevel list if the
window manager supports it.
(handle_one_xevent): Update the toplevel list if prudent.
2022-03-25 11:09:43 +08:00
Philip Kaludercic
392d66f6f5 Fix wrapping of 'previous-completion' at the beginning of buffer
* lisp/simple.el (next-completion): Prevent an error of
'previous-completion' at the beginning of completions buffer.
Also fix 'previous-completion' to wrap to the last completion.
(bug#54374)
2022-03-24 20:11:01 +02:00
Juri Linkov
71aec1d044 Small fixes for the new feature 'second-tab' of 'completion-auto-select'
* lisp/simple.el (completion-auto-select): Extend the docstring.
2022-03-24 19:54:14 +02:00
Augusto Stoffel
45978f97be Handle invisible text in Eldoc when calculating size
Co-authored-by: João Távora <joaotavora@gmail.com>

* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-substring,
eldoc-display-in-echo-area):  Take invisible text into consideration
when counting lines to crop an echo-area message.
(Version): Bump.
2022-03-24 15:06:05 +00:00
Eli Zaretskii
17d9830f46 ; * etc/NEWS: Fix wording of a recently added entry. 2022-03-24 16:55:28 +02:00
Po Lu
380f0443b2 Allow fetching events from other displays inside DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Get the next event
from the app connection instead on Xt.
2022-03-24 21:25:32 +08:00
Mauro Aranda
4e0b0114f2 ; Fix filename in undigest-tests.el header 2022-03-24 09:41:20 -03:00
Michael Albinus
34c7f14668 Adapt Tramp to dired--insert-disk-space assumptions
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not modify disk space information when
`dired--insert-disk-space' is available.  (Bug#54512)
2022-03-24 12:50:34 +01:00
Lars Ingebrigtsen
b97aa560ab Fix autoinsert.el byte compilation warning
* lisp/autoinsert.el (sgml-tag): Fix a byte compilation warning.
2022-03-24 11:39:13 +01:00
Jimmy Aguilar Mena
410675ce0e Merge 'completion-auto-select new value secont-tab'
This includes the second-tab value for completion-auto-select and
documentation related.
2022-03-24 11:23:32 +01:00
Jimmy Aguilar Mena
acde5252d3 Add documentation entries for completion-auto-select user option. 2022-03-24 11:18:05 +01:00
Jimmy Aguilar Mena
3a349ff648 Add completion-auto-select second-tab value.
* lisp/minibuffer.el (completion--in-region-1) : Change if with cond and
check if completion-auto-select.
* lisp/simple.el (completion-auto-select) : Move before first use.
(completion-setup-function) : Make a more precise check for when
completion-auto-select is t.
2022-03-24 11:18:05 +01:00
Stefan Monnier
288ecdf90c * lisp/select.el (xselect-convert-to-targets): Use delete-dups and delq 2022-03-24 05:32:10 -04:00
Stefan Monnier
f7a90cc85b * lisp/autoinsert.el (auto-insert-alist): Expose lambdas as code 2022-03-24 05:19:19 -04:00
Stefan Monnier
774e007d90 (archive-*-write-file-member): Fix relative file name
* lisp/arc-mode.el (archive-*-write-file-member): Set the pwd
2022-03-24 05:13:11 -04:00
Lars Ingebrigtsen
f35dbb41cd Do some NEWS tagging 2022-03-24 10:09:58 +01:00
Po Lu
f09e68e180 Avoid crashes if async input arrives when setting properties for DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Block input around
non-async signal safe functions.
2022-03-24 17:00:43 +08:00
Lars Ingebrigtsen
9856290806 Mention frame-text-* function in frame-pixel-* doc strings
* src/frame.c (Fframe_native_width, Fframe_native_height): Link to
`frame-text-*' functions.
2022-03-24 10:00:09 +01:00
Lars Ingebrigtsen
0e739909ab Fix image-mode-fit-frame some more
* lisp/image-mode.el (image-mode-fit-frame): Use frame-text-width
and fit-frame-to-buffer instead of computing things ourselves
(bug#37630).  This makes things work better across platforms.
2022-03-24 09:54:56 +01:00
Po Lu
cae187e430 Fix some bugs with drag and drop and Mozilla
* src/xfns.c (Fx_begin_drag): Call maybe_quit when iterating
through potentially long lists.  Also allow specifying
XdndActionAsk manually again, since it's useful for debugging.
* src/xterm.c (x_dnd_begin_drag_and_drop): Delete XdndActionList
and XdndActionDescription if they were not specified.
2022-03-24 16:39:23 +08:00
Stefan Kangas
b4f504a0ea Load desktop without prompting if process is dead
* doc/emacs/misc.texi (Saving Emacs Sessions): Document the new
'check' value.
* etc/NEWS: Announce the change (bug#1474).
* lisp/desktop.el (desktop-load-locked-desktop): Add new value 'check'
to load desktop file without prompting if locking Emacs process does
not exist on the local machine.  (Bug#1474)
(desktop-read): Extract function from here...
(desktop--load-locked-desktop-p): ...to here.  New function handles
the semantics of 'desktop-load-locked-desktop', including above new
value 'check'.
(desktop--emacs-pid-running-p): New function.

* test/lisp/desktop-tests.el: New file with tests for the above.
2022-03-24 09:23:31 +01:00
Po Lu
72ab6c4f14 Fix setter for hl-line-sticky-flag when hl-line is not loaded
* lisp/hl-line.el (hl-line-sticky-flag): Wrap most of setter
around (featurep 'hl-line).  Reported by Michael Heerdegen
<michael_heerdegen@web.de>.
2022-03-24 13:50:55 +08:00
Po Lu
97f9eeaaef Allow holding down scroll bar buttons on Haiku when overscrolling
* src/haiku_support.cc (EmacsWindow): Set appropriate pulse
rate.
(class EmacsScrollBar, ValueChanged): Don't send any part events
here.
(MouseDown): Set dragging to a value larger than 1 if the scroll
bar is at the end.
(Pulse): New method.
2022-03-24 05:32:34 +00:00
Po Lu
ebd5725e0b Fix an infinite loop if the window manager pings Emacs during DND
* src/xterm.c (handle_one_xevent): Work around _NET_WM_PING
infinite loop during drag and drop.
2022-03-24 11:41:29 +08:00
Po Lu
d81df9e449 Fix copying font names around on Haiku
* src/haiku_font_support.cc (font_style_to_flags)
(haiku_font_fill_pattern, BFont_open_pattern)
(BFont_populate_fixed_family, BFont_populate_plain_family):
* src/haiku_support.cc (be_get_version_string):
* src/haikufont.c (haikufont_spec_or_entity_to_pattern): Stop
assuming patterns were allocated by xzalloc.
2022-03-24 01:50:18 +00:00
Po Lu
17393c0db0 Allow dragging and dropping multiple actions
* doc/lispref/frames.texi (Drag and Drop): Document new meaning
of `action'.
* lisp/term/haiku-win.el (x-begin-drag): Correct for new meaning
of `action'.
* src/xfns.c (Fx_begin_drag): Handle new alist meaning of
`action'.
* src/xterm.c (x_dnd_begin_drag_and_drop): New parameters
`ask_action_list', `ask_action_names' and `n_ask_actions'.
* src/xterm.h: Update prototypes.
2022-03-24 09:42:47 +08:00
Augusto Stoffel
ac3bb7e754 Fix regression in isearch-yank-char-in-minibuffer
* lisp/isearch.el (isearch-yank-char-in-minibuffer): Select the
original window in order to restore point.  This is needed when
minibuffer lazy highlight is in effect.
2022-03-23 22:06:07 +02:00
Mauro Aranda
4ec23d922d Make undigest work with multipart/mixed messages
* test/lisp/mail/undigest.el: New test file (bug#12873).
* lisp/mail/undigest.el (rmail-digest-methods): Install
rmail-digest-parse-mixed-mime.
(rmail-content-type-boundary): New function, to get a specific
Content-type boundary.
(rmail-digest-parse-mixed-mime): New function, to search for a
multipart/digest message inside a multipart/mixed message.
2022-03-23 20:44:32 +01:00
Michael Albinus
ef0a0d30c5 Make quoting of shell arguments in grep.el more robust
* lisp/progmodes/grep.el (grep-apply-setting)
(grep-compute-defaults): Adapt docstring.
(grep-quoting-style): New variable.
(grep-compute-defaults, grep-default-command)
(grep-expand-keywords, lgrep, rgrep-default-command): Use it.
2022-03-23 19:54:53 +01:00
Glenn Morris
b8e8c83360 * doc/misc/eudc.texi (Inline Query Expansion): Unbreak it. 2022-03-23 08:44:18 -07:00
Michael Albinus
fdbee9bc4c Support changing remoteness of DIR in rgrep and lgrep
* lisp/net/tramp-sh.el (tramp-get-remote-dev-tty): New defun.
(tramp-sh-handle-make-process): Use it.

* lisp/progmodes/grep.el: Prefer #' to quote named functions.
(lgrep, rgrep): Recompute grep defaults when the remoteness of DIR
changes.
2022-03-23 16:04:57 +01:00
Po Lu
7fa5d6c87d Improvements to Haiku selection handling
* lisp/term/haiku-win.el (haiku-selection-targets): Implement in Lisp.
* src/haiku_select.cc (be_get_message_type):
(be_set_message_type):
(be_get_message_message):
(be_add_message_message): New functions.

* src/haiku_support.cc (MessageReceived): Fix typo.
* src/haikuselect.c (haiku_selection_data_1)
(Fhaiku_selection_targets): Delete functions.
(haiku_message_to_lisp, lisp_to_type_code)
(haiku_lisp_to_message): Correctly decode and encode nested
messages, and fix encoding specially decoded types via numeric
names.  Also store and decode message types inside Lisp
messages.
(Fhaiku_drag_message): Update doc string.
(syms_of_haikuselect): Update subrs.
* src/haikuselect.h: Update prototypes.
2022-03-23 14:16:15 +00:00
Lars Ingebrigtsen
36810a8164 Reinstate `C-M-<delete>'
* lisp/bindings.el (global-map): Reinstate `C-M-<delete>' and
`C-M-<backspace>' (bug#29430).  These used to kill X, but that
hasn't been the case in any common GNU/Linux distributions for
decades.
2022-03-23 14:29:03 +01:00
Lars Ingebrigtsen
e5e5d85369 Fix image-mode-fit-frame resizing
* lisp/image-mode.el (image-mode-fit-frame): Use pixel sizes
instead of lines/columns to get more accurate resizing (bug#37630).
2022-03-23 14:19:22 +01:00
Andreas Schwab
59260ec598 * lisp/term/pgtk-win.el: Update header comment. 2022-03-23 14:14:04 +01:00
Po Lu
5811741eda Fix hl-line tests
* lisp/hl-line.el (hl-line-mode): Restore old setter.
* test/lisp/hl-line-tests.el (hl-line-tests-verify): Don't rely
`cl-some' always returning t on success.
(hl-line-tests-sticky-across-frames): Use correct global variable.
2022-03-23 20:25:33 +08:00
Po Lu
b49d249ee5 * lisp/calendar/todo-mode.el: Restore old code. 2022-03-23 16:51:01 +08:00
Po Lu
a34afbf2ae Restore old hl-line code
* lisp/hl-line.el: Restore old code to remove obsoletions.
(hl-line-overlay-priority): Make defcustom.
2022-03-23 16:48:49 +08:00
Po Lu
fed9a353db Allow retrieving some more kinds of clipboard data on Haiku
* src/haiku_select.cc (BClipboard_find_data): Handle NULL
characters inside data correctly.
(be_lock_clipboard_message, be_unlock_clipboard): New functions.
* src/haikuselect.c (Fhaiku_selection_data): Return entire
clipboard contents as a message when clipboard is NULL.
(haiku_lisp_to_message): Allow quitting when iterating through
potentially large or circular lists.
* src/haikuselect.h (enum haiku_clipboard): New enum.
2022-03-23 08:20:14 +00:00
Stefan Kangas
5f8a3ca9af ; Merge from origin/emacs-28
The following commit was skipped:

c69a617742 Add notes about command modes and nativecomp interaction
2022-03-23 06:30:45 +01:00
Po Lu
64aabe706f Fix crash in haiku_message_to_lisp
* src/haikuselect.c (haiku_message_to_lisp): Block input around
`free'.
2022-03-23 04:01:01 +00:00
Po Lu
8aff4c0a36 Handle quitting correctly during interprogram drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Handle quit
correctly by exiting the cross program drag and drop.
2022-03-23 11:30:13 +08:00
Po Lu
021dbdb128 * src/xterm.c (x_dnd_begin_drag_and_drop): Fix test against DND frame. 2022-03-23 11:14:28 +08:00
Po Lu
bd2734f0b6 Don't allocate duplicate cursors for each frame on Haiku
* src/haikufns.c (haiku_create_frame)
(haiku_free_frame_resources): Stop creating cursors.
* src/haikuterm.c (haiku_delete_terminal, haiku_term_init):
Create and free cursors here instead.
* src/haikuterm.h (struct haiku_display_info): New fields for
cursors.
2022-03-23 02:27:21 +00:00
Po Lu
9cef919692 Improve DND documentation
* doc/lispref/frames.texi (Drag and Drop):
* src/xfns.c (Fx_begin_drag): Document meaning of
`XdndActionPrivate'.
2022-03-23 09:26:50 +08:00
Po Lu
dd242b49ec ; * src/xterm.c (x_free_frame_resources): Fix typo in last change. 2022-03-23 09:21:19 +08:00
Po Lu
8b853b3f98 Reported taken action correctly when dragging to another frame on X
* src/xterm.c (x_dnd_cleanup_drag_and_drop, x_dnd_update_state)
(x_free_frame_resources, handle_one_xevent): Set
`x_dnd_end_window'.
(x_dnd_begin_drag_and_drop): Return `XdndActionPrivate' if the
drop landed on one of our own frames.
2022-03-23 09:21:04 +08:00
Andrew G Cohen
eb25ae3f2d Refactor gnus/nnselect artlist saving and getting
* lisp/gnus/nnselect.el (nnselect-generate-run): New function that
replaces nnselect-run.
(nnselect-store-artlist): New function.
(nnselect-get-artlist): Update function.
(nnselect-request-group, nnselect-request-thread)
(nnselect-request-create-group, nnselect-request-group-scan): Use the
new functions.
* doc/misc/gnus.texi (Selection Groups): Document artlist storage and
retrieval.
2022-03-23 08:13:28 +08:00
Lars Ingebrigtsen
c14ce74f33 NEWS copy edits 2022-03-22 23:48:34 +01:00
Lars Ingebrigtsen
601e0d992e Mention highlight-confusing-reorderings in doc string
* src/xdisp.c (Fbidi_find_overridden_directionality): Mention
highlight-confusing-reorderings.
2022-03-22 23:44:16 +01:00