1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-13 03:06:23 -08:00
Commit graph

157120 commits

Author SHA1 Message Date
Po Lu
2f31dbeadf Also show mouse DND tooltip contents during interprogram drag-and-drop
* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/mouse.el (mouse-drag-and-drop-region): Don't hide tooltip
when initiating interprogram drag-and-drop.
* lisp/term/haiku-win.el (x-begin-drag):
* lisp/term/ns-win.el (x-begin-drag): Add stubs for new
parameter.
* src/xfns.c (Fx_begin_drag): New parameter `follow-tooltip'.
(Fx_show_tip, syms_of_xfns): Add records of the last dx and dy
given to `x-show-tip'.
* src/xterm.c (x_clear_dnd_monitors): New function.
(x_dnd_begin_drag_and_drop): Save monitor attributes list if
appropriate.
(x_dnd_compute_tip_xy, x_dnd_update_tooltip_position): New
function.
(x_dnd_update_state, handle_one_xevent): Update tooltip position
during DND mouse movement.
(syms_of_xterm): Update staticpros.
* src/xterm.h: Update prototypes.
2022-06-09 13:11:08 +08:00
Po Lu
7e41b4aa23 Fix dnd-tests on builds without X
* test/lisp/dnd-tests.el (x-get-selection-internal): New
function declaration.
2022-06-09 10:22:14 +08:00
Po Lu
8d4551cbdb Ignore tooltip frames when looking for DND target
* src/xterm.c (x_dnd_get_target_window): When not using client
lists, look beneath any tooltip frame.
2022-06-09 10:05:54 +08:00
Po Lu
dcb45946ee Make use of faster atom intern functions in xselect.c
* src/xselect.c (symbol_to_x_atom):
(x_atom_to_symbol): Use x_get_atom_name and
x_intern_cached_atom.
2022-06-09 09:52:21 +08:00
Juri Linkov
c754f277a6 * lisp/rect.el: Return correct positions of region-beginning/end (bug#55234)
(rectangle-mark-mode): Add advices for region-beginning and region-end.
(rectangle--region-beginning, rectangle--region-end): New advices.
(rectangle--extract-region): Let-bind rectangle-mark-mode around
region-beginning and region-end to use the original functions.
2022-06-08 20:10:12 +03:00
Robert Pluim
4ad75a50a2 Add more super and subscript characters to latin input methods
* lisp/leim/quail/latin-post.el ("latin-postfix", "latin-prefix"): Add
mssing super and subscript characters.  (Bug#55722)
2022-06-08 14:53:44 +02:00
Robert Pluim
1ce34040fa Add fractions to latin-post input method
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add fractions.
2022-06-08 14:53:44 +02:00
Robert Pluim
2f6f85de34 Add more ways to enter trade mark and registered sign
* lisp/international/iso-transl.el (iso-transl-char-map): Add sequence
for TRADE MARK.
* lisp/leim/quail/latin-post.el ("latin-postfix"): Add REGISTERED SIGN
and TRADE MARK.
* lisp/leim/quail/latin-pre.el ("latin-prefix"): Add TRADE MARK.
2022-06-08 14:53:44 +02:00
Po Lu
0fd60451bc Allow running some DND tests interactively
* src/xselect.c (x_get_local_selection): Respect new variable.
(syms_of_xselect): New variable
`x-treat-local-requests-remotely'.

* test/lisp/dnd-tests.el (x-begin-drag, gui-set-selection):
Don't redefine these functions under X.
(dnd-tests-verify-selection-data): Use
`x-get-selection-internal' under X.
(dnd-tests-extract-selection-data): New function.
(dnd-tests-begin-text-drag): Update accordingly.
(dnd-tests-begin-file-drag, dnd-tests-begin-drag-files):
Temporarily skip these tests under X.
2022-06-08 20:34:13 +08:00
Lars Ingebrigtsen
efe9940567 Revert "Give ,@ a prefix syntax in elisp-mode"
This reverts commit d003848b5e.

This leads to hangs in edebug-tests.
2022-06-08 14:27:14 +02:00
Jim Porter
a8e5e3ce5d Don't split Eshell expansions by line when using split-subscript operator
* lisp/eshell/esh-var.el (eshell-apply-indices): Use
'eshell-convert-to-number' instead of 'eshell-convert'.

* test/lisp/eshell/esh-var-tests.el
(esh-var-test/interp-convert-var-split-indices): Expand test
(bug#55838).
2022-06-08 14:10:55 +02:00
Nicholas Vollmer
33c9572cfe * doc/man/emacs.1.in: Add --init-directory.
* doc/man/emacs.1.in: Document --init-directory (bug#55839).
2022-06-08 14:10:33 +02:00
Po Lu
b8e0f2e827 Simplify XDND toplevel freeing code
* src/xterm.c (x_free_dnd_toplevels): New function.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop): Record
an unwind function to free DND toplevels instead of doing that
manually everywhere.
2022-06-08 20:05:06 +08:00
Manuel Giraud
496e191fc7 Fix last-modified meaning in bookmark.el
* lisp/bookmark.el (bookmark-update-last-modified): New function
to update the last-modified field.
(bookmark-send-edited-annotation, bookmark-relocate)
(bookmark-rename): Use `bookmark-update-last-modified' in
annotations editing, relocation and renaming.
2022-06-08 13:51:41 +02:00
Lars Ingebrigtsen
c8532a0acf icomplete-in-buffer doc fix
* lisp/icomplete.el (icomplete-in-buffer): dabbrev now uses
icomplete-in-buffer (bug#45764).
2022-06-08 13:48:48 +02:00
Michael Albinus
b2ed8a547a Factor out test configuration for remote files
* lisp/emacs-lisp/ert-x.el (tramp-methods)
(tramp-default-host-alist): Declare.
(ert-remote-temporary-file-directory): New defconst.

* test/README: Mention dnd-tests.el.

* test/lisp/autorevert-tests.el
(auto-revert-test-remote-temporary-file-directory): Remove.
Replace all uses by `ert-remote-temporary-file-directory'.

* test/lisp/dnd-tests.el (ert-x): Require.
(dnd-tests-temporary-file-directory): Remove.  Replace all uses by
`ert-remote-temporary-file-directory'.

* test/lisp/filenotify-tests.el
(file-notify-test-remote-temporary-file-directory): Remove.
Replace all uses by `ert-remote-temporary-file-directory'.

* test/lisp/shadowfile-tests.el (ert-x): Require.
(shadow-test-remote-temporary-file-directory): Remove.  Replace
all uses by `ert-remote-temporary-file-directory'.

* test/lisp/net/tramp-tests.el: Don't require ert.
(ert-remote-temporary-file-directory): Define if it doesn't exist.
(tramp-test-temporary-file-directory): Remove.  Replace all uses
by `ert-remote-temporary-file-directory'.
2022-06-08 12:06:56 +02:00
Mattias Engdegård
493ae66be0 Preserve doc string in byte-compile (bug#55830)
* lisp/emacs-lisp/bytecomp.el (byte-compile--reify-function):
Don't transpose doc string and interactive spec, which must come
in this order.
* test/lisp/emacs-lisp/bytecomp-tests.el
(bytecomp-function-attributes): New test.
2022-06-08 10:08:05 +02:00
Po Lu
22d3f0e95a Make responding to selection requests work inside popups
* src/xfns.c (Fx_file_dialog):
* src/xmenu.c (x_menu_wait_for_event, create_and_show_popup_menu)
(create_and_show_dialog, x_menu_show): Defer selection requests.
* src/xselect.c (x_get_foreign_selection)
(x_handle_selection_notify): Add some more info to selection
trace.

* src/xterm.c (x_defer_selection_requests): Make non-static.
(x_release_selection_requests_and_flush): New function.
(x_dnd_begin_drag_and_drop): Use DEFER_SELECTIONS instead.
(x_wait_for_cell_change): Fix initial value of rc for pushed
back events.
(handle_one_xevent): Allow GTK to respond to selections in its
windows too.

* src/xterm.h (DEFER_SELECTIONS): New slug of code.
2022-06-08 15:08:27 +08:00
Po Lu
90f3da0ccd Fix quitting in one go out of `mouse-drag-and-drop-region'
* src/xterm.c (x_dnd_begin_drag_and_drop): Make sure
handle_interrupt is called inside the nested event loop upon a
quit event.
2022-06-08 13:03:57 +08:00
Po Lu
d1c6193720 Fix crash with outdated selection requests
* src/xselect.c (x_handle_selection_request): Don't store into
stack if it wasn't previously pushed.
2022-06-08 10:54:07 +08:00
Po Lu
3237d1d6b6 Improve drag-and-drop tests
* lisp/dnd.el (dnd-begin-file-drag, dnd-begin-drag-files): Fix
type of `x-xdnd-username'.
* lisp/select.el (selection-converter-alist): Fix declaration of
_DT_NETFILE converter.

* test/lisp/dnd-tests.el (dnd-tests-verify-selection-data):
Handle "compound" selection converters.
(dnd-tests-parse-tt-netfile): New function.
(dnd-tests-begin-file-drag, dnd-tests-begin-drag-files): Verify
validity of file selection data.
2022-06-08 10:40:20 +08:00
Po Lu
f3162b8240 More fixes to mouse event reporting during drag-and-drop
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't reset
dpyinfo->grabbed when quitting.
(handle_one_xevent): Keep track of dpyinfo->grabbed as well
inside the drag-and-drop event loop.
2022-06-08 08:49:51 +08:00
Dmitry Gutov
88b025f815 pcomplete-parse-arguments: Fix last change
* lisp/pcomplete.el (pcomplete-parse-arguments):
Throw the previous value of 'pcomplete-stub' (a list) rather than
the newly constructed one (bug#50470).
2022-06-08 01:08:22 +03:00
Juri Linkov
ff2ce79f6c * doc/emacs/vc1-xtra.texi (Customizing VC): Remove deprecated Mtn. 2022-06-07 21:47:51 +03:00
Lars Ingebrigtsen
d003848b5e Give ,@ a prefix syntax in elisp-mode
* lisp/progmodes/elisp-mode.el (elisp-mode-syntax-propertize):
Give ,@ a prefix syntax so that we can properly identify symbols
that follow it, i.e., ,@foo (bug#44418).
2022-06-07 20:28:05 +02:00
Lars Ingebrigtsen
6a9ff1c638 Demote extended attribute errors in basic-save-buffer-2
* lisp/files.el (basic-save-buffer-2): Give demoted errors when
reading extended attributes that fail (bug#43723).
2022-06-07 20:03:41 +02:00
Lars Ingebrigtsen
be02a32f47 Regenerated ldefs-boot.el
This is the first check-in after the loaddefs-gen.el rewrite.
2022-06-07 18:59:44 +02:00
Lars Ingebrigtsen
f0238d8bd3 Remove Mtn from vc-handled-backends
* lisp/vc/vc-hooks.el (vc-handled-backends): Remove the deprecate
vc-mtn backend.
2022-06-07 18:59:04 +02:00
Lars Ingebrigtsen
7815ebd25f Fix loaddefs-generate--rubric recorded name
* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric): Fix
the name that's recorded in the file -- this is only used by
loaddefs-gen now, I think.
2022-06-07 18:51:15 +02:00
Lars Ingebrigtsen
5ab66afa34 Make artist-mode work in zoomed buffers
* lisp/textmodes/artist.el (artist-mouse-draw-continously):
(artist-mouse-draw-continously):
(artist-mouse-draw-poly):
(artist-mouse-draw-1point):
(artist-mouse-draw-2points):
(artist-mouse-draw-2points): Work better when the window is zoomed
(bug#46035).
2022-06-07 18:35:00 +02:00
Lars Ingebrigtsen
17ed9a8039 Allow posn-col-row to return data on a per-window basis
* doc/lispref/commands.texi (Accessing Mouse): Document it.
* lisp/subr.el (posn-col-row): Extend to use window data.
2022-06-07 18:34:20 +02:00
Lars Ingebrigtsen
00a0226ba5 Allow hooks to alter the process in prolog-ensure-process
* lisp/progmodes/prolog.el (prolog-ensure-process): Start the mode
after starting the process, so that the mode hook can talk to the
process (bug#46003).
2022-06-07 16:39:22 +02:00
Stefan Monnier
a98413726f find-func.el: Fix bug#41104
* lisp/emacs-lisp/find-func.el (find-function-advised-original): Look
at the actual function definition rather than
`advice--symbol-function` which sometimes returns only the advice.

* test/lisp/emacs-lisp/find-func-tests.el
(find-func-tests--find-library-verbose): Add test.
2022-06-07 10:31:17 -04:00
Po Lu
3864308c20 Add selection stuff to DND tests
* test/lisp/dnd-tests.el (dnd-tests-selection-table): New
defvar.
(gui-set-selection): Actually implement in a way that validates
the local value and stores it for future use.
(dnd-tests-verify-selection-data): New function.
(dnd-tests-begin-text-drag): Add tests for the contents of
various selections.
2022-06-07 21:45:17 +08:00
Po Lu
6a4444aa39 Fix coding style of some Haiku files
* src/haiku_support.cc: (FrameResized):
(class EmacsView, AfterResize): Fix coding and initializer
style.

* src/haiku_support.h (struct haiku_resize_event): Rename
confusingly named fields.
* src/haikuterm.c (haiku_read_socket): Update accordingly.
2022-06-07 12:13:42 +00:00
Lars Ingebrigtsen
254d2a1477 Simplify mode line for vc-print-root-log
* lisp/vc/vc.el (vc-print-root-log): Don't display "from <file>"
(bug#45007).
2022-06-07 13:23:54 +02:00
Po Lu
4918ef0915 Fix more bugs with DND selection handling
* src/xterm.c (x_defer_selection_requests)
(x_release_selection_requests): New functions.
(x_dnd_begin_drag_and_drop): Use those functions to defer
selections instead.  Fix error signalled when ownership of
XdndSelection is lost.
(handle_one_xevent): Likewise.
2022-06-07 18:24:10 +08:00
Lars Ingebrigtsen
dc546d1ca0 Clarify highlight-changes-rotate-faces doc string
* lisp/hilit-chg.el (highlight-changes-rotate-faces): Doc string
clarification (bug#44150).
2022-06-07 12:22:10 +02:00
Po Lu
6fe133c3ae Remove mentions of GNOME MediaKeys from dbus documentation examples
* doc/misc/dbus.texi (Properties and Annotations):
* lisp/net/dbus.el (dbus-get-all-managed-objects): Remove
mentions of obsolete GNOME APIs from example text.
2022-06-07 15:44:05 +08:00
Po Lu
3bdeedd8ac Improve compatibility with some clients of the Motif drop protocol
* lisp/select.el (x-dnd-targets-list): New defvar.
(xselect-convert-to-targets): Convert XdndSelection based on the
DND targets list.
* src/xfns.c (Fx_begin_drag): Pass new argument.
* src/xselect.c (struct x_selection_request): New struct.
(x_push_current_selection_request):
(x_pop_current_selection_request): New functions.
(x_selection_request_lisp_error, x_reply_selection_request)
(x_handle_selection_request, x_convert_selection)
(syms_of_xselect_for_pdumper): Correctly handle recursive
requests for MULTIPLE by maintaining a stack of selection
requests, converted selections, and other data.
* src/xterm.c (x_dnd_begin_drag_and_drop): New argument
`selection_target_list'.  Bind it to the DND targets list.
(syms_of_xterm): New defvar and associated defsym.
* src/xterm.h: Update prototypes.
2022-06-07 13:49:41 +08:00
Po Lu
6871e649b5 Add new drag-and-drop test
* test/lisp/dnd-tests.el (dnd-tests-get-local-file-uri): New
test.
2022-06-07 13:07:26 +08:00
Po Lu
192de232bf Fix leak of event data on GTK+ 2.x
* src/xterm.c (handle_one_xevent): Fix goto XI_OTHER for
valuator motion events generated on scroll bars.
2022-06-07 12:59:37 +08:00
Po Lu
f6f5634378 Update Haiku drag-and-drop code
* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't allow
dropping on places other than the text area (it doesn't work).
Also respect mouse-yank-at-point.
2022-06-07 02:44:08 +00:00
Po Lu
c60cb3baa7 Don't allow dropping on invalid drop sites
* lisp/x-dnd.el (x-dnd-drop-data): If dropping on something
other than the text area, don't set point.
(x-dnd-handle-xdnd, x-dnd-handle-motif): Don't pretend dropping
on the mode line is ok.
2022-06-07 10:39:55 +08:00
Po Lu
cbc0d8f7c7 Don't display mouse face during mouse drag-and-drop
* lisp/mouse.el (mouse-drag-and-drop-region): Don't display
mouse face, since it leads to a lot of flicker.
2022-06-07 10:27:03 +08:00
Po Lu
e21c761d13 Prevent crashes with very large Motif targets tables
* src/xterm.c (xm_setup_dnd_targets): Catch errors around
xm_write_targets_table lest we get a BadAlloc error.
2022-06-07 09:45:41 +08:00
Po Lu
2267b48cac Fix two crashes when a display connection is lost
This fixes errors caused by invalid error traps being left on
the error handler stack if an IO error causes a non-local exit
out of the protected code, and another crash caused by
delete_frame trying to read async input.

* src/eval.c (unwind_to_catch, push_handler_nosignal): Save and
restore the X error handler stack.
* src/lisp.h (struct handler): [HAVE_X_WINDOWS]: New field
`x_error_handler_depth'.

* src/xterm.c (struct x_error_message_stack): Make string a
regular string.
(x_unwind_errors_to): New function.
(x_error_catcher, x_catch_errors_with_handler)
(x_uncatch_errors_after_check, x_uncatch_errors): Update the
stack depth.
(x_check_errors): Stop manually unwinding since unwind_to_catch
now does that for us.
(x_had_errors_p, x_clear_errors): Update for new type of
`string'.
(x_connection_closed): Block input between just before
delete_frame to when the terminal is unlinked.

* src/xterm.h: Update prototypes.
2022-06-07 09:26:15 +08:00
Lars Ingebrigtsen
8c252e2326 Fix execute-extended-command help text for remapped commands
* lisp/simple.el (execute-extended-command): Don't provide
misleading help text for remapped commands (bug#23543).
2022-06-06 16:43:12 +02:00
Stephen Berman
dc9337aacd Allow using xref buttons in non-*Help* buffers
* lisp/help-mode.el (help-buffer): Allow using the xref buttons in
non-*Help* buffers (bug#8147) (but display the result in a *Help*
buffer).
2022-06-06 16:12:39 +02:00
Eli Zaretskii
f3062c4104 ; * lisp/emacs-lisp/lisp.el (raise-sexp): Doc fix. (Bug#55788) 2022-06-06 17:10:21 +03:00