]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix parsing of indices in Eshell expansions
Jim Porter [Wed, 2 Mar 2022 02:36:08 +0000 (18:36 -0800)]
Fix parsing of indices in Eshell expansions

Previously, more-complex index expansions, like '$var[":" 0]' or
'$var[$(expr) 0]' failed to parse correctly.

* lisp/eshell/esh-var.el (Commentary): Clarify indexing and length
expansions.
(eshell-parse-indices): Expand docstring and support parsing inside
double-quotes.
(eshell-eval-indices): New function.
(eshell-parse-variable): Use it.

* test/lisp/eshell/esh-var-tests.el (eshell-test-value): New defvar.
(esh-var-test/interp-var-indices,
(esh-var-test/interp-var-split-indices)
(esh-var-test/interp-var-string-split-indices)
(esh-var-test/interp-var-regexp-split-indices)
(esh-var-test/interp-var-assoc, esh-var-test/interp-var-length-list)
(esh-var-test/interp-var-length-string)
(esh-var-test/interp-var-length-alist)
(esh-var-test/quoted-interp-var-indices)
(esh-var-test/quoted-interp-var-split-indices)
(esh-var-test/quoted-interp-var-string-split-indices)
(esh-var-test/quoted-interp-var-regexp-split-indices)
(esh-var-test/quoted-interp-var-assoc)
(esh-var-test/quoted-interp-var-length-list)
(esh-var-test/quoted-interp-var-length-string)
(esh-var-test/quoted-interp-var-length-alist): New tests.

* doc/misc/eshell.texi (Dollars Expansion): Expand and reword
documentation for indexing and length expansions.

2 years agoFix Eshell dollar interpolation inside of double-quotes
Jim Porter [Mon, 28 Feb 2022 05:04:30 +0000 (21:04 -0800)]
Fix Eshell dollar interpolation inside of double-quotes

For example,

  echo "${echo hi}"

previously tried to run the program named 'echo hi', instead of 'echo'
with the argument 'hi'.

* lisp/eshell/esh-arg.el (eshell-parse-inner-double-quote):
New function.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Support parsing
when wrapped in double-quiotes.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var)
(esh-var-test/interp-quoted-var)
(esh-var-test/interp-quoted-var-concat)
(esh-var-test/quoted-interp-var)
(esh-var-test/quoted-interp-quoted-var)
(esh-var-test/quoted-interp-lisp, esh-var-test/quoted-interp-cmd)
(esh-var-test/quoted-interp-temp-cmd): New tests.

2 years agoAdd a new macro to simplify parsing temporary Eshell command strings
Jim Porter [Sun, 27 Feb 2022 04:55:22 +0000 (20:55 -0800)]
Add a new macro to simplify parsing temporary Eshell command strings

This abstracts out the somewhat-unusual "insert&delete" logic in
'eshell-parse-command' so that it can be used elsewhere, and also
ensures that the deletion occurs even if an an error occurs.

* lisp/eshell/esh-cmd.el (eshell-with-temp-command): New macro.
(eshell-parse-command): Use it.

2 years agoMove Eshell variable interpolation tests to their own file
Jim Porter [Mon, 28 Feb 2022 02:34:22 +0000 (18:34 -0800)]
Move Eshell variable interpolation tests to their own file

* test/lisp/eshell/eshell-tests.el (eshell-test/interp-cmd)
(eshell-test/interp-lisp, eshell-test/interp-temp-cmd)
(eshell-test/interp-concat, eshell-test/interp-concat-lisp)
(eshell-test/interp-concat2, eshell-test/interp-concat-lisp2)
(eshell-test/interp-cmd-external)
(eshell-test/interp-cmd-external-concat, eshell-test/window-height)
(eshell-test/window-width, eshell-test/last-result-var)
(eshell-test/last-result-var2, eshell-test/last-arg-var):
Move from here...

* test/lisp/eshell/esh-var-test.el (esh-var-test/interp-lisp)
(esh-var-test/interp-cmd, esh-var-test/interp-cmd-external)
(esh-var-test/interp-temp-cmd, esh-var-test/interp-concat-lisp)
(esh-var-test/interp-concat-lisp2, esh-var-test/interp-concat-cmd)
(esh-var-test/interp-concat-cmd2)
(esh-var-test/interp-concat-cmd-external, esh-var-test/window-height)
(esh-var-test/window-width, esh-var-test/last-result-var)
(esh-var-test/last-result-var2, esh-var-test/last-arg-var):
... to here.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Thu, 3 Mar 2022 05:30:34 +0000 (06:30 +0100)]
Merge from origin/emacs-28

225e0d6047 Correct etc/NEWS entry about bitmapped fonts

# Conflicts:
# etc/NEWS

2 years agoCache the backend value together with the project root
Dmitry Gutov [Thu, 3 Mar 2022 03:23:26 +0000 (05:23 +0200)]
Cache the backend value together with the project root

