Po Lu [Sat, 23 Jul 2022 01:35:20 +0000 (09:35 +0800)]
Improve efficiency of DND tooltip movement
* src/xterm.c (x_dnd_begin_drag_and_drop): Clear new flag.
(x_dnd_update_tooltip_position): Save last tooltip X and Y
somewhere, so we don't move it upon client lists being updated.
Po Lu [Fri, 22 Jul 2022 07:37:28 +0000 (15:37 +0800)]
Fix handling hscroll during drag-and-drop
* lisp/x-dnd.el (x-dnd-hscroll-flags): Delete function.
(x-dnd-get-modifiers, x-dnd-wheel-modifier-type): New functions.
(x-dnd-mwheel-scroll): Use that to determine hscroll instead.
* src/window.c (set_window_hscroll): Mark window as needing
redisplay if the hscroll really changed.
Po Lu [Fri, 22 Jul 2022 01:38:32 +0000 (09:38 +0800)]
Fix posn-timestamp of scroll bar events on GTK
* src/xterm.c (x_get_last_toolkit_time): New function.
(x_scroll_bar_to_input_event)
(x_horizontal_scroll_bar_to_input_event): Use it to retrieve
toolkit time.
(xg_scroll_callback, xg_end_scroll_callback): Set last user time
if possible.
Stefan Monnier [Thu, 21 Jul 2022 22:39:11 +0000 (18:39 -0400)]
(compilation-parse-errors-function): Remove obsolete var
* lisp/progmodes/compile.el (compilation-parse-errors-function): Remove.
(compilation--parse-region): Simplify accordingly.
(compilation--compat-parse-errors): Remove function, not used any more.
(compilation-error-list, compilation-parsing-end)
(compilation-old-error-list): Remove vars, not used any more.
(compilation-last-buffer): Mark as obsolete (sadly, forgot to do that
back in Emacs-22).
* lisp/textmodes/tex-mode.el: Remove old code that was needed for
Emacs<24.
* lisp/progmodes/prolog.el (prolog-consult-compile): Remove long-dead code.
(compilation-parse-errors-function): Remove declaration, not used any more.
(prolog-parse-sicstus-compilation-errors): Remove function, not used any more.
Stefan Kangas [Thu, 21 Jul 2022 19:07:54 +0000 (21:07 +0200)]
image-dired: Don't end messages with "."
* lisp/image-dired.el (image-dired-toggle-dired-display-properties)
(image-dired--on-file-in-dired-buffer)
(image-dired-thumbnail-set-image-description)
(image-dired-mark-tagged-files)
(image-dired-dired-edit-comment-and-tags)
(image-dired-modify-mark-on-thumb-original-file): Don't end messages
with "." to better comply with '(elisp) Programming Tips'.
* src/xdisp.c (redisplay_window): Increase the threshold above which
long lines detection is performed in the buffer. This should avoid
triggering that detection for most simple editing operations.
* src/lisp.h (modiff_incr): Explain why the counter is incremented
logarithmically.
* src/buffer.h (struct buffer_text): Adapt the comment about the
'modiff' field accordingly.
* src/buffer.c (modify_overlay): Increase the counter by 1 instead of
the size of the buffer section on which the overlay is placed.
* lisp/subr.el (lsh): Note the general preference for `ash`.
* lisp/emacs-lisp/shortdoc.el (number): Remove entry for `lsh`.
It was identical to that for `ash` which is misleading.
Shortdoc is very helpful for finding the right function to use,
and `lsh` is just for compatibility at this point.
Po Lu [Wed, 20 Jul 2022 11:05:58 +0000 (19:05 +0800)]
Fix calculation of default highlightForeground in the lucid menu bar
* lwlib/xlwmenu.c (xlwMenuResources, display_menu_item)
(make_drawing_gcs, make_shadow_gcs, openXftFont, XlwMenuRealize)
(XlwMenuSetValues): Use -1 as the default for
highlight_foreground. Replace that with the normal foreground
when creating GCs. Reported by Colin Baxter
<m43cap@yandex.com>.
Po Lu [Wed, 20 Jul 2022 07:37:24 +0000 (07:37 +0000)]
Implement wheel movement during DND on Haiku
* lisp/term/haiku-win.el (haiku-dnd-wheel-count): New defvar.
(haiku-note-wheel-click, haiku-handle-drag-wheel): New
functions.
* src/haiku_support.cc (EmacsWindow): Get rid of window ID
logic.
(MessageReceived, MouseMoved, be_drag_message): Use thread ID to
identify windows instead of window ID.
* src/haikuselect.c (Fhaiku_drag_message): Record whether or not
the DND frame is a valid drop target.
(haiku_note_drag_wheel): New function.
(syms_of_haikuselect): New defvar.
João Távora [Tue, 19 Jul 2022 23:35:08 +0000 (00:35 +0100)]
Make eldoc-echo-area-prefer-doc-buffer consider all frames
Previously, it considered only windows on 'visible' frames (according
to get-buffer-window). This seemed correct at first, but it's not
much use for multiple TTY frames and not particularly reliable on GUI
frames either. There's no reliable way to tell what is actually
visible, so it's best to assume that users setup frames that are
indeed visible when using this parameter.
* lisp/emacs-lisp/eldoc.el (eldoc--echo-area-prefer-doc-buffer-p):
Consider all frames.
Simplified and improved heuristic for long lines detection.
* src/lisp.h (modiff_incr): Add a parameter to 'modiff_incr' to record
the extent of the modification.
* src/insdel.c (insert_1_both, insert_from_string_1, insert_from_gap,
insert_from_buffer_1, adjust_after_replace, replace_range,
replace_range_2, del_range_2, modify_text): Add an argument to each
call to 'modiff_incr'.
* src/textprop.c (modify_text_properties): Add an argument to the call
to 'modiff_incr'.
* src/buffer.c (Frestore_buffer_modified_p, Fbuffer_swap_text,
modify_overlay): Add an argument to each call to 'modiff_incr'.
* src/xdisp.c (redisplay_window): Use the improved version of 'MODIFF'
for the heuristic.
Stefan Monnier [Mon, 18 Jul 2022 21:39:55 +0000 (17:39 -0400)]
(help-fns--first-release): Try and avoid false positives
We used to use a very "optimistic" regexp which worked well for
longish symbol names but suffered from too many false positives on
short names. Use a more restrictive regexp, which should make the
recent "weed out" change unnecessary.
This in turn requires the use of '...' more consistently in etc/NEWS* files.
* lisp/help-fns.el (help-fns--first-release-regexp): New function.
(help-fns--first-release): Use it. Fix minor issue with the Emacs
version regexp.
(help-fns--mention-first-release): Undo last change.
* etc/NEWS*: Replace `...' with '...'. Indent code examples by at
least 2 spaces. Add previously missing '...' quotes around many of
the variables and functions described.
Po Lu [Tue, 19 Jul 2022 01:33:09 +0000 (09:33 +0800)]
Make drag-and-drop wheel movement work locally too on X
This is provided by the XDND protocol, so it isn't fair for it
to not work with local drag-and-drop.
* lisp/x-dnd.el (x-dnd-note-wheel-movement): New function. Set
it as the `x-dnd-wheel-function'.
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Clear new flags.
(x_dnd_note_self_wheel): New function. Set some flags.
(x_dnd_process_quit, x_dnd_begin_drag_and_drop, handle_one_xevent)
(x_connection_closed, x_delete_terminal, mark_xterm): Handle and
set new wheel movement flags
(syms_of_xterm): New variable `x-dnd-wheel-function'.
Alexander Adolf [Wed, 13 Jul 2022 21:52:46 +0000 (23:52 +0200)]
Additional query and results attributes in eudcb-macos-contacts.el
* lisp/net/eudcb-macos-contacts.el: wider set of attributes for
queries, and in query results
* lisp/net/eudc-vars.el (eudc-inline-expansion-format): update
docstring to explain how to use the function eudc-translate-query to
translate to generic attribute names in the user supplied formatting
function
* etc/NEWS: announce wider query/result attribute set
* doc/misc/eudc.texi: more details on eudcb-mab.el's limitations
Michael Albinus [Mon, 18 Jul 2022 13:48:14 +0000 (15:48 +0200)]
Adapt Tramp new test macros
* test/lisp/net/tramp-tests.el (tramp--test-deftest-with-stat)
(tramp--test-deftest-with-perl, tramp--test-deftest-with-ls):
Skip for all methods but those from tramp-sh.el.