]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAllow dragging the divider in vtable
Lars Ingebrigtsen [Fri, 15 Apr 2022 09:10:05 +0000 (11:10 +0200)]
Allow dragging the divider in vtable

* 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.

2 years agoFix off-by-one error in text-property-search-backward
Lars Ingebrigtsen [Fri, 15 Apr 2022 09:06:44 +0000 (11:06 +0200)]
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.

2 years agoMore PGTK related cleanup
Po Lu [Fri, 15 Apr 2022 08:43:15 +0000 (16:43 +0800)]
More PGTK related cleanup

* src/pgtkfns.c (x_set_foreground_color, x_set_background_color)
(x_set_border_color, x_set_cursor_color, x_set_title)
(x_set_menu_bar_lines, x_set_tab_bar_lines, x_set_tool_bar_lines)
(x_set_child_frame_border_width, x_set_internal_border_width)
(x_set_icon_type, x_set_icon_name, x_set_cursor_type)
(x_set_mouse_color, x_set_undecorated, x_set_skip_taskbar)
(x_set_override_redirect, pgtk_frame_parm_handlers)
(Fx_create_frame): Rename most `x_' functions to `pgtk_' ones.
All callers changed.
* src/pgtkmenu.c (Fx_menu_bar_open_internal): Remove duplicate
doc string definition.
* src/pgtkterm.c (x_set_offset, pgtk_iconify_frame)
(x_set_parent_frame, x_set_no_focus_on_map, x_set_no_accept_focus)
(x_set_z_group, x_set_cursor_gc, x_set_mouse_face_gc)
(x_set_mode_line_face_gc, x_set_glyph_string_gc)
(x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly)
(x_setup_relief_color, x_setup_relief_colors)
(x_set_clip_rectangles, x_draw_relief_rect, x_draw_box_rect)
(x_draw_glyph_string_box, x_draw_image_relief)
(x_draw_image_foreground, x_draw_stretch_glyph_string)
(pgtk_draw_glyph_string, x_set_toolkit_scroll_bar_thumb)
(x_set_toolkit_horizontal_scroll_bar_thumb)
(pgtk_set_vertical_scroll_bar, pgtk_set_horizontal_scroll_bar)
(x_set_frame_alpha, frame_highlight, frame_unhighlight)
(pgtk_create_terminal, map_event): Rename most `x_' functions to
`pgtk_' ones.  All callers changed.
* src/pgtkterm.h: Update prototypes.

2 years agoClean up some extraneous stuff in pgtkfns.c
Po Lu [Fri, 15 Apr 2022 08:08:28 +0000 (16:08 +0800)]
Clean up some extraneous stuff in pgtkfns.c

* src/pgtkfns.c (Fx_gtk_debug): Fix doc string and remove extra
version check.
(syms_of_pgtkfns): Delete left over defvar from NS port.

2 years agoUpdate project-kill-buffer-conditions to match buffer-match-p
Philip Kaludercic [Thu, 14 Apr 2022 08:24:27 +0000 (10:24 +0200)]
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.

2 years ago* window.el (display-buffer-assq-regexp): Use buffer-match
Philip Kaludercic [Thu, 10 Mar 2022 09:59:52 +0000 (10:59 +0100)]
* window.el (display-buffer-assq-regexp): Use buffer-match

2 years agoGeneralise buffer matching from project.el
Philip Kaludercic [Mon, 7 Mar 2022 19:49:42 +0000 (20:49 +0100)]
Generalise buffer matching from project.el

* subr.el (buffer-match): Add function to check if a buffer satisfies
a condition.
(match-buffers): Returns all buffers that satisfy a condition.

2 years agoFix core string lookup with modifiers on XI2
Po Lu [Fri, 15 Apr 2022 07:09:18 +0000 (15:09 +0800)]
Fix core string lookup with modifiers on XI2

* src/xterm.c (handle_one_xevent): Clean modifiers from
xkey.state before giving it to XLookupString.

2 years agoClean up various bits of Haiku code
Po Lu [Fri, 15 Apr 2022 06:34:42 +0000 (06:34 +0000)]
Clean up various bits of Haiku code