* lisp/progmodes/project.el (project-try-vc):
Cache the backend value together with the root.
(project-root, project-files, project-ignores):
Update to access the new data structure.

2 years ago* src/xterm.c: Fix commentary on GTK client side windows.
Po Lu [Thu, 3 Mar 2022 03:39:55 +0000 (11:39 +0800)]
* src/xterm.c: Fix commentary on GTK client side windows.

2 years agoFix Motif build without toolkit scroll bars
Po Lu [Thu, 3 Mar 2022 03:16:25 +0000 (11:16 +0800)]
Fix Motif build without toolkit scroll bars

* src/xterm.c: Always include Xm.h on Motif.

2 years ago* lisp/progmodes/xref.el: Bump the version.
Dmitry Gutov [Thu, 3 Mar 2022 02:55:05 +0000 (04:55 +0200)]
* lisp/progmodes/xref.el: Bump the version.

2 years agoDon't calculate any frame for extension events
Po Lu [Thu, 3 Mar 2022 02:49:55 +0000 (10:49 +0800)]
Don't calculate any frame for extension events

* src/xterm.c (handle_one_xevent): If event is not a core event,
don't try to calculate any from event.xany.window.

2 years agoImplement `toolkit_position_hook' on PGTK
Po Lu [Thu, 3 Mar 2022 01:05:00 +0000 (09:05 +0800)]
Implement `toolkit_position_hook' on PGTK

* src/pgtkterm.c (pgtk_toolkit_position): New function.
(pgtk_create_terminal): Set it as the toolkit position hook.

2 years ago; * src/termhooks.h (struct terminal): Fix typo in comment.
Po Lu [Wed, 2 Mar 2022 11:16:53 +0000 (19:16 +0800)]
; * src/termhooks.h (struct terminal): Fix typo in comment.

2 years agoFix menu bar position reporting on Haiku as well
Po Lu [Wed, 2 Mar 2022 11:10:00 +0000 (11:10 +0000)]
Fix menu bar position reporting on Haiku as well

* src/haikuterm.c (haiku_toolkit_position): New function.
(haiku_create_terminal): Register new hook.

2 years agoFix reporting of imaginary key prefixes on toolkit tool and menu bars
Po Lu [Wed, 2 Mar 2022 11:00:21 +0000 (19:00 +0800)]
Fix reporting of imaginary key prefixes on toolkit tool and menu bars

* src/keyboard.c (make_lispy_position): Set imaginary prefix if
the terminal says what widget the position is on top of.
* src/termhooks.h (struct terminal): New field
`toolkit_position_hook'.
* src/xterm.c (x_toolkit_position): New function.
(x_create_terminal): Register hook.

2 years agoCorrect etc/NEWS entry about bitmapped fonts
Po Lu [Wed, 2 Mar 2022 08:22:18 +0000 (09:22 +0100)]
Correct etc/NEWS entry about bitmapped fonts

* etc/NEWS: Don't say that bitmap font issues are due to Pango, that's
not accurate.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 2 Mar 2022 05:33:19 +0000 (06:33 +0100)]
Merge from origin/emacs-28

9dadcbe429 ; * doc/misc/eshell.texi (Dollars Expansion): Fix markup.
2c3d1b6bf4 Improve/correct documentation about Eshell variable expansion
9e257aecc9 Partially revert b03f74e0f2a578b1580e8b1c368665850ee7f808

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Wed, 2 Mar 2022 05:33:19 +0000 (06:33 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

b8bc359bbf Backport: Port pre-commit hook to Git 2.35.0

2 years agoFix some bugs with multiple terminals on Haiku
Po Lu [Wed, 2 Mar 2022 05:21:20 +0000 (05:21 +0000)]
Fix some bugs with multiple terminals on Haiku

* src/haikuterm.c (haiku_mouse_position): Only clear
`mouse_moved' for Haiku frames.

2 years agoFix persistent help text on disabled menu items
Po Lu [Wed, 2 Mar 2022 03:12:09 +0000 (11:12 +0800)]
Fix persistent help text on disabled menu items

* oldXMenu/Activate.c (XMenuActivate): Always deactivate help
echo upon leaving a menu item.

2 years ago* src/msdos.c (dos_rawgetc): Handle tab bar clicks correctly.
Po Lu [Wed, 2 Mar 2022 02:07:59 +0000 (10:07 +0800)]
* src/msdos.c (dos_rawgetc): Handle tab bar clicks correctly.

2 years agoDismiss help text when item becomes unactivated on oldXMenu
Po Lu [Wed, 2 Mar 2022 01:46:44 +0000 (09:46 +0800)]
Dismiss help text when item becomes unactivated on oldXMenu

* oldXMenu/Activate.c (XMenuActivate): Dismiss help text when
leaving an item.

2 years agoFix odd scrolling bugs on LessTif
Po Lu [Wed, 2 Mar 2022 01:34:05 +0000 (09:34 +0800)]
Fix odd scrolling bugs on LessTif

* src/xterm.c (handle_one_xevent): Give emulated button events
to Motif.

