]> git.eshelyaron.com Git - emacs.git/log
emacs.git
3 years agoAdd support for event processing via XInput 2
Po Lu [Sat, 16 Oct 2021 05:15:36 +0000 (13:15 +0800)]
Add support for event processing via XInput 2

* configure.ac: Add an option to use XInput 2 if available.
* src/Makefile.in (XINPUT_LIBS, XINPUT_CFLAGS): New variables.
(EMACS_CFLAGS): Add Xinput CFLAGS.
(LIBES): Add XInput libs.
* src/xmenu.c (popup_activated_flag): Expose flag if
XInput 2 is available.
* src/xfns.c (x_window): Set XInput 2 event mask.
(setup_xi_event_mask): New function.
(syms_of_xfns): Provide XInput 2 feature.
* src/xterm.c (x_detect_focus_change): Handle XInput 2
GenericEvents.
(handle_one_xevent): Handle XInput 2 events.
(x_term_init): Ask the server for XInput 2 support and set
xkb_desc if available.
(x_delete_terminal): Free XKB kb desc if it exists, and free
XI2 devices if they exist.
(xi_grab_or_ungrab_device)
(xi_reset_scroll_valuators_for_device_id)
(x_free_xi_devices, x_init_master_valuators): New functions.
(x_get_scroll_valuator_delta): New function.
(init_xterm): Don't tell GTK to only use Core Input when built
with XInput 2 support.
* src/xterm.h (struct x_display_info): Add fields for XKB
and XI2 support.
* src/gtkutil.c (xg_event_is_for_menubar): Handle
XIDeviceEvents.
(xg_is_menu_window): New function.
(xg_event_is_for_scrollbar): Handle XIDeviceEvents.
* etc/NEWS: Document changes.

* lisp/mwheel.el (mouse-wheel-down-alternate-event)
(mouse-wheel-up-alternate-event)
(mouse-wheel-left-alternate-event)
(mouse-wheel-right-alternate-event): New user options.

(mouse-wheel-text-scale)
(mwheel-scroll): Test for alternate events.
(mouse-wheel--setup-bindings): Set up bindings for alternate
buttons.

3 years agoAllow terminating page loading operations in webkit xwidgets
Po Lu [Sat, 20 Nov 2021 10:23:02 +0000 (18:23 +0800)]
Allow terminating page loading operations in webkit xwidgets

* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce `xwidget-webkit-stop-loading'.
* src/xwidget.c (Fxwidget_webkit_stop_loading): New function.
(syms_of_xwidget): Define new subr.

3 years agoImplement the buttonForeground resource
Gregory Heytings [Sat, 20 Nov 2021 09:37:20 +0000 (10:37 +0100)]
Implement the buttonForeground resource

* lwlib/xlwmenu.c (draw_shadow_rectangle, draw_shadow_rhombus):
Use the buttonForeground resource color (bug#51988).

3 years agoFix another narrow-to-defun problem in js-mode
Lars Ingebrigtsen [Sat, 20 Nov 2021 09:20:43 +0000 (10:20 +0100)]
Fix another narrow-to-defun problem in js-mode

* lisp/progmodes/js.el (js--function-prologue-beginning): Fix typo
in looking-back form (bug#51926).

3 years agoContinue adaptions of emba files
Michael Albinus [Sat, 20 Nov 2021 09:07:48 +0000 (10:07 +0100)]
Continue adaptions of emba files

* test/infra/default-gitlab-ci.yml: New file, derived from
gitlab-ci.yml.

* test/infra/gitlab-ci.yml (top, test-jobs-pipeline):
Include default-gitlab-ci.yml.
(stages): Remove normal.

* test/infra/test-jobs-generator.sh: Generate also stages entry.

3 years agoMake xwidget-events special and document xwidget callbacks
Po Lu [Sat, 20 Nov 2021 06:57:22 +0000 (14:57 +0800)]
Make xwidget-events special and document xwidget callbacks

Users have always been supposed to use callbacks for handling
xwidget events, but for some reason this has not been
documented until now.

* doc/lispref/commands.texi (Xwidget Events): Document xwidget
callbacks and the special status of `xwidget-event's.

* doc/lispref/display.texi (Xwidgets): Add xwidget property
list functions to the concept index.

* lisp/xwidget.el: Make xwidget events special.

3 years agoUse `xwidget-live-p' inside `xwidget-at'.
Po Lu [Sat, 20 Nov 2021 06:30:12 +0000 (14:30 +0800)]
Use `xwidget-live-p' inside `xwidget-at'.

It should no longer be possible for Lisp code to abuse internal
xwidget state, or cause crashes with killed xwidgets and such,
so the pedantic checking done in this function is no longer
necessary.  (In fact, it is even wrong, as it won't catch
killed xwidgets.)