* src/haiku_font_support.cc (BFont_string_width): Delete unused
function.
* src/haiku_support.cc (BWindow_new): Clean up type of `view'.
(BWindow_quit): Clean up coding style.
(BView_mouse_down, BView_mouse_up, BView_mouse_moved): Delete
unused functions.
(unwind_popup_file_dialog): Clean up coding style.
(be_popup_file_dialog_safe_set_target): Delete function.
(be_popup_file_dialog): Improve code clarity.
* src/haiku_support.h: Fix coding style.
* src/haikufns.c (haiku_get_color, haiku_display_info_for_name)
(check_haiku_display_info, Fhaiku_read_file_name)
(Fx_display_save_under, Fhaiku_frame_restack): Remove references
to "Be displays" and replace them with "Haiku displays".
* src/haikuselect.h: Clean up coding style.
* src/haikuterm.c (haiku_read_socket): Clean up coding style and
fix a few latent bugs.

2 years agoAdd missing extern declarations to headers
Po Lu [Fri, 15 Apr 2022 06:08:40 +0000 (14:08 +0800)]
Add missing extern declarations to headers

* src/xterm.h (xi_device_from_id, xi_frame_selected_for): Add
`extern' declaration.

2 years agoMake Haiku scroll bar behave more like other programs
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.

2 years agoPort new tests to leap seconds or (TICKS . HZ)
Paul Eggert [Fri, 15 Apr 2022 02:08:56 +0000 (19:08 -0700)]
Port new tests to leap seconds or (TICKS . HZ)

* test/lisp/mail/ietf-drums-date-tests.el (ietf-drums-date-tests):
Don’t assume leap seconds are ignored, or that timestamps are in
(HI LO) format.

2 years agoNew time-equal-p test
Paul Eggert [Fri, 15 Apr 2022 02:03:41 +0000 (19:03 -0700)]
New time-equal-p test

* test/src/timefns-tests.el (time-equal-p-NaN-NaN): New test.

2 years agoProperly wait for app thread exit on Haiku
Po Lu [Fri, 15 Apr 2022 01:23:27 +0000 (01:23 +0000)]
Properly wait for app thread exit on Haiku

* src/haiku_support.cc (MessageReceived): Handle
QUIT_APPLICATION.
(start_running_application): Clean up code a little.
(wait_for_exit_of_app_thread): New function.
(BApplication_setup): Add atexit handler to clean up app thread.
(be_app_quit): Delete function.
* src/haikuterm.c (haiku_delete_terminal): Un-implement
function.
* src/haikuterm.h: Update prototypes.

2 years agoFix calls to XKB functions without testing for server support
Po Lu [Fri, 15 Apr 2022 00:55:22 +0000 (08:55 +0800)]
Fix calls to XKB functions without testing for server support

* src/xterm.c (x_dnd_cleanup_drag_and_drop):
(x_dnd_begin_drag_and_drop): Never call XkbSelectEvents if the
X server doesn't have XKB.

2 years agoAllow dragging dividers in vtable
Lars Ingebrigtsen [Thu, 14 Apr 2022 17:48:47 +0000 (19:48 +0200)]
Allow dragging dividers in vtable

* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Allow
dragging dividers.
(vtable--drag-resize-column): Adjust function.

2 years agoFix mouse clicks in hscrolled window with variable-height fonts
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>.

2 years agoAllow resizing vtable columns by dragging
Lars Ingebrigtsen [Thu, 14 Apr 2022 17:36:08 +0000 (19:36 +0200)]
Allow resizing vtable columns by dragging

* 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.

2 years ago* lisp/gnus/gnus.el (toplevel autoloads): Fix file name
Stefan Monnier [Thu, 14 Apr 2022 16:55:23 +0000 (12:55 -0400)]
* lisp/gnus/gnus.el (toplevel autoloads): Fix file name

`score-mode` does not define `gnus-score-edit-all-score`, it's defined
in `gnus-score` instead.

2 years agoHave submit-emacs-patch prompt for patch file before subject
Philip Kaludercic [Thu, 14 Apr 2022 10:13:27 +0000 (12:13 +0200)]
Have submit-emacs-patch prompt for patch file before subject

* emacsbug.el (submit-emacs-patch): Prompt for patch file and use that
  to guess the subject.

