]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoPort hourglass display to XCB
Po Lu [Thu, 20 Jan 2022 03:27:17 +0000 (11:27 +0800)]
Port hourglass display to XCB

* src/xterm.c (x_show_hourglass):
(x_hide_hourglass): Use straightforward translations to XCB if
available.

3 years agoGet rid of calls to XRenderQueryExtension after terminal initialization
Po Lu [Thu, 20 Jan 2022 02:48:25 +0000 (10:48 +0800)]
Get rid of calls to XRenderQueryExtension after terminal initialization

* src/image.c (x_create_xrender_picture):
(Fimage_transforms_p): Use `xrender_supported_p'.

* src/xterm.c (x_term_init): Query for XRender support and
extension versions.

* src/xterm.h (struct x_display_info): New fields
`xrender_supported_p', `xrender_major' and `xrender_minor'.

3 years agoImplement selection ownership on Haiku
Po Lu [Thu, 20 Jan 2022 01:01:52 +0000 (01:01 +0000)]
Implement selection ownership on Haiku

* lisp/term/haiku-win.el (haiku-selection-owner-p): New
declaration.
(gui-backend-selection-owner-p): Implement using newly exposed
primitive.

* src/haiku_select.cc
(count_clipboard, count_primary, count_secondary): New
variables for tracking selection ownership.
(BClipboard_set_system_data):
(BClipboard_set_primary_selection_data):
(BClipboard_set_secondary_selection_data): Set ownership
variables.
(BClipboard_owns_clipboard):
(BClipboard_owns_primary):
(BClipboard_owns_secondary): New functions.

* src/haikuselect.c (Fhaiku_selection_owner_p): New function.
(syms_of_haikuselect): Define new subr.
* src/haikuselect.h: New prototypes.

3 years agoSuspend temp .elc production when native compiling till when necessary
Andrea Corallo [Wed, 19 Jan 2022 20:07:00 +0000 (21:07 +0100)]
Suspend temp .elc production when native compiling till when necessary

* lisp/emacs-lisp/bytecomp.el (byte-to-native-output-buffer-file):
Rename from `byte-to-native-output-file'.
(byte-write-target-file): Update.
(byte-compile-file): Write the temporary .elc only when not native
compiling.
(byte-compile-file): Kill the .elc buffer only when not native
compiling.
* lisp/emacs-lisp/comp.el (batch-byte+native-compile): Instead of just
renaming the temporary .elc make use of `byte-write-target-file' to
write it down and kill the temporary buffer.

3 years ago* Move some code in in `byte-write-target-file'.
Andrea Corallo [Wed, 19 Jan 2022 19:44:12 +0000 (20:44 +0100)]
* Move some code in in `byte-write-target-file'.

* lisp/emacs-lisp/bytecomp.el (byte-write-target-file): New function
spilling code from `byte-compile-file'.

3 years agoMake article--check-suspicious-addresses more resilient
Lars Ingebrigtsen [Wed, 19 Jan 2022 18:44:29 +0000 (19:44 +0100)]
Make article--check-suspicious-addresses more resilient

* lisp/gnus/gnus-art.el (article--check-suspicious-addresses):
Don't bug out on mbox-less addresses.

3 years agoTweak the previous suspicious Message change
Lars Ingebrigtsen [Wed, 19 Jan 2022 18:10:45 +0000 (19:10 +0100)]
Tweak the previous suspicious Message change

* lisp/gnus/message.el (message-check-recipients)
(message-send-mail): Move the check to after encoding.

3 years agoMake Message check for invalid recipients before sending
Lars Ingebrigtsen [Wed, 19 Jan 2022 18:00:13 +0000 (19:00 +0100)]
Make Message check for invalid recipients before sending

