Stefan Kangas [Sat, 30 Jul 2022 23:44:22 +0000 (01:44 +0200)]
Delete redisplay-end-trigger-functions and related defuns
This variable and related functions have been obsolete since 23.1.
The last things to depend on this (fast-lock.el and lazy-lock.el) were
recently removed.
* src/dispextern.h (struct it): Delete field
'redisplay_end_trigger_charpos'.
* src/window.c (Fwindow_redisplay_end_trigger)
(Fset_window_redisplay_end_trigger): Delete defuns and corresponding
defsubrs for functions obsolete since 23.1.
* src/window.h (wset_redisplay_end_trigger): Delete function.
(GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'.
* src/xdisp.c (run_redisplay_end_trigger_hook): Delete function.
(syms_of_xdisp) <redisplay_end_trigger_functions>: Delete
variable obsolete since 23.1.
(init_iterator, next_element_from_buffer): Don't run or set above
deleted hook variable.
* lisp/emacs-lisp/icons.el (icons--create): Choose another
character that's unlikely to appear in non-Emoji fonts. (Comment
left in place since this should be fixed in a less breakable way.)
* lisp/mail/mail-parse.el (mail-header-parse-address-lax):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Clarify what
these functions do (bug#56824).
Stefan Kangas [Fri, 15 Jul 2022 16:08:34 +0000 (18:08 +0200)]
Make outline-view-change-hook obsolete
According to a comment, this hook "Seems only used by lazy-lock.
I.e. obsolete." But lazy-lock has been deleted.
* lisp/outline.el (outline-view-change-hook): Make obsolete.
Po Lu [Sat, 30 Jul 2022 03:26:46 +0000 (11:26 +0800)]
Minor improvements to precision scroll interpolation
* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Bump GC
cons threshold temporarily. This leads to a very noticable
improvement to animation speed.
Po Lu [Sat, 30 Jul 2022 01:40:00 +0000 (09:40 +0800)]
Don't freeze if the compositing manager crashes
* src/xterm.c (x_if_event): New function, like XIfEvent but with
a timeout.
(x_sync_wait_for_frame_drawn_event): Disable frame
synchronization if x_if_event times out after 1 second.
Improve narrowing when iterator has moved outside of narrowing bounds.
* src/xdisp.c (get_narrowed_begv, get_narrowed_zv): Add 'pos'
parameter.
(init_iterator): Add arguments to 'get_narrowed_begv' and
'get_narrowed_zv'.
(handle_fontified_prop): Recompute the narrowing when iterator
has moved outside of narrowing bounds.
Po Lu [Fri, 29 Jul 2022 12:54:30 +0000 (20:54 +0800)]
Fix handling of extended frame resize synchronization
* src/xterm.c (x_sync_wait_for_frame_drawn_event): Don't wait if
the frame is invisible. If it is mapped again the compositing
manager is obliged to send us another event, so we can wait in
that case.
(x_sync_update_begin, x_sync_update_finish): Handle extended
resize synchronization here.
(XTframe_up_to_date, handle_one_xevent): Save stuff here.
* src/xterm.h (struct x_output): New field
`resize_counter_value'.
* lisp/outline.el (outline-minor-mode-highlight-buffer): Factor
out... (bug#56820).
(outline--use-buttons-p): ... to here.
(outline-hide-subtree, outline--fix-up-all-buttons)
(outline-show-subtree): Use it.
Po Lu [Fri, 29 Jul 2022 08:20:32 +0000 (16:20 +0800)]
Implement monitor refresh rate synchronization on X
* src/xfns.c (x_set_parent_frame, Fx_create_frame): Disable
vsync on child and embedded frames.
* src/xmenu.c (x_menu_show): Fix XMenu position calculation in
child frames.
* src/xterm.c (x_sync_is_frame_drawn_event)
(x_sync_wait_for_frame_drawn_event): New functions.
(x_sync_update_begin): Wait for frame to be drawn if not double
buffered.
(x_sync_update_finish): Set FRAME_X_WAITING_FOR_DRAW (f).
(show_back_buffer): Wait for frame to be drawn before flipping
buffers.
(XTframe_up_to_date): Set FRAME_X_WAITING_FOR_DRAW if bumped.
(handle_one_xevent): Handle frame drawn events.
* src/xterm.h (struct x_output): New fields for frame dirtyness
and vsync.
Po Lu [Fri, 29 Jul 2022 02:13:54 +0000 (10:13 +0800)]
Implement extended frame synchronization
* src/xterm.c (x_atom_refs): New atom _NET_WM_FRAME_TIMINGS.
(x_sync_update_finish, x_sync_update_begin): New frame.
(x_update_begin, x_update_end, XTframe_up_to_date): Begin and
end frames accordingly if extended frame synchronization is
enabled.
(handle_one_xevent): Ignore timing and frame drawn events.
* src/xterm.h (struct x_display_info): New atom.
(FRAME_X_COUNTER_VALUE): New macro.
Po Lu [Fri, 29 Jul 2022 00:50:55 +0000 (08:50 +0800)]
Don't offer meaningless selection targets during drag-and-drop
* lisp/select.el (xselect-dnd-target-available-p): New function.
(selection-converter-alist): Register it as the availability
function for DND specific targets.
Add an optional 'lock' parameter to 'narrow-to-region'
* src/editfns.c (Fnarrow_to_region): Add the parameter to the
function, and handle it. Update docstring.
(unwind_locked_begv, unwind_locked_zv): New functions.
(Fwiden): Do nothing when restrictions are locked. Update
docstring.
(syms_of_editfns): Replace the 'inhibit-widen' symbol and variable
with a 'restrictions-locked' symbol and variable. Update docstring.
* src/xdisp.c (handle_fontified_prop): Use Fnarrow_to_region with
the new parameter.
(unwind_narrowed_zv): Remove function.
* src/process.c (Finternal_default_process_filter): Add a third
argument to Fnarrow_to_region.
* src/lread.c (readevalloop): Add a third argument to
Fnarrow_to_region.
* src/bytecode.c (exec_byte_code): Add a third argument to
Fnarrow_to_region.
* etc/NEWS (like): Mention the new parameter of 'narrow-to-region'.
* doc/lispref/positions.texi (Narrowing): Document it.
Stefan Kangas [Thu, 28 Jul 2022 13:32:42 +0000 (15:32 +0200)]
Delete fast-lock.el and lazy-lock.el
The 'font-lock-support-mode' is occasionally useful for debugging
purposes, so it remains as a defvar.
Ref: https://lists.gnu.org/r/emacs-devel/2020-08/msg00125.html
* lisp/obsolete/fast-lock.el:
* lisp/obsolete/lazy-lock.el: Delete libraries obsolete since
22.1. (Bug#56560)
* lisp/font-lock.el (font-lock-support-mode): Make into a defvar and
delete any mention of 'lazy-lock-mode' and 'fast-lock-mode'.
(font-lock-turn-on-thing-lock, font-lock-turn-off-thing-lock):
Drop support for obsolete modes lazy-lock and fast-lock.
(font-lock-after-fontify-buffer)
(font-lock-after-unfontify-buffer): Make into obsolete function
aliases for 'ignore'. Adjust callers.
(font-lock-keywords, font-lock-inhibit-thing-lock): Adjust
documentation to not mention lazy-lock and fast-lock.
* lisp/font-core.el (font-lock-defaults): Adjust documentation to
not mention 'font-lock-inhibit-thing-lock'.
* lisp/mail/rmail.el (rmail-variables): Don't inhibit obsolete
lazy-lock-mode and fast-lock-mode.
* lisp/emacs-lisp/warnings.el (warning-suppress-action)
(warning-suppress-log-action): Removed.
New icon.
(warnings-suppress): New helper function.
(display-warning): Use it (bug#46025).
* lisp/help.el (describe-bindings): Don't force buttons on
(bug#56691).
* lisp/outline.el (outline-minor-mode-use-buttons): Default
buttons on in special-mode buffers.
* lisp/outline.el (outline-minor-mode-buttons): Remove.
(outline-open, outline-close): New icons.
(outline-minor-mode-highlight-buffer): Use the new predicate to
switch on/off.
(outline--make-button): Remove.
(outline--make-button-overlay): Use icons.el instantiation.
(outline--valid-emoji-p): Remove.
(outline--valid-char-p): Remove.
(outline--insert-open-button, outline--insert-close-button): Make
point movement better in *Help* buffers.
* doc/emacs/custom.texi (Specific Customization): Mention it.
* doc/emacs/display.texi (Icons): New node.
* doc/lispref/display.texi (Icons): New node.
* lisp/button.el (buttonize):
(button--properties, buttonize-region): Allow not overriding faces.
* lisp/cus-edit.el (custom-save-all): Save icons.
(custom-icon): New widget.
(custom-icon-value-create, custom-toggle-hide-icon)
(custom--icons-widget-value, custom-icon-set): Helper functions
for the widget.
(customize-icon): Main command.
(custom-icon-state-set, custom-icon-state): Helper functions.
(custom-theme-set-icons): Function to be used by theme writers.
(custom-set-icons): Function to be used in .emacs.
(custom-save-icons): New function.
* lisp/custom.el (custom-push-theme): Add icons.
* lisp/emacs-lisp/icons.el: New file.
* test/lisp/emacs-lisp/icons-tests.el: Add some tests.
Ensure that we don't call print-unreadable-function from " prin1"
* src/print.c (PRINTPREPARE): Bind the current buffer so that we
can retrieve it later.
(print_vectorlike): Use it (bug#56773).
(syms_of_print): New internal `print--unreadable-callback-buffer'
variable.
Po Lu [Thu, 28 Jul 2022 07:17:04 +0000 (07:17 +0000)]
Fix race conditions in mouse button handling on Haiku
* src/haiku_support.cc (class EmacsView): New field
`grabbed_buttons'. Remove `previous_buttons'.
(BasicMouseDown, BasicMouseUp): Accept new parameter `message'.
Use data from that message instead.
(MouseDown, MouseUp): Pass the current message to BasicMouseUp
and BasicMouseDown.
Paul Pogonyshev [Wed, 27 Jul 2022 19:20:55 +0000 (21:20 +0200)]
Release the desktop lock in 'kill-emacs-hook'
* lisp/desktop.el: Run 'desktop--on-kill' in 'kill-emacs-hook'.
(desktop--on-kill): New function, refactored from 'desktop-kill'.
(desktop-kill): Call 'desktop--on-kill'. (Bug#56800)
Stefan Kangas [Wed, 27 Jul 2022 22:25:33 +0000 (00:25 +0200)]
Drop support for obsolete "Lisp Code Directory" from ffap
Ref: https://flex.phys.tohoku.ac.jp/texi/faq/faq_146.html
Note also that the host "archive.cis.ohio-state.edu" is unknown.
* lisp/ffap.el (ffap-alist): Drop support for obsolete "Lisp Code
Directory".
(ffap-lcd): Make obsolete.
Stefan Kangas [Wed, 27 Jul 2022 21:33:03 +0000 (23:33 +0200)]
Drop support for XEmacs package EFS
EFS is a long defunct XEmacs-specific fork of Ange FTP that is
superseded by TRAMP.
* lisp/ffap.el (ffap-ftp-default-user)
(ffap-replace-file-component, ffap-host-to-filename):
* lisp/gnus/mml.el (mml-parse-file-name):
* lisp/gnus/nnheader.el (nnheader-re-read-dir):
* lisp/net/browse-url.el (browse-url-filename-alist):
* lisp/speedbar.el (speedbar-check-vc): Drop support for XEmacs
package EFS.