* lisp/xwidget.el (xwidget-at): Use `xwidget-live-p'.

3 years agoRemove nonsensical command in xwidget-webkit-mode-map
Po Lu [Sat, 20 Nov 2021 06:17:27 +0000 (14:17 +0800)]
Remove nonsensical command in xwidget-webkit-mode-map

* lisp/xwidget.el (xwidget-webkit-mode-map): Remove nonsensical
command binding.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 20 Nov 2021 06:19:43 +0000 (07:19 +0100)]
Merge from origin/emacs-28

c1eea85be1 * test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Rem...

3 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 20 Nov 2021 06:19:43 +0000 (07:19 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

9b08846faa Add upward compatibility entry in Tramp (don't merge)

3 years agoFix option type of `xwidget-webkit-cookie-file' again
Po Lu [Sat, 20 Nov 2021 06:15:46 +0000 (14:15 +0800)]
Fix option type of `xwidget-webkit-cookie-file' again

* lisp/xwidget.el (xwidget-webkit-cookie-file): Revert changes
caused by rebase.

3 years agoClarify doc string in xwidget-webkit
Po Lu [Sat, 20 Nov 2021 06:11:13 +0000 (14:11 +0800)]
Clarify doc string in xwidget-webkit

* lisp/xwidget.el (xwidget-webkit-buffer-name-format): Update
doc string.

3 years ago* lisp/xwidget.el (xwidget-webkit-cookie-file): Fix type.
Glenn Morris [Sat, 20 Nov 2021 02:36:03 +0000 (18:36 -0800)]
* lisp/xwidget.el (xwidget-webkit-cookie-file): Fix type.

3 years agoMake xwidget-webkit default to not storing cookies
Po Lu [Sat, 20 Nov 2021 00:38:04 +0000 (08:38 +0800)]
Make xwidget-webkit default to not storing cookies

* etc/NEWS: Update to reflect change.
* lisp/xwidget.el (xwidget-webkit-cookie-file): Set default
value to nil.

3 years ago; * test/infra/test-jobs-generator.sh: Still fixes.
Michael Albinus [Fri, 19 Nov 2021 20:24:08 +0000 (21:24 +0100)]
; * test/infra/test-jobs-generator.sh: Still fixes.

3 years agoFix Tramp test
Michael Albinus [Fri, 19 Nov 2021 19:32:29 +0000 (20:32 +0100)]
Fix Tramp test

* test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name):
Skip Ange FTP test.

3 years ago; Fix emba scripts
Michael Albinus [Fri, 19 Nov 2021 19:20:31 +0000 (20:20 +0100)]
; Fix emba scripts

3 years ago* test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Remove declaration.
Michael Albinus [Fri, 19 Nov 2021 17:58:01 +0000 (18:58 +0100)]
* test/lisp/net/tramp-tests.el (tramp-get-remote-gid): Remove declaration.

3 years agoAdd upward compatibility entry in Tramp (don't merge)
Michael Albinus [Fri, 19 Nov 2021 17:57:47 +0000 (18:57 +0100)]
Add upward compatibility entry in Tramp (don't merge)

* lisp/net/tramp.el (tramp-file-name-for-operation):
Add `abbreviate-file-name'.

3 years ago; Still gitlab-ci.yml fixes
Michael Albinus [Fri, 19 Nov 2021 16:54:59 +0000 (17:54 +0100)]
; Still gitlab-ci.yml fixes

* test/infra/gitlab-ci.yml (variables): Add CI_DEBUG_TRACE.
(build-image-inotify): Remove timeout.
(generator, test-jobs-pipeline): New jobs.
(test-lisp-inotify, test-lisp-net-inotify): Comment.

3 years ago; Further fixes in gitlab-ci.yml
Michael Albinus [Fri, 19 Nov 2021 16:46:40 +0000 (17:46 +0100)]
; Further fixes in gitlab-ci.yml

3 years agoFix stage in gitlab-ci.yml
Michael Albinus [Fri, 19 Nov 2021 16:33:12 +0000 (17:33 +0100)]
Fix stage in gitlab-ci.yml

3 years agoAdd more test jobs for emba
Michael Albinus [Fri, 19 Nov 2021 15:50:03 +0000 (16:50 +0100)]
Add more test jobs for emba

* test/Makefile.in (SUBDIRS): Suppress "*auto-save-list".
(SUBDIR_TARGETS): New variable.
(subdir_template): Set it.
(subdir-targets): New target.

* test/infra/gitlab-ci.yml (variables): Add CI_DEBUG_TRACE.
(build-image-inotify): Remove timeout.
(generator, test-jobs-pipeline): New jobs.
(test-lisp-inotify, test-lisp-net-inotify): Comment.

* test/infra/test-jobs-generator.sh: New script.

3 years agoFix doc strings in ucs-normalize.el
Eli Zaretskii [Fri, 19 Nov 2021 15:23:35 +0000 (17:23 +0200)]
Fix doc strings in ucs-normalize.el

* lisp/international/ucs-normalize.el (ucs-normalize-NFD-region)
(ucs-normalize-NFD-string, string-glyph-compose)
(string-glyph-decompose, ucs-normalize-NFC-string)
(ucs-normalize-NFKD-region, ucs-normalize-NFKD-string)
(ucs-normalize-NFKC-region, ucs-normalize-NFKC-string)
(ucs-normalize-HFS-NFD-region, ucs-normalize-HFS-NFC-region): Fix
wording and typos.

3 years agoFix documentation of last commit
Eli Zaretskii [Fri, 19 Nov 2021 13:41:48 +0000 (15:41 +0200)]
Fix documentation of last commit

* lisp/xwidget.el (xwidget-webkit-cookie-file): Don't use "path"
for file names in the doc string.  Improve wording and markup of
the doc string.

* src/xwidget.c (Fxwidget_webkit_set_cookie_storage_file):
* doc/lispref/display.texi (Xwidgets): Don't use "path" for file
names.

* etc/NEWS: Improve the wording of the entry about
'xwidget-webkit-cookie-file'.

3 years agoAllow controlling where xwidget-webkit stores cookies
Po Lu [Fri, 19 Nov 2021 12:04:08 +0000 (20:04 +0800)]
Allow controlling where xwidget-webkit stores cookies

* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce `xwidget-webkit-cookie-file' and
`xwidget-webkit-set-cookie-storage-file'.

* lisp/xwidget.el (xwidget-webkit-cookie-file): New user
option.
(xwidget-webkit-new-session): Set cookie storage file.

* src/xwidget.c (Fmake_xwidget): Create new context for
each unrelated widget.
(Fxwidget_webkit_set_cookie_storage_file): New function.
(syms_of_xwidget): Define new subr.

3 years agoUse CHECK_LIVE_XWIDGET in xwidget-webkit-estimated-load-progress
Po Lu [Fri, 19 Nov 2021 11:18:48 +0000 (19:18 +0800)]
Use CHECK_LIVE_XWIDGET in xwidget-webkit-estimated-load-progress

* src/xwidget.c (Fxwidget_webkit_estimated_load_progress): Check
for live xwidgets instead.

