1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-24 13:32:41 -08:00
Commit graph

157149 commits

Author SHA1 Message Date
Po Lu
66aaedffd6 Don't rely on TARGETS to read selection targets for Motif DND
* lisp/x-dnd.el (x-dnd-types-alist):
(x-dnd-known-types): Fix formatting.
(x-dnd-xm-unpack-targets-table-header):
(x-dnd-xm-read-single-rec):
(x-dnd-xm-read-targets-table):
(x-dnd-xm-read-targets): New functions.
(x-dnd-handle-motif): Read targets from the targets table
of the drag window instead of the selection's TARGET target.
2022-06-10 11:45:49 +08:00
Po Lu
feb94707a9 Fix crashes in x_tooltip_window_to_frame on GTK
* src/xterm.c (x_tooltip_window_to_frame): Ignore all non-X
frames instead of trying to get their tooltip window.
2022-06-10 09:28:45 +08:00
Po Lu
6d2bad20bb * src/haikuselect.c (haiku_note_drag_motion): Only handle visible tip_f. 2022-06-10 01:15:25 +00:00
Po Lu
0e2f94ded0 Fix DND tooltip handling with tooltip-reuse-hidden-frame
* src/xterm.c (x_dnd_update_tooltip_position): Don't move window
if tip_f is not visible.
2022-06-10 08:58:51 +08:00
Eli Zaretskii
8ef3862fa0 Update the 'etags' test suite
* ETAGS.good_1:
* ETAGS_good_2:
* ETAGS_good_3:
* ETAGS_good_4:
* ETAGS_good_5:
* ETAGS_good_6: Adapt to recent changes in test sources.

