aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mouse.el (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Use single-arg form of `signal` to re-throw an errorStefan Monnier23 hours1-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/vc/smerge-mode.el (smerge-extend): * lisp/vc/diff-mode.el (diff-beginning-of-file-and-junk): * lisp/transient.el (transient--with-emergency-exit): * lisp/textmodes/tex-mode.el (latex-forward-sexp): * lisp/tar-mode.el (tar-mode): * lisp/savehist.el (savehist--reload): * lisp/progmodes/octave.el (inferior-octave-resync-dirs): * lisp/progmodes/js.el (js--re-search-forward): * lisp/plstore.el (plstore--decrypt): * lisp/net/dbus.el (dbus-ignore-errors, dbus-register-signal) (dbus-handle-event): * lisp/mouse.el (mouse-drag-track, mouse-drag-region-rectangle): * lisp/minibuffer.el (completion-pcm--find-all-completions): * lisp/mail/rfc2231.el (rfc2231-parse-string): * lisp/mail/rfc2047.el (rfc2047-encode-region): * lisp/jit-lock.el (jit-lock-fontify-now): * lisp/international/ja-dic-utl.el (skkdic-lookup-key): * lisp/gnus/nnselect.el (nnselect-generate-artlist): * lisp/gnus/mml-sec.el (mml-secure-epg-encrypt, mml-secure-epg-sign): * lisp/gnus/mail-source.el (mail-source-fetch-pop) (mail-source-check-pop): * lisp/gnus/gnus-art.el (gnus-article-read-summary-keys): * lisp/files.el (basic-save-buffer-2, files--ensure-directory) (files--force, copy-directory): * lisp/eshell/esh-io.el (eshell-output-object-to-target): * lisp/epa.el (epa-decrypt-file, epa-verify-file, epa-sign-file) (epa-encrypt-file, epa-decrypt-region, epa-verify-region) (epa-sign-region, epa-encrypt-region, epa-delete-keys) (epa-export-keys, epa-insert-keys): * lisp/emacs-lisp/package.el (package--unless-error): * lisp/emacs-lisp/multisession.el (multisession--read-file-value): * lisp/emacs-lisp/lisp.el (up-list-default-function): * lisp/desktop.el (desktop-kill): * lisp/calendar/time-date.el (date-to-time): * lisp/calendar/appt.el (appt-display-message): * lisp/calc/calc.el (calc-do): * lisp/bookmark.el (bookmark-handle-bookmark): * src/fileio.c (report_file_errno): * lisp/vc/vc.el (vc-checkout, vc-pull): Use `(signal err)` instead of `(signal (car err) (cdr err))`.
* ; Add 2026 to copyright years.Sean Whitton2026-01-011-1/+1
|
* Fix mouse dragging on touch screensPo Lu2025-11-251-9/+14
| | | | | | | | | | | | | | | | | | | * lisp/mouse.el (mouse-position-for-drag-line): New function; return position of active touch screen tool if a sequence is being translated into mouse movement events, and the last mouse position otherwise. (mouse-drag-line): Invoke `mouse-position-for-drag-line' rather than reading the mouse position manually. * lisp/touch-screen.el (touch-screen-current-tool): New 10th field holding the frame-relative last attested position of this tool. (touch-screen-relative-xy): Clarify doc string. (touch-screen-handle-point-update): Update the said field with POSN's position relative to its frame. (touch-screen-handle-touch): Initialize the 10th field of new tool lists with such a position. (touch-screen-last-drag-position): New function.
* Restore mouse line dragging in character increments (Bug#79351)Martin Rudalics2025-09-271-78/+140
| | | | | | * lisp/mouse.el (mouse-drag-line): Restore dragging in character increments and make it the default (Bug#79351). * etc/NEWS: Mention restored behavior of mouse line dragging.
* New mode 'mouse-shift-adjust-mode' for S-<mouse-1>Juri Linkov2025-09-161-7/+54
| | | | | | | | | * lisp/mouse.el (mouse-shift-adjust-mode-map): New variable. (mouse-shift-adjust-mode): New minor mode (bug#79453). (mouse-shift-adjust-point): New variable. (mouse-drag-region-shift-adjust): New command. (mouse-drag-track, mouse-set-region): Use 'mouse-shift-adjust-point' to take into account the already existing region boundary.
* Context menu related fixes (bug#64980)Juri Linkov2025-09-161-24/+1
| | | | | | | | | * etc/PROBLEMS: Suggest how to keep context menus open on Lucid. * lisp/mouse.el (context-menu-mode-map): Bind [mouse-3] to 'ignore' instead of 'nil' to not fallback to the default binding. (mouse--drag-start-event): Remove unused variable. (mouse-undouble-last-event): Remove unused function.
* Add "Send to..." context menu item to mouse.elAlvaro Ramirez2025-07-191-1/+16
| | | | | | | | | | | | * lisp/send-to.el: New package implements sending files/region. * lisp/mouse.el (context-menu-send-to): Add "Send to..." context menu. * lisp/term/ns-win.el (ns-send-items): Expose native macOS send API. * src/nsfns.m (ns-send-items): Implement native macOS sending. * etc/NEWS: Announce the new feature.
* Implement dragging and resizing of tty child framesMartin Rudalics2025-03-171-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (face-spec-recalc): Don't set scroll-bar-foreground and scroll-bar-background parameters on ttys. * lisp/mouse.el (mouse-drag-frame-resize) (mouse-drag-frame-move): On ttys call 'mouse-position-in-root-frame' to get position of child frame to resize or drag. * lisp/xt-mouse.el (xterm-mouse-event): Handle events on child frame decorations as if they happened on the internal border to find out whether a user wants to drag or resize a child frame. * src/frame.c (frame_internal_border_part): Define for ttys too. (Fmouse_position_in_root_frame): New function. * src/frame.h (internal_border_part): Define for ttys too. * src/keyboard.c (internal_border_parts): Define for ttys too. (frame_border_side): New enum. (make_lispy_position): Handle events on tty child frames. (Fposn_at_x_y): Accept -1 for Y so we can handle a position on the top decoration of a tty child frame. * src/term.c (tty_frame_at): Handle case where X and Y denote a position on a tty child frame's decoration. * src/window.c (Fwindow_at): Handle case where X and Y denote a position on the decoration of a tty child frame which we pretend as belonging to that child frame (and not to its root).
* ; Fix documentation of recent change in mouse.elEli Zaretskii2025-03-151-1/+4
| | | | | | * lisp/mouse.el (mouse-event-areas-with-no-buffer-positions): Doc fix. (mouse-posn-property): Add commentary.
* Fix mouse-posn-propertyGerd Möllmann2025-03-151-7/+18
| | | | | | | * doc/lispref/commands.texi (Click Events): Mention menu-bar. * lisp/mouse.el (mouse-event-areas-with-no-buffer-positions): New defvar including all areas mentioned in the Lisp reference. (mouse-posn-property): Use it.
* Implement tab line dragging with mouse (Bug#76084)Martin Rudalics2025-02-101-5/+10
| | | | | | | | | * lisp/mouse.el (mouse-drag-line): Allow tab line dragging if there's a window above. Consider tab line height when calculating 'position'. Add 'tab-line' binding to transient map. (mouse-drag-tab-line): Have it drag the tab line only (and not the entire frame) when the tab line is between two windows.
* * lisp/mouse.el (mouse-skip-word): Avoid errors at EOB. (Bug#75965)Eli Zaretskii2025-02-081-1/+7
|
* Merge branch 'scratch/no-purespace' into 'master'Stefan Kangas2025-02-011-75/+70
|\
| * Don't call purecopy in mouse.elStefan Kangas2024-12-121-75/+70
| | | | | | | | | | * lisp/mouse.el (context-menu-entry, mouse-buffer-menu-mode-groups) (x-fixed-font-alist): Remove calls to purecopy.
* | Fix mouse clicks on characters with parenthesis syntaxEli Zaretskii2025-01-041-24/+24
| | | | | | | | | | | | * lisp/mouse.el (context-menu-region, mouse-skip-word) (mouse-start-end): Use 'syntax-after' instead of 'char-syntax', to pay attention to 'syntax-table' text properties. (Bug#74415)
* | Update copyright year to 2025Paul Eggert2025-01-011-1/+1
|/ | | | Run "TZ=UTC0 admin/update-copyright".
* (mouse-wheel-buttons): Map old-style wheel buttons to actual wheel eventsStefan Monnier2024-04-091-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the handling of the old X11 convention that uses mouse-4/5/6/7 events to represent wheel events: instead of asking downstream packages to use the `mouse-wheel-*-event` variables to know which events represent wheel events, use new var `mouse-wheel-buttons` to directly convert those events into the standard `wheel-up/down/left/right` events used everywhere else. This will simplify the work of packages which can thus just bind their commands to `wheel-up/down/left/right`. * lisp/mouse.el (mouse-wheel-buttons): New custom variable. * src/keyboard.c (make_lispy_event): Adjust for "wheel-clicks" on the tab-bar. * src/xterm.c (x_construct_mouse_click): Add `xi2` argument and obey `mouse-wheel-buttons` variable. (handle_one_xevent): Adjust calls accordingly. (syms_of_xterm): Define the `mouse-wheel-buttons` and the `wheel-up/down/left/right`symbols. * lisp/xt-mouse.el: Don't require `mwheel` any more. (xterm-mouse--same-button-p): Delete function. (xterm-mouse--read-event-sequence): Use `mouse-wheel-buttons`. * lisp/mwheel.el (mouse-wheel-up-event, mouse-wheel-down-event) (mouse-wheel-left-event, mouse-wheel-right-event): Make obsolete. (mouse-wheel-obey-old-style-wheel-buttons): Delete variable. * lisp/completion-preview.el (completion-preview--mouse-map): * lisp/progmodes/flymake.el (flymake--mode-line-counter-map): * lisp/edmacro.el (edmacro-fix-menu-commands): Silence warnings.
* Context menu for project (bug#69566)Juri Linkov2024-03-141-0/+7
| | | | | | | | | | | | | | * lisp/menu-bar.el (menu-bar-project-item): New variable from 'project-menu-entry'. (menu-bar-tools-menu): Use 'menu-bar-project-item'. * lisp/mouse.el (context-menu-functions): Add 'context-menu-project' to choice. (context-menu-project): New function. * lisp/progmodes/project.el (project-menu-entry): Remove variable. (project-mode-line-map): Use 'menu-bar-project-item' instead of 'project-menu-entry'.
* New property 'context-menu-functions' (bug#62250)Juri Linkov2024-03-051-4/+10
| | | | | | | | | | | | | | * lisp/iimage.el (iimage-mode-buffer): Set context-menu-functions text property to '(image-context-menu)'. * lisp/image.el (image-context-menu): New function. (put-image): Set context-menu-functions overlay property to '(image-context-menu)'. (insert-image, insert-sliced-image): Set context-menu-functions text property to '(image-context-menu)'. * lisp/mouse.el (context-menu-map): Use mouse-posn-property 'context-menu-functions' and call its funs at the end.
* Merge from savannah/emacs-29Po Lu2024-01-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dc4e6b13296 ; Update copyright years in more files 64b37776318 ; Run set-copyright from admin.el 8e1c56ae467 ; Add 2024 to copyright years # Conflicts: # doc/misc/modus-themes.org # doc/misc/texinfo.tex # etc/NEWS # etc/refcards/ru-refcard.tex # etc/themes/modus-operandi-theme.el # etc/themes/modus-themes.el # etc/themes/modus-vivendi-theme.el # lib/alloca.in.h # lib/binary-io.h # lib/c-ctype.h # lib/c-strcasecmp.c # lib/c-strncasecmp.c # lib/careadlinkat.c # lib/cloexec.c # lib/close-stream.c # lib/diffseq.h # lib/dup2.c # lib/filemode.h # lib/fpending.c # lib/fpending.h # lib/fsusage.c # lib/getgroups.c # lib/getloadavg.c # lib/gettext.h # lib/gettime.c # lib/gettimeofday.c # lib/group-member.c # lib/malloc.c # lib/md5-stream.c # lib/md5.c # lib/md5.h # lib/memmem.c # lib/memrchr.c # lib/nanosleep.c # lib/save-cwd.h # lib/sha1.c # lib/sig2str.c # lib/stdlib.in.h # lib/strtoimax.c # lib/strtol.c # lib/strtoll.c # lib/time_r.c # lib/xalloc-oversized.h # lisp/auth-source-pass.el # lisp/emacs-lisp/lisp-mnt.el # lisp/emacs-lisp/timer.el # lisp/info-look.el # lisp/jit-lock.el # lisp/loadhist.el # lisp/mail/rmail.el # lisp/net/ntlm.el # lisp/net/webjump.el # lisp/progmodes/asm-mode.el # lisp/progmodes/project.el # lisp/progmodes/sh-script.el # lisp/textmodes/flyspell.el # lisp/textmodes/reftex-toc.el # lisp/textmodes/reftex.el # lisp/textmodes/tex-mode.el # lisp/url/url-gw.el # m4/alloca.m4 # m4/clock_time.m4 # m4/d-type.m4 # m4/dirent_h.m4 # m4/dup2.m4 # m4/euidaccess.m4 # m4/fchmodat.m4 # m4/filemode.m4 # m4/fsusage.m4 # m4/getgroups.m4 # m4/getloadavg.m4 # m4/getrandom.m4 # m4/gettime.m4 # m4/gettimeofday.m4 # m4/gnulib-common.m4 # m4/group-member.m4 # m4/inttypes.m4 # m4/malloc.m4 # m4/manywarnings.m4 # m4/mempcpy.m4 # m4/memrchr.m4 # m4/mkostemp.m4 # m4/mktime.m4 # m4/nproc.m4 # m4/nstrftime.m4 # m4/pathmax.m4 # m4/pipe2.m4 # m4/pselect.m4 # m4/pthread_sigmask.m4 # m4/readlink.m4 # m4/realloc.m4 # m4/sig2str.m4 # m4/ssize_t.m4 # m4/stat-time.m4 # m4/stddef_h.m4 # m4/stdint.m4 # m4/stdio_h.m4 # m4/stdlib_h.m4 # m4/stpcpy.m4 # m4/strnlen.m4 # m4/strtoimax.m4 # m4/strtoll.m4 # m4/time_h.m4 # m4/timegm.m4 # m4/timer_time.m4 # m4/timespec.m4 # m4/unistd_h.m4 # m4/warnings.m4 # nt/configure.bat # nt/preprep.c # test/lisp/register-tests.el
| * ; Add 2024 to copyright yearsPo Lu2024-01-021-1/+1
| |
* | New defgroup pixel-scroll-precisionStefan Kangas2023-09-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/pixel-scroll.el (pixel-scroll-precision): New defgroup. (pixel-scroll-precision-use-momentum) (pixel-scroll-precision-momentum-tick) (pixel-scroll-precision-momentum-seconds) (pixel-scroll-precision-momentum-min-velocity) (pixel-scroll-precision-initial-velocity-factor) (pixel-scroll-precision-large-scroll-height) (pixel-scroll-precision-interpolation-total-time) (pixel-scroll-precision-interpolation-factor) (pixel-scroll-precision-interpolation-between-scroll) (pixel-scroll-precision-interpolate-page) (pixel-scroll-precision-interpolate-mice): Move to above new defgroup. (Bug#57970) * lisp/mouse.el (mouse): Remove stale comment.
* | Correct many instances of ``allows to''Po Lu2023-09-101-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refer to: lists.gnu.org/archive/html/emacs-devel/2016-01/msg01598.html * doc/emacs/frames.texi (Tab Bars): * doc/emacs/maintaining.texi (Tag Syntax): * doc/lispref/compile.texi (Native Compilation): * doc/lispref/control.texi (Destructuring with pcase Patterns): * doc/lispref/display.texi (Overlay Properties, Glyphless Chars): * doc/lispref/frames.texi (Size Parameters, Layout Parameters) (Child Frames): * doc/lispref/minibuf.texi (Minibuffer Windows): * doc/lispref/processes.texi (Asynchronous Processes): * doc/lispref/windows.texi (Precedence of Action Functions) (Mouse Window Auto-selection): * doc/misc/autotype.texi (Autoinserting): * doc/misc/efaq.texi (New in Emacs 28): * doc/misc/idlwave.texi (Examining Variables): * doc/misc/ses.texi (Quick Tutorial, Standard formula functions): * doc/misc/tramp.texi (External methods, FUSE-based methods): * lisp/comint.el (comint-insert-previous-argument-from-end): * lisp/emacs-lisp/rmc.el (read-multiple-choice): * lisp/gnus/gnus-util.el: * lisp/mail/rmailsum.el (rmail-summary-progressively-narrow): * lisp/mouse.el (mouse-drag-track): * lisp/net/tramp-sudoedit.el: * lisp/obsolete/landmark.el: * lisp/org/org.el (org-startup-truncated, org-file-apps): * lisp/pixel-scroll.el (pixel-scroll-precision-mode): * lisp/progmodes/cperl-mode.el (cperl-praise): * lisp/simple.el (yank-from-kill-ring, kill-visual-line): * lisp/window.el (delete-window-choose-selected): * src/ChangeLog.11: * src/xdisp.c (syms_of_xdisp): * src/xterm.c (handle_one_xevent): The construct ``allows to <infinitive>'' is not English inasmuch as no direct object to ``allows'' is provided. Correct and rephrase each instance of such a construct within our documentation and commentary.
* | Merge remote-tracking branch 'origin/master' into feature/androidPo Lu2023-07-191-13/+35
|\ \
| * | Improve reliability of minor mode menu dispatchPo Lu2023-07-191-13/+35
| | | | | | | | | | | | | | | | | | * lisp/mouse.el (minor-mode-menu-from-indicator): Instead of using the word at point, search for a matching enabled minor mode from the beginning of the string object when mode-line-compact is enabled.
* | | Merge remote-tracking branch 'origin/master' into feature/androidPo Lu2023-07-181-3/+25
|\ \ \ | |/ /
| * | Fix display of minor mode menus when mode-line-compact is enabledPo Lu2023-07-181-3/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/mouse.el (minor-mode-menu-from-indicator): New arg WINDOW. If INDICATOR is a string object and mode-line-compat is enabled within WINDOW, use the symbol within the object at its position instead. (mouse-minor-mode-menu): Pass posn-object and posn-window to minor-mode-menu-from-indicator.
* | | Update Android portPo Lu2023-07-171-3/+9
|/ / | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Touchscreen Events): Document meaning of `mouse-1-menu-command'. * lisp/mouse.el (minor-mode-menu-from-indicator): New arg EVENT. Give it to popup-menu. (mouse-minor-mode-menu): Use posn specified within EVENT. * lisp/touch-screen.el (touch-screen-handle-touch): Fix interactive translation. Treat commands labeled `mouse-1-menu-command' like ordinary keymaps.
* | Merge from origin/emacs-29Eli Zaretskii2023-04-151-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5ef7ff05736 ; Start a new ChangeLog.4 file. 11126c6d30a Fix 'C-h k' for "Paste from Kill Menu" in context menus 74ddfe811f9 ; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (b... 08cda286c3f Improve the documentation of the XDS support 14d1c00e806 Allow reindentation of images inserted by 'mm-inline-image' b63a9eda01c Fix "C-h k" and "C-h c" with Paste from Kill Menu b36c21e27dc Change cursor color on NS port when it matches the face b... 96714c106b7 Improve documentation of image-related commands 6a2863ca016 Fix handling of sliced images 5be79fd05a5 ; * etc/NEWS: Announce 'cyrillic-mongolian' IM. ca1a0fda98a ; Fix last change. ce63462dbda Add cyrillic-mongolian input method 58801792706 ; Minor addition to the Emacs FAQ 88847dee125 Jsonrpc: don't bind inhibit-read-only to t so early cb8c87a423a Allow active region when IM is used # Conflicts: # etc/NEWS
| * Fix 'C-h k' for "Paste from Kill Menu" in context menusEli Zaretskii2023-04-081-1/+2
| | | | | | | | | | | | * lisp/mouse.el (context-menu-region): Make the entries be symbols, not just integers, to prevent "C-h c" from interpreting them as character keys. (Bug#62626)
* | Merge from origin/emacs-29Eli Zaretskii2023-01-011-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | cae528457c ; Add 2023 to copyright years. b394359261 Improve documentation of 'isearch-open-overlay-temporary' ab3210e709 Document 'use-package' in the 2 main manuals # Conflicts: # etc/refcards/ru-refcard.tex # lib/explicit_bzero.c # m4/explicit_bzero.m4
| * ; Add 2023 to copyright years.Eli Zaretskii2023-01-011-1/+1
| |
* | New option for selecting symbols by double-clickingEli Zaretskii2022-12-161-2/+18
|/ | | | | | | * lisp/mouse.el (mouse-1-double-click-prefer-symbols): New user option. (mouse-skip-word): If 'mouse-1-double-click-prefer-symbols' is non-nil, skip over the entire symbol at point. (Bug#60080)
* Avoid signaling args-out-of-range in mouse.elEli Zaretskii2022-11-231-0/+1
| | | | | | * lisp/mouse.el (mouse-posn-property): Avoid signaling args-out-of-range errors when mode-line format uses min-width 'display' property. (Bug#59452)
* Fix some no-X build warningsLars Ingebrigtsen2022-08-221-0/+3
| | | | | | | | | | | | | | * lisp/cus-edit.el (fringe-bitmap-p): Autoload. * lisp/image.el (clear-image-cache): Declare. * lisp/mouse.el (dnd-begin-file-dram): Autoload. * lisp/thumbs.el (image-supported-file-p): Declare (bug#57342). * lisp/mail/rmailmm.el (rmail-mime-set-bulk-data): * lisp/emacs-lisp/icons.el (icons--create): Avoid warnings on no-X builds.
* ; * lisp/mouse.el: Delete stale comment.Stefan Kangas2022-08-091-3/+1
|
* ; Fix typos.Mattias EngdegÄrd2022-07-021-3/+3
|
* Make <mouse-2> in mode line more careful as wellVisuwesh2022-06-261-3/+6
| | | | | | * lisp/mouse.el (mouse-delete-other-windows): Only delete other windows if the user didn't move the cursor off the mode-line (bug#56198).
* Make <mouse-3> in the mode line more carefulVisuwesh2022-06-261-1/+7
| | | | | | * lisp/mouse.el (mouse-delete-window): Only delete the window if the user hasn't moved point out of the mode line before releasing the button (bug#56198).
* Allow appending to the kill ring with mouse selectionsLars Ingebrigtsen2022-06-201-2/+5
| | | | | | | | | * lisp/bindings.el (ignore-preserving-kill-region): New function. (global-map): Use it. * lisp/mouse.el (mouse-set-region, mouse-drag-region) (mouse-drag-track): Allow appending to kill ring with mouse selections (bug#32747).
* New setting for mouse-drag-copy-region to not put "" onto kill ringLars Ingebrigtsen2022-06-091-3/+17
| | | | | | | * 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.
* Disable tooltip timeouts for drag-and-drop tooltipsPo Lu2022-06-091-1/+4
| | | | | * lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip): Don't time out the created tooltip.
* Note caveats of `follow-tooltip' with system tooltipsPo Lu2022-06-091-0/+3
| | | | | | | * 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.
* Also show mouse DND tooltip contents during interprogram drag-and-dropPo Lu2022-06-091-2/+1
| | | | | | | | | | | | | | | | | | | | | | * 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.
* Don't display mouse face during mouse drag-and-dropPo Lu2022-06-071-0/+1
| | | | | * lisp/mouse.el (mouse-drag-and-drop-region): Don't display mouse face, since it leads to a lot of flicker.
* Improve doc of `mouse-drag-mode-line-buffer'Po Lu2022-06-041-1/+4
| | | | | | | * doc/emacs/frames.texi (Mouse Commands): Document `mouse-drag-mode-line-buffer'. * etc/NEWS: Explain where that option is supported. * lisp/mouse.el (mouse-drag-mode-line-buffer): Likewise.
* Add new user option `mouse-drag-mode-line-buffer'Po Lu2022-06-031-1/+29
| | | | | | | * etc/NEWS: Announce new option. Also add missing entries for an earlier change. * lisp/mouse.el (mouse-drag-mode-line-buffer): New user option. (mouse-drag-mode-line): Implement that option.
* Fix help-echo tooltips interfering with mouse drag-and-dropPo Lu2022-06-021-365/+378
| | | | | | * lisp/mouse.el (mouse-drag-and-drop-region): Disable tooltip-mode while mouse drag-and-drop is in progress. Also restore state correctly in some more cases.
* Improve mouse draggingPo Lu2022-05-121-1/+10
| | | | | | * lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip): Respect foreground and background parameters. (mouse-drag-and-drop-region): Enable fine grained tracking.
* Fix handling double-click-time nil or tStefan Kangas2022-05-021-0/+11
| | | | | | | | | | | | | | * lisp/mouse.el (mouse-double-click-time): New function to always return a number for `double-click-time'. * lisp/emulation/viper-mous.el (viper-multiclick-timeout): * lisp/foldout.el (foldout-mouse-swallow-events): * lisp/help.el (help--read-key-sequence): * lisp/org/org-mouse.el (org-mouse-show-context-menu): Use 'mouse-double-click-time' instead of 'double-click-time'. * src/keyboard.c (syms_of_keyboard): Mention 'mouse-double-click-time' in doc string of 'double-click-time'. * test/lisp/mouse-tests.el (mouse-test-mouse-double-click-time): New test.