3 years agoDisplay page loading progress in xwidget webkit
Po Lu [Fri, 19 Nov 2021 10:41:53 +0000 (18:41 +0800)]
Display page loading progress in xwidget webkit

* lisp/xwidget.el (xwidget-webkit--title): Remove internal
variable.
(xwidget-webkit--loading-p)
(xwidget-webkit--progress-update-timer): New variables.
(xwidget-webkit--update-progress-timer-function): New function.
(xwidget-webkit-callback): Set up progress update timer during
page loads.
(xwidget-webkit-mode): Add page load progress to header line
format.

3 years agoImprove doc-view-mode menus
Stefan Kangas [Fri, 19 Nov 2021 10:34:28 +0000 (11:34 +0100)]
Improve doc-view-mode menus

* lisp/doc-view.el (doc-view-menu): Extend menu.
(doc-view-minor-mode-menu): New menu.

3 years ago; * lisp/international/ucs-normalize.el: Fix typo.
Robert Pluim [Fri, 19 Nov 2021 10:05:25 +0000 (11:05 +0100)]
; * lisp/international/ucs-normalize.el: Fix typo.

3 years agoAdd `xwidget-webkit-estimated-load-progress'
Po Lu [Fri, 19 Nov 2021 09:45:03 +0000 (17:45 +0800)]
Add `xwidget-webkit-estimated-load-progress'

* doc/lispref/display.texi (Xwidgets): Document new function.
* etc/NEWS: Announce new function.

* src/xwidget.c (Fxwidget_webkit_estimated_load_progress): New
function.
(syms_of_xwidget): Define new subr.

3 years agoMake puny-encode-string normalize first
Lars Ingebrigtsen [Fri, 19 Nov 2021 06:42:55 +0000 (07:42 +0100)]
Make puny-encode-string normalize first

* lisp/net/puny.el (puny-encode-string): Normalize before encoding
(bug#51954).

3 years agoRegenerate ldefs-boot
Lars Ingebrigtsen [Fri, 19 Nov 2021 06:42:25 +0000 (07:42 +0100)]
Regenerate ldefs-boot

3 years agoMake UCS compose/decompose functions more understandable
Lars Ingebrigtsen [Fri, 19 Nov 2021 06:42:12 +0000 (07:42 +0100)]
Make UCS compose/decompose functions more understandable

* lisp/international/ucs-normalize.el ()
(ucs-normalize-NFD-region, ucs-normalize-NFD-string)
(ucs-normalize-NFC-region, ucs-normalize-NFC-string)
(ucs-normalize-NFKD-region, ucs-normalize-NFKD-string)
(ucs-normalize-NFKC-region, ucs-normalize-NFKC-string): Make the
doc strings say what they actually do.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 19 Nov 2021 06:00:24 +0000 (07:00 +0100)]
Merge from origin/emacs-28

02853edba7 Fix sorting of menus in `context-menu-local' (bug#50067).
14271d050a Fix flyspell-correct-word selected from context menu opene...
bf824843f4 * lisp/repeat.el (describe-repeat-maps): Print all bound k...
6fc94fb99e * lisp/tab-bar.el: Use 'mouse-1' for history buttons like ...
5eeaf85767 Improve documentation of window hooks
7404f4b4e0 Improve doc string of 'highlight-nonselected-windows'

3 years agoFix documentation on xwidgets
Po Lu [Fri, 19 Nov 2021 04:26:08 +0000 (12:26 +0800)]
Fix documentation on xwidgets

* doc/lispref/display.texi (Xwidgets): Refer to correct
function.

3 years ago* lisp/files.el (file-has-changed-p): Index the cache with absolute file names
Stefan Monnier [Fri, 19 Nov 2021 03:06:50 +0000 (22:06 -0500)]
* lisp/files.el (file-has-changed-p): Index the cache with absolute file names

3 years ago* lisp/net/mailcap.el (mailcap-parse-mailcaps): Fix $MAILCAPS case
Stefan Monnier [Fri, 19 Nov 2021 03:02:43 +0000 (22:02 -0500)]
* lisp/net/mailcap.el (mailcap-parse-mailcaps): Fix $MAILCAPS case

3 years agoTurn mistaken functions into tests (bug#51941)
Mattias Engdegård [Thu, 18 Nov 2021 19:14:02 +0000 (20:14 +0100)]
Turn mistaken functions into tests (bug#51941)

* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--decode-isodatetime):
* test/src/eval-tests.el
(eval-tests-19790-backquote-comma-dot-substitution):
Change `defun` into `ert-deftest` where this seems to have been the
original intention.

3 years agoString backslash corrections
Mattias Engdegård [Thu, 18 Nov 2021 14:05:47 +0000 (15:05 +0100)]
String backslash corrections

* lisp/net/shr.el (shr-tag-video): Remove ineffective backslash.
* test/lisp/emacs-lisp/package-tests.el
(package-test-macro-compilation-gz): Make dot literal as intended.

3 years agoFix sorting of menus in `context-menu-local' (bug#50067).
Juri Linkov [Thu, 18 Nov 2021 18:36:55 +0000 (20:36 +0200)]
Fix sorting of menus in `context-menu-local' (bug#50067).

* lisp/menu-bar.el (menu-bar-keymap): Don't use `lookup-key'
on the `keymap' arg.

* lisp/mouse.el (context-menu-global): Use `lookup-key global-map'
for the `keymap' arg of `menu-bar-keymap'.
(context-menu-local): Use `menu-bar-keymap' to sort `keymap'.

3 years agoDo not exclude emacs-module-tests.el on emba
Michael Albinus [Thu, 18 Nov 2021 18:35:13 +0000 (19:35 +0100)]
Do not exclude emacs-module-tests.el on emba

* test/infra/gitlab-ci.yml (test-native-comp-speed0)
(test-all-inotify): Do not exclude emacs-module-tests.el.