2 years agoImprove behavior of Motif popup menus on XI2
Po Lu [Wed, 2 Mar 2022 01:01:48 +0000 (09:01 +0800)]
Improve behavior of Motif popup menus on XI2

* src/xmenu.c (create_and_show_popup_menu): Set input focus to
menu window.

2 years agoRevert previous merge-gnulib change
Paul Eggert [Tue, 1 Mar 2022 18:06:27 +0000 (10:06 -0800)]
Revert previous merge-gnulib change

* admin/merge-gnulib: Revert previous stopgap change.
It shouldn’t be needed now that Gnulib has the change
2022-03-01T18:01:59Z!eggert@cs.ucla.edu.

2 years ago; * doc/misc/eshell.texi (Dollars Expansion): Fix markup.
Eli Zaretskii [Tue, 1 Mar 2022 13:08:38 +0000 (15:08 +0200)]
; * doc/misc/eshell.texi (Dollars Expansion): Fix markup.

2 years agoImprove/correct documentation about Eshell variable expansion
Jim Porter [Sun, 27 Feb 2022 21:20:51 +0000 (13:20 -0800)]
Improve/correct documentation about Eshell variable expansion

* lisp/eshell/esh-var.el: Correct documentation comment.
(eshell-parse-variable-ref): Correct docstring.

* doc/misc/eshell.texi (Dollars Expansion): Add documentation for
$"var"/$'var' and $<command> syntaxes.

2 years agoPartially revert b03f74e0f2a578b1580e8b1c368665850ee7f808
Jim Porter [Mon, 28 Feb 2022 17:31:22 +0000 (09:31 -0800)]
Partially revert b03f74e0f2a578b1580e8b1c368665850ee7f808

That commit regressed '$<command>' forms in Eshell, due to a
limitation/bug in how 'eshell-do-eval' works.  This fixes
bug#54190.

* lisp/eshell/esh-var.el (eshell-parse-variable-ref): Quote a lambda.

* test/lisp/eshell/eshell-tests.el (eshell-test/interp-temp-cmd):
New test.

2 years ago; Add a comment in recently installed code
Po Lu [Tue, 1 Mar 2022 12:48:55 +0000 (20:48 +0800)]
; Add a comment in recently installed code

* faces.el (face-spec-recalc): Add a comment describing the
special treatement of the scroll-bar face.

2 years agoAdd PropertyChangeMask to the standard event set
Po Lu [Tue, 1 Mar 2022 12:15:02 +0000 (20:15 +0800)]
Add PropertyChangeMask to the standard event set

* src/xfns.c (x_window): Remove special Motif code.
* src/xterm.h (STANDARD_EVENT_SET): Add PropertyChangeMask.

2 years agoFix crashes and other bugs on LessTif
Po Lu [Tue, 1 Mar 2022 11:15:46 +0000 (19:15 +0800)]
Fix crashes and other bugs on LessTif

* lwlib/lwlib-Xm.c (make_menu_in_widget): XmIsRowColumn is
broken on the latest LessTif release, so avoid that here.
* src/xfns.c (x_window): Add PropertyChangeMask which LessTif
doesn't do itself.

2 years agoFix reporting of wheel events on top of GTK scroll bars
Po Lu [Tue, 1 Mar 2022 10:38:08 +0000 (18:38 +0800)]
Fix reporting of wheel events on top of GTK scroll bars