2 years agoAvoid possibly unnecessary lisp_time_struct call
Philip Kaludercic [Thu, 14 Apr 2022 09:00:07 +0000 (11:00 +0200)]
Avoid possibly unnecessary lisp_time_struct call

* timefns.c (time_cmp): Defer the calculation of the time struct, in
  case A and B are eq to one another.

2 years agoHandle non-ASCII domains correctly in url-https-proxy-connect
Lars Ingebrigtsen [Thu, 14 Apr 2022 16:08:00 +0000 (18:08 +0200)]
Handle non-ASCII domains correctly in url-https-proxy-connect

* lisp/url/url-http.el (url-https-proxy-connect)
(url-https-proxy-after-change-function): Handle IDNA domains
correctly.

2 years agoMake vtable remember user-altered column widths
Lars Ingebrigtsen [Thu, 14 Apr 2022 16:03:58 +0000 (18:03 +0200)]
Make vtable remember user-altered column widths

* lisp/emacs-lisp/vtable.el (vtable-narrow-current-column)
(vtable-widen-current-column): Store the size to that it's
respected on `g'.

2 years agoEnsure that commands like { work on all frames in vtable
Lars Ingebrigtsen [Thu, 14 Apr 2022 14:25:31 +0000 (16:25 +0200)]
Ensure that commands like { work on all frames in vtable

* lisp/emacs-lisp/vtable.el (vtable--recompute-cache)
(vtable--ensure-cache): New functions.
(vtable-insert): Use it.
(vtable--widths): Ditto.

2 years agoldap-search-internal cleanup
Filipp Gunbin [Thu, 14 Apr 2022 13:47:32 +0000 (16:47 +0300)]
ldap-search-internal cleanup

* 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.

2 years agoFix eudc-get-attribute-list
Filipp Gunbin [Wed, 13 Apr 2022 20:10:35 +0000 (23:10 +0300)]
Fix eudc-get-attribute-list

* 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.

2 years agoFix electric-help-map problem when help-char has meta-prefix
Nobuyoshi Nakada [Thu, 14 Apr 2022 13:51:04 +0000 (15:51 +0200)]
Fix electric-help-map problem when help-char has meta-prefix

* lisp/ehelp.el (electric-help-map): Fix problem when help-char
has meta-prefix (bug#54932).

2 years agoFix races with child frame locks on Haiku
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.

2 years agoKeep track of keyboard state during drag and drop
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.

2 years agoMinor fixes to menus on XI2
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'.

2 years agoIgnore XdndPosition events triggered by the wrong mouse button
Po Lu [Thu, 14 Apr 2022 02:26:39 +0000 (10:26 +0800)]
Ignore XdndPosition events triggered by the wrong mouse button

* src/xterm.c (x_dnd_send_position): Don't send if button is set
but not a scroll wheel button.

2 years agoAdd support for Xdnd features introduced after version 5
Po Lu [Thu, 14 Apr 2022 01:30:09 +0000 (09:30 +0800)]
Add support for Xdnd features introduced after version 5

* src/xterm.c (x_dnd_send_position, x_dnd_update_state)
(handle_one_xevent): Add support for sending button and keyboard
state during DND.

2 years agoFix describe-mode--minor-modes formatting issue
Lars Ingebrigtsen [Thu, 14 Apr 2022 01:08:32 +0000 (03:08 +0200)]
Fix describe-mode--minor-modes formatting issue

* lisp/help-fns.el (describe-mode--minor-modes): Fix multi-line
local-minor paragraph.

2 years agoMake vtable narrow/widen functions take a prefix
Lars Ingebrigtsen [Thu, 14 Apr 2022 00:47:23 +0000 (02:47 +0200)]
Make vtable narrow/widen functions take a prefix

* 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.

2 years agoCopy edit make-vtable code
Lars Ingebrigtsen [Thu, 14 Apr 2022 00:41:27 +0000 (02:41 +0200)]
Copy edit make-vtable code

* lisp/emacs-lisp/vtable.el (make-vtable): Clean up code slightly.

2 years agoEdit some vtable doc strings
Lars Ingebrigtsen [Thu, 14 Apr 2022 00:37:44 +0000 (02:37 +0200)]
Edit some vtable doc strings

* lisp/emacs-lisp/vtable.el (make-vtable, vtable): Improve doc
strings.

2 years agoFurther divider fixes for vtable
Lars Ingebrigtsen [Thu, 14 Apr 2022 00:18:01 +0000 (02:18 +0200)]
Further divider fixes for vtable

* 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.

2 years agoRestore vtable.texi lines removed by accident
Lars Ingebrigtsen [Thu, 14 Apr 2022 00:00:26 +0000 (02:00 +0200)]
Restore vtable.texi lines removed by accident

* doc/misc/vtable.texi (Introduction): Restore lines inadvertently
removed.

2 years agoFix dividers in vtable header lines
Lars Ingebrigtsen [Wed, 13 Apr 2022 23:56:15 +0000 (01:56 +0200)]
Fix dividers in vtable header lines

* lisp/emacs-lisp/vtable.el (vtable--insert-header-line): Put the
divider in the correct place in the header line.

2 years agoAllow having dividers between columns in vtable
Lars Ingebrigtsen [Wed, 13 Apr 2022 23:36:24 +0000 (01:36 +0200)]
Allow having dividers between columns in vtable

* 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.

2 years agoDocument additions of cl-with-gensyms and cl-once-only
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.

2 years agoAllow putting alternating colors on vtable rows
Lars Ingebrigtsen [Wed, 13 Apr 2022 23:00:44 +0000 (01:00 +0200)]
Allow putting alternating colors on vtable rows

* 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.

2 years agoMake `C-h m' actually output the documentation for the major mode
Lars Ingebrigtsen [Wed, 13 Apr 2022 21:30:55 +0000 (23:30 +0200)]
Make `C-h m' actually output the documentation for the major mode

* lisp/help-fns.el (describe-mode): Get the documentation for the
correct major mode.

2 years agoAdd a new `vtable' face
Lars Ingebrigtsen [Wed, 13 Apr 2022 21:19:01 +0000 (23:19 +0200)]
Add a new `vtable' face

* doc/misc/vtable.texi (Introduction): Document it.

* lisp/emacs-lisp/vtable.el (vtable): Add a new face.

2 years ago* lisp/comint.el (comint-dynamic-list-input-ring): Keep replaced text props.
Juri Linkov [Wed, 13 Apr 2022 17:56:34 +0000 (20:56 +0300)]
* lisp/comint.el (comint-dynamic-list-input-ring): Keep replaced text props.

* lisp/minibuffer.el (completions-header-format): Remove unused text prop.

2 years agoRegenerated ldefs-boot.el
Lars Ingebrigtsen [Wed, 13 Apr 2022 17:25:43 +0000 (19:25 +0200)]
Regenerated ldefs-boot.el

2 years ago; Reinsert lines in tramp.texi deleted by accident
Michael Albinus [Wed, 13 Apr 2022 14:55:09 +0000 (16:55 +0200)]
; Reinsert lines in tramp.texi deleted by accident

2 years agoAdapt Tramp manual
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.

2 years agoAdd support for column background colors in vtable
Lars Ingebrigtsen [Wed, 13 Apr 2022 14:25:52 +0000 (16:25 +0200)]
Add support for column background colors in vtable

* doc/misc/vtable.texi (Making A Table): Document it.

* lisp/emacs-lisp/vtable.el (vtable): Add a column color element.
(make-vtable): Use it.
(vtable--insert-line): Insert the colors here.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Wed, 13 Apr 2022 14:00:59 +0000 (17:00 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Wed, 13 Apr 2022 13:57:49 +0000 (16:57 +0300)]
Merge from origin/emacs-28

2 years agoFix format-seconds error in previous change
Lars Ingebrigtsen [Wed, 13 Apr 2022 13:57:24 +0000 (15:57 +0200)]
Fix format-seconds error in previous change

* lisp/calendar/time-date.el (format-seconds): Fix zero elision
when using fractional seconds.

2 years ago; Merge from origin/emacs-28
Eli Zaretskii [Wed, 13 Apr 2022 13:52:53 +0000 (16:52 +0300)]
; Merge from origin/emacs-28

The following commit was skipped:

de7901a Bump Emacs version to 28.1

2 years agoMerge from origin/emacs-28
Eli Zaretskii [Wed, 13 Apr 2022 13:52:50 +0000 (16:52 +0300)]
Merge from origin/emacs-28

# Conflicts:
# etc/NEWS
# lisp/desktop.el
# lisp/dired.el

2 years ago; * src/xterm.c (x_term_init): Fix whitespace.
Eli Zaretskii [Wed, 13 Apr 2022 13:48:13 +0000 (16:48 +0300)]
; * src/xterm.c (x_term_init): Fix whitespace.

2 years agoMake list-times not include zero elements
Lars Ingebrigtsen [Wed, 13 Apr 2022 13:31:02 +0000 (15:31 +0200)]
Make list-times not include zero elements

* doc/lispref/os.texi (Time Parsing): Mention %x.
* lisp/calendar/time-date.el (format-seconds): Accept a new %x
spec that removes trailing zeros (bug#54904).

* lisp/emacs-lisp/timer-list.el (list-timers): Don't display
trailing zero bits.

2 years ago; * etc/NEWS: Mention that PGTK build needs GTK >= 3.20.
Eli Zaretskii [Wed, 13 Apr 2022 11:53:35 +0000 (14:53 +0300)]
; * etc/NEWS: Mention that PGTK build needs GTK >= 3.20.

2 years agoMove raw event selection on GTK+ 2 to a more appropriate place
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.

2 years agoFix marking upgrades for packages from ELPA or NonGNU ELPA
Po Lu [Wed, 13 Apr 2022 07:17:30 +0000 (07:17 +0000)]
Fix marking upgrades for packages from ELPA or NonGNU ELPA

* lisp/emacs-lisp/package.el (package-menu--find-upgrades): Look
inside ``external'' packages as well when searching for
upgrades.  (bug#54117)

2 years agoFix input availability detection during visible-bell
Po Lu [Wed, 13 Apr 2022 07:03:50 +0000 (15:03 +0800)]
Fix input availability detection during visible-bell

* src/xterm.c (XTflash): Exit pselect loop also if input becomes
available on f's display connection.

2 years agoMinor cleanups to Haiku windowing
Po Lu [Wed, 13 Apr 2022 06:46:45 +0000 (06:46 +0000)]
Minor cleanups to Haiku windowing

* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
* src/haikuterm.h (struct haiku_output, struct scroll_bar)
(XSCROLL_BAR): Remove used fields of various structs.

* src/haikuterm.c (haiku_flash): Make input detection actually
work.

2 years agoFix zoom rect computation for some deskbar positions on Haiku
Po Lu [Wed, 13 Apr 2022 04:44:11 +0000 (04:44 +0000)]
Fix zoom rect computation for some deskbar positions on Haiku

* src/haiku_support.cc (CalculateZoomRect): Fix computation for
left top and right bottom.

2 years agoFix last change in configure.ac
Po Lu [Wed, 13 Apr 2022 03:17:34 +0000 (11:17 +0800)]
Fix last change in configure.ac

* configure.ac: Test window system against "x11", not "x".

2 years agoBump minimum GTK for PGTK builds
Po Lu [Wed, 13 Apr 2022 03:13:28 +0000 (11:13 +0800)]
Bump minimum GTK for PGTK builds

* configure.ac: Require GTK 3.20 or later if building with PGTK.
It has already been required for some time now, but the
requirement was not reflected in the configure script.

* src/pgtkterm.c (pgtk_any_window_to_frame): Remove version
check.

2 years agoTweak how `M-q' in emacs-lisp-mode works
Lars Ingebrigtsen [Wed, 13 Apr 2022 03:07:30 +0000 (05:07 +0200)]
Tweak how `M-q' in emacs-lisp-mode works

* lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): Only fill as
strings inside strings (bug#31656).
(lisp--fill-line-simple): New function to do simple sexp-based
filling.

2 years agoClean up PGTK code more
Po Lu [Wed, 13 Apr 2022 02:54:56 +0000 (10:54 +0800)]
Clean up PGTK code more

* src/pgtkterm.c (STORE_KEYSYM_FOR_DEBUG): Delete macro.
(x_find_modifier_meanings): Delete function.
(get_modifier_values, pgtk_gtk_to_emacs_modifiers)
(pgtk_emacs_to_gtk_modifiers): Use GDK's own modifier mask
constants instead of detecting our own from the keymap.  This
does mean a specific "meta" key will no longer be detected on X
Windows, but that interface doesn't exist on Wayland, and X
users should use the X port anyway.
(key_press_event): Avoid decoding input text.
(pgtk_term_init): Stop computing modifiers.
(syms_of_pgtkterm): Delete obsolete comment.
* src/pgtkterm.h (struct pgtk_display_info): Delete modifier
masks.

2 years agoRemove unused flag on Haiku
Po Lu [Wed, 13 Apr 2022 02:37:54 +0000 (02:37 +0000)]
Remove unused flag on Haiku

* src/haikufns.c (haiku_create_frame, haiku_create_tip_frame):
* src/haikuterm.h (struct haiku_output): Delete mentions of
`explicit_parent'.

