mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-07 15:21:46 +00:00
Merge remote-tracking branch 'origin/master' into feature/android
This commit is contained in:
commit
4d3442ebad
@ -1218,15 +1218,14 @@ you aren't familiar with @samp{use-package} or have no interest in
|
|||||||
learning it. For our purposes, it's just a means of presenting
|
learning it. For our purposes, it's just a means of presenting
|
||||||
configuration details in a tidy, standardized format. If it helps,
|
configuration details in a tidy, standardized format. If it helps,
|
||||||
just pretend it's some make-believe, pseudo configuration language.
|
just pretend it's some make-believe, pseudo configuration language.
|
||||||
Although the syntax below is easy enough to intuit and adapt to your
|
And while the syntax below is easy enough to intuit and adapt to your
|
||||||
setup, you may wish to keep the following in mind (or @pxref{Top,,,
|
setup, you may wish to keep the following in mind:
|
||||||
use-package,}):
|
|
||||||
|
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
Each @code{use-package} ``declaration'' focuses on a library
|
Each @code{use-package} ``declaration'' focuses on a library
|
||||||
``feature'', which is just a symbol you'd normally @code{require} in
|
``feature'', which is just a symbol you'd normally @code{require} in
|
||||||
your config @pxref{Named Features,,, elisp,}).
|
your config.
|
||||||
|
|
||||||
@item
|
@item
|
||||||
Emacs loads anything in a @code{:config} section @emph{after} loading
|
Emacs loads anything in a @code{:config} section @emph{after} loading
|
||||||
@ -1235,6 +1234,10 @@ whatever library @code{provide}s the declaration's feature.
|
|||||||
@item
|
@item
|
||||||
Everything in a @code{:custom} or @code{:custom-face} section is
|
Everything in a @code{:custom} or @code{:custom-face} section is
|
||||||
basically something you'd find in your @code{custom-file}.
|
basically something you'd find in your @code{custom-file}.
|
||||||
|
|
||||||
|
@item
|
||||||
|
For more info, @pxref{Named Features,,, elisp,}, or @pxref{Top,,,
|
||||||
|
use-package,}.
|
||||||
@end itemize
|
@end itemize
|
||||||
|
|
||||||
@noindent
|
@noindent
|
||||||
@ -1300,12 +1303,12 @@ settings (@pxref{Sample configuration via Customize}).
|
|||||||
|
|
||||||
(use-package erc-goodies
|
(use-package erc-goodies
|
||||||
;; Turn on read indicators when joining channels.
|
;; Turn on read indicators when joining channels.
|
||||||
:hook (erc-join . my-erc-enable-read-indicator-on-join))
|
:hook (erc-join . my-erc-enable-keep-place-indicator-on-join))
|
||||||
|
|
||||||
(defvar my-erc-read-indicator-channels '("#emacs")
|
(defvar my-erc-read-indicator-channels '("#emacs")
|
||||||
"Channels in which to show a `keep-place-indicator'.")
|
"Channels in which to show a `keep-place-indicator'.")
|
||||||
|
|
||||||
(defun my-erc-enable-read-indicator-on-join ()
|
(defun my-erc-enable-keep-place-indicator-on-join ()
|
||||||
"Enable read indicators for certain queries or channels."
|
"Enable read indicators for certain queries or channels."
|
||||||
(when (member (erc-default-target) my-erc-read-indicator-channels)
|
(when (member (erc-default-target) my-erc-read-indicator-channels)
|
||||||
(erc-keep-place-indicator-mode +1)))
|
(erc-keep-place-indicator-mode +1)))
|
||||||
@ -1313,14 +1316,16 @@ settings (@pxref{Sample configuration via Customize}).
|
|||||||
;; Handy commands from the Emacs Wiki.
|
;; Handy commands from the Emacs Wiki.
|
||||||
(defun erc-cmd-TRACK (&optional target)
|
(defun erc-cmd-TRACK (&optional target)
|
||||||
"Start tracking TARGET or that of current buffer."
|
"Start tracking TARGET or that of current buffer."
|
||||||
(setq erc-track-exclude (delete (or target (erc-default-target))
|
(setq erc-track-exclude
|
||||||
erc-track-exclude)))
|
(delete (or target (erc-default-target) (current-buffer))
|
||||||
|
erc-track-exclude)))
|
||||||
|
|
||||||
(defun erc-cmd-UNTRACK (&optional target)
|
(defun erc-cmd-UNTRACK (&optional target)
|
||||||
"Stop tracking TARGET or that of current buffer."
|
"Stop tracking TARGET or that of current buffer."
|
||||||
(setq erc-track-exclude (cl-pushnew (or target (erc-default-target))
|
(setq erc-track-exclude
|
||||||
erc-track-exclude
|
(cl-pushnew (or target (erc-default-target) (current-buffer))
|
||||||
:test #'equal)))
|
erc-track-exclude
|
||||||
|
:test #'equal)))
|
||||||
|
|
||||||
@end lisp
|
@end lisp
|
||||||
|
|
||||||
|
23
etc/ERC-NEWS
23
etc/ERC-NEWS
@ -15,13 +15,14 @@ GNU Emacs since Emacs version 22.1.
|
|||||||
* Changes in ERC 5.6
|
* Changes in ERC 5.6
|
||||||
|
|
||||||
** Module 'keep-place' has gained a more flamboyant cousin.
|
** Module 'keep-place' has gained a more flamboyant cousin.
|
||||||
Remember your place in ERC buffers a bit more easily while retaining
|
Remember your place in ERC buffers more easily while retaining the
|
||||||
the freedom to look around. Optionally sync the indicator to any
|
freedom to look around, all with the help of a configurable, visible
|
||||||
progress made when you haven't yet caught up to the live stream. See
|
indicator. Optionally sync the indicator to any progress made when
|
||||||
options 'erc-keep-place-indicator-style' and friends, and try M-x
|
you haven't yet caught up to the live stream. See options
|
||||||
|
'erc-keep-place-indicator-style' and friends, and try M-x
|
||||||
keep-place-indicator-mode to see it in action.
|
keep-place-indicator-mode to see it in action.
|
||||||
|
|
||||||
** Module 'fill' now offers a style based on 'visual-line-mode'.
|
** Module 'fill' offers a style based on 'visual-line-mode'.
|
||||||
This fill style mimics the "hanging indent" look of 'erc-fill-static'
|
This fill style mimics the "hanging indent" look of 'erc-fill-static'
|
||||||
and provides some movement and editing commands to optionally tame the
|
and provides some movement and editing commands to optionally tame the
|
||||||
less familiar aspects of 'visual-line' behavior. An interactive
|
less familiar aspects of 'visual-line' behavior. An interactive
|
||||||
@ -29,7 +30,7 @@ helper called 'erc-fill-wrap-nudge' allows for dynamic "refilling" of
|
|||||||
buffers on the fly. Set 'erc-fill-function' to 'erc-fill-wrap' to get
|
buffers on the fly. Set 'erc-fill-function' to 'erc-fill-wrap' to get
|
||||||
started.
|
started.
|
||||||
|
|
||||||
** A new module for nickname highlighting has joined ERC.
|
** A module for nickname highlighting has joined ERC.
|
||||||
Automatic nickname coloring has come to ERC core. Users familiar with
|
Automatic nickname coloring has come to ERC core. Users familiar with
|
||||||
'erc-hl-nicks', from which this module directly descends, will already
|
'erc-hl-nicks', from which this module directly descends, will already
|
||||||
be familiar with its suite of handy options. By default, each
|
be familiar with its suite of handy options. By default, each
|
||||||
@ -140,7 +141,7 @@ This is especially handy when using the option 'erc-fill-wrap-merge'
|
|||||||
to omit repeated speaker tags, which can make message boundaries less
|
to omit repeated speaker tags, which can make message boundaries less
|
||||||
detectable by tired eyes.
|
detectable by tired eyes.
|
||||||
|
|
||||||
** Some keybindings are now set by modules rather than their libraries.
|
** Modules rather than their libraries set major-mode keybindings.
|
||||||
To put it another way, simply loading a built-in module's library no
|
To put it another way, simply loading a built-in module's library no
|
||||||
longer modifies 'erc-mode-map'. Instead, modifications occur during
|
longer modifies 'erc-mode-map'. Instead, modifications occur during
|
||||||
module setup. This should not impact most user configs since ERC
|
module setup. This should not impact most user configs since ERC
|
||||||
@ -149,7 +150,7 @@ previously created. Note that while all affected bindings still
|
|||||||
reside in 'erc-mode-map', future built-in modules will use their own
|
reside in 'erc-mode-map', future built-in modules will use their own
|
||||||
minor-mode maps, and new third-party modules should do the same.
|
minor-mode maps, and new third-party modules should do the same.
|
||||||
|
|
||||||
** The option 'erc-timestamp-format-right' has been deprecated.
|
** Option 'erc-timestamp-format-right' deprecated.
|
||||||
Having to account for this option prevented other ERC modules from
|
Having to account for this option prevented other ERC modules from
|
||||||
easily determining what right-hand stamps would look like before
|
easily determining what right-hand stamps would look like before
|
||||||
insertion, which is knowledge needed for certain UI decisions. The
|
insertion, which is knowledge needed for certain UI decisions. The
|
||||||
@ -270,7 +271,7 @@ encouraged to keep a module's name aligned with its group's as well as
|
|||||||
the provided feature of its containing library, if only for the usual
|
the provided feature of its containing library, if only for the usual
|
||||||
reasons of namespace hygiene and discoverability.
|
reasons of namespace hygiene and discoverability.
|
||||||
|
|
||||||
*** ERC now supports arbitrary CHANTYPES.
|
*** ERC supports arbitrary CHANTYPES.
|
||||||
Specifically, channels can be prefixed with any predesignated
|
Specifically, channels can be prefixed with any predesignated
|
||||||
character, mainly to afford more flexibility to specialty services,
|
character, mainly to afford more flexibility to specialty services,
|
||||||
like bridges to other protocols.
|
like bridges to other protocols.
|
||||||
@ -281,7 +282,7 @@ specify a subcommand to actually carry out anything of consequence.
|
|||||||
Built-in modules can now provide more detailed help for a particular
|
Built-in modules can now provide more detailed help for a particular
|
||||||
subcommand by telling ERC to defer to a specialized handler.
|
subcommand by telling ERC to defer to a specialized handler.
|
||||||
|
|
||||||
*** Longtime quasi modules have been made proper.
|
*** Longtime quasi modules made proper.
|
||||||
The 'fill' module is now defined by 'define-erc-module'. The same
|
The 'fill' module is now defined by 'define-erc-module'. The same
|
||||||
goes for ERC's imenu integration, which has 'imenu' now appearing in
|
goes for ERC's imenu integration, which has 'imenu' now appearing in
|
||||||
the default value of 'erc-modules'.
|
the default value of 'erc-modules'.
|
||||||
@ -299,7 +300,7 @@ third-party code, the key takeaway is that more 'font-lock-face'
|
|||||||
properties encountered in the wild may be combinations of faces rather
|
properties encountered in the wild may be combinations of faces rather
|
||||||
than lone ones.
|
than lone ones.
|
||||||
|
|
||||||
*** Prompt input is split before 'erc-pre-send-functions' has a say.
|
*** Prompt input split before 'erc-pre-send-functions' gets a say.
|
||||||
Hook members are now treated to input whose lines have already been
|
Hook members are now treated to input whose lines have already been
|
||||||
adjusted to fall within the allowed length limit. For convenience,
|
adjusted to fall within the allowed length limit. For convenience,
|
||||||
third-party code can request that the final input be "re-filled" prior
|
third-party code can request that the final input be "re-filled" prior
|
||||||
|
@ -1301,33 +1301,45 @@ clashes."
|
|||||||
(make-temp-file (comp-c-func-name function-name "freefn-")
|
(make-temp-file (comp-c-func-name function-name "freefn-")
|
||||||
nil ".eln")))
|
nil ".eln")))
|
||||||
(let* ((f (symbol-function function-name))
|
(let* ((f (symbol-function function-name))
|
||||||
|
(byte-code (byte-compile function-name))
|
||||||
(c-name (comp-c-func-name function-name "F"))
|
(c-name (comp-c-func-name function-name "F"))
|
||||||
(func (make-comp-func-l :name function-name
|
(func
|
||||||
:c-name c-name
|
(if (comp-lex-byte-func-p byte-code)
|
||||||
:doc (documentation f t)
|
(make-comp-func-l :name function-name
|
||||||
:int-spec (interactive-form f)
|
:c-name c-name
|
||||||
:command-modes (command-modes f)
|
:doc (documentation f t)
|
||||||
:speed (comp-spill-speed function-name)
|
:int-spec (interactive-form f)
|
||||||
:pure (comp-spill-decl-spec function-name
|
:command-modes (command-modes f)
|
||||||
'pure))))
|
:speed (comp-spill-speed function-name)
|
||||||
|
:pure (comp-spill-decl-spec function-name
|
||||||
|
'pure))
|
||||||
|
(make-comp-func-d :name function-name
|
||||||
|
:c-name c-name
|
||||||
|
:doc (documentation f t)
|
||||||
|
:int-spec (interactive-form f)
|
||||||
|
:command-modes (command-modes f)
|
||||||
|
:speed (comp-spill-speed function-name)
|
||||||
|
:pure (comp-spill-decl-spec function-name
|
||||||
|
'pure)))))
|
||||||
(when (byte-code-function-p f)
|
(when (byte-code-function-p f)
|
||||||
(signal 'native-compiler-error
|
(signal 'native-compiler-error
|
||||||
'("can't native compile an already byte-compiled function")))
|
'("can't native compile an already byte-compiled function")))
|
||||||
(setf (comp-func-byte-func func)
|
(setf (comp-func-byte-func func) byte-code)
|
||||||
(byte-compile (comp-func-name func)))
|
|
||||||
(let ((lap (byte-to-native-lambda-lap
|
(let ((lap (byte-to-native-lambda-lap
|
||||||
(gethash (aref (comp-func-byte-func func) 1)
|
(gethash (aref (comp-func-byte-func func) 1)
|
||||||
byte-to-native-lambdas-h))))
|
byte-to-native-lambdas-h))))
|
||||||
(cl-assert lap)
|
(cl-assert lap)
|
||||||
(comp-log lap 2 t)
|
(comp-log lap 2 t)
|
||||||
(let ((arg-list (aref (comp-func-byte-func func) 0)))
|
(if (comp-func-l-p func)
|
||||||
(setf (comp-func-l-args func)
|
(let ((arg-list (aref (comp-func-byte-func func) 0)))
|
||||||
(comp-decrypt-arg-list arg-list function-name)
|
(setf (comp-func-l-args func)
|
||||||
(comp-func-lap func)
|
(comp-decrypt-arg-list arg-list function-name)))
|
||||||
lap
|
(setf (comp-func-d-lambda-list func) (cadr f)))
|
||||||
(comp-func-frame-size func)
|
(setf (comp-func-lap func)
|
||||||
(comp-byte-frame-size (comp-func-byte-func func))))
|
lap
|
||||||
(setf (comp-ctxt-top-level-forms comp-ctxt)
|
(comp-func-frame-size func)
|
||||||
|
(comp-byte-frame-size (comp-func-byte-func func))
|
||||||
|
(comp-ctxt-top-level-forms comp-ctxt)
|
||||||
(list (make-byte-to-native-func-def :name function-name
|
(list (make-byte-to-native-func-def :name function-name
|
||||||
:c-name c-name)))
|
:c-name c-name)))
|
||||||
(comp-add-func-to-ctxt func))))
|
(comp-add-func-to-ctxt func))))
|
||||||
|
@ -480,6 +480,12 @@ Abandon search after examining LIMIT faces."
|
|||||||
"Uniquely colorize nicknames in target buffers."
|
"Uniquely colorize nicknames in target buffers."
|
||||||
((if erc--target
|
((if erc--target
|
||||||
(progn
|
(progn
|
||||||
|
(erc-with-server-buffer
|
||||||
|
(unless erc-nicks-mode
|
||||||
|
(erc--warn-once-before-connect 'erc-nicks-mode
|
||||||
|
"Module `nicks' must be enabled or disabled session-wide."
|
||||||
|
" Toggling it in individual target buffers is unsupported.")
|
||||||
|
(erc-nicks-mode +1))) ; but do it anyway
|
||||||
(setq erc-nicks--downcased-skip-nicks
|
(setq erc-nicks--downcased-skip-nicks
|
||||||
(mapcar #'erc-downcase erc-nicks-skip-nicks))
|
(mapcar #'erc-downcase erc-nicks-skip-nicks))
|
||||||
(add-function :filter-return (local 'erc-button--modify-nick-function)
|
(add-function :filter-return (local 'erc-button--modify-nick-function)
|
||||||
|
@ -6350,7 +6350,9 @@ This option mainly prevents text accidentally entered into Emacs
|
|||||||
from being sent to the server. Offending sources include
|
from being sent to the server. Offending sources include
|
||||||
terminal multiplexers, desktop-automation scripts, and anything
|
terminal multiplexers, desktop-automation scripts, and anything
|
||||||
capable of rapidly submitting successive lines of prompt input.
|
capable of rapidly submitting successive lines of prompt input.
|
||||||
For example, entering \"one\\ntwo\\nthree\\n\" will send \"one\"
|
For example, if you could somehow manage to type \"one \\`RET'
|
||||||
|
two \\`RET' three \\`RET'\" at the prompt in less than
|
||||||
|
`erc-accidental-paste-threshold-seconds', ERC would send \"one\"
|
||||||
to the server, leave \"two\" at the prompt, and insert \"three\"
|
to the server, leave \"two\" at the prompt, and insert \"three\"
|
||||||
into an \"overflow\" buffer. See `erc-inhibit-multiline-input'
|
into an \"overflow\" buffer. See `erc-inhibit-multiline-input'
|
||||||
and `erc-warn-about-blank-lines' for suppression involving input
|
and `erc-warn-about-blank-lines' for suppression involving input
|
||||||
|
@ -2644,7 +2644,7 @@ internal_delete_file (Lisp_Object filename)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Return -1 if FILE is a case-insensitive file name, 0 if not,
|
/* Return -1 if FILE is a case-insensitive file name, 0 if not,
|
||||||
and a positive errno value if the result cannot be determined. */
|
and 1 if the result cannot be determined. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
file_name_case_insensitive_err (Lisp_Object file)
|
file_name_case_insensitive_err (Lisp_Object file)
|
||||||
@ -2678,7 +2678,7 @@ file_name_case_insensitive_err (Lisp_Object file)
|
|||||||
return - (res == 0);
|
return - (res == 0);
|
||||||
# endif
|
# endif
|
||||||
if (errno != EINVAL)
|
if (errno != EINVAL)
|
||||||
return errno;
|
return 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined CYGWIN || defined DOS_NT
|
#if defined CYGWIN || defined DOS_NT
|
||||||
|
95
src/xterm.c
95
src/xterm.c
@ -5497,12 +5497,24 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo,
|
|||||||
no input.
|
no input.
|
||||||
|
|
||||||
The device attachment is a device ID whose meaning varies
|
The device attachment is a device ID whose meaning varies
|
||||||
depending on the device use. If the device is a master device,
|
depending on the device's use. If a device is a master device,
|
||||||
then the attachment is the device ID of the other device in its
|
then its attachment is the device ID of the other device in its
|
||||||
seat (the master keyboard for master pointer devices, and vice
|
seat (the master keyboard for master pointer devices and vice
|
||||||
versa). Otherwise, it is the ID of the master device the slave
|
versa.) Otherwise, it is the ID of the master device the slave
|
||||||
device is attached to. For slave devices not attached to any
|
device is attached to. For slave devices not attached to any
|
||||||
seat, its value is undefined. */
|
seat, its value is undefined.
|
||||||
|
|
||||||
|
Emacs receives ordinary pointer and keyboard events from the
|
||||||
|
master devices associated with each seat, discarding events from
|
||||||
|
slave devices. However, multiplexing events from touch devices
|
||||||
|
onto a master device poses problems: if both dependent and direct
|
||||||
|
touch devices are attached to the same master pointer device, the
|
||||||
|
coordinate space of touch events sent from that seat becomes
|
||||||
|
ambiguous. In addition, the X server does not send TouchEnd
|
||||||
|
events to cancel ongoing touch sequences if the slave device that
|
||||||
|
is their source is detached. As a result of these ambiguities,
|
||||||
|
touch events are processed from and recorded onto their slave
|
||||||
|
devices instead. */
|
||||||
|
|
||||||
xi_device->device_id = device->deviceid;
|
xi_device->device_id = device->deviceid;
|
||||||
xi_device->grab = 0;
|
xi_device->grab = 0;
|
||||||
@ -5516,7 +5528,7 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo,
|
|||||||
#ifdef HAVE_XINPUT2_2
|
#ifdef HAVE_XINPUT2_2
|
||||||
xi_device->touchpoints = NULL;
|
xi_device->touchpoints = NULL;
|
||||||
xi_device->direct_p = false;
|
xi_device->direct_p = false;
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_1 */
|
||||||
|
|
||||||
#ifdef HAVE_XINPUT2_1
|
#ifdef HAVE_XINPUT2_1
|
||||||
if (!dpyinfo->xi2_version)
|
if (!dpyinfo->xi2_version)
|
||||||
@ -5582,9 +5594,34 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo,
|
|||||||
case XITouchClass:
|
case XITouchClass:
|
||||||
{
|
{
|
||||||
touch_info = (XITouchClassInfo *) device->classes[c];
|
touch_info = (XITouchClassInfo *) device->classes[c];
|
||||||
xi_device->direct_p = touch_info->mode == XIDirectTouch;
|
|
||||||
|
/* touch_info->mode indicates the coordinate space that
|
||||||
|
this device reports in its touch events.
|
||||||
|
|
||||||
|
DirectTouch means that the device uses a coordinate
|
||||||
|
space that corresponds to locations on the screen. It
|
||||||
|
is set by touch screen devices which are overlaid
|
||||||
|
over the raster itself.
|
||||||
|
|
||||||
|
The other value (DependentTouch) means that the device
|
||||||
|
uses a separate abstract coordinate space corresponding
|
||||||
|
to its own surface. Emacs ignores events from these
|
||||||
|
devices because it does not support recognizing touch
|
||||||
|
gestures from surfaces other than the screen.
|
||||||
|
|
||||||
|
Master devices may report multiple touch classes for
|
||||||
|
attached slave devices, leaving the nature of touch
|
||||||
|
events they send ambiguous. The problem of
|
||||||
|
discriminating between these events is bypassed
|
||||||
|
entirely through only processing touch events from the
|
||||||
|
slave devices where they originate. */
|
||||||
|
|
||||||
|
if (touch_info->mode == XIDirectTouch)
|
||||||
|
xi_device->direct_p = true;
|
||||||
|
else
|
||||||
|
xi_device->direct_p = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_2 */
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -5611,7 +5648,7 @@ xi_populate_device_from_info (struct x_display_info *dpyinfo,
|
|||||||
}
|
}
|
||||||
|
|
||||||
SAFE_FREE ();
|
SAFE_FREE ();
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_1 */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Populate our client-side record of all devices, which includes
|
/* Populate our client-side record of all devices, which includes
|
||||||
@ -13443,7 +13480,7 @@ xi_handle_new_classes (struct x_display_info *dpyinfo, struct xi_device_t *devic
|
|||||||
device->scroll_valuator_count = 0;
|
device->scroll_valuator_count = 0;
|
||||||
#ifdef HAVE_XINPUT2_2
|
#ifdef HAVE_XINPUT2_2
|
||||||
device->direct_p = false;
|
device->direct_p = false;
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_2 */
|
||||||
|
|
||||||
for (i = 0; i < num_classes; ++i)
|
for (i = 0; i < num_classes; ++i)
|
||||||
{
|
{
|
||||||
@ -13461,10 +13498,34 @@ xi_handle_new_classes (struct x_display_info *dpyinfo, struct xi_device_t *devic
|
|||||||
case XITouchClass:
|
case XITouchClass:
|
||||||
touch = (XITouchClassInfo *) classes[i];
|
touch = (XITouchClassInfo *) classes[i];
|
||||||
|
|
||||||
|
/* touch_info->mode indicates the coordinate space that this
|
||||||
|
device reports in its touch events.
|
||||||
|
|
||||||
|
DirectTouch means that the device uses a coordinate space
|
||||||
|
that corresponds to locations on the screen. It is set
|
||||||
|
by touch screen devices which are overlaid over the
|
||||||
|
raster itself.
|
||||||
|
|
||||||
|
The other value (DependentTouch) means that the device
|
||||||
|
uses a separate abstract coordinate space corresponding
|
||||||
|
to its own surface. Emacs ignores events from these
|
||||||
|
devices because it does not support recognizing touch
|
||||||
|
gestures from surfaces other than the screen.
|
||||||
|
|
||||||
|
Master devices may report multiple touch classes for
|
||||||
|
attached slave devices, leaving the nature of touch
|
||||||
|
events they send ambiguous. The problem of
|
||||||
|
discriminating between these events is bypassed entirely
|
||||||
|
through only processing touch events from the slave
|
||||||
|
devices where they originate. */
|
||||||
|
|
||||||
if (touch->mode == XIDirectTouch)
|
if (touch->mode == XIDirectTouch)
|
||||||
device->direct_p = true;
|
device->direct_p = true;
|
||||||
|
else
|
||||||
|
device->direct_p = false;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_2 */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13502,7 +13563,7 @@ xi_handle_new_classes (struct x_display_info *dpyinfo, struct xi_device_t *devic
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* HAVE_XINPUT2_1 */
|
||||||
|
|
||||||
/* Handle EVENT, a DeviceChanged event. Look up the device that
|
/* Handle EVENT, a DeviceChanged event. Look up the device that
|
||||||
changed, and update its information with the data in EVENT. */
|
changed, and update its information with the data in EVENT. */
|
||||||
@ -32250,10 +32311,12 @@ reported as iconified. */);
|
|||||||
|
|
||||||
DEFVAR_BOOL ("x-input-grab-touch-events", x_input_grab_touch_events,
|
DEFVAR_BOOL ("x-input-grab-touch-events", x_input_grab_touch_events,
|
||||||
doc: /* Non-nil means to actively grab touch events.
|
doc: /* Non-nil means to actively grab touch events.
|
||||||
This means touch sequences that started on an Emacs frame will
|
This means touch sequences that are obtained through a passive grab on
|
||||||
reliably continue to receive updates even if the finger moves off the
|
an Emacs frame (or a parent window of such a frame) will reliably
|
||||||
frame, but may cause crashes with some window managers and/or external
|
continue to receive updates, but may cause crashes with some window
|
||||||
programs. */);
|
managers and/or external programs. Changing this option is only
|
||||||
|
useful when other programs are making their own X requests pertaining
|
||||||
|
to the window hierarchy of an Emacs frame. */);
|
||||||
x_input_grab_touch_events = true;
|
x_input_grab_touch_events = true;
|
||||||
|
|
||||||
DEFVAR_BOOL ("x-dnd-fix-motif-leave", x_dnd_fix_motif_leave,
|
DEFVAR_BOOL ("x-dnd-fix-motif-leave", x_dnd_fix_motif_leave,
|
||||||
|
31
test/src/comp-resources/comp-test-funcs-dyn2.el
Normal file
31
test/src/comp-resources/comp-test-funcs-dyn2.el
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
;;; comp-test-funcs-dyn2.el -*- lexical-binding: nil; no-byte-compile: t; -*-
|
||||||
|
|
||||||
|
;; Copyright (C) 2023 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
;; Author: Alan Mackenzie <acm@muc.de>
|
||||||
|
|
||||||
|
;; This file is part of GNU Emacs.
|
||||||
|
|
||||||
|
;; GNU Emacs is free software: you can redistribute it and/or modify
|
||||||
|
;; it under the terms of the GNU General Public License as published by
|
||||||
|
;; the Free Software Foundation, either version 3 of the License, or
|
||||||
|
;; (at your option) any later version.
|
||||||
|
|
||||||
|
;; GNU Emacs is distributed in the hope that it will be useful,
|
||||||
|
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
;; GNU General Public License for more details.
|
||||||
|
|
||||||
|
;; You should have received a copy of the GNU General Public License
|
||||||
|
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
;;; Commentary:
|
||||||
|
;; Test the compilation of a function under dynamic binding.
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defun comp-tests-result-lambda ()
|
||||||
|
(lambda (bar) (car bar)))
|
||||||
|
|
||||||
|
(provide 'comp-test-funcs-dyn2)
|
||||||
|
;;; comp-test-funcs-dyn2.el ends here.
|
@ -33,7 +33,8 @@
|
|||||||
|
|
||||||
(eval-and-compile
|
(eval-and-compile
|
||||||
(defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
|
(defconst comp-test-src (ert-resource-file "comp-test-funcs.el"))
|
||||||
(defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el")))
|
(defconst comp-test-dyn-src (ert-resource-file "comp-test-funcs-dyn.el"))
|
||||||
|
(defconst comp-test-dyn-src2 (ert-resource-file "comp-test-funcs-dyn2.el")))
|
||||||
|
|
||||||
(when (native-comp-available-p)
|
(when (native-comp-available-p)
|
||||||
(message "Compiling tests...")
|
(message "Compiling tests...")
|
||||||
@ -44,6 +45,7 @@
|
|||||||
;; names used in this file.
|
;; names used in this file.
|
||||||
(require 'comp-test-funcs comp-test-src)
|
(require 'comp-test-funcs comp-test-src)
|
||||||
(require 'comp-test-dyn-funcs comp-test-dyn-src) ;Non-standard feature name!
|
(require 'comp-test-dyn-funcs comp-test-dyn-src) ;Non-standard feature name!
|
||||||
|
(require 'comp-test-funcs-dyn2 comp-test-dyn-src2)
|
||||||
|
|
||||||
(defmacro comp-deftest (name args &rest docstring-and-body)
|
(defmacro comp-deftest (name args &rest docstring-and-body)
|
||||||
"Define a test for the native compiler tagging it as :nativecomp."
|
"Define a test for the native compiler tagging it as :nativecomp."
|
||||||
@ -1528,4 +1530,7 @@ folded."
|
|||||||
(equal (comp-mvar-typeset mvar)
|
(equal (comp-mvar-typeset mvar)
|
||||||
comp-tests-cond-rw-expected-type))))))))
|
comp-tests-cond-rw-expected-type))))))))
|
||||||
|
|
||||||
|
(ert-deftest comp-tests-result-lambda ()
|
||||||
|
(native-compile 'comp-tests-result-lambda)
|
||||||
|
(should (eq (funcall (comp-tests-result-lambda) '(a . b)) 'a)))
|
||||||
;;; comp-tests.el ends here
|
;;; comp-tests.el ends here
|
||||||
|
Loading…
Reference in New Issue
Block a user