* src/gtkutil.c (xg_update_scrollbar_pos):
(xg_update_horizontal_scrollbar_pos): Stop ensuring the window
is native.
(xg_event_is_for_scrollbar): New variable `for_valuator'.
All callers changed.
* src/gtkutil.h: Update prototypes.
* src/xterm.c (handle_one_xevent): Drop all valuator change
events destined for scroll bars.

2 years agoBackport: Port pre-commit hook to Git 2.35.0
Paul Eggert [Wed, 23 Feb 2022 19:29:56 +0000 (11:29 -0800)]
Backport: Port pre-commit hook to Git 2.35.0

* build-aux/git-hooks/pre-commit: Use LC_ALL=C grep -E instead of
sane_egrep (removed in Git 2.35.0).

(cherry picked from commit b8a96f055624f86fe965a0d1b7b2495b2db80e63)

2 years ago; * src/xwidget.c: Add missing part of last change.
Po Lu [Tue, 1 Mar 2022 07:49:03 +0000 (15:49 +0800)]
; * src/xwidget.c: Add missing part of last change.

2 years ago* src/xwidget.h: Fix build with XI 2.4.
Po Lu [Tue, 1 Mar 2022 07:45:50 +0000 (15:45 +0800)]
* src/xwidget.h: Fix build with XI 2.4.

2 years agoMake precision scrolling on top of the tool bar work
Po Lu [Tue, 1 Mar 2022 07:38:37 +0000 (15:38 +0800)]
Make precision scrolling on top of the tool bar work

* lisp/pixel-scroll.el (pixel-scroll-precision-mode-map): Bind
some more events.

(pixel-scroll-precision):
(pixel-scroll-start-momentum): If window is a frame, use its
selected window.

2 years agoAvoid duplicate wheel and button events on non-toolkit scroll bars
Po Lu [Tue, 1 Mar 2022 06:59:32 +0000 (14:59 +0800)]
Avoid duplicate wheel and button events on non-toolkit scroll bars

* src/xterm.c (x_scroll_bar_create): Set appropriate input
extension event mask.
(handle_one_xevent): Move some ifdefs around and handle input
extension button events on scroll bars.

2 years agoFix old X menu on builds with XI2
Po Lu [Tue, 1 Mar 2022 06:44:02 +0000 (14:44 +0800)]
Fix old X menu on builds with XI2

* oldXMenu/Activate.c (XMenuActivateSetTranslateFunction): New
function.
(XMenuActivate): Handle generic events.
* oldXMenu/XMenu.h: New prototypes.
(Translate_func): New type.
* src/xmenu.c (x_menu_wait_translate_generic_event): New
function.
(x_menu_show): Set translate function.

2 years agoDisable some code that interferes with menus on Lucid
Po Lu [Tue, 1 Mar 2022 06:06:52 +0000 (14:06 +0800)]
Disable some code that interferes with menus on Lucid

* src/xmenu.c (create_and_show_popup_menu)
(server_timestamp_predicate): Disable timestamp code on builds
using the Lucid menu bar widget.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 1 Mar 2022 06:05:15 +0000 (07:05 +0100)]
Merge from origin/emacs-28

6dbc3da205 Fix :tag for eol in tab-first-completion

2 years agoFix C-g inside toolkit file dialogs with XI2
Po Lu [Tue, 1 Mar 2022 05:48:36 +0000 (13:48 +0800)]
Fix C-g inside toolkit file dialogs with XI2

* src/xfns.c (Fx_file_dialog): Handle GenericEvents when looking
for quit character.
* src/xmenu.c (x_menu_wait_for_event): If data is non-nil, use
XPending.

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Tue, 1 Mar 2022 05:04:06 +0000 (06:04 +0100)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-02-28 02:58:30 UTC.

2 years agoIntern server time property during terminal initialization
Po Lu [Tue, 1 Mar 2022 03:31:37 +0000 (11:31 +0800)]
Intern server time property during terminal initialization

* src/xmenu.c (create_and_show_popup_menu): Use previously
interned atom.
* src/xterm.c (x_term_init): New atom `EMACS_SERVER_TIME_PROP'.
* src/xterm.h (struct x_display_info): New field
`Xatom_EMACS_SERVER_TIME_PROP'.

2 years agoFix Motif menu help text in submenus
Po Lu [Tue, 1 Mar 2022 03:30:52 +0000 (11:30 +0800)]
Fix Motif menu help text in submenus

* lwlib/lwlib-Xm.c (xm_arm_callback):
(make_menu_in_widget):
(update_one_menu_entry):
(xm_update_one_widget):
(do_call): Pass instance to arm callback and use wv as user data
instead of call data.

2 years ago* src/xterm.c: Explain frame resize synchronization.
Po Lu [Tue, 1 Mar 2022 01:00:29 +0000 (09:00 +0800)]
* src/xterm.c: Explain frame resize synchronization.

2 years agoWork around merge-gnulib glitch from fresh checkout
Paul Eggert [Mon, 28 Feb 2022 21:16:44 +0000 (13:16 -0800)]
Work around merge-gnulib glitch from fresh checkout

* admin/merge-gnulib: In a fresh checkout, run gnulib-tool
twice, instead of merely running autogen.sh twice.

2 years agoecomplete: Try and avoid losing data
Stefan Monnier [Mon, 28 Feb 2022 16:59:38 +0000 (11:59 -0500)]
ecomplete: Try and avoid losing data

* lisp/ecomplete.el (ecomplete-add-item): Make sure the database is
setup, so we don't risk overwriting it with a (mostly) empty one.
(ecomplete-save): Don't save an empty database.

2 years ago; In xterm.c add comment about frame resizing under X
Martin Rudalics [Mon, 28 Feb 2022 15:36:15 +0000 (16:36 +0100)]
; In xterm.c add comment about frame resizing under X

2 years agoClean up input extension event handling code
Po Lu [Mon, 28 Feb 2022 12:21:24 +0000 (20:21 +0800)]
Clean up input extension event handling code

* src/xterm.c (handle_one_xevent): Fix usages of event
structures of the wrong type.

2 years ago* src/xterm.c (handle_one_xevent): Add some missing dead keys.
Po Lu [Mon, 28 Feb 2022 11:43:08 +0000 (19:43 +0800)]
* src/xterm.c (handle_one_xevent): Add some missing dead keys.

2 years agoClean up byte-compile-arglist-warn
Mattias EngdegĂĄrd [Mon, 28 Feb 2022 11:13:52 +0000 (12:13 +0100)]
Clean up byte-compile-arglist-warn

* lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn):
Remove unnecessary sort (only need min and max).  Reduce mutation.

2 years agoFix :color specification in flat-button boxes
Lars Ingebrigtsen [Mon, 28 Feb 2022 10:41:52 +0000 (11:41 +0100)]
Fix :color specification in flat-button boxes

* src/xfaces.c (realize_gui_face): Allow reliably specifying
:color in flat-button boxes (bug#54196).

2 years agoDon't throw errors while propertizing in sgml-mode
Lars Ingebrigtsen [Mon, 28 Feb 2022 09:30:31 +0000 (10:30 +0100)]
Don't throw errors while propertizing in sgml-mode

* lisp/textmodes/sgml-mode.el (sgml-syntax-propertize): Don't
throw an error when propertizing (bug#54195).

2 years agoFix :tag for eol in tab-first-completion
Lars Ingebrigtsen [Mon, 28 Feb 2022 09:14:03 +0000 (10:14 +0100)]
Fix :tag for eol in tab-first-completion

* lisp/indent.el (tab-first-completion): Fix the :tag description
(bug#54179).

2 years agoBetter fix for bug#13476
Po Lu [Mon, 28 Feb 2022 06:35:01 +0000 (14:35 +0800)]
Better fix for bug#13476

* lisp/faces.el (face-spec-recalc): Apply scroll bar foreground
and background to the frame if changing the scroll-bar face.
(scroll-bar): Restore previous declaration.  That way, the
default colors are used for toolkit scroll bars, instead of
black and white.

2 years agoImprove treatment of toolkit scroll bars with the input extension
Po Lu [Mon, 28 Feb 2022 06:04:23 +0000 (14:04 +0800)]
Improve treatment of toolkit scroll bars with the input extension

* src/xterm.c (x_create_horizontal_toolkit_scroll_bar)
(x_create_toolkit_scroll_bar): Set XI2 event mask appropriately.
(handle_one_xevent): Make sure coordinates are correct for the
frame's window when handling wheel events.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 28 Feb 2022 05:33:06 +0000 (06:33 +0100)]
Merge from origin/emacs-28

e77fc8262a Update to Org 9.5.2-22-g33543d
9bce4b67f1 ; * lisp/help.el (with-help-window): Doc fix.  (Bug#54170)
558b03a958 Add explicit '--no-heading' for ripgrep

2 years agoUpdate to Org 9.5.2-22-g33543d
Kyle Meyer [Mon, 28 Feb 2022 05:11:01 +0000 (00:11 -0500)]
Update to Org 9.5.2-22-g33543d

2 years agoDon't save menu bar events that land on the menu bar itself
Po Lu [Mon, 28 Feb 2022 01:40:01 +0000 (09:40 +0800)]
Don't save menu bar events that land on the menu bar itself

* src/xterm.c (handle_one_xevent): Ignore menu bar events which
land on the menu bar itself instead of a button.

2 years agoTreat scroll bar information consistently on Haiku
Po Lu [Mon, 28 Feb 2022 01:16:17 +0000 (01:16 +0000)]
Treat scroll bar information consistently on Haiku

* src/haiku_support.cc (class EmacsScrollBar): New field `info'.
(EmacsScrollBar): Obtain scroll bar info on initialization.
(ButtonRegionFor): Use that information instead.