2 years agoFix bit rot in the XEmbed code
Po Lu [Wed, 13 Apr 2022 02:07:00 +0000 (10:07 +0800)]
Fix bit rot in the XEmbed code

* src/xterm.c (x_term_init): Delete unused atom.
(handle_one_xevent):
(x_make_frame_visible): Handle embedded frame visibility
correctly.
* src/xterm.h (struct x_display_info): Delete unused atom.

2 years agoAdd NEWS entry for `C-h m' change
Lars Ingebrigtsen [Wed, 13 Apr 2022 01:52:15 +0000 (03:52 +0200)]
Add NEWS entry for `C-h m' change

2 years agoRedo `C-h m' output
Lars Ingebrigtsen [Wed, 13 Apr 2022 01:50:06 +0000 (03:50 +0200)]
Redo `C-h m' output

* lisp/help-fns.el (describe-mode--minor-modes): New function
(bug#2473).
(describe-mode): Rewritten to include local minor mode links first,
then the major mode, and then global minor mode links, and then
all the minor modes.

2 years agoMake `describe-mode' include a link to the major mode function
Lars Ingebrigtsen [Wed, 13 Apr 2022 00:51:03 +0000 (02:51 +0200)]
Make `describe-mode' include a link to the major mode function

* lisp/help-fns.el (describe-mode): Add a link to the mode
function so that the user can go to the manual more easily
(bug#575).

2 years agoFix freezes when trying to accelerate menu bar on Haiku
Po Lu [Wed, 13 Apr 2022 00:47:00 +0000 (00:47 +0000)]
Fix freezes when trying to accelerate menu bar on Haiku

* src/haiku_support.cc (class EmacsWindow): New field
`menus_begun'.
(MenusBeginning): Don't send menu bar open events when that is
set, instead set it to true.
(BMenuBar_start_tracking): Stop locking the menu bar here and
send a special BE_MENU_BAR_OPEN event instead.
* src/haiku_support.h (struct haiku_menu_bar_state_event):
Delete field `no_lock'.
* src/haikumenu.c (Fhaiku_menu_bar_open):
* src/haikuterm.c (haiku_read_socket): Update accordingly.

2 years agoProvide a useful default to smime-CA-file
Lars Ingebrigtsen [Wed, 13 Apr 2022 00:29:27 +0000 (02:29 +0200)]
Provide a useful default to smime-CA-file

* lisp/gnus/smime.el (smime-CA-file): Use `gnutls-trustfiles' to
provide a default so that this will work automatically on many
systems (bug#20960).

2 years agoMake the SVG error message less verbose
Lars Ingebrigtsen [Tue, 12 Apr 2022 23:38:10 +0000 (01:38 +0200)]
Make the SVG error message less verbose

* src/image.c (svg_load_image): Don't include the spec in the
error message, because this is commonly the entire SVG string, and
this will fill up the *Messages* buffer quickly.

2 years agoMention animated WebP images
Lars Ingebrigtsen [Tue, 12 Apr 2022 19:29:10 +0000 (21:29 +0200)]
Mention animated WebP images

2 years agoFix eager macroexpansion cycle in cl-once-only
Sean Whitton [Tue, 12 Apr 2022 15:59:22 +0000 (17:59 +0200)]
Fix eager macroexpansion cycle in cl-once-only

* lisp/emacs-lisp/cl-macs.el (cl-once-only): Use different cl-loop
syntax, with no functional change, but such that the loop does not
expand into cl-psetq.

2 years agoImprove DISPOSE_PREVIOUS in gif_load slightly
Lars Ingebrigtsen [Tue, 12 Apr 2022 14:22:27 +0000 (16:22 +0200)]
Improve DISPOSE_PREVIOUS in gif_load slightly

* src/image.c (gif_load): Tweak how DISPOSE_PREVIOUS is handled.
It's still not right, but it's less glaringly wrong.

2 years agoFix 'window-text-pixel-size' when starting from a display property
Eli Zaretskii [Tue, 12 Apr 2022 14:19:06 +0000 (17:19 +0300)]
Fix 'window-text-pixel-size' when starting from a display property

* src/xdisp.c (Fwindow_text_pixel_size): Handle the case where
there's a display property at START and 'move_it_to' overshoots.
(Bug#54862)

2 years agoFix webp_load data lifetime issues
Lars Ingebrigtsen [Tue, 12 Apr 2022 14:08:50 +0000 (16:08 +0200)]
Fix webp_load data lifetime issues

* src/image.c (webp_load): Take care of lifetime issues of the
image data we're iterating over for animated images.

2 years agoFix keyboard event device attribution on GTK+ 2
Po Lu [Tue, 12 Apr 2022 13:29:02 +0000 (21:29 +0800)]
Fix keyboard event device attribution on GTK+ 2

* src/xfns.c (setup_xi_event_mask): Select for raw keypress
events on GTK 2.
* src/xterm.c (handle_one_xevent): Set pending keystroke time
when a raw event is received.
* src/xterm.h (struct x_display_info): New flag
`pending_keystroke_time_special_p'.

2 years agoFix detection of Meta key in some cases
Po Lu [Tue, 12 Apr 2022 13:15:05 +0000 (21:15 +0800)]
Fix detection of Meta key in some cases

* src/xterm.c (x_find_modifier_meanings): Set found_meta_p
correctly.

2 years agoFix check for whether frames fit into gif images
Lars Ingebrigtsen [Tue, 12 Apr 2022 13:11:09 +0000 (15:11 +0200)]
Fix check for whether frames fit into gif images

* src/image.c (gif_load): Really check all frames that they fit.

2 years agoFix some confusing names in xterm.c
Po Lu [Tue, 12 Apr 2022 13:08:36 +0000 (21:08 +0800)]
Fix some confusing names in xterm.c

* src/xterm.c (enum xm_targets_table_byte_order): Rename to
`xm_byte_order'.  All uses changed.

2 years agoStore less data in the gif animation cache
Lars Ingebrigtsen [Tue, 12 Apr 2022 12:45:13 +0000 (14:45 +0200)]
Store less data in the gif animation cache

* src/image.c (gif_load): Only start a cache if we're have an
:index entry (which means that we're trying to animate something).

2 years agoFix clicking on files in Dired when drag is enabled
Po Lu [Tue, 12 Apr 2022 11:21:21 +0000 (19:21 +0800)]
Fix clicking on files in Dired when drag is enabled

* lisp/dired.el (dired-mouse-drag): Don't drag if the mouse
didn't move far enough.

2 years agoRelease resources in gif_load on errors
Lars Ingebrigtsen [Tue, 12 Apr 2022 11:17:14 +0000 (13:17 +0200)]
Release resources in gif_load on errors

* src/image.c (webp_load): Clean up code slightly.
(gif_load): Really release resources on GIF parsing errors.

2 years agoAnimate GIF images that don't have an explicit delay setting
Lars Ingebrigtsen [Tue, 12 Apr 2022 10:43:56 +0000 (12:43 +0200)]
Animate GIF images that don't have an explicit delay setting

* src/image.c (gif_load): Use the default delay for GIF images
that don't explicitly state a delay.

2 years agoAdd biblatex alias entry types for compability with bibtex
Olaf Trygve Berglihn [Tue, 12 Apr 2022 10:21:19 +0000 (12:21 +0200)]
Add biblatex alias entry types for compability with bibtex

* lisp/textmodes/bibtex.el (bibtex-biblatex-entry-alist): Add
biblatex alias entry types for compability with bibtex (bug#54877).

Copyright-paperwork-exempt: yes

2 years agoFix thinko in the anim cache
Lars Ingebrigtsen [Tue, 12 Apr 2022 10:12:24 +0000 (12:12 +0200)]
Fix thinko in the anim cache

* src/image.c (gif_load): Fix resetting the cache when we're out
of sync.
(anim_create_cache): Start from zero, not 1.

2 years agoDisallow drag and drop inside a menu-entry
Po Lu [Tue, 12 Apr 2022 08:36:42 +0000 (16:36 +0800)]
Disallow drag and drop inside a menu-entry

* src/xterm.c (x_dnd_cleanup_drag_and_drop): Always free DND
targets even if waiting for finish.
(x_dnd_begin_drag_and_drop): Free targets correctly when
signalling error and prevent activating drag-and-drop inside a
menu or popup.  (It doesn't work.)

2 years agoAdapt macOS defaults in Tramp's process-attributes implementation
Michael Albinus [Tue, 12 Apr 2022 07:41:11 +0000 (09:41 +0200)]
Adapt macOS defaults in Tramp's process-attributes implementation

* doc/misc/tramp.texi (Remote processes):
Mention tramp-connection-local-darwin-ps-* constants.

* lisp/net/tramp-integration.el
(tramp-connection-local-darwin-ps-variables): Fix docstring.
(top): Simplify setting local profiles.

* test/lisp/net/tramp-tests.el (tramp-test31-list-system-processes)
(tramp-test31-process-attributes): New tests.

2 years agoprocess-attributes-ps-args / process-attributes-ps-format for Darwin
Filipp Gunbin [Tue, 12 Apr 2022 07:12:29 +0000 (09:12 +0200)]
process-attributes-ps-args / process-attributes-ps-format for Darwin

* lisp/net/tramp-integration.el
(tramp-darwin-process-attributes-ps-args)
(tramp-darwin-process-attributes-ps-format)
(tramp-connection-local-darwin-ps-variables): New defconsts.  Add
them to connection-local variables.  Preset default "ps" profile
for Darwin.

2 years agoAdd two classic Common Lisp macro-writing macros
Sean Whitton [Mon, 11 Apr 2022 16:20:35 +0000 (09:20 -0700)]
Add two classic Common Lisp macro-writing macros

* lisp/emacs-lisp/cl-macs.el (cl-with-gensyms, cl-once-only): New macros.

2 years agoFix some DISPLAY variable related bugs on PGTK
Po Lu [Tue, 12 Apr 2022 05:27:56 +0000 (13:27 +0800)]
Fix some DISPLAY variable related bugs on PGTK

* src/callproc.c (getenv_internal, make_environment_block):
Don't set DISPLAY on non-X GDK backends.  (bug#54844)

2 years ago* src/xterm.c (frame_set_mouse_pixel_position): Avoid server grab.
Po Lu [Tue, 12 Apr 2022 04:01:34 +0000 (12:01 +0800)]
* src/xterm.c (frame_set_mouse_pixel_position): Avoid server grab.

2 years agoDon't use native image APIs for some types on Haiku
Po Lu [Tue, 12 Apr 2022 02:37:39 +0000 (02:37 +0000)]
Don't use native image APIs for some types on Haiku

* src/haikuimage.c (haiku_can_use_native_image_api): Ignore
types with animations when their respective libraries are
present.

2 years agoFix last tool bar bug on Haiku as well
Po Lu [Tue, 12 Apr 2022 00:47:38 +0000 (00:47 +0000)]
Fix last tool bar bug on Haiku as well

* src/haikuterm.c (haiku_read_socket): Adapt last change to
Haiku.

2 years agoFix selecting text and releasing the mouse buttons above the toolbar
Po Lu [Tue, 12 Apr 2022 00:41:19 +0000 (08:41 +0800)]
Fix selecting text and releasing the mouse buttons above the toolbar

* src/xterm.c (handle_one_xevent): Don't send ButtonRelease
events to tool bars if there is no selected tool bar item.

2 years ago* lisp/emacs-lisp/macroexp.el (macroexp-let2*): Allow common shorthand
Stefan Monnier [Mon, 11 Apr 2022 19:10:51 +0000 (15:10 -0400)]
* lisp/emacs-lisp/macroexp.el (macroexp-let2*): Allow common shorthand

2 years agoUse preferred chars among duplicates as per UTR#25 §25.
Paul Eggert [Mon, 11 Apr 2022 17:37:59 +0000 (10:37 -0700)]
Use preferred chars among duplicates as per UTR#25 §25.