1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-01 13:21:11 -08:00
Commit graph

155589 commits

Author SHA1 Message Date
Eli Zaretskii
968af794ba * lisp/desktop.el (desktop-read): Clarify warning text. 2022-03-27 08:10:27 +03:00
Po Lu
ef94f32557 Fix processing of DND grab on non-XI2 builds
* src/xterm.c (handle_one_xevent): Process DND grab flag
correctly.
2022-03-27 13:01:53 +08:00
Stefan Kangas
8ff41237ba Merge from origin/emacs-28
1bef52ce73 * doc/emacs/anti.texi (Antinews): Unannounce removal of Mo...
2022-03-27 06:30:16 +02:00
Po Lu
0bdbea654d Fix no-toolkit build
* src/xterm.c (x_top_window_to_frame): Declare correctly on
no-toolkit builds.
2022-03-27 09:48:37 +08:00
Po Lu
a4a44d7ee1 Avoid excessive synchronization when handling ShapeNotify events
* src/xterm.c (handle_one_xevent): Use XCB to handle ShapeNotify
events when we want both the bounding and input rects.
2022-03-27 08:53:12 +08:00
Po Lu
9f7e620bb5 ; * src/haikuimage.c (syms_of_haikuimage): Remove duplicate DEFSYM. 2022-03-27 00:34:25 +00:00
Mattias Engdegård
2dfeea8962 Fix reader infinite recursion for circular mixed-type values
Make sure that the value added to the `read_objects_completed` set is
the one we actually return; previously this wasn't the case for conses
because of an optimisation (bug#54501).

Also add a check for vacuous self-references such as #1=#1# instead of
returning a nonsense value from thin air.

* src/lread.c (read1): Treat numbered conses correctly as described
above.  Detect vacuous self-references.
* test/src/lread-tests.el (lread-test-read-and-print)
(lread-test-circle-cases, lread-circle): Add tests.
2022-03-26 17:11:40 +01:00
Eli Zaretskii
e96061de95 ; * src/image.c (syms_of_image): Fix whitespace. 2022-03-26 15:29:11 +03:00
Po Lu
b1e9151915 Enable the native display of BMP images on Haiku
* src/image.c (syms_of_image): Also register `bmp' image type on
Haiku when native image APIs are enabled.
2022-03-26 12:16:46 +00:00
Po Lu
0549adb4bb Fix crash when timer signals or throws inside a popup menu on Haiku
* src/haikumenu.c (haiku_process_pending_signals_for_menu_1)
(haiku_process_pending_signals_for_menu_2): New functions.
(haiku_process_pending_signals_for_menu): Catch non local exits
around `timer_check'.
2022-03-26 12:01:58 +00:00
Po Lu
a3ed1d2590 ; * src/xterm.c (x_dnd_compute_toplevels): Fix cookie leak if rc is 0. 2022-03-26 19:38:30 +08:00
Po Lu
0594e91261 Fix processing of emacs:window_id inside DND messages if it already exists
* src/haiku_support.cc (MessageReceived): Use DropPoint instead
of getting it manually.
(be_drag_message): Replace window_id if it already exists.
2022-03-26 10:14:05 +00:00
Michael Albinus
f8ff5689a2 ; Improve readablity in grep.el
* lisp/progmodes/grep.el (grep-compute-defaults): Set a more
readable value for `grep-quoting-style'.
2022-03-26 10:40:16 +01:00
Michael Albinus
6aafb92167 Don't let Tramp block dired (Bug#54542)
* lisp/dired.el (dired-find-buffer-nocreate): Avoid avoid hangs in
remote buffers with a blocked connection.  (Bug#54542)

* lisp/net/tramp-sh.el (tramp-maybe-open-connection):
Extend suppression rules.
2022-03-26 10:39:39 +01:00
Po Lu
78f99be675 Minor fixes to last change
* src/Makefile.in: Add XSHAPE_LIBS and XSHAPE_CFLAGS.
(LIBES, EMACS_CFLAGS): Likewise.

* src/xterm.c (x_dnd_compute_toplevels): Fix build without
HAVE_XCB_SHAPE.
2022-03-26 17:14:38 +08:00
Po Lu
a4d45f1efd Also fetch shapes via XCB for drag and drop
* configure.ac: Also look for xcb-shape.
* src/xterm.c (HAVE_XCB_SHAPE_INPUT_RECTS): New define.
(x_dnd_compute_toplevels): Use XCB for input shapes if possible.
2022-03-26 17:14:38 +08:00
Eli Zaretskii
4525b49118 Use native image APIs on MS-Windows by default
* src/w32term.c (syms_of_w32term) <w32-use-native-image-API>: Now
t by default on W2K and later systems, but only on WINDOWSNT
builds.

* etc/NEWS: Announce the change.
2022-03-26 11:52:41 +03:00
Eli Zaretskii
a6abb6f5cd Support display of BMP images on MS-Windows
* src/w32image.c (w32_can_use_native_image_api): Support BMP
images.
* src/image.c (syms_of_image) <Qbmp>: New symbol.
[HAVE_NTGUI]: Add 'bmp' to list of supported image types.

* doc/lispref/display.texi (Image Formats): Document built-in
support for BMP images.

* etc/NEWS: Announce the change.
2022-03-26 11:31:46 +03:00
Eli Zaretskii
de953a6fe3 Improve 'desktop--emacs-pid-running-p'
* lisp/desktop.el (desktop--emacs-pid-running-p): Avoid false
negatives on MS-Windows and with some symlinks to Emacs
executables.  (Bug#1474)
2022-03-26 10:28:52 +03:00
Po Lu
1bef52ce73 * doc/emacs/anti.texi (Antinews): Unannounce removal of Motif. 2022-03-26 14:46:00 +08:00
Stefan Kangas
f7e83d9673 Merge from origin/emacs-28
4ec9f9edd1 Fix eshell-explicit-command-char doc string typo
2022-03-26 06:30:21 +01:00
Po Lu
c16b296939 Fix crash when windows are destroyed by faulty clients
* src/xterm.c (x_dnd_compute_toplevels): Make sure
property_reply is non-NULL before testing its format and length.
2022-03-26 12:20:23 +08:00
Po Lu
98952340bd Avoid excessive synchronization when initiating drag-and-drop
* src/xterm.c (x_dnd_compute_toplevels): Use XCB to get WM
state, attributes, geometry and to translate coordinates.  This
avoids 4 calls to XSync.
2022-03-26 12:14:52 +08:00
Po Lu
66f6324a58 Fix compiler warning in x-dnd.el
* lisp/x-dnd.el (x-dnd-xdnd-to-action): Move declaration
earlier.
2022-03-26 10:17:12 +08:00
Po Lu
5359062be6 Avoid ClientMessage overhead when dragging stuff to other frames
* lisp/dired.el (dired-mouse-drag): Handle correctly dragging
from dired buffers in nonselected windows.
* lisp/x-dnd.el (x-dnd-handle-drag-n-drop-event): Understand new
client message type.
* src/xterm.c (x_dnd_send_enter, x_dnd_send_position)
(x_dnd_send_leave): Ignore if window is the top window of a
frame.
(x_dnd_send_drop): Send special DND event in that case.
2022-03-26 10:15:53 +08:00
Po Lu
21ecf6b24d Fix minor issues with dired-mouse-drag-files
* lisp/dired.el (dired-mouse-drag-files): Update doc string and
add setter.
(dired-insert-set-properties): Don't insert misleading tooltip
if feature is not available.
2022-03-26 08:45:08 +08:00
Andrew G Cohen
3b6e74f08e ; * lisp/gnus/nnselect.el (nnselect-get-artlist): Fix last change. 2022-03-26 07:04:39 +08:00
Andrew G Cohen
413ef5a7e6 ; Restore regexp-quote for gnus subject match
* lisp/gnus/gnus-sum.el (gnus-summary-limit-include-thread): Restore
regexp-quote that was inadvertently dropped in commit 2021-12-21 "Fix
gnus subject matching when subject is empty".
2022-03-26 06:23:20 +08:00
Lars Ingebrigtsen
4ec9f9edd1 Fix eshell-explicit-command-char doc string typo
* lisp/eshell/esh-ext.el (eshell-explicit-command-char): Fix typo
in doc string (bug#54567).
2022-03-25 19:02:04 +01:00
Lars Ingebrigtsen
4eabca26d3 Fix (bounds-of-thing-at-point 'number)
* lisp/thingatpt.el (number): Make (bounds-of-thing-at-point
'number) work (bug#54555).
2022-03-25 17:32:40 +01:00
Lars Ingebrigtsen
ec2f2ed65e Fix reporting of read error line/columns in the init file
* src/lread.c (invalid_syntax_lisp): The comments here said that
we were supposed to be called with point in the readcharfun
buffer.  This was not the case (at least) when reading the Emacs
init file, so the reported line/column was always wrong (1 and 0,
respectively) (bug#54550).
2022-03-25 17:20:35 +01:00
Lars Ingebrigtsen
3e7257c3ed Improve pp-last-sexp ergonomics
* lisp/emacs-lisp/pp.el (pp-last-sexp): Ignore ,@?
before a sexp, because eval-ing that will always lead to an error
(bug#54537).
2022-03-25 16:44:30 +01:00
Po Lu
4dfd42014b Implement new drag and drop parameter on Haiku
* lisp/term/haiku-win.el (x-begin-drag): Implement
`allow-current-frame'.
* src/haiku_support.cc (be_drag_message): New argument
`allow_same_view'.
* src/haiku_support.h: Update prototypes.
* src/haikuselect.c (Fhaiku_drag_message): New parameter
`allow-same-frame'.
2022-03-25 13:41:30 +00:00
Po Lu
8ba0f19064 Allow dragging files from dired to windows on the same frame
* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/dired.el (dired-mouse-drag): Utilize new parameter.
* lisp/term/haiku-win.el (x-begin-drag): Add new parameter.
* src/xfns.c (Fx_begin_drag): New parameter
`allow-current-frame'.  Fix typo and update doc string.
* src/xterm.c (x_dnd_get_window_proto): Respect
`x_dnd_allow_current_frame'.
(x_dnd_begin_drag_and_drop): New parameter
`allow_current_frame'.
* src/xterm.h: Update prototypes.
2022-03-25 21:24:27 +08:00
Eli Zaretskii
ab414c5661 Improve documentation of 'completion-auto-select'
* lisp/simple.el (completion-auto-select):
* doc/emacs/mini.texi (Completion Options): Improve documentation
and description of customization options of 'completion-auto-select'.
2022-03-25 15:39:44 +03:00
Po Lu
3fac06dfb8 Make it easier to select text inside dired when mouse dragging is on
* lisp/dired.el (dired-insert-set-properties): Only set drag
keymap on the filename itself.
2022-03-25 20:34:18 +08:00
Michael Albinus
1b7a9753e1 * admin/notes/emba: Mention workflow rules for branches. 2022-03-25 09:28:44 +01:00
Po Lu
8ecde51972 Fix quitting DND while waiting for finish
* src/xterm.c (x_dnd_begin_drag_and_drop): Always clear finish
flag before quitting.
2022-03-25 16:22:45 +08:00
Po Lu
f38bdb0327 Take window shapes into account when processing drag and drop
* configure.ac: Test for the Nonrectangular Window Shape
extension.
* msdos/sed1v2.inp: Update.
* src/xterm.c (struct x_client_list_window): New fields for
shapes.
(x_dnd_free_toplevels): Free shapes.
(x_dnd_compute_toplevels): Populate window shapes.
(x_dnd_get_target_window_2): New function.
(x_dnd_get_target_window_1): Test WM state of window before
taking it into account.
(x_dnd_begin_drag_and_drop): Use outer window as the initial
last seen window.
(x_dnd_update_state): Small fixes to frame tracking.
(handle_one_xevent): Handle ShapeNotify events correctly.
(x_term_init): Test for the Nonrectangular Window Shape
extension.
* src/xterm.h (struct x_display_info): New atom `WM_STATE'.
2022-03-25 16:22:45 +08:00
Stefan Kangas
9d2dcd1841 Merge from origin/emacs-28
d3d6f1c9bd Clarify the description of "selected tags table"
2022-03-25 06:30:16 +01:00
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
Eli Zaretskii
d3d6f1c9bd Clarify the description of "selected tags table"
* doc/emacs/maintaining.texi (Select Tags Table): Clarify the
distinction between the "selected tags table" and the "current
list of tags tables".  (Bug#54543)
2022-03-24 17:22:43 +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