2 years ago; * lisp/help.el (with-help-window): Doc fix. (Bug#54170)
Eli Zaretskii [Sun, 27 Feb 2022 13:54:27 +0000 (15:54 +0200)]
; * lisp/help.el (with-help-window): Doc fix.  (Bug#54170)

2 years agoMerge from gnulib
Lars Ingebrigtsen [Sun, 27 Feb 2022 13:32:38 +0000 (14:32 +0100)]
Merge from gnulib

* m4/gnulib-common.m4 (gl_COMMON_BODY):
* lib/gnulib.mk.in (CXXCPP):
* lib/cdefs.h: Updated with admin/merge-gnulib.  (This is in
preparation to adding the nanosleep module later.)

2 years agoAdd explicit '--no-heading' for ripgrep
Dmitry Gutov [Sun, 27 Feb 2022 13:28:04 +0000 (15:28 +0200)]
Add explicit '--no-heading' for ripgrep

* lisp/progmodes/xref.el (xref-search-program-alist):
Add explicit '--no-heading' for ripgrep (bug#54177).

2 years agoDon't send help-echo on menu button arming not caused by motion events
Po Lu [Sun, 27 Feb 2022 11:33:16 +0000 (19:33 +0800)]
Don't send help-echo on menu button arming not caused by motion events

* lwlib/lwlib-Xm.c (xm_arm_callback): Ignore arming if the arm
was not caused by an EnterNotify or MotionNotify event.

2 years ago* src/xterm.c (handle_one_xevent): Translate motion events on Motif.
Po Lu [Sun, 27 Feb 2022 06:56:34 +0000 (14:56 +0800)]
* src/xterm.c (handle_one_xevent): Translate motion events on Motif.

2 years agoWork around some problems with Motif and the input extension
Po Lu [Sun, 27 Feb 2022 06:40:26 +0000 (14:40 +0800)]
Work around some problems with Motif and the input extension

* src/xmenu.c (create_and_show_popup_menu): Restore input focus
to the frame's outer window if there was an input extension
grab.

2 years agoTranslate some more input extension events needed by Motif
Po Lu [Sun, 27 Feb 2022 06:30:58 +0000 (14:30 +0800)]
Translate some more input extension events needed by Motif

* src/xterm.c (handle_one_xevent): Translate XI_Enter and
XI_Leave events when built with Motif.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 27 Feb 2022 05:31:54 +0000 (06:31 +0100)]
Merge from origin/emacs-28

a50f8dec09 Follow OpenSSH changes in Tramp
e86eae21a9 Document better how to reset attributes of faces for new f...

2 years ago* commands.texi (Misc Events): Update description of wheel events.
Po Lu [Sun, 27 Feb 2022 03:44:06 +0000 (11:44 +0800)]
* commands.texi (Misc Events): Update description of wheel events.

2 years agoAdd project-ignore-buffer-conditions
Manuel Uberti [Wed, 23 Feb 2022 08:25:32 +0000 (09:25 +0100)]
Add project-ignore-buffer-conditions

* lisp/progmodes/project.el (project-ignore-buffer-conditions):
New defcustom.
(project--read-project-buffer):
Use it (bug#54100).

2 years ago* src/xterm.c (handle_one_xevent): Fix translation of button events.
Po Lu [Sun, 27 Feb 2022 02:49:19 +0000 (10:49 +0800)]
* src/xterm.c (handle_one_xevent): Fix translation of button events.

2 years agoFix Motif menu and menu bar dismissal on XI2
Po Lu [Sun, 27 Feb 2022 02:37:17 +0000 (10:37 +0800)]
Fix Motif menu and menu bar dismissal on XI2

* src/xmenu.c (x_activate_menubar): Improve ungrabbing logic on
XI2.
(server_timestamp_predicate): New function.
(create_and_show_popup_menu): If the display supports XI2, make
sure the timestamps are correct by dispatching a PropertyNotify
event to Xt.
* src/xterm.c (handle_one_xevent): Translate XI_ButtonRelease
events into core events before dispatching them to Xt.

2 years agoIgnore irrelevant button events on Haiku scroll bars
Po Lu [Sat, 26 Feb 2022 12:25:51 +0000 (12:25 +0000)]
Ignore irrelevant button events on Haiku scroll bars

* src/haiku_support.cc (MouseDown): Ignore if there are too many
buttons pressed.

2 years agoFollow OpenSSH changes in Tramp
Michael Albinus [Sat, 26 Feb 2022 11:51:26 +0000 (12:51 +0100)]
Follow OpenSSH changes in Tramp

* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options):
Reimplement.  OpenSSH has changed its diagnostics messages.

2 years agoDocument better how to reset attributes of faces for new frames
Eli Zaretskii [Sat, 26 Feb 2022 07:41:05 +0000 (09:41 +0200)]
Document better how to reset attributes of faces for new frames

* doc/lispref/display.texi (Attribute Functions):
* lisp/faces.el (set-face-attribute): Explain how to reset an
attribute's value for future frames.  (Bug#54156)

2 years agoPrevent crashes on event for removed scroll bar on Haiku
Po Lu [Sat, 26 Feb 2022 07:24:12 +0000 (07:24 +0000)]
Prevent crashes on event for removed scroll bar on Haiku

* src/haiku_support.cc (class EmacsScrollBar): Remove field
`scroll_bar'.
(ValueChanged, MouseDown, MouseUp, BScrollBar_make_for_view):
Adjust for changes.

* src/haiku_support.h (struct haiku_scroll_bar_value_event)
(struct haiku_scroll_bar_drag_event)
(struct haiku_scroll_bar_part_event): New field `window'.

* src/haikuterm.c (haiku_scroll_bar_from_widget): New function.
(haiku_read_socket): Adjust for changes in scroll bar event
structures.

2 years agoFix reporting of horizontal scroll bar buttons on Haiku
Po Lu [Sat, 26 Feb 2022 07:06:55 +0000 (07:06 +0000)]
Fix reporting of horizontal scroll bar buttons on Haiku

* haikuterm.c (haiku_read_socket): Use correct values for scroll
bar buttons when the scroll bar is horizontal.

2 years agoImprove scroll bar button handling on Haiku
Po Lu [Sat, 26 Feb 2022 06:56:31 +0000 (06:56 +0000)]
Improve scroll bar button handling on Haiku

* src/haiku_io.c (haiku_len): Add `SCROLL_BAR_PART_EVENT'.
* src/haiku_support.cc (class EmacsScrollBar): New fields
`dragging' and `current_state', along with `old_value' and
`current_part'.
(EmacsScrollBar): Set horizontal flag to `horizontal_p'.
(MessageReceived): Set old_value when receiving
SCROLL_BAR_UPDATE message.
(ValueChanged): Don't allow scroll bar values to change while
dragging.
(MouseUp, MouseDown): Calculate button under mouse and act
accordingly.
* src/haiku_support.h (enum haiku_event_type): New event
`SCROLL_BAR_PART_EVENT'.
(enum haiku_scroll_bar_part): New enumerator.
(struct haiku_scroll_bar_part_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle
SCROLL_BAR_PART_EVENTs.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 26 Feb 2022 05:32:26 +0000 (06:32 +0100)]
Merge from origin/emacs-28

ded89ed3fa * lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): ...

2 years ago* src/xterm.c (handle_one_xevent): Set user time for xwidgets as well.
Po Lu [Sat, 26 Feb 2022 00:54:36 +0000 (08:54 +0800)]
* src/xterm.c (handle_one_xevent): Set user time for xwidgets as well.

2 years agoDrop the visited file modtime check for remote xref hits
Dmitry Gutov [Sat, 26 Feb 2022 00:18:34 +0000 (02:18 +0200)]
Drop the visited file modtime check for remote xref hits

* lisp/progmodes/xref.el (xref--hits-remote-id): New variable.
(xref--convert-hits, xref--collect-matches)
(xref--find-file-buffer): Use it (bug#54025).

2 years agoRobustify merge-gnulib a bit
Paul Eggert [Fri, 25 Feb 2022 20:26:59 +0000 (12:26 -0800)]
Robustify merge-gnulib a bit

* admin/merge-gnulib: Fail if autogen.sh fails.
Remove autom4te.cache before running gnulib-tool.

2 years agoAdd new file ietf-drums-date.el
Bob Rogers [Fri, 25 Feb 2022 12:03:20 +0000 (13:03 +0100)]
Add new file ietf-drums-date.el

* lisp/mail/ietf-drums-date.el: parse-time-string replacement which is
compatible but can be made stricter if desired.
* test/lisp/mail/ietf-drums-date-tests.el (added): Add tests for
ietf-drums-parse-date-string.
* lisp/mail/ietf-drums.el (ietf-drums-parse-date): Use
ietf-drums-parse-date-string.

2 years agoImprove treatment of dropping mouse track state on Haiku
Po Lu [Fri, 25 Feb 2022 11:36:07 +0000 (11:36 +0000)]
Improve treatment of dropping mouse track state on Haiku

* src/haikuterm.c (haiku_mouse_or_wdesc_frame): New function.
(haiku_read_socket): Use it to find the appropriate frame when
handling motion or button events.

2 years ago* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Adapt test.
Michael Albinus [Fri, 25 Feb 2022 09:11:40 +0000 (10:11 +0100)]
* lisp/net/tramp-sh.el (tramp-ssh-controlmaster-options): Adapt test.

2 years agoImprove tracking of modified regions on Haiku
Po Lu [Fri, 25 Feb 2022 08:05:11 +0000 (08:05 +0000)]
Improve tracking of modified regions on Haiku

* src/haiku_support.cc (class EmacsView): New field
`invalid_region'.
(FlipBuffers): Only invalidate that region.
(SetUpDoubleBuffering): Clear that region.
(BView_draw_lock): New parameters for denoting the region
to invalidate.
(BView_invalidate_region): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_set_background_color):
* src/haikumenu.c (digest_menu_items):
* src/haikuterm.c (haiku_clip_to_string):
(haiku_flip_buffers):
(haiku_clear_frame_area):
(haiku_clear_frame):
(haiku_draw_glyph_string):
(haiku_after_update_window_line):
(haiku_draw_window_cursor):
(haiku_draw_vertical_window_border):
(haiku_draw_window_divider):
(haiku_draw_fringe_bitmap):
(haiku_scroll_run):
(haiku_read_socket):
(haiku_flash):
(haiku_clear_under_internal_border): Mark appropriate region as
invalid before buffer flip.

2 years agoFix calculation of scroll deltas when coalescing wheel events
Po Lu [Fri, 25 Feb 2022 06:20:14 +0000 (14:20 +0800)]
Fix calculation of scroll deltas when coalescing wheel events

* src/xterm.c (handle_one_xevent): Use accumulated values
instead of raw delta to determine scroll amounts.

2 years agoMake interpolated scrolling work above non-selected windows
Po Lu [Fri, 25 Feb 2022 06:15:51 +0000 (14:15 +0800)]
Make interpolated scrolling work above non-selected windows

* lisp/pixel-scroll.el (pixel-scroll-precision-interpolate): New
parameter `old-window'.
(pixel-scroll-precision): Pass originally selected window to the
interpolation function.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 25 Feb 2022 05:30:57 +0000 (06:30 +0100)]
Merge from origin/emacs-28

5c77aed2d6 Mention flyspell-prog-mode in flyspell-mode doc string

2 years agoFix Eshell process tests to (hopefully) work on all platforms
Jim Porter [Fri, 25 Feb 2022 02:18:27 +0000 (03:18 +0100)]
Fix Eshell process tests to (hopefully) work on all platforms

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline):
Fix test (bug#54136).

2 years agoxref--find-file-buffer: Check modified-p and modtime
Dmitry Gutov [Fri, 25 Feb 2022 01:34:59 +0000 (03:34 +0200)]
xref--find-file-buffer: Check modified-p and modtime

* lisp/progmodes/xref.el (xref--find-file-buffer):
Check whether the buffer contents match what's on disk
(bug#54025).

2 years agoSet user time when receiving any wheel events
Po Lu [Fri, 25 Feb 2022 00:40:51 +0000 (08:40 +0800)]
Set user time when receiving any wheel events

* src/xterm.c (handle_one_xevent): Set user time if the mouse
wheel moved.

2 years agoFix esh-proc-tests on MS-Windows
Eli Zaretskii [Thu, 24 Feb 2022 20:02:28 +0000 (22:02 +0200)]
Fix esh-proc-tests on MS-Windows

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline)
(esh-proc-test/kill-background-process): Fix tests on MS-Windows.

2 years agoMake 't' in Buffer-menu be more defensive
Eli Zaretskii [Thu, 24 Feb 2022 19:57:34 +0000 (21:57 +0200)]
Make 't' in Buffer-menu be more defensive

* lisp/buff-menu.el (Buffer-menu-visit-tags-table): Verify that
the buffer holds a tags-table file before using it as such.
(Bug#54133)

2 years ago* admin/merge-gnulib: fix bare checkout (Bug#32452#65)
Paul Eggert [Thu, 24 Feb 2022 18:12:50 +0000 (10:12 -0800)]
* admin/merge-gnulib: fix bare checkout (Bug#32452#65)

2 years agoAmend byte-run-strip-symbol-positions so that an unexec build builds
Alan Mackenzie [Thu, 24 Feb 2022 17:30:39 +0000 (17:30 +0000)]
Amend byte-run-strip-symbol-positions so that an unexec build builds

This fixes bug #54098.

* lisp/emacs-lisp/byte-run.el (byte-run--strip-list)
(byte-run--strip-vector/record): New functions.  These alter a list or
vector/record structure only where a symbol with position gets replaced by a
bare symbol.
(byte-run-strip-symbol-positions): Reformulate to use the two new functions.
(function-put): No longer strip positions from the second and third arguments.

* lisp/emacs-lisp/bytecomp.el (byte-compile-out): Remove the senseless
"stripping" of putative symbol positions from OPERAND, which is nil or a
number.

2 years agoFix symlinks in tramp-sshfs.el (Bug#54130)
Michael Albinus [Thu, 24 Feb 2022 15:11:01 +0000 (16:11 +0100)]
Fix symlinks in tramp-sshfs.el  (Bug#54130)

* lisp/net/tramp-sshfs.el (tramp-methods) <sshfs>:
Add "-o transform_symlinks" to `tramp-mount-args'.
(tramp-sshfs-file-name-handler-alist):
Use `tramp-sshfs-handle-file-writable-p'.
(tramp-sshfs-handle-file-writable-p): New defun.  (Bug#54130)

* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test20-file-modes): Adapt tests.

2 years agoCheck if WM support for NET_WM_USER_TIME_WINDOW changed during updates
Po Lu [Thu, 24 Feb 2022 12:01:39 +0000 (20:01 +0800)]
Check if WM support for NET_WM_USER_TIME_WINDOW changed during updates

* src/xterm.c (x_display_set_last_user_time): Update the user
time window if window manager support changed.

* src/xterm.h (struct x_display_info): New field
`last_user_check_time'.

2 years ago; * etc/NEWS: Fix wording of a recently added NEWS entry.
Eli Zaretskii [Thu, 24 Feb 2022 11:07:16 +0000 (13:07 +0200)]
; * etc/NEWS: Fix wording of a recently added NEWS entry.

2 years agoDon't superfluously emit prompts when terminating processes in Eshell
Jim Porter [Thu, 24 Feb 2022 04:43:38 +0000 (20:43 -0800)]
Don't superfluously emit prompts when terminating processes in Eshell

* lisp/eshell/esh-proc.el (eshell-kill-process-function): Only reset
the prompt if PROC is writing to the terminal.
(eshell-sentinel): Only write the exit message if PROC is writing to
the terminal (bug#54136).

* test/lisp/eshell/esh-proc-tests.el (esh-proc-test/kill-pipeline)
(esh-proc-test/kill-pipeline-head)
(esh-proc-test/kill-background-process): New tests.

2 years agoMention flyspell-prog-mode in flyspell-mode doc string
Lars Ingebrigtsen [Thu, 24 Feb 2022 09:10:40 +0000 (10:10 +0100)]
Mention flyspell-prog-mode in flyspell-mode doc string

* lisp/textmodes/flyspell.el (flyspell-mode): Mention
flyspell-prog-mode (bug#54131).