]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

2 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'.

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

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

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

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

2 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".

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

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

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

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

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

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

2 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.)

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

2 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):

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

2 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)

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

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

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

2 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'.

2 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

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

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

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

2 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).

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

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

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

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

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

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

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

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

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

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

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

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

2 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

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

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

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

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

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

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

2 years agoFix a minor snafu when resizing frames on Haiku
Po Lu [Sun, 16 Jan 2022 00:47:41 +0000 (00:47 +0000)]
Fix a minor snafu when resizing frames on Haiku

* src/haiku_support.cc (BWindow_resize): Adjust for minor snafu
where BWindow::ResizeTo uses BRect-style width and height
instead of actual width and height.

2 years agoAdd some more mailcap tests.
Tassilo Horn [Sat, 15 Jan 2022 22:59:20 +0000 (23:59 +0100)]
Add some more mailcap tests.

* test/lisp/net/mailcap-resources/mailcap: New file.
* test/lisp/net/mailcap-resources/test.test: New file.
* test/lisp/net/mailcap-tests.el (with-pristine-mailcap): New macro.
(mailcap-parsing-and-mailcap-mime-info): New test for parsing mailcap
files and selecting the right viewer.
(mailcap--test-result): New variable.
(mailcap--test-viewer): New function.
(mailcap-view-file): New test for mailcap-view-file.

2 years agoUpdate to Org 9.5.2-9-g7ba24c
Kyle Meyer [Sat, 15 Jan 2022 21:02:26 +0000 (16:02 -0500)]
Update to Org 9.5.2-9-g7ba24c

2 years ago* lisp/net/dictionary.el (dictionary-context-menu): Use package prefix.
Juri Linkov [Sat, 15 Jan 2022 18:58:31 +0000 (20:58 +0200)]
* lisp/net/dictionary.el (dictionary-context-menu): Use package prefix.