* lisp/gnus/message.el (message-check-recipients): Check for
suspicious addresses before sending (bug#51733).

3 years agoMake textsec-mixed-numbers-p actually work
Lars Ingebrigtsen [Wed, 19 Jan 2022 17:50:40 +0000 (18:50 +0100)]
Make textsec-mixed-numbers-p actually work

* lisp/international/textsec.el (textsec-mixed-numbers-p): Fix the
test.

3 years agoMake Gnus check for suspicious headers
Lars Ingebrigtsen [Wed, 19 Jan 2022 17:43:34 +0000 (18:43 +0100)]
Make Gnus check for suspicious headers

* lisp/gnus/gnus-art.el (gnus-treat-suspicious-headers): New user
option.
(gnus-article-treat-suspicious-headers): New function.
(article-decode-encoded-words): Hook into the machinery to check
headers.
(article--check-suspicious-addresses): New function.

3 years ago; * lisp/international/textsec.el (textsec-url-suspicious-p): Fix a typo.
Eli Zaretskii [Wed, 19 Jan 2022 17:26:46 +0000 (19:26 +0200)]
; * lisp/international/textsec.el (textsec-url-suspicious-p): Fix a typo.

3 years agoAdd text for suspicious links
Lars Ingebrigtsen [Wed, 19 Jan 2022 16:50:21 +0000 (17:50 +0100)]
Add text for suspicious links

* lisp/international/textsec-check.el (textsec-check): Note `link'.
(textsec-propertize): Fix typo.

* lisp/international/textsec.el (textsec-link-suspicious-p): New
function.

* lisp/net/shr.el (shr-tag-a): Check for sus links.

3 years agoDon't overwrite the link text in shr-tag-a for suspicious URLs
Lars Ingebrigtsen [Wed, 19 Jan 2022 16:17:42 +0000 (17:17 +0100)]
Don't overwrite the link text in shr-tag-a for suspicious URLs

* lisp/net/shr.el (shr-tag-a): Tweak how the suspiciousness
warning is handled.

3 years ago; Fix bug#53367
Michael Albinus [Wed, 19 Jan 2022 16:16:08 +0000 (17:16 +0100)]
; Fix bug#53367

* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Handle small buffers.  (Bug#53367)

3 years agoFix thinko in textsec-url-suspicious-p
Lars Ingebrigtsen [Wed, 19 Jan 2022 15:39:13 +0000 (16:39 +0100)]
Fix thinko in textsec-url-suspicious-p

* lisp/international/textsec.el (textsec-url-suspicious-p): Don't
bug out on non-HTTP URLs.

3 years agoMake shr mark links with suspicious URLs
Lars Ingebrigtsen [Wed, 19 Jan 2022 15:37:05 +0000 (16:37 +0100)]
Make shr mark links with suspicious URLs

* lisp/international/textsec-check.el (textsec-propertize): New
function.
(textsec-check): Only check, don't alter STRING.

* lisp/international/textsec.el (textsec-url-suspicious-p): New
function.

* lisp/net/shr.el (shr-tag-a): Mark suspicious links.

3 years agoAdd new file textsec-check.el
Lars Ingebrigtsen [Wed, 19 Jan 2022 15:22:16 +0000 (16:22 +0100)]
Add new file textsec-check.el

* lisp/international/textsec-check.el: New file.
* lisp/international/textsec.el
(textsec-email-address-header-suspicious-p): Rename.

3 years agoMark whole-script confusables as suspicious domains
Lars Ingebrigtsen [Wed, 19 Jan 2022 14:52:20 +0000 (15:52 +0100)]
Mark whole-script confusables as suspicious domains

* lisp/international/textsec.el (textsec-domain-suspicious-p):
Consider domain names that are whole-script confusables with ASCII
to be suspicious.  (I think this is what the Unicode standard is
recommending, but I'm not 100% sure.)

3 years agoSplit textsec-email-address-suspicious-p into two functions
Lars Ingebrigtsen [Wed, 19 Jan 2022 14:21:43 +0000 (15:21 +0100)]
Split textsec-email-address-suspicious-p into two functions

* lisp/international/textsec.el
(textsec-email-address-suspicious-p): Made into its own function.
(textsec-email-suspicious-p): Use it and adjust doc strings.

3 years ago; Minor fix in 'textsec-domain-suspicious-p'
Eli Zaretskii [Wed, 19 Jan 2022 14:19:36 +0000 (16:19 +0200)]
; Minor fix in 'textsec-domain-suspicious-p'

* lisp/international/textsec.el (textsec-domain-suspicious-p): Fix
explanation string.

3 years agoMake textsec-suspicious-nonspacing-p work on marks
Lars Ingebrigtsen [Wed, 19 Jan 2022 13:42:39 +0000 (14:42 +0100)]
Make textsec-suspicious-nonspacing-p work on marks

* lisp/international/textsec.el (textsec-suspicious-nonspacing-p):
We're only interested in nonspacing marks, not control characters
in this test.

3 years agoFix recent change for big endian systems where `Atom' is 64 bits
Po Lu [Wed, 19 Jan 2022 13:26:38 +0000 (21:26 +0800)]
Fix recent change for big endian systems where `Atom' is 64 bits

* src/xfns.c (x_create_tip_frame): Cast atoms to xcb_atom_t
and pass a reference to that to xcb_change_property instead.

3 years ago* lisp/cus-face.el (custom-face-attributes): Expose the lambdas
Stefan Monnier [Wed, 19 Jan 2022 13:18:19 +0000 (08:18 -0500)]
* lisp/cus-face.el (custom-face-attributes): Expose the lambdas

3 years ago; Yet another improvement of doc strings in textsec
Eli Zaretskii [Wed, 19 Jan 2022 12:00:45 +0000 (14:00 +0200)]
; Yet another improvement of doc strings in textsec

* lisp/international/textsec.el (textsec-local-address-suspicious-p)
(textsec-name-suspicious-p): Fix wording of doc strings.

3 years agoPort some X11 tooltip code to XCB
Po Lu [Wed, 19 Jan 2022 11:06:53 +0000 (19:06 +0800)]
Port some X11 tooltip code to XCB

* configure.ac: Require `xcb-aux' to be present before using
XCB.
* src/xfns.c (x_sync):
(x_create_tip_frame):
(Fx_show_tip): Port window related code to XCB.

3 years agoDeconfuse textsec doc strings slightly
Lars Ingebrigtsen [Wed, 19 Jan 2022 10:34:48 +0000 (11:34 +0100)]
Deconfuse textsec doc strings slightly

* lisp/international/textsec.el (textsec-name-suspicious-p):
(textsec-domain-suspicious-p):
(textsec-local-address-suspicious-p):
(textsec-name-suspicious-p):
(textsec-suspicious-nonspacing-p):
(textsec-email-suspicious-p): Suspiciosness isn't only about
homoglyphs, so don't claim so in the doc strings.

3 years agoImprove textsec doc strings
Robert Pluim [Wed, 19 Jan 2022 10:20:06 +0000 (11:20 +0100)]
Improve textsec doc strings

* lisp/international/textsec.el (textsec-domain-suspicious-p)
(textsec-local-address-suspicious-p, textsec-name-suspicious-p)
(textsec-suspicious-nonspacing-p): Improve doc strings.

3 years agoUse Cairo XCB surfaces when XCB is available
Po Lu [Wed, 19 Jan 2022 09:39:04 +0000 (17:39 +0800)]
Use Cairo XCB surfaces when XCB is available

This lets us get at goodies such as shm support, which aren't
available with the xlib surface.  (bug#52120)

* configure.ac: Test for cairo-xcb if cairo is available on X.
* src/xterm.c (USE_CAIRO_XCB_SURFACE): New define.
(x_begin_cr_clip): Create XCB surfaces if available.
(x_try_cr_xlib_drawable):
(x_scroll_run): Handle XCB surfaces.
(x_term_init): Find XCB visualtype structure.
* src/xterm.h (struct x_display_info): New field `xcb_visual'.
* src/xwidget.c (x_draw_xwidget_glyph_string): Fix integer
overflow.

3 years agoMinor improvement in textsec diagnostics
Eli Zaretskii [Wed, 19 Jan 2022 08:57:03 +0000 (10:57 +0200)]
Minor improvement in textsec diagnostics

* lisp/international/textsec.el (textsec-suspicious-nonspacing-p):
Clarify wording of the strings returned to explain the suspicious
use of nonspacing characters.

3 years ago; * etc/NEWS ('use-system-tooltips'): Improve wording.
Eli Zaretskii [Wed, 19 Jan 2022 08:41:11 +0000 (10:41 +0200)]
; * etc/NEWS ('use-system-tooltips'): Improve wording.

3 years agoRespect structure of Tramp archive file names
Michael Albinus [Wed, 19 Jan 2022 08:07:49 +0000 (09:07 +0100)]
Respect structure of Tramp archive file names

* lisp/net/tramp.el (tramp-make-tramp-file-name):
Respect structure of archive file names.

3 years ago* src/haikufns.c (Fx_display_mm_width): Fix copy-paste error.
Po Lu [Wed, 19 Jan 2022 06:00:13 +0000 (06:00 +0000)]
* src/haikufns.c (Fx_display_mm_width): Fix copy-paste error.

3 years agoRename system tooltip variables to `use-system-tooltips'
Po Lu [Wed, 19 Jan 2022 05:12:18 +0000 (13:12 +0800)]
Rename system tooltip variables to `use-system-tooltips'

* doc/emacs/frames.texi (Tooltips):
* doc/emacs/haiku.texi (Haiku Basics):
* doc/lispref/display.texi (Tooltips): Document
`use-system-tooltips' instead.

* etc/NEWS: Announce new option.
* lisp/cus-start.el (standard): Add new option.

* lisp/term/haiku-win.el (haiku-use-system-tooltips):
* lisp/term/pgtk-win.el (x-gtk-use-system-tooltips):
* lisp/term/x-win.el (x-gtk-use-system-tooltips): Add aliases
for old options.

* src/frame.c (syms_of_frame): New variable
`use-system-tooltips'.

* src/haikufns.c (Fx_show_tip):
(syms_of_haikufns):
* src/pgtkfns.c (x_hide_tip):
(Fx_show_tip):
(syms_of_pgtkfns):
* src/xfns.c (x_hide_tip):
(Fx_show_tip):
(syms_of_xfns): Use `use-system-tooltips' instead of the old
platform dependent options.

3 years agoUse more reliable timestamps for some kinds of events on Haiku
Po Lu [Wed, 19 Jan 2022 02:08:52 +0000 (02:08 +0000)]
Use more reliable timestamps for some kinds of events on Haiku

* src/haiku_support.cc (DispatchMessage):
(MouseMoved):
(MouseDown):
(MouseUp): Set `time' field of event structures to input server
time.
* src/haiku_support.h (struct haiku_key_event):
(struct haiku_mouse_motion_event):
(struct haiku_button_event): New field `time'.
* src/haikuterm.c (haiku_read_socket): Use input server time
if provided.

3 years agoFix event timestamp generation on Haiku
Po Lu [Wed, 19 Jan 2022 01:14:19 +0000 (01:14 +0000)]
Fix event timestamp generation on Haiku

* src/haikuterm.c (haiku_read_socket): Use miliseconds for event
time.

3 years agocl-generic-tests.el: Fix warning
Stefan Monnier [Tue, 18 Jan 2022 21:53:28 +0000 (16:53 -0500)]
cl-generic-tests.el: Fix warning

* test/lisp/emacs-lisp/cl-generic-tests.el (ert): Require at run-time
for `ert--get-explainer`.

3 years agoVC: Fix tests for SCCS and Mtn
Stefan Monnier [Tue, 18 Jan 2022 21:42:19 +0000 (16:42 -0500)]
VC: Fix tests for SCCS and Mtn

* test/lisp/vc/vc-tests.el: Prefer closures to `(lambda ...).
(vc-test-mtn05-rename-file, vc-test-mtn06-version-diff): Skip.

* lisp/vc/vc.el (vc-responsible-backend): Fix vc-test--register on SCCS.

3 years agoautoload.el: Fix corner case and avoid encoding issues
Stefan Monnier [Tue, 18 Jan 2022 21:40:32 +0000 (16:40 -0500)]
autoload.el: Fix corner case and avoid encoding issues

* lisp/emacs-lisp/autoload.el (autoload-print-form): Don't burp when
autoloading a `cl-defmethod`.
(autoload-rubric): Support non-UTF-8 chars and enforce Unix EOLs.

3 years agoImprove doc strings in textsec.el
Eli Zaretskii [Tue, 18 Jan 2022 19:08:19 +0000 (21:08 +0200)]
Improve doc strings in textsec.el

* lisp/international/textsec.el (textsec-mixed-numbers-p)
(textsec-ascii-confusable-p, textsec-resolved-script-set)
(textsec-single-script-confusable-p)
(textsec-mixed-script-confusable-p)
(textsec-whole-script-confusable-p, textsec-domain-suspicious-p)
(textsec-local-address-suspicious-p, textsec-name-suspicious-p)
(textsec-suspicious-nonspacing-p): Doc fix.

3 years agoRemove 'cuneiform-numbers-and-punctuation' from w32font.c
Eli Zaretskii [Tue, 18 Jan 2022 14:24:36 +0000 (16:24 +0200)]
Remove 'cuneiform-numbers-and-punctuation' from w32font.c

* src/w32font.c (syms_of_w32font, font_supported_scripts): Remove
'cuneiform-numbers-and-punctuation'.  Reported by Kévin Le Gouguec
<kevin.legouguec@gmail.com>.

3 years agoThe name in textsec-email-suspicious-p is optional
Lars Ingebrigtsen [Tue, 18 Jan 2022 12:34:39 +0000 (13:34 +0100)]
The name in textsec-email-suspicious-p is optional

* lisp/international/textsec.el (textsec-email-suspicious-p): The
name is optional.

3 years agoAdd textsec functions for verifying email addresses
Lars Ingebrigtsen [Tue, 18 Jan 2022 12:19:55 +0000 (13:19 +0100)]
Add textsec functions for verifying email addresses

* lisp/international/characters.el (bidi-control-characters):
Rename from glyphless--bidi-control-characters for use in textsec,
and add LRM/RLM/ALM.
(update-glyphless-char-display): Adjust the code.

* lisp/international/textsec.el (textsec-local-address-suspicious-p)
(textsec-name-suspicious-p, textsec-suspicious-nonspacing-p)
(textsec-email-suspicious-p): New functions.

3 years agoIntern virtual modifier atoms the smart way on X
Po Lu [Tue, 18 Jan 2022 11:52:51 +0000 (19:52 +0800)]
Intern virtual modifier atoms the smart way on X

* src/xterm.c (x_find_modifier_meanings): Get rid of calls to
XInternAtom.
(x_term_init): Initialize atom refs for virtual modifiers and
make sure to only call `x_find_modifier_meanings' after they
are interned.
* src/xterm.h (struct x_display_info): New fields for virtual
modifier atoms.

3 years agoAdd textsec-domain-suspicious-p
Lars Ingebrigtsen [Tue, 18 Jan 2022 10:53:01 +0000 (11:53 +0100)]
Add textsec-domain-suspicious-p

* .gitignore: Ignore idna-mapping.el.

* admin/notes/unicode: Note idna-mapping file.
* admin/unidata/IdnaMappingTable.txt: New file.

* admin/unidata/Makefile.in (all): Generate idna-mapping.el.

* admin/unidata/unidata-gen.el (unidata-gen-idna-mapping): Generate.

* lisp/international/textsec.el (textsec-domain-suspicious-p): New
function.

3 years agoMorka handling of multi-hops in Tramp more consistent
Michael Albinus [Tue, 18 Jan 2022 10:27:15 +0000 (11:27 +0100)]
Morka handling of multi-hops in Tramp more consistent

* lisp/net/tramp.el (tramp-make-tramp-file-name): Adapt argument list.
Add hops to `tramp-default-proxies-alist'.
(tramp-find-foreign-file-name-handler): Adapt argument list.
(tramp-handle-abbreviate-file-name): Abbreviate multi-hops.
(tramp-handle-file-remote-p): Adapt handling of hops.
(tramp-add-hops): New defun.
(tramp-compute-multi-hops): Use it.

* lisp/net/tramp.el (tramp-make-tramp-hop-name, tramp-get-buffer)
(tramp-file-name-handler, tramp-handle-file-truename)
(tramp-handle-insert-file-contents, tramp-local-host-p)
(tramp-read-passwd, tramp-clear-passwd):
* lisp/net/tramp-archive.el (tramp-archive-dissect-file-name)
(tramp-archive-gvfs-file-name):
* lisp/net/tramp-cache.el (tramp-get-hash-table):
* lisp/net/tramp-sh.el (tramp-sh-handle-file-truename)
(tramp-sh-handle-make-process, tramp-sh-handle-process-file)
(tramp-sh-file-name-handler-p, tramp-get-remote-path):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-truename):
Adapt callees.

* test/lisp/net/tramp-tests.el (tramp-test02-file-name-dissect)
(tramp-test02-file-name-dissect-simplified)
(tramp-test02-file-name-dissect-separate)
(tramp-test07-abbreviate-file-name): Adapt tests.

3 years ago* src/haikuterm.c (haiku_read_socket): Add work for frame size bug.
Po Lu [Tue, 18 Jan 2022 08:25:02 +0000 (08:25 +0000)]
* src/haikuterm.c (haiku_read_socket): Add work for frame size bug.

BWindow::ResizeTo seems to have the same rounding issues that
BRect has, but I have no idea how to solve it there.  As a
temporary workaround until a solution has been found, avoid
garbaging tooltip frames when FrameResized reports different
dimensions from what they were set to.

3 years agoAdd textsec predicates for different types of confusability
Lars Ingebrigtsen [Tue, 18 Jan 2022 09:24:32 +0000 (10:24 +0100)]
Add textsec predicates for different types of confusability

* lisp/international/textsec.el (textsec-resolved-script-set)
(textsec-single-script-confusable-p)
(textsec-mixed-script-confusable-p)
(textsec-whole-script-confusable-p): New functions.

3 years agoAdd textsec support for confusable characters
Lars Ingebrigtsen [Tue, 18 Jan 2022 08:57:43 +0000 (09:57 +0100)]
Add textsec support for confusable characters

* admin/notes/unicode: Note the confusables.txt file.
* admin/unidata/Makefile.in (${unidir}/uni-confusable.el):
Generate the confusable file.

* admin/unidata/README (https): Add confusables.txt.

* admin/unidata/confusables.txt: New file.

* admin/unidata/unidata-gen.el (unidata-gen-confusable): Parse the
confusables.txt file.

* lisp/international/textsec.el (textsec-ascii-confusable-p)
(textsec-unconfuse-string): New functions.

3 years agoImprove textsec-restriction-level doc string
Lars Ingebrigtsen [Mon, 17 Jan 2022 17:29:12 +0000 (18:29 +0100)]
Improve textsec-restriction-level doc string

* lisp/international/textsec.el (textsec-restriction-level):
Improve doc string.

3 years ago* src/haikufns.c (Fx_show_tip): Fix typo.
Po Lu [Tue, 18 Jan 2022 08:20:37 +0000 (08:20 +0000)]
* src/haikufns.c (Fx_show_tip): Fix typo.

3 years agoFix default value of `no-special-glyphs' frame parameter on Haiku
Po Lu [Tue, 18 Jan 2022 08:19:16 +0000 (08:19 +0000)]
Fix default value of `no-special-glyphs' frame parameter on Haiku

* src/haikufns.c (haiku_create_frame): Make `no-special-glyphs'
nil by default.

3 years agoImprove tooltip implementation on Haiku
Po Lu [Tue, 18 Jan 2022 08:15:08 +0000 (08:15 +0000)]
Improve tooltip implementation on Haiku

This fixes several issues: tooltips having no right internal
border, reusing tooltips occasionally freezing Emacs, and
inconsistent behaviour when compared to X.

* src/haiku_support.cc (BWindow_resize): Revert a recent change.
(BView_move_frame):
(BWindow_set_avoid_focus): Stop sync'ing when locked.  This
tends to cause lockups for an unknown reason.
* src/haikufns.c (initial_setup_back_buffer): New function.
(haiku_create_frame): Remove tooltip related code.
(haiku_set_internal_border_width): Handle cases where the face
cache is NULL and/or the window has not been created.
(haiku_set_inhibit_double_buffering): Likewise.
(haiku_create_tip_frame): New function.
(Fx_create_frame): Remove tooltip specific code.
(Fx_show_tip): Synchronize code with X.

* src/haikuterm.c (haiku_new_font): Don't adjust size on tooltip
frames.
(haiku_read_socket): Draw internal border on tooltip frames
during resize.
(haiku_clear_under_internal_border): Handle cases where the face
cache is NULL.

3 years ago* lisp/tooltip.el (tooltip-show-help): Fix typo.
Po Lu [Tue, 18 Jan 2022 07:56:08 +0000 (15:56 +0800)]
* lisp/tooltip.el (tooltip-show-help): Fix typo.

3 years ago* lisp/tooltip.el: Fix warning when built on a non-Haiku system.
Po Lu [Tue, 18 Jan 2022 03:34:55 +0000 (11:34 +0800)]
* lisp/tooltip.el: Fix warning when built on a non-Haiku system.

3 years ago; * lisp/international/fontset.el (setup-default-fontset): Fix last change.
Eli Zaretskii [Tue, 18 Jan 2022 03:33:28 +0000 (05:33 +0200)]
; * lisp/international/fontset.el (setup-default-fontset): Fix last change.

3 years agoFix system tooltips above menus
Po Lu [Tue, 18 Jan 2022 02:41:29 +0000 (02:41 +0000)]
Fix system tooltips above menus

* src/haikufns.c (Fx_show_tip): Disable frame reuse inside a
menu.
(syms_of_haikufns): New symbol `tooltip-reuse-hidden-frame'.

3 years agoAllow non-system tooltips to display above menus on Haiku
Po Lu [Tue, 18 Jan 2022 02:06:00 +0000 (02:06 +0000)]
Allow non-system tooltips to display above menus on Haiku

* doc/emacs/haiku.texi (Haiku Basics): Document that tooltips
can now be displayed above the menu bar.

* lisp/tooltip.el (tooltip-show-help): Only display help text in
the echo area if Haiku system tooltips are enabled.

* src/haiku_support.cc (FlipBuffers): Stop flushing view.
* src/haikufns.c (Fx_show_tip): Fix a sizing bug leading to
tooltips needing two redisplays to display correctly.
* src/haikuterm.c (haiku_read_socket): Ignore resize events on
tooltips.

3 years ago(hack-local-variables--find-variables): Use `user-error`
Stefan Monnier [Mon, 17 Jan 2022 21:28:02 +0000 (16:28 -0500)]
(hack-local-variables--find-variables): Use `user-error`

* lisp/files.el (hack-local-variables--find-variables):
Incorrect formatting are not coding errors.

3 years agoFix minor inconsistencies in 'char-script-table'
Eli Zaretskii [Mon, 17 Jan 2022 19:49:58 +0000 (21:49 +0200)]
Fix minor inconsistencies in 'char-script-table'

* admin/unidata/blocks.awk (name2alias): Map some obscure blocks
to their native scripts, to follow Scripts.txt.

* lisp/international/characters.el (char-script-table): Add
few exceptions.
* lisp/international/fontset.el (script-representative-chars):
Remove scripts no longer used.

3 years ago; textsec.el: fix typo
Robert Pluim [Mon, 17 Jan 2022 17:24:31 +0000 (18:24 +0100)]
; textsec.el: fix typo

* lisp/international/textsec.el (textsec-covering-scripts): Fix typo
in docstring.

3 years agoDoc fixes in textsec.el
Eli Zaretskii [Mon, 17 Jan 2022 17:15:30 +0000 (19:15 +0200)]
Doc fixes in textsec.el

* lisp/international/textsec.el (textsec-scripts)
(textsec-single-script-p, textsec-covering-scripts): Clarify "script".

3 years ago; * admin/notes/unicode: Update.
Eli Zaretskii [Mon, 17 Jan 2022 17:09:22 +0000 (19:09 +0200)]
; * admin/notes/unicode: Update.

3 years agoChange textsec-mixed-numbers-p to use recommended algorithm
Lars Ingebrigtsen [Mon, 17 Jan 2022 17:01:59 +0000 (18:01 +0100)]
Change textsec-mixed-numbers-p to use recommended algorithm

* lisp/international/textsec.el (textsec-mixed-numbers-p): New
function.

3 years agoAdd new function textsec-mixed-numbers-p
Lars Ingebrigtsen [Mon, 17 Jan 2022 16:32:58 +0000 (17:32 +0100)]
Add new function textsec-mixed-numbers-p

* lisp/international/textsec.el (textsec-mixed-numbers-p): New
function.

3 years agoAdd some textsec-restriction-level comments
Lars Ingebrigtsen [Mon, 17 Jan 2022 15:27:10 +0000 (16:27 +0100)]
Add some textsec-restriction-level comments

* lisp/international/textsec.el (textsec-restriction-level): Add
comment about source of the list of languages.

3 years agoAdd textsec-restriction-level function
Lars Ingebrigtsen [Mon, 17 Jan 2022 15:24:17 +0000 (16:24 +0100)]
Add textsec-restriction-level function

* lisp/international/textsec.el (textsec-restriction-level): New
function.

3 years agoFix some doc strings in textsec.el
Lars Ingebrigtsen [Mon, 17 Jan 2022 15:06:04 +0000 (16:06 +0100)]
Fix some doc strings in textsec.el

* lisp/international/textsec.el (textsec-single-script-p): Fix
typo in doc string.
(textsec-covering-scripts): Improve doc string and sort the results.

3 years agoAvoid loading the possibly stale unidata-gen.elc file
Lars Ingebrigtsen [Mon, 17 Jan 2022 14:51:58 +0000 (15:51 +0100)]
Avoid loading the possibly stale unidata-gen.elc file

* admin/unidata/Makefile.in (${unidir}/uni-scripts.el): Fix .elc
  staleness.  (Should probably be fixed in a different way.)

3 years agoAdd support for functions that deal with Unicode scripts
Lars Ingebrigtsen [Mon, 17 Jan 2022 14:47:37 +0000 (15:47 +0100)]
Add support for functions that deal with Unicode scripts

* admin/unidata/Makefile.in (${unidir}/uni-scripts.el): Build
uni-scripts.el.

* admin/unidata/Scripts.txt:
* admin/unidata/ScriptExtensions.txt:
* admin/unidata/PropertyValueAliases.txt: New files from Unicode.

* admin/unidata/README: Update.

* admin/unidata/unidata-gen.el (unidata-gen-charprop): Allow
writing other data, too.
(unidata-gen-scripts, unidata-gen--read-script-aliases)
(unidata-gen--insert-file): New functions to parse the Script* files.

* lisp/international/textsec.el: Implement some functions that
work on scripts.

3 years agoMove the Gnus range functions to a new range.el file
Lars Ingebrigtsen [Mon, 17 Jan 2022 11:40:43 +0000 (12:40 +0100)]
Move the Gnus range functions to a new range.el file

* lisp/emacs-lisp/range.el: New file.

* lisp/gnus/gnus-agent.el (range):
(gnus-agent-synchronize-group-flags):
(gnus-agent-possibly-alter-active):
(gnus-agent-fetch-headers):
(gnus-agent-read-agentview):
(gnus-agent-fetch-group-1):
(gnus-agent-read-p):
(gnus-agent-expire-group-1):
(gnus-agent-retrieve-headers): Adjust callers.

* lisp/gnus/gnus-art.el (range):
(gnus-article-describe-bindings):

* lisp/gnus/gnus-cloud.el (range):
(gnus-cloud-available-chunks):

* lisp/gnus/gnus-draft.el (gnus-group-send-queue):

* lisp/gnus/gnus-group.el (range):
(gnus-group-line-format-alist):
(gnus-number-of-unseen-articles-in-group):
(gnus-group-update-eval-form):
(gnus-group-read-group):
(gnus-group-delete-articles):
(gnus-group-catchup):
(gnus-group-expire-articles-1):
(gnus-add-marked-articles):

* lisp/gnus/gnus-int.el (gnus-request-marks):

* lisp/gnus/gnus-kill.el (gnus-apply-kill-file-internal):

* lisp/gnus/gnus-range.el (gnus-range-difference)
(gnus-sorted-range-intersection, gnus-uncompress-range)
(gnus-add-to-range, gnus-remove-from-range)
(gnus-member-of-range, gnus-list-range-intersection)
(gnus-list-range-difference, gnus-range-length, gnus-range-add)
(gnus-range-map): Make into obsolete aliases.

* lisp/gnus/gnus-start.el (gnus-make-articles-unread):
(gnus-convert-old-ticks):
(gnus-read-old-newsrc-el-file):

* lisp/gnus/gnus-sum.el (gnus-select-newsgroup):
(gnus-articles-to-read):
(gnus-articles-to-read):
(gnus-killed-articles):
(gnus-adjust-marked-articles):
(gnus-update-marks):
(gnus-update-marks):
(gnus-compute-read-articles):
(gnus-list-of-read-articles):
(gnus-summary-update-info):
(gnus-summary-move-article):
(gnus-summary-expire-articles):
(gnus-update-read-articles):
(gnus-summary-insert-old-articles):
(gnus-summary-insert-old-articles):
(gnus-summary-insert-old-articles):

* lisp/gnus/mail-source.el (gnus-range):
(gnus-compress-sequence):

* lisp/gnus/nnheader.el (range):
(gnus-range-add):
(nnheader-update-marks-actions):

* lisp/gnus/nnimap.el (nnimap-update-info):
(nnimap-update-info):
(nnimap-update-info):
(nnimap-update-qresync-info):
(nnimap-update-qresync-info):
(nnimap-update-qresync-info):
(nnimap-parse-copied-articles):

* lisp/gnus/nnmaildir.el (nnmaildir-request-update-info):
(nnmaildir-request-update-info):
(nnmaildir-request-expire-articles):
(nnmaildir-request-expire-articles):
(nnmaildir-request-set-mark):

* lisp/gnus/nnmairix.el (nnmairix-request-set-mark):

* lisp/gnus/nnmbox.el (nnmbox-record-active-article):
(nnmbox-record-deleted-article):

* lisp/gnus/nnml.el (nnml-request-compact-group):

* lisp/gnus/nnvirtual.el (nnvirtual-request-expire-articles):
* lisp/gnus/nnselect.el (numbers-by-group):
(nnselect-request-update-info):
(nnselect-push-info):

3 years agoMerge from origin/emacs-28
Po Lu [Mon, 17 Jan 2022 13:45:44 +0000 (21:45 +0800)]
Merge from origin/emacs-28

f393d0d441 Fix regression leading to flickering tooltips when the mou...

3 years ago; Merge from origin/emacs-28
Po Lu [Mon, 17 Jan 2022 13:45:44 +0000 (21:45 +0800)]
; Merge from origin/emacs-28

The following commit was skipped:

9e64aeff40 * Fix native comp for non trivial function names (bug#52833)

3 years agoFix regression leading to flickering tooltips when the mouse is moved
Po Lu [Mon, 17 Jan 2022 13:42:31 +0000 (21:42 +0800)]
Fix regression leading to flickering tooltips when the mouse is moved

* lisp/tooltip.el (tooltip-show-help): Compare string with
previous tooltip string ignoring properties.

3 years agoRevert "Add undelete-frame-max instead of undelete-frame-mode (bug#51883)"
Eli Zaretskii [Mon, 17 Jan 2022 12:51:53 +0000 (14:51 +0200)]
Revert "Add undelete-frame-max instead of undelete-frame-mode (bug#51883)"

This reverts commit 714e11d53534416b6519396a9df5d62054731810.

That commit was unilateral and disregarded past discussions.

3 years agoRevert "* etc/NEWS: Improve wording of 'undelete-frame-max' (bug#51883)."
Eli Zaretskii [Mon, 17 Jan 2022 12:51:03 +0000 (14:51 +0200)]
Revert "* etc/NEWS: Improve wording of 'undelete-frame-max' (bug#51883)."

This reverts commit 65666c47863c4ad2ed4bacd1a0bc5e638269df52.

The original commit was unilateral and disregarded past
discussions.

3 years agoFix Emacs icon not appearing on Haiku
Po Lu [Mon, 17 Jan 2022 11:09:50 +0000 (11:09 +0000)]
Fix Emacs icon not appearing on Haiku

* lib-src/be_resources.cc (main): Scale input bitmap
appropriately before setting it as the mini and large icons.
* src/Makefile.in (Emacs): Add dependency on
`lib-src/be-resources'.

3 years ago* Fix native comp for non trivial function names (bug#52833)
Andrea Corallo [Tue, 28 Dec 2021 11:12:16 +0000 (12:12 +0100)]
* Fix native comp for non trivial function names (bug#52833)

* lisp/emacs-lisp/comp.el (comp-c-func-name): Fix native compilation
for functions with function names containing non trivial
characters (bug#52833).

This commit is the backport of e7699bf290.

Do not merge to master

3 years agoUse BControlLook to determine scroll bar size on Haiku
Po Lu [Mon, 17 Jan 2022 10:46:55 +0000 (10:46 +0000)]
Use BControlLook to determine scroll bar size on Haiku

* src/haiku_support.cc (BScrollBar_default_size): Use
BControlLook instead of legacy constants.

3 years agoDisplay override redirect frames in all workspaces on Haiku
Po Lu [Mon, 17 Jan 2022 10:08:04 +0000 (10:08 +0000)]
Display override redirect frames in all workspaces on Haiku

* src/haiku_support.cc (class EmacsWindow): New field
`pre_override_redirect_workspaces'.
(BWindow_set_override_redirect): Set window to display on all
workspaces.

3 years agoImprove handling of INFILE in tramp*-process-file (Bug#53284)
Michael Albinus [Mon, 17 Jan 2022 09:46:58 +0000 (10:46 +0100)]
Improve handling of INFILE in tramp*-process-file (Bug#53284)

* lisp/net/tramp-adb.el (tramp-adb-handle-process-file):
* lisp/net/tramp-sh.el (tramp-sh-handle-process-file):
* lisp/net/tramp-smb.el (tramp-smb-handle-process-file):
* lisp/net/tramp-sshfs.el (tramp-sshfs-handle-process-file):
Improve handling of INFILE.  Fix thinko using
`process-file-side-effects'.  (Bug#53284)

* lisp/net/tramp-sshfs.el (tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-set-file-times'.
(tramp-sshfs-handle-set-file-times): New defun.

* test/lisp/net/tramp-tests.el (tramp-test28-process-file): Extend test.

3 years ago* etc/NEWS: Improve wording of 'undelete-frame-max' (bug#51883).
Juri Linkov [Mon, 17 Jan 2022 08:24:20 +0000 (10:24 +0200)]
* etc/NEWS: Improve wording of 'undelete-frame-max' (bug#51883).

3 years ago* src/haikufns.c (Fx_show_tip): Sync after making window visible.
Po Lu [Mon, 17 Jan 2022 05:06:31 +0000 (05:06 +0000)]
* src/haikufns.c (Fx_show_tip): Sync after making window visible.

3 years agoReally eliminate tooltip flicker on Haiku
Po Lu [Mon, 17 Jan 2022 04:52:00 +0000 (04:52 +0000)]
Really eliminate tooltip flicker on Haiku

* src/haikufns.c (tip_frame): Make non-static.
* src/haikuterm.c (haiku_read_socket): Ignore motion events that
didn't actually move when a tip frame is visible.
* src/haikuterm.h (tip_frame): Declare.

3 years agoTranslate timestamps when using GTK native input
Po Lu [Mon, 17 Jan 2022 01:48:01 +0000 (09:48 +0800)]
Translate timestamps when using GTK native input

* src/gtkutil.c (xg_widget_key_press_event_cb): Use timestamp
specified in key event.
(xg_filter_key): Translate timestamps.

3 years agoExercise wire right after event is filtered for native input
Po Lu [Mon, 17 Jan 2022 00:29:39 +0000 (08:29 +0800)]
Exercise wire right after event is filtered for native input

* src/xterm.c (handle_one_xevent): Run a no-op immediately after
an event was filtered by GDK.

3 years agoAdd undelete-frame-max instead of undelete-frame-mode (bug#51883)
Juri Linkov [Sun, 16 Jan 2022 20:58:30 +0000 (22:58 +0200)]
Add undelete-frame-max instead of undelete-frame-mode (bug#51883)

* doc/emacs/frames.texi (Frame Commands): Replace
undelete-frame-mode with undelete-frame-max.

* lisp/frame.el (undelete-frame-max): New defcustom, by default 1.
(undelete-frame--handle-delete-frame): Use undelete-frame-max
instead of hard-coded 16.
(undelete-frame-mode): Remove function.
(after-init-hook): Add hook undelete-frame--handle-delete-frame to
delete-frame-functions using after-init-hook to not store the
initial frame.
(undelete-frame): Remove undelete-frame-mode.  Use undelete-frame-max
instead of hard-coded 16.

* lisp/menu-bar.el (menu-bar-file-menu): Remove menu item undelete-frame-mode.

* src/frame.c (Fdelete_frame): Replace `undelete-frame-mode' with
`undelete-frame-max' in the docstring.

3 years agoExtend Outline mode with default visibility state
Matthias Meulien [Sun, 16 Jan 2022 18:13:21 +0000 (20:13 +0200)]
Extend Outline mode with default visibility state

* etc/NEWS: Announce support for default visibility state (bug#51809).

* lisp/outline.el (outline-mode, outline-minor-mode): Ensure default
visibility state is applied with outline-apply-default-state.
(outline-default-state, outline-default-rules)
(outline-default-long-line, outline-default-line-count): New defcustoms.
(outline-apply-default-state, outline-show-only-headings)
(outline--show-headings-up-to-level): New functions.

3 years agoFix XI2 event filtering for very old versions of libXi
Po Lu [Sun, 16 Jan 2022 13:39:14 +0000 (21:39 +0800)]
Fix XI2 event filtering for very old versions of libXi

* src/xterm.c (handle_one_xevent): Handle cases where
xev->display is NULL.

3 years agoFix the xft build
Po Lu [Sun, 16 Jan 2022 11:45:54 +0000 (19:45 +0800)]
Fix the xft build

* src/xsettings.h [!HAVE_PGTK]: Include dispextern.h and remove
duplicate definition of Display_Info.

3 years agoUse kMenuWindowFeel on Haiku toolkip windows
Po Lu [Sun, 16 Jan 2022 11:02:58 +0000 (11:02 +0000)]
Use kMenuWindowFeel on Haiku toolkip windows

* src/haiku_support.cc (BWindow_set_tooltip_decoration): Use
kMenuWindowFeel and set flags here.
* src/haikufns.c (Fx_show_tip): Don't set_avoid_focus manually
since setting tooltip decorations already does that.

3 years agoMake help event generation on Haiku behave closer to X
Po Lu [Sun, 16 Jan 2022 10:43:22 +0000 (10:43 +0000)]
Make help event generation on Haiku behave closer to X

* src/haikuterm.c (haiku_read_socket): Generate help events more
like how X does it.

3 years agoReduce poll time for Haiku file dialogs
Po Lu [Sun, 16 Jan 2022 10:12:22 +0000 (10:12 +0000)]
Reduce poll time for Haiku file dialogs

* src/haiku_support.c (be_popup_file_dialog): Reduce idle
processor load by increasing timeout.  The timeout is still too
low to be noticable by the user.

3 years ago* src/gtkutil.c (xg_widget_key_press_event_cb): Also raise input signal.
Po Lu [Sun, 16 Jan 2022 10:02:04 +0000 (18:02 +0800)]
* src/gtkutil.c (xg_widget_key_press_event_cb): Also raise input signal.

3 years ago* src/pgtkterm.c (evq_flush): Shift events one by one
Yuuki Harano [Sun, 16 Jan 2022 08:25:28 +0000 (17:25 +0900)]
* src/pgtkterm.c (evq_flush): Shift events one by one

3 years agoAvoid focus and allow monospace text in tooltip frames on Haiku
Po Lu [Sun, 16 Jan 2022 05:57:14 +0000 (05:57 +0000)]
Avoid focus and allow monospace text in tooltip frames on Haiku

* src/haikufns.c (Fx_show_tip): Set avoid focus on tooltip
frames.

* src/haikuterm.c (haiku_default_font_parameter): Don't special
case the default font on tooltip frames, since the bug that was
supposed to work around has already been fixed.

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

e488601849 Update to Org 9.5.2-9-g7ba24c
95640360f0 * lisp/net/dictionary.el (dictionary-context-menu): Use pa...

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Sun, 16 Jan 2022 05:51:09 +0000 (06:51 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

2dcb1bc474 Mark a few more map tests as unstable on Emacs 28 (Bug#467...

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

7f36aca99d * lisp/indent.el (tab-first-completion): Fix incorrect cho...

3 years agoUpdate modifier meanings even if an xkb_desc was not available
Po Lu [Sun, 16 Jan 2022 05:46:39 +0000 (13:46 +0800)]
Update modifier meanings even if an xkb_desc was not available

* src/xterm.c (handle_one_event): Always update modifiers after
the keyboard mapping is refreshed.

3 years ago* src/xwidget.c (webkit_js_to_lisp): Use correct constant to check size.
Po Lu [Sun, 16 Jan 2022 02:05:17 +0000 (10:05 +0800)]
* src/xwidget.c (webkit_js_to_lisp): Use correct constant to check size.