* test/src/emacs-module-tests.el
(module--test-assertions--load-non-live-object)
(module--test-assertions--load-non-live-object-with-global-copy)
(module--test-assertions--call-emacs-from-gc)
(module--test-assertions--globref-invalid-free): Tag them as
:unstable on emba.  (Bug#50902)

3 years agoFix flyspell-correct-word selected from context menu opened with the keyboard
Juri Linkov [Thu, 18 Nov 2021 18:23:58 +0000 (20:23 +0200)]
Fix flyspell-correct-word selected from context menu opened with the keyboard

* lisp/mouse.el (context-menu-open): Call interactively a command
returned by `context-menu-map' such as `flyspell-correct-word' (bug#50067).

* lisp/textmodes/flyspell.el (flyspell-correct-word): Handle the
case when it's called by a key bound to `context-menu-open'.
Then it should work the same way as `C-c $' typed on misspelled word
where the arg `event' of `flyspell-correct-word-before-point' is nil.

3 years ago* lisp/repeat.el (describe-repeat-maps): Print all bound keys (bug#49265).
Robert Pluim [Thu, 18 Nov 2021 17:42:44 +0000 (19:42 +0200)]
* lisp/repeat.el (describe-repeat-maps): Print all bound keys (bug#49265).

3 years ago* lisp/tab-bar.el: Use 'mouse-1' for history buttons like for 'add-tab' button
Juri Linkov [Thu, 18 Nov 2021 17:36:42 +0000 (19:36 +0200)]
* lisp/tab-bar.el: Use 'mouse-1' for history buttons like for 'add-tab' button

* lisp/tab-bar.el (tab-bar-mouse-down-1, tab-bar-mouse-1):
Handle clicks for 'history-back' and 'history-forward' the same way
as 'add-tab' clicks.

3 years ago* lisp/tab-bar.el: Optimize data usage for nil tab-bar-history-mode.
Juri Linkov [Thu, 18 Nov 2021 17:27:46 +0000 (19:27 +0200)]
* lisp/tab-bar.el: Optimize data usage for nil tab-bar-history-mode.

* lisp/tab-bar.el (tab-bar--tab): Add wc-history-back and
wc-history-forward only when tab-bar-history-mode is non-nil.
(tab-bar-select-tab): Use wc-history-back and
wc-history-forward only when tab-bar-history-mode is non-nil.
(tab-bar-new-tab-to): Reset tab-bar-history-back and
tab-bar-history-forward to nil.

3 years ago* lisp/tab-bar.el: Avoid micro-steps in tab-bar-history-back/forward.
Juri Linkov [Thu, 18 Nov 2021 17:24:35 +0000 (19:24 +0200)]
* lisp/tab-bar.el: Avoid micro-steps in tab-bar-history-back/forward.

* lisp/tab-bar.el (tab-bar-history-pre-command)
(tab-bar-history-done-command): New variables.
(tab-bar--history-pre-change): Set 'tab-bar-history-omit' and
'tab-bar-history-pre-command'.
(tab-bar--history-change): Use 'tab-bar-history-done-command' and
'tab-bar-history-pre-command' (bug#51370).

3 years ago; Minor fixes of doc strings in xdisp.c
Eli Zaretskii [Thu, 18 Nov 2021 17:17:52 +0000 (19:17 +0200)]
; Minor fixes of doc strings in xdisp.c

* src/xdisp.c (syms_of_xdisp) <redisplay-skip-initial-frame>
<redisplay--all-windows-cause, redisplay--mode-lines-cause>: Doc fix.

3 years ago* lisp/vc/diff-mode.el (diff-minor-mode-prefix): Fix typo from 44faf54659
Juri Linkov [Thu, 18 Nov 2021 17:13:48 +0000 (19:13 +0200)]
* lisp/vc/diff-mode.el (diff-minor-mode-prefix): Fix typo from 44faf54659

3 years agoUpdate modus-themes to version 1.7.0
Protesilaos Stavrou [Thu, 18 Nov 2021 11:24:30 +0000 (13:24 +0200)]
Update modus-themes to version 1.7.0

* doc/misc/modus-themes.org (File): Use new version and add release
date.
(How do the themes look like, Learn about the latest changes): Update
link to new URL.
(Enable and load): Update text of internal reference.
(Sample configuration for use-package): Add sample configuration
without the 'use-package' infrastructure.
(Differences between loading and enabling): Minor rewordings.
(Customization Options): Update sample code to cover latest changes.

(Option for inhibiting theme reload)
(Option for color-coding success state (deuteranopia))
(Option for more bold constructs)
(Option for more italic constructs)
(Option for syntax highlighting)
(Option for links)
(Option for command prompt styles)
(Option for mode line presentation)
(Option for accented background in tab interfaces)
(Option for completion framework aesthetics)
(Option for mail citations)
(Option for fringe visibility)
(Option for language checkers)
(Option for line highlighting (hl-line-mode))
(Option for line numbers (display-line-numbers-mode))
(Option for parenthesis matching (show-paren-mode))
(Option for active region)
(Option for diff buffer looks)
(Option for org-mode block styles)
(Option for Org agenda constructs)
(Option for scaled headings)
(Control the scale of headings)
(Option for variable-pitch font in UI elements)
(Option for variable-pitch font in headings): Write brief description,
document the type of the user option, and make any other relevant
adjustments.

(Option for font mixing): Document new 'modus-themes-mixed-fonts' user
option, which supersedes the old 'modus-themes-no-mixed-fonts'.
(Option for mode line padding): Document new user option
'modus-themes-mode-line-padding'.
(Option for language checkers): Include new available property for the
user option 'modus-themes-lang-checkers'.  Reword the rest of the
entry.
(Option for intense markup in Org and others): Describe new boolean
option 'modus-themes-intense-markup'.
(Option for Org agenda constructs): Include new available property for
the 'event' key in the alist 'modus-themes-org-agenda'.
(Option for the headings' overall style): Describe the new style of
explicitly specifying an optional font weight other than the implied
bold.

(Font configurations for Org and others (DIY))
(Configure bold and italic faces (DIY)): Reword and clarify some
statements.
(Decrease mode line height (DIY)): Add new Do-It-Yourself section on
tweaking the mode line's :box attribute.
(Full support for packages or face groups): Include new packages.
(Acknowledgements): Update list of contributors to code, user
feedback, etc.  Does not affect the status of copyright assignment.
(Meta): Update URLs to protesilaos.com (my website).

* etc/themes/modus-themes.el (modus-themes-variable-pitch)
(modus-themes-fixed-pitch, modus-themes-no-mixed-fonts): Reference the
new 'modus-themes-mixed-fonts' user option.
(modus-themes--headings-choice): Include new font weight styles.
(modus-themes-headings): Document the new feature of accepting an
explicit font weight.
(modus-themes-org-agenda): Document the refinements to the 'event' key
of the alist and the new 'varied' property it accepts.
(modus-themes-lang-checkers): Describe the new 'faint' property.
(modus-themes-mode-line-padding): Include new user option.
(modus-themes-intense-hl-line): Remove old-deprecated user option.
(modus-themes-intense-markup): Add new option.
(modus-themes-success-deuteranopia): Update doc string.
(modus-themes--fixed-pitch): Work with 'modus-themes-mixed-fonts'.
(modus-themes--lang-check): Update internal function to add the
'faint' property of 'modus-themes-lang-checkers'.
(modus-themes--markup): Add helper function.
(modus-themes--heading-weights): Private variable with available font
weights.
(modus-themes--heading-weight): New helper function to pick the
desired font weight.
(modus-themes--heading): Update helper function to implement the
aforementioned change to 'modus-themes-headings'.
(modus-themes--agenda-event): Update helper function to apply the new
styles of 'modus-themes-org-agenda'.
(modus-themes--mode-line-padding): Add helper function for
'modus-themes-mode-line-padding'.
(modus-themes--mode-line-attrs): Minor refinements.
(modus-themes-load-operandi, modus-themes-load-vivendi): Make these
functions interactive.
(modus-themes-faces): Update faces.

* etc/themes/modus-operandi-theme.el: Bump version number.
* etc/themes/modus-vivendi-theme.el: Same.

* * *

A detailed change log entry is available here:
<https://protesilaos.com/codelog/2021-11-18-modus-themes-1-7-0/>.

3 years agoExtend abbreviate-file-name for further Tramp methods.
Michael Albinus [Thu, 18 Nov 2021 14:06:26 +0000 (15:06 +0100)]
Extend abbreviate-file-name for further Tramp methods.

* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Add 'abbreviate-file-name'.
(tramp-gvfs-handle-expand-file-name):
* lisp/net/tramp.el (tramp-handle-expand-file-name): Handle case
that tilde cannot be expanded.

* test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name):
Extend test.

3 years agoFixup for bug#51037
Filipp Gunbin [Thu, 18 Nov 2021 14:03:43 +0000 (17:03 +0300)]
Fixup for bug#51037

* lisp/emacs-lisp/ert.el (ert-batch-backtrace-line-length): Fix
docstring.
(ert-run-tests-batch): Remove redundand let-binding.
(ert-run-tests-interactively): Fix interactive spec.

3 years agoEliminate ERT test name clashes (bug#51941)
Mattias Engdegård [Thu, 18 Nov 2021 11:47:35 +0000 (12:47 +0100)]
Eliminate ERT test name clashes (bug#51941)

* test/lisp/electric-tests.el (js-mode-braces-with-layout-and-indent):
* test/lisp/emacs-lisp/cl-lib-tests.el (cl-lib-test-fifth):
* test/lisp/thingatpt-tests.el (test-symbol-thing-2):
Remove duplicated tests.
* test/lisp/emacs-lisp/generator-tests.el (cps-loop):
* test/lisp/emacs-lisp/ring-tests.el (ring-tests-insert):
* test/lisp/help-tests.el (help-tests-substitute-command-keys/no-change):
* test/lisp/net/netrc-tests.el (test-netrc-credentials):
* test/lisp/progmodes/elisp-mode-tests.el
(elisp-completes-functions-after-let-bindings):
* test/lisp/thingatpt-tests.el (test-symbol-thing-3):
* test/src/buffer-tests.el (deftest-overlayp-1, buffer-tests--*):
* test/src/buffer-tests.el (test-buffer-swap-text-1):
* test/src/data-tests.el (binding-test-set-constant-nil)
(data-tests-logcount):
Rename clashing tests.

3 years agoSignal an error for duplicated ERT tests (bug#51941)
Mattias Engdegård [Thu, 18 Nov 2021 11:18:24 +0000 (12:18 +0100)]
Signal an error for duplicated ERT tests (bug#51941)

Make `ert-deftest` fail with an error (in batch mode only) if an
existing test is redefined, because that is an easy mistake to make
and which leads to a test being discarded silently.

lisp/emacs-lisp/ert.el (ert-set-test, ert-deftest): Add check.
etc/NEWS: Announce.

3 years agoAvoid adding duplicates to Xref history
Mattias Engdegård [Thu, 18 Nov 2021 10:26:21 +0000 (11:26 +0100)]
Avoid adding duplicates to Xref history

* lisp/progmodes/xref.el (xref--push-backward, xref--push-forward):
New functions.
(xref-push-marker-stack, xref-go-back, xref-go-forward): Use them.

3 years agoRevert VC-related prefix user options to previous values
Lars Ingebrigtsen [Thu, 18 Nov 2021 11:11:35 +0000 (12:11 +0100)]
Revert VC-related prefix user options to previous values

* lisp/vc/smerge-mode.el (smerge-command-prefix):
* lisp/vc/pcvs.el (cvs-minor-mode-prefix):
* lisp/vc/diff-mode.el (diff-minor-mode-prefix): Revert to
previous values, as external packages rely on those values.

3 years agoFix `narrow-to-defun' in "async function" in js-mode
Lars Ingebrigtsen [Thu, 18 Nov 2021 10:25:18 +0000 (11:25 +0100)]
Fix `narrow-to-defun' in "async function" in js-mode

* lisp/progmodes/js.el (js--plain-method-re):
(js--function-prologue-beginning):
(js--ensure-cache): Allow "async" before "function" (bug#51926).
This makes `narrow-to-defun' work as expected.

3 years agoFix eldoc usage of newly introduced variable
Greg Minshall [Thu, 18 Nov 2021 09:32:34 +0000 (10:32 +0100)]
Fix eldoc usage of newly introduced variable

* lisp/emacs-lisp/eldoc.el
(eldoc-display-message-no-interference-p): Make this function work
in older Emacs versions again (bug#51939).

3 years ago; * src/macfont.m: fix typing errors
Mattias Engdegård [Thu, 18 Nov 2021 09:01:17 +0000 (10:01 +0100)]
; * src/macfont.m: fix typing errors

3 years agoImprove documentation of window hooks
Eli Zaretskii [Thu, 18 Nov 2021 08:25:58 +0000 (10:25 +0200)]
Improve documentation of window hooks

* doc/lispref/windows.texi (Window Hooks): Clarify "buffer-local
functions".  (Bug#51930)

3 years agoMake the optional describe-map-tree parameters optional
Lars Ingebrigtsen [Wed, 17 Nov 2021 08:29:06 +0000 (09:29 +0100)]
Make the optional describe-map-tree parameters optional

* lisp/help.el (describe-map-tree): Make the optional parameters
optional.  This makes testing easier.

3 years agoDon't ignore restriction in indent-region-line-by-line
Miha Rihtaršič [Wed, 17 Nov 2021 08:12:21 +0000 (09:12 +0100)]
Don't ignore restriction in indent-region-line-by-line

* lisp/indent.el (indent-according-to-mode): Don't widen if the new
optional argument is non-nil.
(indent-region): Explicitly widen before calling
indent-region-line-by-line.
(indent-region-line-by-line): Don't widen (bug#51892).

Emacs convention is that low-level functions should respect restriction
so that their callers can set restriction according to their needs. For
example, 'c-indent-region' is a lower-level function which respects the
current restriction and 'indent-region' is a higher-level user command
which sets the restriction for lower-level functions, it calls
"(widen)".

'indent-region-line-by-line' is a low-level function on a similar level
as 'c-indent-region'. This patch makes it respect the current
restriction instead of having it call "(widen)".

3 years agoImprove doc string of 'highlight-nonselected-windows'
Eli Zaretskii [Thu, 18 Nov 2021 06:46:17 +0000 (08:46 +0200)]
Improve doc string of 'highlight-nonselected-windows'

* src/xdisp.c (syms_of_xdisp) <highlight-nonselected-windows>:
Clarify the doc string.  (Bug#51927)

3 years agoFix two failing tests in mh-utils-tests
Mike Kupfer [Thu, 18 Nov 2021 04:25:50 +0000 (20:25 -0800)]
Fix two failing tests in mh-utils-tests

* test/lisp/mh-e/mh-utils-tests.el
(mh-test-utils-mock-call-process): Add mock for root folders.
(mh-folder-completion-function-08-plus-slash)
(mh-folder-completion-function-09-plus-slash-tmp): Skip these tests
with Mailutils, which doesn't handle root folders.  (Bug#51902)

3 years agoRevert "* lisp/image-dired.el: Remove unnecessary 'declare-function'."
Stefan Kangas [Wed, 17 Nov 2021 23:58:26 +0000 (00:58 +0100)]
Revert "* lisp/image-dired.el: Remove unnecessary 'declare-function'."

This reverts commit e0261d4a0cf2a23d32b51b84870a3a75f8273c7c.

This commit gives warnings on builds --without-x.
Problem pointed out by Glenn Morris <rgm@gnu.org> in:
https://lists.gnu.org/r/emacs-devel/2021-11/msg01278.html

3 years agoFix recent changes related to USABLE_SIGIO
Eli Zaretskii [Wed, 17 Nov 2021 18:33:40 +0000 (20:33 +0200)]
Fix recent changes related to USABLE_SIGIO

* src/process.c (wait_reading_process_output) [WINDOWSNT]:
* src/keyboard.c (handle_async_input) [DOS_NT]: Ifdef away the
code that is not needed on MS-Windows.  (Bug#50403) (Bug#51820)

3 years agoMake process_pending_signals useful on systems without SIGIO
Ken Brown [Wed, 17 Nov 2021 18:02:44 +0000 (13:02 -0500)]
Make process_pending_signals useful on systems without SIGIO

* src/keyboard.c (handle_async_input): Call gobble_input
unconditionally, not just if USABLE_SIGIO is defined.  This makes
process_pending_signals do something useful on systems that have
to poll for input.  (Bug#51820)

3 years agoAvoid delays waiting for input on systems without SIGIO
Ken Brown [Wed, 17 Nov 2021 16:55:39 +0000 (11:55 -0500)]
Avoid delays waiting for input on systems without SIGIO

* src/process.c (wait_reading_process_output) [!USABLE_SIGIO]: If
we're waiting for input, don't use a timeout of more than 25 msec
in the call to select.  (Bug#50043)

3 years agoPrevent subprocess hangs in xwidget
Po Lu [Wed, 17 Nov 2021 13:30:20 +0000 (21:30 +0800)]
Prevent subprocess hangs in xwidget

* src/xwidget.c (Fmake_xwidget, Fxwidget_webkit_goto_url): Use
`catch_child_signal' instead of trying to preserve the previous
signal handler.

3 years agoUse substitute-command-keys in some messages
Stefan Kangas [Mon, 8 Mar 2021 09:56:51 +0000 (10:56 +0100)]
Use substitute-command-keys in some messages

* lisp/dired.el (dired-get-file-for-visit):
* lisp/doc-view.el (doc-view-buffer-message):
* lisp/help.el (help-window-setup):
* lisp/ibuf-ext.el (ibuffer-do-kill-lines):
* lisp/vc/ediff.el (ediff-documentation): Use 'substitute-command-keys'.

3 years agoDon't draw xwidgets that have just been resized
Po Lu [Wed, 17 Nov 2021 12:31:41 +0000 (20:31 +0800)]
Don't draw xwidgets that have just been resized

This serves to eliminate the huge black bar displayed when the
offscreen widget has been resized (and as such the damage event
signal is sent), but the X window hasn't.

* src/xwidget.c (xv_do_draw): Don't draw xwidgets that have
just been resized.
(x_draw_xwidget_glyph_string)
(xwidget_init_view): Clear just_resized.

(Fxwidget_resize): Set just_resized first, then queue allocate.

3 years agoIgnore some externally maintained files in AUTHORS
Stefan Kangas [Wed, 17 Nov 2021 11:08:56 +0000 (12:08 +0100)]
Ignore some externally maintained files in AUTHORS

* admin/authors.el (authors-ignored-files): Ignore externally
maintained files.

3 years ago* lisp/image-dired.el: Remove unnecessary 'declare-function'.
Stefan Kangas [Wed, 17 Nov 2021 10:46:14 +0000 (11:46 +0100)]
* lisp/image-dired.el: Remove unnecessary 'declare-function'.

3 years ago; * admin/MAINTAINERS: Add myself.
Stefan Kangas [Wed, 17 Nov 2021 09:49:19 +0000 (10:49 +0100)]
; * admin/MAINTAINERS: Add myself.

3 years agoChange the call signature to keymap-substitute
Lars Ingebrigtsen [Wed, 17 Nov 2021 07:34:32 +0000 (08:34 +0100)]
Change the call signature to keymap-substitute

* lisp/keymap.el (keymap-substitute): Make the keymap the first
parameter for symmetry with the other functions.
* lisp/emacs-lisp/shortdoc.el (keymaps):
* lisp/emacs-lisp/bytecomp.el (lambda): Adjust.

3 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 17 Nov 2021 07:20:55 +0000 (08:20 +0100)]
Merge from origin/emacs-28

fa0b34b716 * admin/authors.el (authors-ignored-files): Ignore some NE...
c25be3e7bb * lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-f...
38d905abf9 * lisp/tab-bar.el: Doc fixes for commands bound to modifie...

3 years agoMake bookmark-set prompt less confusing
Lars Ingebrigtsen [Wed, 17 Nov 2021 07:16:58 +0000 (08:16 +0100)]
Make bookmark-set prompt less confusing

* lisp/bookmark.el (bookmark-set): Make the prompt less confusing
(bug#51876).

3 years agoFix mh-mime build problem
Lars Ingebrigtsen [Wed, 17 Nov 2021 07:14:23 +0000 (08:14 +0100)]
Fix mh-mime build problem

* lisp/mh-e/mh-mime.el (mh-acros): Require to get mh-dlet*.

3 years agoTemporarily mark two failing tests as unstable
Stefan Kangas [Wed, 17 Nov 2021 06:59:00 +0000 (07:59 +0100)]
Temporarily mark two failing tests as unstable

* test/lisp/mh-e/mh-utils-tests.el
(mh-folder-completion-function-08-plus-slash)
(mh-folder-completion-function-09-plus-slash-tmp): Temporarily
mark two failing tests as unstable.

3 years ago; * admin/automerge: Maintain.
Stefan Kangas [Wed, 17 Nov 2021 06:37:38 +0000 (07:37 +0100)]
; * admin/automerge: Maintain.

3 years agoFix bookmark-bmenu-mode-map syntax
Lars Ingebrigtsen [Wed, 17 Nov 2021 06:04:22 +0000 (07:04 +0100)]
Fix bookmark-bmenu-mode-map syntax

* lisp/bookmark.el (bookmark-bmenu-mode-map): Fix syntax in defvar-keymap.

3 years agoRemove some references to XEmacs
Stefan Kangas [Wed, 17 Nov 2021 05:25:50 +0000 (06:25 +0100)]
Remove some references to XEmacs

* lisp/emulation/viper-cmd.el (viper-start-R-mode):
* lisp/emulation/viper-init.el (viper-window-display-p):
* lisp/emulation/viper-mous.el (viper-surrounding-word):
* lisp/mail/footnote.el (footnote-mode):
* lisp/textmodes/reftex-index.el: Remove some comments referring to
XEmacs.

3 years agoMake mh-funcall-if-exists obsolete
Stefan Kangas [Wed, 17 Nov 2021 05:05:12 +0000 (06:05 +0100)]
Make mh-funcall-if-exists obsolete

* lisp/mh-e/mh-acros.el (mh-funcall-if-exists): Make obsolete.
* lisp/mh-e/mh-alias.el (mh-read-address):
* lisp/mh-e/mh-folder.el (mh-folder-mode):
* lisp/mh-e/mh-mime.el (mh-mm-display-part):
* lisp/mh-e/mh-show.el (mh-defun-show-buffer):
* lisp/mh-e/mh-speed.el (mh-speedbar-change-expand-button-char):
* lisp/mh-e/mh-tool-bar.el (mh-tool-bar-define):
* lisp/mh-e/mh-utils.el (mh-logo-display):
* lisp/mh-e/mh-xface.el (mh-face-display-function): Don't use
above obsolete macro.

3 years agoConvert keymaps in bookmark.el to defvar-keymap
Stefan Kangas [Wed, 17 Nov 2021 04:49:05 +0000 (05:49 +0100)]
Convert keymaps in bookmark.el to defvar-keymap

* lisp/bookmark.el (bookmark-map)
(bookmark-minibuffer-read-name-map)
(bookmark-edit-annotation-mode-map, bookmark-bmenu-mode-map):
Convert to defvar-keymap.

3 years ago* lisp/rot13.el (rot13-translate-table): Make it a `translation-table`
Stefan Monnier [Wed, 17 Nov 2021 03:48:37 +0000 (22:48 -0500)]
* lisp/rot13.el (rot13-translate-table): Make it a `translation-table`

(rot13-display-table): Use `dotimes`.

3 years ago* admin/authors.el (authors-ignored-files): Ignore some NEWS files.
Stefan Kangas [Wed, 17 Nov 2021 03:44:38 +0000 (04:44 +0100)]
* admin/authors.el (authors-ignored-files): Ignore some NEWS files.

3 years ago* admin/gitmerge.el (gitmerge-mode-map): Convert to defvar-keymap.
Stefan Kangas [Wed, 17 Nov 2021 03:14:33 +0000 (04:14 +0100)]
* admin/gitmerge.el (gitmerge-mode-map): Convert to defvar-keymap.

3 years agoUpdate xwidget webkit history buffer more eagerly
Po Lu [Wed, 17 Nov 2021 01:10:10 +0000 (09:10 +0800)]
Update xwidget webkit history buffer more eagerly

* lisp/xwidget.el (xwidget-webkit-callback): Update history
buffer on each load-changed event.

3 years agoOnly set LANG if the ID is valid
Alan Third [Sun, 14 Nov 2021 15:09:43 +0000 (15:09 +0000)]
Only set LANG if the ID is valid

* src/nsterm.m (ns_init_locale): Check the provided locale identifier
is available before trying to use it.

3 years ago* lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-frame (bug#51883).
Juri Linkov [Tue, 16 Nov 2021 20:45:33 +0000 (22:45 +0200)]
* lisp/tab-bar.el (tab-bar-select-tab): Add check for wc-frame (bug#51883).

3 years ago* lisp/tab-bar.el: Doc fixes for commands bound to modifier keys.
Juri Linkov [Tue, 16 Nov 2021 20:40:45 +0000 (22:40 +0200)]
* lisp/tab-bar.el: Doc fixes for commands bound to modifier keys.

(tab-bar-select-tab-modifiers)
(tab-bar-select-tab, tab-bar-switch-to-last-tab): Doc fixes.

3 years agoMake keymap-unset work
Lars Ingebrigtsen [Tue, 16 Nov 2021 18:41:56 +0000 (19:41 +0100)]
Make keymap-unset work

* lisp/keymap.el (keymap-unset): Fix key syntax (bug#51897).

3 years agoPut back documentation of legacy keymap functions
Eli Zaretskii [Tue, 16 Nov 2021 17:14:04 +0000 (19:14 +0200)]
Put back documentation of legacy keymap functions

* doc/lispref/keymaps.texi (Low-Level Key Binding): Reinstate
documentation of legacy commands and functions.

3 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 16 Nov 2021 14:18:30 +0000 (16:18 +0200)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

3 years agoMinor copyedits of recent documentation changes
Eli Zaretskii [Tue, 16 Nov 2021 14:17:10 +0000 (16:17 +0200)]
Minor copyedits of recent documentation changes

* doc/lispref/keymaps.texi (Low-Level Key Binding): Minor changes
in wording and markup.

3 years agoSome minor Tramp updates
Michael Albinus [Tue, 16 Nov 2021 14:04:27 +0000 (15:04 +0100)]
Some minor Tramp updates

* lisp/net/tramp-crypt.el (tramp-crypt-add-directory): Add comment.

* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p)
(tramp-setup-debug-buffer): New defuns.
(tramp-get-debug-buffer): Call `tramp-setup-debug-buffer.

* test/lisp/net/tramp-tests.el (tramp-test07-abbreviate-file-name):
Extend test.

3 years agoFix compilation error in previous keymap.c change
Lars Ingebrigtsen [Tue, 16 Nov 2021 13:10:50 +0000 (14:10 +0100)]
Fix compilation error in previous keymap.c change

* src/keymap.c (initial_define_lispy_key, define_as_prefix): Fix
--enable-checking error.

3 years agoLower xwidget views owned by parent when lowering frame
Po Lu [Tue, 16 Nov 2021 09:51:07 +0000 (17:51 +0800)]
Lower xwidget views owned by parent when lowering frame

* src/xterm.c (x_lower_frame): Lower parent frame's xwidget
views as well.

* src/xwidget.h (lower_frame_xwidget_views):
* src/xwidget.c (lower_frame_xwidget_views): New function.

3 years agoAdd command to browse xwidget history
Po Lu [Mon, 15 Nov 2021 05:12:45 +0000 (13:12 +0800)]
Add command to browse xwidget history

* doc/emacs/misc.texi (Embedded WebKit Widgets)
* etc/NEWS: Document `xwidget-webkit-browse-history'.

* lisp/xwidget.el (xwidget-webkit-mode-map): Bind "H" to
xwidget-webkit-browse-history.
(xwidget-webkit-import-widget): Set last session buffer correctly.
(xwidget-webkit-browse-history): New command.
(xwidget-webkit-history--session): New variable.

(xwidget-webkit-history--insert-item)
(xwidget-webkit-history-select-item)
(xwidget-webkit-history-reload): New functions.

(xwidget-webkit-history-mode): New major mode.

3 years agoNew X resource to control the border thickness of menus
Gregory Heytings [Tue, 16 Nov 2021 08:00:24 +0000 (09:00 +0100)]
New X resource to control the border thickness of menus

* lwlib/xlwmenu.h (XtNborderThickness, XtCBorderThickness): New X
resource name.
* lwlib/xlwmenuP.h (XlwMenuPart): New border_thickness field.
* lwlib/xlwmenu.c (xlwMenuResources): Access the new resource.
(draw_shadow_rectangle): Use the new resource value.
* doc/emacs/xresources.texi (Lucid Resources): Document the new
resource (bug#51867).