2 years ago* lisp/mouse.el (context-menu-map): Select clicked window (bug#53249).
Juri Linkov [Sat, 15 Jan 2022 18:37:15 +0000 (20:37 +0200)]
* lisp/mouse.el (context-menu-map): Select clicked window (bug#53249).

2 years agoMore fixes for recently committed context-menu additions from bug#52973
Juri Linkov [Sat, 15 Jan 2022 18:33:45 +0000 (20:33 +0200)]
More fixes for recently committed context-menu additions from bug#52973

* lisp/hi-lock.el (highlight-symbol-at-mouse): New defalias.
(hi-lock-face-symbol-at-mouse): Rename from hi-lock-symbol-at-mouse.
(hi-lock-context-menu): Use thing-at-mouse and middle-separator.

* lisp/man.el (Man-context-menu): Fix Man-at-mouse and use middle-separator.

* lisp/mouse.el (context-menu-functions): Remove context-menu-online-search.
Add occur-context-menu and dictionary-context-menu (bug#50552).

2 years ago* doc/emacs/search.texi (Special Isearch): Move isearch-char-by-name item back
Juri Linkov [Sat, 15 Jan 2022 18:27:15 +0000 (20:27 +0200)]
* doc/emacs/search.texi (Special Isearch): Move isearch-char-by-name item back

Put it at the end of the list and still closer to isearch-emoji-by-name.

2 years ago* pcvs-info.el (cvs-mode-toggle-mark): Typo
Stefan Monnier [Sat, 15 Jan 2022 14:31:55 +0000 (09:31 -0500)]
* pcvs-info.el (cvs-mode-toggle-mark): Typo

2 years agoFix setting cursor in pixel-scrolling modes
Eli Zaretskii [Sat, 15 Jan 2022 13:58:21 +0000 (15:58 +0200)]
Fix setting cursor in pixel-scrolling modes

* src/xdisp.c (redisplay_window): Don't set cursor to any glyph
row past the one that contains EOB.  (Bug#53275)

2 years agoDon't strip properties in show-paren-function
Lars Ingebrigtsen [Sat, 15 Jan 2022 13:15:54 +0000 (14:15 +0100)]
Don't strip properties in show-paren-function

* lisp/paren.el (show-paren-function): Don't strip text properties
(bug#51606) because that makes the offscreen context less
informative.

2 years agoUse preferred XIM style without trying to detect if it's supported
Po Lu [Sat, 15 Jan 2022 12:14:31 +0000 (20:14 +0800)]
Use preferred XIM style without trying to detect if it's supported

The old code would in general fall back to the default if the
preferred style wasn't available, which is usually worse than
what the user specified

* src/xfns.c (best_xim_style): Stop checking if the preferred
input style is supported.

2 years agoMark a few more map tests as unstable on Emacs 28 (Bug#46722).
Philipp Stephani [Sat, 15 Jan 2022 11:40:09 +0000 (12:40 +0100)]
Mark a few more map tests as unstable on Emacs 28 (Bug#46722).

At least for me, these tests still occasionally fail.

Do not merge to master.

* test/lisp/emacs-lisp/map-tests.el (test-map-into-hash-test)
(test-map-merge, test-map-merge-with, test-map-merge-empty): Mark as
unstable.

2 years ago* lisp/indent.el (tab-first-completion): Fix incorrect choices.
Philipp Stephani [Fri, 14 Jan 2022 19:49:35 +0000 (20:49 +0100)]
* lisp/indent.el (tab-first-completion): Fix incorrect choices.

2 years agoAdd emoji-alternate-names variable
Lars Ingebrigtsen [Sat, 15 Jan 2022 10:55:18 +0000 (11:55 +0100)]
Add emoji-alternate-names variable

* lisp/international/emoji.el (emoji-alternate-names): New
variable (bug#52860).
(emoji-search): Note usage.
(emoji--choose-emoji): Use it.

2 years agomailcap: Docfix & handle function-viewer case in mailcap-view-file
Tassilo Horn [Sat, 15 Jan 2022 10:23:46 +0000 (11:23 +0100)]
mailcap: Docfix & handle function-viewer case in mailcap-view-file

* lisp/net/mailcap.el (mailcap-mime-data): Fix docstring: if viewer is
a symbol/function, it should have zero args and expect the file's
contents to be in the current buffer.
(mailcap-view-file): Implement the case where the chosen viewer is a
function and not a shell command.

2 years agoPrevent pre-edit overlay text from being displayed after a command
Po Lu [Sat, 15 Jan 2022 10:18:34 +0000 (18:18 +0800)]
Prevent pre-edit overlay text from being displayed after a command

This works around buggy input methods causing the overlay to be
displayed alongside newly inserted text for a brief period.

* lisp/term/x-win.el (x-clear-preedit-text): New function.
(x-preedit-text): Add said function to pre-command-hook.  It
will remove itself when triggered.

2 years ago* src/emacsgtkfixed.c (XSetWMSizeHints): Remove some useless code.
Po Lu [Sat, 15 Jan 2022 10:11:35 +0000 (18:11 +0800)]
* src/emacsgtkfixed.c (XSetWMSizeHints): Remove some useless code.

2 years agoDon't bug out on improper lists in pp-emacs-lisp-code
Lars Ingebrigtsen [Sat, 15 Jan 2022 09:40:39 +0000 (10:40 +0100)]
Don't bug out on improper lists in pp-emacs-lisp-code

* lisp/emacs-lisp/pp.el (pp--format-list): Don't bug out on
improper lists (bug#52917).

2 years agoUse "server complete" instead of "complete" in gud-gdb-completions
Tom Tromey [Sat, 15 Jan 2022 09:30:24 +0000 (10:30 +0100)]
Use "server complete" instead of "complete" in gud-gdb-completions

* lisp/progmodes/gud.el (gud-gdb-completions): gud-gdb sends a
"complete" command to gdb to implement command line completion.  It
would be better to send "server complete".  This is what Emacs does
for other behind-the-scenes commands it sends (bug#52922).

2 years ago(gnus-summary-hide-thread): Fix thread hiding for dummy roots.
Alex Bochannek [Sat, 15 Jan 2022 09:28:14 +0000 (10:28 +0100)]
(gnus-summary-hide-thread): Fix thread hiding for dummy roots.

* lisp/gnus/gnus-sum.el (gnus-summary-hide-thread): Make thread
hiding work when using dummy `gnus-summary-make-false-root'
(bug#52923).

2 years agoImprove the with-output-to-temp-buffer doc string
Lars Ingebrigtsen [Sat, 15 Jan 2022 08:30:01 +0000 (09:30 +0100)]
Improve the with-output-to-temp-buffer doc string

* lisp/subr.el (with-output-to-temp-buffer): Clarify the point of
the macro (bug#53265).

2 years agoRevert "Add command to invoke a search engine"
Lars Ingebrigtsen [Sat, 15 Jan 2022 08:06:50 +0000 (09:06 +0100)]
Revert "Add command to invoke a search engine"

This reverts commit 3f36d0836274a01d3cfc73f53ddbc76afc1d8a5e.

Similar functionality has been added to webjump, so this commit duplicated that.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 15 Jan 2022 05:47:59 +0000 (06:47 +0100)]
Merge from origin/emacs-28

5990148860 * lisp/simple.el (undo-no-redo): Fix customization group
ac2cdb8a46 * lisp/progmodes/xref.el (xref-file-name-display): Fix doc...
c05864dd25 Avoid another segfault in 'face_at_buffer_position'

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 15 Jan 2022 05:47:59 +0000 (06:47 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

281b878858 Mark test-map-into as unstable

2 years agoFind a way to make lowering frames work on Haiku
Po Lu [Sat, 15 Jan 2022 05:30:28 +0000 (05:30 +0000)]
Find a way to make lowering frames work on Haiku

* doc/lispref/frames.texi (Raising and Lowering): Document that
lowering frames is now supported on Haiku.
* src/haikuterm.c (haiku_frame_raise_lower): Implement a hack to
lower frames.

2 years agoFilter key release events when using native input without having XIM
Po Lu [Sat, 15 Jan 2022 05:25:23 +0000 (13:25 +0800)]
Filter key release events when using native input without having XIM

* src/xterm.c (handle_one_xevent): Also check for XI key
release events when using native input on a build without XIM.

2 years agoFix native input when using core input events
Po Lu [Sat, 15 Jan 2022 01:40:28 +0000 (09:40 +0800)]
Fix native input when using core input events

* src/gtkutil.c (xg_filter_key): Test for core key press events
correctly.
* src/xterm.c (handle_one_xevent): Also check for KeyRelease
events.

2 years agoRemove non-functional configure test
Po Lu [Sat, 15 Jan 2022 01:11:11 +0000 (09:11 +0800)]
Remove non-functional configure test

It cannot work anymore, leading to compiler warnings when
building xterm.c.

* configure.ac: Remove test for whether
XRegisterIMInstantiateCallback wants XPointer or XPointer * as
the client_data.

* src/xterm.c (xim_initialize):
(xim_close_dpy): Just cast client data to void * and hope that
the compiler keeps quiet.

2 years ago* lisp/simple.el (undo-no-redo): Fix customization group
Philipp Stephani [Fri, 14 Jan 2022 18:35:03 +0000 (19:35 +0100)]
* lisp/simple.el (undo-no-redo): Fix customization group

2 years ago* lisp/progmodes/xref.el (xref-file-name-display): Fix docstring.
Philipp Stephani [Fri, 14 Jan 2022 21:01:06 +0000 (22:01 +0100)]
* lisp/progmodes/xref.el (xref-file-name-display): Fix docstring.

2 years agopcvs-info.el: Prefer `declare-function` over `autoload`
Stefan Monnier [Fri, 14 Jan 2022 20:28:21 +0000 (15:28 -0500)]
pcvs-info.el: Prefer `declare-function` over `autoload`

* lisp/vc/pcvs-info.el (cvs-mode-toggle-mark): Use `declare-function`
to silence the byte-compiler warning.

2 years ago* lisp/indent.el (indent-for-tab-command): Use 'eq' for symbols.
Philipp Stephani [Fri, 14 Jan 2022 20:02:08 +0000 (21:02 +0100)]
* lisp/indent.el (indent-for-tab-command): Use 'eq' for symbols.

2 years agoindent-for-tab-command: Deal with large point or modiff values.
Philipp Stephani [Fri, 14 Jan 2022 19:59:28 +0000 (20:59 +0100)]
indent-for-tab-command: Deal with large point or modiff values.

* lisp/indent.el (indent-for-tab-command): Don't use 'eq' to compare
integers that aren't guaranteed to be fixnums.

2 years agoSimplify code for 'indent-for-tab-command' slightly.
Philipp Stephani [Fri, 14 Jan 2022 19:56:03 +0000 (20:56 +0100)]
Simplify code for 'indent-for-tab-command' slightly.

* lisp/indent.el (indent-for-tab-command): Don't use a one-element
list for SYN.

2 years ago(macroexp--expand-all): Fix bug#53227 and bug#46636
Stefan Monnier [Fri, 14 Jan 2022 17:26:30 +0000 (12:26 -0500)]
(macroexp--expand-all): Fix bug#53227 and bug#46636

* lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Don't mis-expand
invalid funcalls.

2 years agoimage-dired: Use MD5 for thumb filename generation
Stefan Kangas [Fri, 14 Jan 2022 15:17:33 +0000 (16:17 +0100)]
image-dired: Use MD5 for thumb filename generation

* lisp/image-dired.el (image-dired-thumb-name): Revert back to MD5 for
file name generation to preserve backwards-compatibility.  (Bug#53229)

2 years agoAvoid another segfault in 'face_at_buffer_position'
Eli Zaretskii [Fri, 14 Jan 2022 14:11:34 +0000 (16:11 +0200)]
Avoid another segfault in 'face_at_buffer_position'

* src/xfaces.c (face_at_buffer_position): Make really sure the
default face is usable.  (Bug#53254)

2 years ago* src/xterm.c: Add a small writeup on input handling on X.
Po Lu [Fri, 14 Jan 2022 11:47:35 +0000 (19:47 +0800)]
* src/xterm.c: Add a small writeup on input handling on X.

Hopefully I will extend this section with details about more
aspects of X11 support in the future.

2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Fri, 14 Jan 2022 11:12:47 +0000 (12:12 +0100)]
Regenerate ldefs-boot.el

2 years agoSkip ffap test on some systems
Lars Ingebrigtsen [Fri, 14 Jan 2022 11:10:46 +0000 (12:10 +0100)]
Skip ffap test on some systems