* lib-src/etags.c (C_entries): Add commentary for resetting
bracelev.  (Bug#45246)
2022-06-09 20:33:43 +03:00
Eli Zaretskii
559c276942 ; * src/window.c (window_body_unit_from_symbol): Fix Lisp EQ. 2022-06-09 19:40:25 +03:00
Lars Ingebrigtsen
4ac18cc34a Adjust browse-url test after previous browse-url change 2022-06-09 17:13:58 +02:00
Lars Ingebrigtsen
835b431639 Make browse-url-encode-url encode even less
* lisp/net/browse-url.el (browse-url-encode-url): Don't encode
dollar signs, because that's out of spec (bug#55873).
2022-06-09 17:11:54 +02:00
Lars Ingebrigtsen
f0cd91067d Improve `C-h b' output for remapped commands.
* lisp/help.el (describe-map): Include the bindings of the
remapped commands (bug#14084).

This will result in output like this, instead of just listing the
remapped commands:

<remap> <display-buffer>                ido-display-buffer
C-x 4 C-o                               display-buffer
<remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
C-x 5 C-o                               display-buffer-other-frame
<remap> <insert-buffer>                 ido-insert-buffer
C-x x i                                 insert-buffer
<remap> <kill-buffer>                   ido-kill-buffer
C-x k                                   kill-buffer
<remap> <switch-to-buffer>              ido-switch-buffer
C-x b                                   switch-to-buffer
<remap> <switch-to-buffer-other-frame>  ido-switch-buffer-other-frame
C-x 5 b                                 switch-to-buffer-other-frame
<remap> <switch-to-buffer-other-window> ido-switch-buffer-other-window
C-x 4 b                                 switch-to-buffer-other-window
2022-06-09 16:41:03 +02:00
Lars Ingebrigtsen
8cb7682e88 New setting for mouse-drag-copy-region to not put "" onto kill ring
* doc/emacs/frames.texi (Mouse Commands): Document it.
* lisp/mouse.el (mouse-drag-copy-region): Add value (bug#17211)
for not putting "" strings onto the kill ring.
(mouse-set-region, mouse-save-then-kill): Use the new value.
2022-06-09 15:58:28 +02:00
Po Lu
e99f41f03a Fix recalculation of `icon-title-format' after a frame is iconified
Previously it would only happen upon the next mode line
redisplay, meaning that just pressing C-z would not update the
implicit title, since C-z doesn't cause a redisplay.

* src/dispextern.h: Update prototypes.
* src/frame.h (SET_FRAME_ICONIFIED): De-slugify.  Call
`gui_consider_frame_title', since `icon-title-format' might be
different from the current frame title.
* src/xdisp.c (gui_consider_frame_title): Export (also in
dispextern.h).  (bug#55850)
2022-06-09 21:50:37 +08:00
Lars Ingebrigtsen
39d2efbfae Make `line-number-at-pos' work more like in earlier Emacs versions
* src/fns.c (Fline_number_at_pos): Allow calling with position
outside the region if called with ABSOLUTE non-nil (bug#55847).
This isn't announced in the doc string, but makes function
compatible with the version in earlier Emacs versions.
2022-06-09 14:43:40 +02:00
Po Lu
64b5fd2e43 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs 2022-06-09 19:44:31 +08:00
Po Lu
c29fb3e0d8 Never return tooltip frames from ns-begin-drag
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]):
([EmacsWindow beginDrag:forPasteboard...]): Don't return frame
if tooltip.
2022-06-09 19:42:56 +08:00
Eli Zaretskii
06173e6949 ; Fix typos in Kharoshthi script support
* etc/HELLO:
* lisp/leim/quail/misc-lang.el ("kharoshthi"):
* lisp/language/misc-lang.el ("Kharoshthi"): Fix typos.
2022-06-09 13:27:34 +03:00
Po Lu
e563020eea Handle monitor attribute updates during drag-and-drop
* src/xterm.c (x_monitors_changed_cb):
(handle_one_xevent): Set x_dnd_monitors during monitor changes.
2022-06-09 18:21:16 +08:00
Stefan Baums
521de5ab62 Add support for the Kharoshthi script
* etc/NEWS: Announce the new language environment and script.
* etc/HELLO: Add Kharoshthi greeting.

* lisp/leim/quail/misc-lang.el ("kharoshthi"): New input method.
* lisp/language/misc-lang.el ("Kharoshthi"): New language
environment.  Set up composition rules for Kharoshthi.
(Bug#55539)
2022-06-09 12:05:28 +03:00
Po Lu
677367ae65 Satisfy GCC warnings on the GNUstep build
* src/nsfns.m (ns_move_tooltip_to_mouse_location):
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Pacify GCC.
2022-06-09 16:48:17 +08:00
Po Lu
dd8db560c2 Disable tooltip timeouts for drag-and-drop tooltips
* lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip):
Don't time out the created tooltip.
2022-06-09 16:44:17 +08:00
Eli Zaretskii
7e5aab18dd Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs 2022-06-09 11:38:08 +03:00
Po Lu
e7ac2ac4e0 Implement `follow-tooltip' on NS as well
* lisp/term/ns-win.el (x-begin-drag): Pass `follow-tooltip'.
* src/nsfns.m (Fx_show_tip): Record last dx and dy.
(syms_of_nsfns): New staticpros.
* src/nsmenu.m ([EmacsTooltip moveTo:]): New method.

* src/nsselect.m (Fns_begin_drag): New parameter
`follow-tooltip'.

* src/nsterm.h (@interface EmacsWindow):
(EmacsTooltip): Update prototypes.
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Move any
tooltip to the right location.
([EmacsWindow beginDrag:forPasteboard...]): New parameter
`followTooltip'.
2022-06-09 16:34:18 +08:00
Po Lu
0ba43e15d9 Note caveats of `follow-tooltip' with system tooltips
* lisp/mouse.el (mouse-drag-and-drop-region): Turn off system
tooltips inside.
* src/xfns.c (Fx_begin_drag): Say that follow-tooltip doesn't
work with system tooltips.
2022-06-09 15:44:51 +08:00
Eli Zaretskii
b2eb627c0d ; * doc/lispref/processes.texi (Bindat Types): Fix wording. (Bug#55815) 2022-06-09 10:28:25 +03:00
Richard Hansen
ed9b261ae2 bindat: Improve str, strz documentation
* doc/lispref/processes.texi (Bindat Types): Expand the documentation
for the `str' and `strz' types to clarify expectations and explain
edge case behavior.
2022-06-09 10:26:22 +03:00
Po Lu
0936d6fa20 Implement `follow-tooltip' for DND on Haiku
* lisp/term/haiku-win.el (x-begin-drag): Implement
`follow-tooltip'.
* src/haikufns.c (Fx_show_tip): Record last dx and dy.
(syms_of_haikufns): New staticpros.

* src/haikuselect.c (haiku_unwind_drag_message): Clear new flag.
(Fhaiku_drag_message): New argument `follow-tooltip'.  Set new
flag.
(haiku_dnd_compute_tip_xy): New function.
(haiku_note_drag_motion): Move tooltip if flag is true.

* src/haikuterm.c (haiku_read_socket): Don't generate help event
if mouse moves onto a tooltip during DND.
* src/haikuterm.h: Update prototypes.
2022-06-09 07:21:42 +00:00
Jim Porter
43f8690ebf Account for remapped faces in $COLUMNS and $LINES in Eshell
* src/window.h (window_body_unit): New enum...
(window_body_width): ... use it.

* src/window.c (window_body_unit_from_symbol): New function.
(window_body_height, window_body_width): Make PIXELWISE a
'window_body_unit'.
(window-body-height, window-body-width): Accept 'remap' for PIXELWISE.
(window-lines-pixel-dimensions, window_change_record_windows)
(run_window_change_functions, resize_frame_windows, grow_mini_window)
(shrink_mini_window, scroll-left, scroll-right): Update calls to
'window_body_height' and 'window_body_width'.

* src/indent.c (compute_motion): Update calls to 'window_body_width'.

* lisp/eshell/em-ls.el (eshell-ls-find-column-widths)
(eshell-ls-find-column-lengths): Use 'window-body-width'.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Use
'window-body-width' and 'window-body-height'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/window-height)
(esh-var-test/window-width): Rename to...
(esh-var-test/lines-var, esh-var-test/columns-var): ... and update
expected value.

* doc/lispref/windows.texi (Window Sizes): Document new behavior of
PIXELWISE argument for 'window-body-width' and 'window-body-height'.

* etc/NEWS: Announce this change (bug#55696).
2022-06-09 10:08:15 +03:00
Eli Zaretskii
d18e60fef1 Revert "* src/comp.c (Fcomp_el_to_eln_filename): Update error message."
This reverts commit ec987e3e17.
This change was installed on the emacs-28 branch instead.
2022-06-09 09:56:59 +03:00
Juri Linkov
d7270b4445 Allow C-x 4 4, C-x 5 5, C-x t t to handle commands that use switch-to-buffer
* lisp/window.el (display-buffer-override-next-command):
Temporarily set switch-to-buffer-obey-display-actions to t,
and revert back to the original value afterwards.
This allows other-window-prefix, other-frame-prefix, other-tab-prefix,
windmove-display-in-direction to override the default behavior of
commands that use switch-to-buffer.
https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00483.html
2022-06-09 09:41:52 +03:00
Jeff Walsh
ec987e3e17 * src/comp.c (Fcomp_el_to_eln_filename): Update error message. 2022-06-09 08:35:41 +02:00
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