* etc/NEWS: Mention how to suppress the warning.
* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Amend doc string.
* lisp/subr.el: Use `macroexp-warn-and-return` to delay the warning
until codegen time (which makes it suppressible) and to prevent
repeated warnings.
* test/lisp/international/ccl-tests.el (shift):
* test/src/data-tests.el (data-tests-ash-lsh):
Suppress warning in tests of `lsh` itself.
For discussion, see:
https://lists.gnu.org/r/emacs-devel/2022-07/msg00761.html
* src/pdumper.c (dump_buffer): Dump new field
long_line_optimizations_p introduced in commit e7b5912b23 of
2022-07-16 "Improvements to long lines handling."
(dump_buffer) [CHECK_STRUCTS]: Update hash accordingly
for --enable-checking=structs.
Use `ash` instead of `lsh` in verilog-mode (bug#56641)
* lisp/progmodes/verilog-mode.el (verilog-simplify-range-expression):
Use `ash`; the result will be the same because the first argument is
nonnegative.
* lisp/faces.el (region): Don't use the Gtk region face, because
it produces low contrast combinations (bug#46493).
* src/gtkutil.h:
* src/gtkutil.c (xg_check_special_colors): Remove.
New user option to disable deleting current input in comint mouse-2
* etc/NEWS: Announce the user option (bug#56646).
* lisp/comint.el (comint-delete-old-input): New user option to disable
deleting current input when insert an old input using mouse-2.
(comint-insert-input): Use it.
Po Lu [Sat, 23 Jul 2022 07:00:12 +0000 (15:00 +0800)]
Fix PGTK DND after a source leaves without dropping anything
* lisp/pgtk-dnd.el (pgtk-dnd-clear-data-on-motion): New flag.
(pgtk-dnd-handle-gdk): Set flag upon drag-leave. Clear state
upon drag-motion if it is set.
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.