This adds back macOS-specific code replaced earlier (bug#48548),
specifically to fix build errors on macOS 10.7.5. See discussion at
https://lists.gnu.org/archive/html/emacs-devel/2022-04/msg00779.html .
* src/sysdep.c (HAVE_RUSAGE_INFO_CURRENT, HAVE_PROC_PIDINFO): New.
(system_process_attributes): Use alternative code or exclude features
when building on older macOS versions.
Eli Zaretskii [Sat, 16 Apr 2022 10:18:47 +0000 (13:18 +0300)]
Improve support for the Brahmi script
* lisp/language/indian.el ("Brahmi"): New language environment.
Add composition rules for Brahmi.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Brahmi. (Bug#54914)
* etc/NEWS: Announce the new language environment.
* configure.ac (CHECK_LISP_OBJECT_TYPE): Disable
-Wimplicit-const-int-float-conversion and -Wint-in-bool-context, which
currently only have false positives.
Po Lu [Sat, 16 Apr 2022 08:48:02 +0000 (16:48 +0800)]
Protect windows from garbage collection when a ClientMessage is pending
* src/xterm.c (x_protect_window_for_callback)
(x_unprotect_window_for_callback): New functions.
(x_send_scroll_bar_event): Protect windows from garbage
collection before sending event containing pointer to window.
(handle_one_xevent): Unprotect after such a ClientMessage is
received and the window put in the keyboard buffer.
(x_term_init): Initialize protected windows list.
(x_delete_display): Free that list.
(mark_xterm): Mark the windows in that list.
* src/xterm.h (struct x_display_info): New fields for recording
a list of protected windows.
* doc/lispref/windows.texi (Choosing Window): Document that
buffer-match-p is used by display-buffer-alist.
* etc/NEWS: Mention buffer-match-p and match-buffers.
* lisp/window.el (display-buffer-alist): Update documentation as for
display-buffer-assq-regexp.
(display-buffer-assq-regexp): Rename buffer-name to buffer-or-name.
(display-buffer): Pass the buffer directly to
display-buffer-assq-regexp,.
Po Lu [Fri, 15 Apr 2022 12:22:26 +0000 (12:22 +0000)]
Fix default registry of Haiku font backend
* src/haiku_support.h (struct haiku_zoom_event): Fix coding
style.
(enum haiku_font_specification): Move FSPECs over here.
* src/haikufont.c (haikufont_apply_registry)
(haikufont_get_fallback_entity, haikufont_pattern_to_entity)
(haikufont_spec_or_entity_to_pattern, haikufont_list): Use
`iso10646-1' as the default registry instead of `utf8', which is
not a registry.
Po Lu [Fri, 15 Apr 2022 11:57:14 +0000 (11:57 +0000)]
Clean up keysyms from Haiku headers
* src/haiku_support.cc (keysym_from_raw_char): Add keysym
numbers here and use those instead.
* src/haiku_support.h: Delete all the X11 keysym definitions.
* doc/misc/vtable.texi (Making A Table): Adjust color documentation.
* lisp/emacs-lisp/vtable.el (make-vtable): Mix more.
(vtable--compute-colors): Mix both foreground and background colors.
(vtable--make-color-face, vtable--face-blend): New functions.
(vtable--insert-line): Adjust usage.
* lisp/emacs-lisp/vtable.el (vtable): Add a keymap cache.
(make-vtable): Allow dragging the divider.
(vtable-insert): Don't put the table keymap over the entire line
-- avoid the divider, which has its own keymap.
(vtable--drag-resize-column): Adjust to the in-buffer divider
dragging.
Fix off-by-one error in text-property-search-backward
* lisp/emacs-lisp/text-property-search.el
(text-property-search-backward): Fix off-by-one error -- this
would result in not finding the previous (non-)match when at the
first character in a field.
Update project-kill-buffer-conditions to match buffer-match-p
* project.el (project-kill-buffer-conditions): Document the
deprecation of the use of derived-mode
(project--buffer-check): Have `major-mode' behave like `derived-mode'
did previously, and issue a warning of `derived-mode' is used.
Po Lu [Fri, 15 Apr 2022 02:38:19 +0000 (02:38 +0000)]
Make Haiku scroll bar behave more like other programs
* haiku_support.cc (class EmacsScrollBar): New field
`repeater_start'.
(Pulse): Wait for time to pass repeater_delay.
(MouseDown): Set it to the current time + the system repeater
delay.
Eli Zaretskii [Thu, 14 Apr 2022 17:40:24 +0000 (20:40 +0300)]
Fix mouse clicks in hscrolled window with variable-height fonts
* src/xdisp.c (move_it_in_display_line_to): Fix calculation of
height of a screen-line that is completely hscrolled out of view.
Reported by Yasushi SHOJI <yasushi.shoji@gmail.com>.
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow
resizing by dragging headers.
(vtable--drag-resize-column): New function.
(vtable-narrow-current-column): Refactor out common bits.
(vtable--alter-column-width): To here.
(vtable-widen-current-column): Rewrite to use
vtable-narrow-current-column.
* lisp/net/ldap.el (ldap-ldapsearch-args): Change -LL to -LLL to
suppress ldif version output.
(ldap-search-internal): Remove skipping of version output. Remove
redundand ws skipping.
* lisp/net/eudc-vars.el (eudc-ldap-no-wildcard-attributes): New
defcustom.
* doc/misc/eudc.texi (LDAP Configuration): Mention it.
* lisp/net/eudcb-ldap.el (eudc-ldap-format-query-as-rfc1558): Use it.
(eudc-ldap-get-field-list): Set scope and sizelimit, instead of
overriding the whole ldap-host-parameters-alist.
* lisp/net/ldap.el (ldap-search-internal): Allow "size limit exceeded"
exit code. Allow empty attribute values.
Po Lu [Thu, 14 Apr 2022 13:14:32 +0000 (13:14 +0000)]
Fix races with child frame locks on Haiku
* src/haiku_support.cc
(CHILD_FRAME_LOCK_INSIDE_LOOPER_CALLBACK): New macro.
(FrameMoved, WorkspacesChanged): Lock child frame data with that
macro instead.
Po Lu [Thu, 14 Apr 2022 11:02:13 +0000 (19:02 +0800)]
Keep track of keyboard state during drag and drop
* src/xterm.c (x_dnd_cleanup_drag_and_drop): Deselect for
keyboard state changes.
(x_dnd_begin_drag_and_drop): Select for keyboard state changes
when XKB is available.
(x_dnd_update_state, handle_one_xevent): Use current XKB state
if it is available.
(x_term_init): Reformat code a little.
Po Lu [Thu, 14 Apr 2022 08:02:12 +0000 (16:02 +0800)]
Minor fixes to menus on XI2
* src/xfns.c (Fx_create_frame): Populate `xi_masks'.
* src/xmenu.c (x_activate_menubar)
(create_and_show_popup_menu, x_menu_show): Only clear input
extension grabs if we (or the toolkit) actually selected for
XI_ButtonPress events.
* src/xterm.c (xi_frame_selected_for): New function.
(xi_populate_device_from_info, handle_one_xevent): Store device
use instead of just whether or not it's a master device.
(x_dnd_begin_drag_and_drop): Clean up block_input stuff.
* src/xterm.h: Update prototypes.
(struct xi_device_t): Rename `master_p' to `use'.
* lisp/emacs-lisp/vtable.el (vtable-narrow-current-column)
(vtable-widen-current-column): Allow using the prefix to say how
much to narrow/widen the columns.
* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Don't
insert the divider at the end.
(vtable-narrow-current-column, vtable-widen-current-column): Don't
error out when being called on the divider.
* doc/misc/vtable.texi (Making A Table): Document it.
* lisp/emacs-lisp/vtable.el (vtable): Add a divider slot.
(make-vtable): Accept :divider and :divider-width arguments.
(vtable--insert-line, vtable--insert-header-line): Display the
divider.
Sean Whitton [Tue, 12 Apr 2022 18:38:32 +0000 (11:38 -0700)]
Document additions of cl-with-gensyms and cl-once-only
* NEWS: Document additions of cl-with-gensyms and cl-once-only.
* doc/misc/cl.texi (Macro-Writing Macros): New section.
(Creating Symbols): Add to the concept index under the name "gensym".
(Obsolete Setf Customization): Use cl-once-only rather than
macroexp-let2, and fix a quotation bug in one example.
* doc/misc/vtable.texi (Making A Table): Document it.
* lisp/emacs-lisp/vtable.el (vtable): Add :row-colors.
(make-vtable): Ditto.
(vtable--compute-colors, vtable--color-blend): New functions.
(vtable--insert-line): Take a line number argument and adjust
callers.
Michael Albinus [Wed, 13 Apr 2022 14:40:32 +0000 (16:40 +0200)]
Adapt Tramp manual
* doc/misc/tramp.texi (Ssh setup): New subsection "Using ssh
config include for host name completion". (Bug#54885)
Precise, that list-system-processes and process-attributes are
about system processes.
Po Lu [Wed, 13 Apr 2022 11:13:38 +0000 (19:13 +0800)]
Move raw event selection on GTK+ 2 to a more appropriate place
* src/xfns.c (setup_xi_event_mask): Stop selecting for
RawKeyPress on the root window.
* src/xterm.c (x_new_focus_frame): Select here instead, once a
frame becomes focused.