]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoMake Gnus address checking more resilient
Lars Ingebrigtsen [Mon, 31 Jan 2022 15:41:32 +0000 (16:41 +0100)]
Make Gnus address checking more resilient

* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Check that we have an email address before checking the validity
(bug#53651).

3 years agoClarify that INSTALL isn't for Git checkouts (bug#53627)
Lars Ingebrigtsen [Mon, 31 Jan 2022 15:24:25 +0000 (16:24 +0100)]
Clarify that INSTALL isn't for Git checkouts (bug#53627)

3 years agoExtend filelock-tests.el for bug#53207
Michael Albinus [Mon, 31 Jan 2022 14:26:06 +0000 (15:26 +0100)]
Extend filelock-tests.el for bug#53207

* test/src/filelock-tests.el (filelock-tests--fixture): Make it a
defmacro.  Adapt callees.
(filelock-tests-unlock-spoiled, filelock-tests-kill-buffer-spoiled):
Simplify.
(filelock-tests-detect-external-change): New test

3 years agoFix artifacting on PGTK when bits are copied with an alpha channel
Po Lu [Mon, 31 Jan 2022 13:12:14 +0000 (21:12 +0800)]
Fix artifacting on PGTK when bits are copied with an alpha channel

* src/pgtkterm.c (x_draw_stretch_glyph_string): Draw background
respecting `alpha-background'.
(pgtk_copy_bits): Use CAIRO_OPERATOR_SOURCE to draw onto the
destination surface.

3 years agoImprove 'latin1-display-ucs-per-lynx'
Eli Zaretskii [Mon, 31 Jan 2022 13:08:08 +0000 (15:08 +0200)]
Improve 'latin1-display-ucs-per-lynx'

* lisp/international/latin1-disp.el (latin1-display-ucs-per-lynx):
Don't judge display-ability of all the characters by testing just
one of them.  Instead, install an ASCII equivalent of every
character that the terminal cannot display.

3 years ago; * src/gtkutil.c (xg_create_frame_widgets): Avoid private GTK symbol.
Po Lu [Mon, 31 Jan 2022 13:01:45 +0000 (21:01 +0800)]
; * src/gtkutil.c (xg_create_frame_widgets): Avoid private GTK symbol.

3 years agoImplement `alpha-background' on PGTK
Po Lu [Mon, 31 Jan 2022 12:21:04 +0000 (20:21 +0800)]
Implement `alpha-background' on PGTK

* src/ftcrfont.c (ftcrfont_draw): Respect alpha-background where
appropriate.
* src/gtkutil.c (xg_create_frame_widgets): Swap some
conditionals around to get the right visual and signal handlers
on PGTK.
(xg_widget_style_updated): Likewise.
* src/pgtkfns.c (pgtk_set_alpha_background): New function.
(pgtk_frame_parm_handlers): Add it instead of the generic param
handler.
(Fx_create_frame): Fix typo.
* src/pgtkterm.c (pgtk_fill_rectangle):
(pgtk_set_cr_source_with_gc_foreground):
(pgtk_set_cr_source_with_gc_background):
(pgtk_set_cr_source_with_color): New argument
`respect_alpha_backend'.  All callers changed.
* src/pgtkterm.h: Update function prototypes.

3 years agoFix accesses to GTK structures on tooltip frames
Po Lu [Mon, 31 Jan 2022 10:37:09 +0000 (18:37 +0800)]
Fix accesses to GTK structures on tooltip frames

* src/xfns.c (xic_set_preeditarea): Don't set the GTK context on
tooltip frames.
(x_set_alpha_background): Don't make tooltip frames paintable.
* src/xterm.c (x_xr_ensure_picture): Get rid of GDK visual code.
This is now done in a better way inside xg_create_frame_widgets.
(bug#53654)

3 years ago* src/haikufns.c (Fx_display_visual_class): Return correct values.
Po Lu [Mon, 31 Jan 2022 10:14:52 +0000 (10:14 +0000)]
* src/haikufns.c (Fx_display_visual_class): Return correct values.

3 years agoImprove portability of GDK visual code
Po Lu [Mon, 31 Jan 2022 10:13:19 +0000 (18:13 +0800)]
Improve portability of GDK visual code

* src/gtkutil.c (xg_create_frame_widgets): Look up the visual
instead of assuming it based on the depth.

3 years ago* src/xterm.c (x_term_init): Avoid freeze with 24-bit visuals.
Po Lu [Mon, 31 Jan 2022 10:08:07 +0000 (18:08 +0800)]
* src/xterm.c (x_term_init): Avoid freeze with 24-bit visuals.

3 years agoImprove portability of alpha channel handling on TrueColor visuals
Po Lu [Mon, 31 Jan 2022 09:59:12 +0000 (17:59 +0800)]
Improve portability of alpha channel handling on TrueColor visuals

* src/xfns.c (select_visual): Always ask for a TrueColor visual.
* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_draw): Test `alpha_bits' instead of
n_planes.
* src/xterm.c (x_fill_rectangle, x_clear_rectangle): Likewise.
(x_query_colors, x_alloc_nearest_color): Remove code that
hard-coded alpha mask.
(x_term_init): Calculate alpha bits and offset and populate
field appropriately.
* src/xterm.h (struct x_display_info): New fields `alpha_bits'
and `alpha_offset'.
(x_make_truecolor_pixel): Stop hardcoding the value of the alpha
mask.

3 years agoFactor out function to check for clang in tests
Stefan Kangas [Mon, 31 Jan 2022 06:42:50 +0000 (07:42 +0100)]
Factor out function to check for clang in tests

This also stops a flymake test from failing on my machine.

* lisp/emacs-lisp/ert-x.el (ert-gcc-is-clang-p): New function
factored out from ...
* test/lisp/progmodes/flymake-tests.el (flymake-tests--gcc-is-clang):
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): ... here.

* test/lisp/progmodes/flymake-tests.el (different-diagnostic-types)
(included-c-header-files):
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Use above new function.

3 years ago* lisp/image.el (image-map): Use defvar-keymap.
Stefan Kangas [Sun, 30 Jan 2022 23:10:58 +0000 (00:10 +0100)]
* lisp/image.el (image-map): Use defvar-keymap.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 31 Jan 2022 05:58:23 +0000 (06:58 +0100)]
Merge from origin/emacs-28

6f282b31ad Update to Org 9.5.2-13-gdd6486
6636231b2c ; * lisp/international/latin1-disp.el: Update commentary.
f22e9ba9ac Fix regression in Occur Edit mode

3 years agoFix motion not being reported on GTK when mouse moves over toolbar
Po Lu [Mon, 31 Jan 2022 05:45:48 +0000 (13:45 +0800)]
Fix motion not being reported on GTK when mouse moves over toolbar

* src/gtkutil.c (xg_event_is_for_scrollbar): Make code
consistent between XI2 and Core Input.

3 years agoMake cursor alpha consistent with a transparent background
Po Lu [Mon, 31 Jan 2022 05:06:14 +0000 (13:06 +0800)]
Make cursor alpha consistent with a transparent background

* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_shape):
* src/xterm.c (x_clear_glyph_string_rect): Don't respect
background alpha when drawing the cursor.

3 years ago* src/xterm.c (x_xrender_color_from_gc_foreground): Fix omission error.
Po Lu [Mon, 31 Jan 2022 04:58:11 +0000 (12:58 +0800)]
* src/xterm.c (x_xrender_color_from_gc_foreground): Fix omission error.

3 years agoFix the X toolkit build
Po Lu [Mon, 31 Jan 2022 03:59:52 +0000 (11:59 +0800)]
Fix the X toolkit build

* src/xterm.c (x_after_update_window_line): Update calls to
`x_fill_rectangle'.

3 years agoFix tooltip frame creation with 32-bit visuals
Po Lu [Mon, 31 Jan 2022 03:53:10 +0000 (11:53 +0800)]
Fix tooltip frame creation with 32-bit visuals

* src/xfns.c (x_create_tip_frame): Define CWColormap and
CWBorderPixel to use a 32-bit visual if available.

3 years ago* etc/NEWS: Announce the 'alpha-background' frame parameter.
Po Lu [Mon, 31 Jan 2022 02:39:12 +0000 (10:39 +0800)]
* etc/NEWS: Announce the 'alpha-background' frame parameter.

3 years agoFix the no toolkit build.
Po Lu [Mon, 31 Jan 2022 02:34:50 +0000 (10:34 +0800)]
Fix the no toolkit build.

* src/xfns.c (x_window): Use n_planes instead of CopyFromParent
for depth.

3 years agoFix with-suppressed-warnings edebug spec
Lars Ingebrigtsen [Mon, 31 Jan 2022 02:31:01 +0000 (03:31 +0100)]
Fix with-suppressed-warnings edebug spec

* lisp/emacs-lisp/byte-run.el (with-suppressed-warnings): Fix
edebug spec.

3 years agoFix builds without GTK
Po Lu [Mon, 31 Jan 2022 02:30:24 +0000 (10:30 +0800)]
Fix builds without GTK

* src/xfns.c (x_set_alpha_background): Don't call
gtk_widget_set_app_paintable without GTK.

3 years agoImplement `alpha-background' on non-Cairo builds
Po Lu [Mon, 31 Jan 2022 02:15:47 +0000 (10:15 +0800)]
Implement `alpha-background' on non-Cairo builds

* src/frame.c (gui_set_alpha_background): Recompute basic faces
so xft face ext info gets reset.
* src/gtkutil.c (xg_create_frame_widgets): Attach to style
updated signal.
(xg_update_frame_menubar): Set menu bar visual correctly.
(xg_widget_style_updated): New function.

* src/xfns.c (x_set_alpha_background): New function.
(x_frame_parm_handlers): Use x_set_alpha_background instead.

* src/xfont.c (xfont_draw):
* src/xftfont.c (xftfont_draw): Handle `alpha-background'
parameter.

* src/xterm.c (x_xr_ensure_picture): Export function.
(x_update_opaque_region): New function.
(x_fill_rectangle): New parameter `respect_alpha_background'.
All callers changed.
(handle_one_xevent): Set opaque region on ConfigureNotify.
(x_drop_xrender_surfaces): Set opaque region.
(x_xrender_color_from_gc_foreground):
(x_xrender_color_from_gc_background): Premultiply alpha with
components if asked for.
* src/xterm.h (struct x_display_info): New atom
`Xatom_net_wm_opaque_region'.

3 years agoUpdate to Org 9.5.2-13-gdd6486
Kyle Meyer [Mon, 31 Jan 2022 01:38:01 +0000 (20:38 -0500)]
Update to Org 9.5.2-13-gdd6486

3 years ago* lisp/frame.el (undelete-frame--save-deleted-frame): Handle initial frame.
Juri Linkov [Sun, 30 Jan 2022 16:38:24 +0000 (18:38 +0200)]
* lisp/frame.el (undelete-frame--save-deleted-frame): Handle initial frame.

The function undelete-frame--save-deleted-frame is renamed
from undelete-frame--handle-delete-frame (bug#51883).

3 years ago* lisp/frame.el: Don't require 'frameset.el' (bug#51883).
Juri Linkov [Sun, 30 Jan 2022 16:35:33 +0000 (18:35 +0200)]
* lisp/frame.el: Don't require 'frameset.el' (bug#51883).

(clone-frame): Use frame-internal-parameters.
(undelete-frame--handle-delete-frame): Instead of using frameset-save,
save frame-parameters except frame-internal-parameters and 'display'
on non-graphic display.  Also save window-state from window-state-get.
(undelete-frame): Instead of using frameset-restore,
set default-frame-alist for make-frame (like in clone-frame),
and restore window-state with window-state-put.

* lisp/frameset.el (frameset-session-filter-alist): Append
parameters from frame-internal-parameters with the filter :never.
Remove :name that is now in frame-internal-parameters.
(frameset-persistent-filter-alist): Remove outer-window-id,
parent-id, window-id that are now in frame-internal-parameters,
included here via frameset-session-filter-alist.

* src/frame.c (frame-internal-parameters): New variable.

3 years agoEnlarge max-specpdl-size for generation of leim-list.el in bootstrap
Alan Mackenzie [Sun, 30 Jan 2022 16:32:21 +0000 (16:32 +0000)]
Enlarge max-specpdl-size for generation of leim-list.el in bootstrap

* leim/Makefile.in (${leimdir}/leim-list.el): Add a --eval clause to set
max-specpdl-size to 5000 (previously 2500) for this target.

3 years agoHandle correctly errors during frame creation on Haiku
Po Lu [Sun, 30 Jan 2022 13:23:52 +0000 (13:23 +0000)]
Handle correctly errors during frame creation on Haiku

* src/haikufns.c (haiku_create_frame): Only block input where
required.

* src/haiku_support.cc (BCursor_delete): Accept NULL values of
`cursor'.

3 years agoUse XRender to composite fringe bitmaps
Po Lu [Sun, 30 Jan 2022 08:02:58 +0000 (16:02 +0800)]
Use XRender to composite fringe bitmaps

This will allow us to apply transforms such as scaling in the
future.

* src/xterm.c (x_draw_fringe_bitmap): Composite fringe bitmaps
with XRender if available.

3 years ago; * lisp/international/latin1-disp.el: Update commentary.
Eli Zaretskii [Sun, 30 Jan 2022 07:40:12 +0000 (09:40 +0200)]
; * lisp/international/latin1-disp.el: Update commentary.

3 years agoFix regression in Occur Edit mode
Eli Zaretskii [Sun, 30 Jan 2022 06:49:34 +0000 (08:49 +0200)]
Fix regression in Occur Edit mode

* lisp/replace.el (occur-after-change-function): Fix the algorithm
to find the smallest change in some corner cases.  (Bug#53598)

3 years agoFix some problems with inconsistent visuals on GDK
Po Lu [Sun, 30 Jan 2022 06:02:40 +0000 (14:02 +0800)]
Fix some problems with inconsistent visuals on GDK

* src/xterm.c (x_xr_ensure_picture): Use the visual GDK used
instead of our own.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 30 Jan 2022 05:31:11 +0000 (06:31 +0100)]
Merge from origin/emacs-28

e81e375539 ; Yet another minor fix of Malayalam composition rules.
94f38cbec4 Fix last change of Malayalam composition rules
ed3bbeb80d Fix rendering of Malayalam script
5ef3a52342 Improve documentation of Occur mode

3 years agoUse consistent font when displaying menu equivalent keys on Haiku
Po Lu [Sun, 30 Jan 2022 05:20:15 +0000 (05:20 +0000)]
Use consistent font when displaying menu equivalent keys on Haiku

* src/haiku_support.cc (DrawContent): Set plain font when
drawing key text.

3 years agoAdd support for ARGB visuals on non-Xt builds
Po Lu [Sun, 30 Jan 2022 01:23:40 +0000 (09:23 +0800)]
Add support for ARGB visuals on non-Xt builds

* src/gtkutil.c (xg_create_frame_widgets): Enable RGBA visual
on non-PGTK builds.
* src/xfns.c (select_visual): Select 32-bit visuals on non-Xt
builds.
* src/xterm.c (x_draw_fringe_bitmap):
(x_draw_image_glyph_string): Stop using DefaultDepthOfScreen.
(x_query_colors):
* src/xterm.h (x_make_truecolor_pixel): Make colors opaque on
32-bit visuals.

3 years agoSome adjustments to last change
Po Lu [Sun, 30 Jan 2022 00:51:13 +0000 (08:51 +0800)]
Some adjustments to last change

* src/gtkutil.c (xg_set_undecorated): Only set ARGB visual on
Cairo builds wtihout PGTK.
* src/xfns.c (select_visual): Likewise.

3 years agoAdd background transparency support for GTK+Cairo
Håkon Flatval [Sat, 29 Jan 2022 15:13:06 +0000 (16:13 +0100)]
Add background transparency support for GTK+Cairo

3 years agopackage.el: Fix bug#53529
Stefan Monnier [Sat, 29 Jan 2022 22:50:02 +0000 (17:50 -0500)]
package.el: Fix bug#53529

* lisp/emacs-lisp/package.el (package-autoload-ensure-default-file):
Enforce Unix EOLs.

3 years ago; Yet another minor fix of Malayalam composition rules.
Eli Zaretskii [Sat, 29 Jan 2022 20:14:30 +0000 (22:14 +0200)]
; Yet another minor fix of Malayalam composition rules.

3 years agoFix last change of Malayalam composition rules
Eli Zaretskii [Sat, 29 Jan 2022 19:56:53 +0000 (21:56 +0200)]
Fix last change of Malayalam composition rules

* lisp/language/indian.el (malayalam-composable-pattern):
Reinstate.  Instead of removing it, add any sequence of
Malayalam characters to the existing patterns, so as not
to lose the patterns that use ZWJ and ZWNJ.  (Bug#53625)

3 years agoFix rendering of Malayalam script
Eli Zaretskii [Sat, 29 Jan 2022 19:22:02 +0000 (21:22 +0200)]
Fix rendering of Malayalam script

* lisp/language/indian.el (malayalam-composable-pattern): Remove.
(script-regexp-alist): Remove 'malayalam-composable-pattern'.
Instead, pass any sequence of Malayalam codepoints to the shaping
engine.  (Bug#53625)

3 years ago* lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).
Juri Linkov [Sat, 29 Jan 2022 19:05:55 +0000 (21:05 +0200)]
* lisp/tab-bar.el (tab-bar-menu-bar-button): New variable (bug#51648).

(tab-bar-format-menu-bar): Use it.

3 years ago* lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.
Juri Linkov [Sat, 29 Jan 2022 18:55:17 +0000 (20:55 +0200)]
* lisp/isearch.el: Put 'isearch-scroll' property on two new symbols.

Put 'isearch-scroll' property on new commands 'recenter-other-window'
and 'context-menu-open'.

3 years ago; * lisp/subr.el (use-dialog-box-p): Fix typo.
Eli Zaretskii [Sat, 29 Jan 2022 17:18:26 +0000 (19:18 +0200)]
; * lisp/subr.el (use-dialog-box-p): Fix typo.

3 years agoModernise the security section in the efaq a bit
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:49:52 +0000 (17:49 +0100)]
Modernise the security section in the efaq a bit

* doc/misc/efaq.texi (Security risks with Emacs): Remove the X
bit, and add a bit about browsing the web (bug#24489).

3 years agoAllow redirecting `message' output to a different buffer
Lars Ingebrigtsen [Sat, 29 Jan 2022 16:23:48 +0000 (17:23 +0100)]
Allow redirecting `message' output to a different buffer

* doc/lispref/display.texi (Logging Messages): Document it.
* src/xdisp.c (message_dolog): Add sanity checking.
(syms_of_xdisp): Make Vmessages_buffer_name into a defvar
(bug#27170).

3 years ago; Fix formatting of last change.
Eli Zaretskii [Sat, 29 Jan 2022 15:56:30 +0000 (17:56 +0200)]
; Fix formatting of last change.

3 years agoDon't require mouse for prompting via dialog boxes
Eli Zaretskii [Sat, 29 Jan 2022 15:54:43 +0000 (17:54 +0200)]
Don't require mouse for prompting via dialog boxes

* lisp/subr.el (use-dialog-box-p): Don't require mouse support,
and allow dialog boxes when invoked via the TTY menus without a
mouse.
(from--tty-menu-p): New internal variable.

* lisp/menu-bar.el (popup-menu): Bind 'from--tty-menu-p' when
invoking a command from the menu.

3 years agoMake revert-buffer ('g') keep point in VC diff buffers
Charles A. Roelli [Sat, 29 Jan 2022 15:47:52 +0000 (16:47 +0100)]
Make revert-buffer ('g') keep point in VC diff buffers

* lisp/vc/vc.el (vc-diff-restore-buffer): New function.
(vc-diff-finish): Update its calling convention to include an
optional 'oldbuf' parameter, and handle it.
(vc-diff-internal): Pass a clone of the incumbent vc-diff
buffer to 'vc-diff-finish' (bug#28852).

3 years agoClarify Fmatch_data doc string
Lars Ingebrigtsen [Sat, 29 Jan 2022 15:39:48 +0000 (16:39 +0100)]
Clarify Fmatch_data doc string

* src/search.c (Fmatch_data): Note quirk about non-matching
optional groups in the doc string (bug#29343).

3 years agoImprove documentation of Occur mode
Eli Zaretskii [Sat, 29 Jan 2022 14:51:30 +0000 (16:51 +0200)]
Improve documentation of Occur mode

* doc/emacs/search.texi (Other Repeating Search): Improve wording
and document Occur Edit mode better.

3 years agoMake gnus-icalendar-with-decoded-handle more DWIM
Jae-hyeon Park [Sat, 29 Jan 2022 14:44:44 +0000 (15:44 +0100)]
Make gnus-icalendar-with-decoded-handle more DWIM

* lisp/gnus/gnus-icalendar.el
(gnus-icalendar-with-decoded-handle): Assume that calendars with
no charset is utf-8.

Copyright-paperwork-exempt: yes

3 years agoFix error after merge
Po Lu [Sat, 29 Jan 2022 12:38:13 +0000 (20:38 +0800)]
Fix error after merge

* src/filelock.c (lock_file): Fix test against I_OWN_IT.

3 years agoMerge from origin/emacs-28
Po Lu [Sat, 29 Jan 2022 12:37:24 +0000 (20:37 +0800)]
Merge from origin/emacs-28

611736f3bc Remove debug logging
ddba3c3dba Fix error in filelock.c

# Conflicts:
# src/filelock.c

3 years agoRemove debug logging
Alan Third [Thu, 28 Oct 2021 10:21:00 +0000 (11:21 +0100)]
Remove debug logging

* src/nsterm.m ([EmacsView copyRect:to:]): Remove logging as it's no
longer required.

3 years agoFix error at startup with recent change
Po Lu [Sat, 29 Jan 2022 11:08:52 +0000 (19:08 +0800)]
Fix error at startup with recent change

* lisp/startup.el (normal-top-level): Don't access
`native-comp-eln-load-path' if not (featurep 'native-compile).

3 years agoFix unrelated help text tooltips if a popup is shown during the delay
Po Lu [Sat, 29 Jan 2022 10:53:28 +0000 (18:53 +0800)]
Fix unrelated help text tooltips if a popup is shown during the delay

* doc/lispref/frames.texi (Pop-Up Menus): Document new hook.
* etc/NEWS: Announce `x-pre-popup-menu-hook'.
* lisp/tooltip.el (tooltip-mode): Make sure `tooltip-hide' is
run before any popup menu is displayed to prevent unrelated help
text from obscuring the popup menu if it pops up during the
tooltip delay.
* src/menu.c (x_popup_menu_1): Run said hook right before the
popup menu is displayed.
(syms_of_menu): New hook `x-pre-popup-menu-hook'.

3 years agoFix error in filelock.c
Michael Albinus [Sat, 29 Jan 2022 10:45:38 +0000 (11:45 +0100)]
Fix error in filelock.c

* src/filelock.c (lock_file): Move call of file name handler to
`Flock_file'.  Determine lock_filename only in case
create_lockfiles is non-nil.  Adapt the rest of the function accordingly.
(Flock_file): Do not check for create_lockfiles.  Call file name
handler if appropriate.  (Bug#53207)

3 years agoAllow <Delete> key to delete entire grapheme clusters
Eli Zaretskii [Sat, 29 Jan 2022 10:19:23 +0000 (12:19 +0200)]
Allow <Delete> key to delete entire grapheme clusters

* lisp/simple.el (delete-forward-char): If deleting forward,
delete complete grapheme clusters as single units.

* etc/NEWS: Announce the change.

3 years agoFix native-compilation at startup
Eli Zaretskii [Sat, 29 Jan 2022 09:55:02 +0000 (11:55 +0200)]
Fix native-compilation at startup

* lisp/startup.el (normal-top-level): Set up the initial value of
'native-comp-eln-load-path' early into startup, then amend it
after calling 'command-line'.  (Bug#53497)

3 years agoWrite a dummy event on each popup menu event
Po Lu [Sat, 29 Jan 2022 07:35:48 +0000 (07:35 +0000)]
Write a dummy event on each popup menu event

* src/haiku_io.c (haiku_len): Add new event.
* src/haiku_support.cc (be_popup_menu_thread_entry):
(Highlight): Write a dummy event to the event port.
* src/haiku_support.h (enum haiku_event_type): New `DUMMY_EVENT'
type.
(struct haiku_dummy_event): New structure.
* src/haikuterm.c (haiku_read_socket): Handle dummy events.

3 years agoFix compiler warning due to a recent change
Eli Zaretskii [Sat, 29 Jan 2022 07:12:30 +0000 (09:12 +0200)]
Fix compiler warning due to a recent change

* src/data.c (Ffset): Avoid compiler warning about 'function'.

3 years agoFix a default value of the `:underline' face attribute
Po Lu [Sat, 29 Jan 2022 06:05:49 +0000 (14:05 +0800)]
Fix a default value of the `:underline' face attribute

* lisp/cus-face.el (custom-face-attributes): Add `:position' t
default value of "On" for underlines.

3 years agoImprove menu drag tracking on Haiku
Po Lu [Sat, 29 Jan 2022 05:50:32 +0000 (05:50 +0000)]
Improve menu drag tracking on Haiku

* src/haikuterm.c (haiku_read_socket): Ignore all button events
when popup_activated_p.

3 years agoMake menus on Haiku work better
Po Lu [Sat, 29 Jan 2022 05:24:04 +0000 (05:24 +0000)]
Make menus on Haiku work better

* src/haikuterm.c (haiku_read_socket): Don't send up events for
ungrabbed buttons.

3 years agoImplement real menu help-echo text on Haiku
Po Lu [Sat, 29 Jan 2022 05:06:02 +0000 (05:06 +0000)]
Implement real menu help-echo text on Haiku

* lisp/tooltip.el (tooltip-show-help): Remove Haiku-specific
conditional since that's now taken care of by C code.

* src/haiku_io.c (haiku_read_size):
(haiku_read_with_timeout):
(haiku_write_without_signal): Add parameter `popup_p'.  All
callers changed.
(port_popup_menu_to_emacs): New variable.

* src/haiku_support.cc (struct be_popup_menu_data): New
structure.
(be_popup_menu_thread_entry): New function.
(class EmacsMenuItem): New field `menu_ptr'.
(Highlight): Send help text to the popup port if this item
isn't for a menu bar.
(BMenu_add_item): Set menu_ptr appropriately.
(BMenu_run): Complete rewrite that allows to read help text from
the menu bar port.

* src/haiku_support.h (struct haiku_menu_bar_help_event): New
fields for popup menus.

* src/haikumenu.c (digest_menu_items): Only set help tooltip on
popup menus when system tooltips are enabled.
(haiku_menu_show_help):
(haiku_process_pending_signals_for_menu): New functions.
(haiku_menu_show): Pass new callbacks.

3 years ago* src/data.c (Ffset, defalias): Complete last change
Stefan Monnier [Sat, 29 Jan 2022 04:39:31 +0000 (23:39 -0500)]
* src/data.c (Ffset, defalias): Complete last change

Somehow part of the autoload history handling was left behind in `Ffset`
when the rest was moved to `defalias`.  Finish the job.

* src/data.c (Ffset): Don't set the `autoload` property here...
(defalias): ... set it here instead.

3 years agoReduce code duplication in parts of (auto)load&defalias
Stefan Monnier [Fri, 28 Jan 2022 18:19:11 +0000 (13:19 -0500)]
Reduce code duplication in parts of (auto)load&defalias

* src/data.c (defalias): New function, extracted from `Fdefalias`.
(Fdefalias): Use it.
(Ffset): Don't handle `Vautoload_queue` here, handle it in
`defalias` instead.
* src/comp.c (comp--register-subr): Use `defalias` instead of
duplicating its code.

* src/eval.c (load_with_autoload_queue): New function, extracted from
`Fautoload_do_load`.
(Fautoload_do_load): Use it.
(un_autoload): Mark it as static.
* src/fns.c (Frequire): Use it as well.

* src/lisp.h (defalias, load_with_autoload_queue): New declarations.
(un_autoload): Remove declaration.

3 years agoMake where-is correctly identify aliases
Sebastian Urban [Fri, 28 Jan 2022 16:27:28 +0000 (17:27 +0100)]
Make where-is correctly identify aliases

* lisp/help.el (where-is): Make aliases correctly say which
function is an alias for what (bug#37325).

3 years agoFix manual points about tex-latex-block/latex-insert-block
Sebastian Urban [Fri, 28 Jan 2022 16:12:35 +0000 (17:12 +0100)]
Fix manual points about tex-latex-block/latex-insert-block

* doc/emacs/text.texi (LaTeX Editing):
(LaTeX Editing): Update documentation of
tex-latex-block/latex-insert-block to what they really point to
(bug#37325).

Copyright-paperwork-exempt: yes

3 years agoImprove the read-file-name doc string slightly
Lars Ingebrigtsen [Fri, 28 Jan 2022 16:03:14 +0000 (17:03 +0100)]
Improve the read-file-name doc string slightly

* lisp/minibuffer.el (read-file-name): Note that the semantics of
INITIAL are odd (bug#37883).

3 years agoClarify where the shell-command output goes
Michael Albinus [Fri, 28 Jan 2022 15:32:15 +0000 (16:32 +0100)]
Clarify where the shell-command output goes

* lisp/simple.el (shell-command):
* doc/emacs/misc.texi (Single Shell): Clarify where the output
goes if the specified buffer isn't the current one (bug#40896).

3 years agoAllow using dired-hide-details-mode in wdired buffers
Lars Ingebrigtsen [Fri, 28 Jan 2022 14:56:05 +0000 (15:56 +0100)]
Allow using dired-hide-details-mode in wdired buffers

* lisp/dired.el (dired-hide-details-mode): Also work in
wdired-mode buffers (bug#45127).

* lisp/wdired.el (wdired-mode-map): Add a key binding.

3 years agoMove native-comp-eln-load-path setting earlier again
Lars Ingebrigtsen [Fri, 28 Jan 2022 14:26:39 +0000 (15:26 +0100)]
Move native-comp-eln-load-path setting earlier again

* lisp/startup.el (normal-top-level): Move
`native-comp-eln-load-path' earlier because hooks called may need
the setting (bug#53596).

3 years agoFix copyright-fix-years, use a dash to separate years in a range
Lele Gaifax [Fri, 28 Jan 2022 07:41:51 +0000 (08:41 +0100)]
Fix copyright-fix-years, use a dash to separate years in a range

Commit 7a46fa9c751f7c3147cd9b27fe84c1ce25419d3b, allowing en-dash as
years separator, changed the way the years range is composed taking the
separator from the `sep' variable instead of always using an hardwired
hyphen. Since the code explicitly avoid to touch (that is, extend)
existing ranges, that `sep' variable is almost always a space, or
whatever character precedes the last parsed year, thus generating a
range like "2020 2022" instead of "2020-2022".

* lisp/emacs-lisp/copyright.el (copyright-fix-years): Always use an dash
to separate years in a range.

* test/lisp/emacs-lisp/copyright-tests.el (with-copyright-fix-years-test):
(copyright-fix-years-tests--data):
(text-copyright-fix-years): New test cases (bug#53597).

3 years agoFix merge error in doc-view-pdf/ps->png
Lars Ingebrigtsen [Fri, 28 Jan 2022 13:47:15 +0000 (14:47 +0100)]
Fix merge error in doc-view-pdf/ps->png

* lisp/doc-view.el (doc-view-pdf/ps->png): Fix merge error from
previous epub patch.

3 years agoPrevent duplicate grab setting with xwidgets
Po Lu [Fri, 28 Jan 2022 09:49:38 +0000 (17:49 +0800)]
Prevent duplicate grab setting with xwidgets

* src/xwidget.c (xwidget_show_view): Don't set passive grab if
already set.

3 years agoUse the real cursor beneath the pointer on xwidgets
Po Lu [Fri, 28 Jan 2022 08:38:02 +0000 (16:38 +0800)]
Use the real cursor beneath the pointer on xwidgets

* src/xwidget.c (define_cursors): Make manual cursor definition
code PGTK-only.
(xw_update_cursor_for_view):
(xw_last_crossing_cursor_cb): New functions.
(xw_maybe_synthesize_crossing): Attach and disconnect cursor
signal handler where appropriate.
(xwidget_init_view): Set the default cursor to the nontext
cursor.
(Fxwidget_delete_view): Disconnect last crossing signal if
appropriate.
* src/xwidget.h (struct xwidget_view): New field
`last_crossing_cursor_signal'.

3 years agoFix xwidget build on PGTK
Po Lu [Fri, 28 Jan 2022 08:08:10 +0000 (16:08 +0800)]
Fix xwidget build on PGTK

* src/xwidget.c (xw_forward_event_translate): Adjust calls to
`find_widget_at_pos' for recent changes.

3 years ago; Rename 'startup--require-comp-safetly'
Eli Zaretskii [Fri, 28 Jan 2022 07:37:28 +0000 (09:37 +0200)]
; Rename 'startup--require-comp-safetly'

* src/comp.c (maybe_defer_native_compilation):
* lisp/startup.el (startup--require-comp-safely): Rename from
'startup--require-comp-safetly'.  All callers changed.

3 years ago; Fix a typo in recent documentation changes
Eli Zaretskii [Fri, 28 Jan 2022 07:30:04 +0000 (09:30 +0200)]
; Fix a typo in recent documentation changes

* doc/lispref/os.texi (Startup Summary):
* doc/emacs/cmdargs.texi (Initial Options): Fix a typo.

3 years agoFix duplicate scroll events without XI2
Po Lu [Fri, 28 Jan 2022 06:06:38 +0000 (14:06 +0800)]
Fix duplicate scroll events without XI2

* src/xwidget.c (xwidget_button): Only generate scroll events
when the button was released.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 28 Jan 2022 05:32:22 +0000 (06:32 +0100)]
Merge from origin/emacs-28

3dd47bde7a * lisp/frame.el (clone-frame): Filter out 'parent-id' (bug...

3 years agoClear xwidget passive grab whenever a drag begins
Po Lu [Fri, 28 Jan 2022 03:08:20 +0000 (11:08 +0800)]
Clear xwidget passive grab whenever a drag begins

* src/xwidget.c (xv_drag_begin_cb): New function.
(xwidget_view_from_window): Attach said function to grab widget
when a grab starts.
* src/xwidget.h (struct xwidget_view): New field
`passive_grab_drag_signal'.

3 years ago* src/xterm.c (handle_one_xevent): Remove obsolete workaround.
Po Lu [Fri, 28 Jan 2022 02:51:33 +0000 (10:51 +0800)]
* src/xterm.c (handle_one_xevent): Remove obsolete workaround.

3 years agoFix inappropriate use of killed xwidgets
Po Lu [Fri, 28 Jan 2022 02:48:12 +0000 (10:48 +0800)]
Fix inappropriate use of killed xwidgets

* src/xwidget.c (x_draw_xwidget_webkit_view): Don't record
embedder or synthesize focus events if the widget is killed.

3 years agoImplement xwidget passive grabs
Po Lu [Fri, 28 Jan 2022 02:41:03 +0000 (10:41 +0800)]
Implement xwidget passive grabs

* src/xwidget.c (find_widget_at_pos): New parameters for
controlling whether to respect grabs.  All callers changed.
(window_coords_from_toplevel): Make work when the widget is
the toplevel.
(find_widget): Fix coding style.
(xwidget_button_1): Set and clear passive grabs if appropriate.
(xw_maybe_synthesize_crossing): Allow current_window to be NULL
if the mode is XW_CROSSING_LEFT.

3 years agoAdd new switch --init-directory
Lars Ingebrigtsen [Thu, 27 Jan 2022 22:38:13 +0000 (23:38 +0100)]
Add new switch --init-directory

* doc/emacs/cmdargs.texi (Initial Options): Mention it.
* lisp/startup.el (normal-top-level): Move the eln init to after
we've processed the command line arguments.
(command-line): Interpret the --init-directory switch.

* src/emacs.c (standard_args): Add.

3 years ago* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.
Glenn Morris [Thu, 27 Jan 2022 22:21:15 +0000 (14:21 -0800)]
* lisp/doc-view.el (doc-view-epub-font-size): Fix type; add version.

Flagged by test-custom-opts.

3 years agoFix potential native compiler circular dependencies during load
Andrea Corallo [Thu, 27 Jan 2022 17:18:13 +0000 (18:18 +0100)]
Fix potential native compiler circular dependencies during load

* lisp/startup.el (startup--require-comp-safetly): New function.
(startup--honor-delayed-native-compilations): Make use of
`startup--require-comp-safetly'.
* src/comp.c (CALL0I): New define.
(maybe_defer_native_compilation): Make use of
`startup--require-comp-safetly'.

3 years agoFix up previous "Quit Emacs" from menu logic
Lars Ingebrigtsen [Thu, 27 Jan 2022 21:26:12 +0000 (22:26 +0100)]
Fix up previous "Quit Emacs" from menu logic

* lisp/files.el (files--buffers-needing-to-be-saved): Separated
out into its own function...
(save-some-buffers): ... from here.
(save-buffers-kill-emacs): Check that we have anything to save
before prompting the user.

3 years agoMake the save buffers prompt from Quit Emacs menu more understandable
Lars Ingebrigtsen [Thu, 27 Jan 2022 18:54:48 +0000 (19:54 +0100)]
Make the save buffers prompt from Quit Emacs menu more understandable

* lisp/files.el (save-buffers-kill-emacs): Use a much simpler (and
more understandable) prompt when exiting Emacs from the menu bar
(bug#4980).

* lisp/subr.el (use-dialog-box-p): Separate out into its own
function for reuse...
(y-or-n-p): ... from here.

3 years agoImprove detection of glyphless characters on TTY frames
Eli Zaretskii [Thu, 27 Jan 2022 18:35:22 +0000 (20:35 +0200)]
Improve detection of glyphless characters on TTY frames

* src/term.c (produce_glyphs): If the terminal can report for
which characters it has glyphs, use that to determine whether
a given character should be displayed as glyphless.

3 years ago* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).
Juri Linkov [Thu, 27 Jan 2022 17:47:40 +0000 (19:47 +0200)]
* lisp/frame.el (clone-frame): Filter out 'parent-id' (bug#51883).

3 years agoAdd setx highlighting to bat-mode
Arni Magnusson [Thu, 27 Jan 2022 16:12:11 +0000 (17:12 +0100)]
Add setx highlighting to bat-mode

* lisp/progmodes/bat-mode.el (bat-font-lock-keywords):
(bat-font-lock-keywords): Highlight setx (bug#53568).

3 years agoMove some of the doc-view variables around to fix load errors
Lars Ingebrigtsen [Thu, 27 Jan 2022 16:10:13 +0000 (17:10 +0100)]
Move some of the doc-view variables around to fix load errors

3 years agoAdd support for EPUB, CBZ, FB2 and (O)XPS extension to doc view
Daniel Nicolai [Thu, 27 Jan 2022 16:03:38 +0000 (17:03 +0100)]
Add support for EPUB, CBZ, FB2 and (O)XPS extension to doc view

* doc/emacs/misc.texi (Document View): Add requirements for new
extensions (i.e. mutool).

* lisp/doc-view.el (doc-view): Additionally update preliminary comment
(doc-view-custom-set-epub-font-size): redraw image after setting
(doc-view-unoconv-program): Put code all on one line
(doc-view-doc-type): Update docstring.
(doc-view-kill-proc): Fix comment indentation
(doc-view-mode-p):
Add check for new extensions and alternative check for PDF
(doc-view-pdf/ps->png): Associate new extension with png converter
(doc-view-convert-current-doc): Handle new extensions like PDF's
(doc-view-set-doc-type): Set correct doc-type for new extensions.

* lisp/files.el (auto-mode-alist):
Associate new extension types with doc-view.

3 years agoTweak href/superscript fix in tex-mode
Lars Ingebrigtsen [Thu, 27 Jan 2022 15:30:12 +0000 (16:30 +0100)]
Tweak href/superscript fix in tex-mode

* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-1): Fix
superscripts in href in a better way.