emacs/lisp/textmodes
Jared Finder 66ac17289a Make libraries works with xterm-mouse-mode.
Change calls from 'read-event' to 'read-key' in libraries expecting
mouse events.  Do this only when 'xterm-mouse-mode' is enabled.  That
way those libraries read decoded mouse events instead of the
underlying escape sequence.  Add a parameter to 'read-key' that avoids
running any of the unbound fallbacks in 'read-key-sequence' so the
libraries can read mouse button-down events.

For backward compatibility purposes, the above logic is contained in a
new internal-only function: 'read--potential-mouse-event'.

* doc/lispref/commands.texi (Reading One Event): Document new
parameter to 'read-key'.  Mention that non-character events on
terminals need 'read-key'.
* lisp/subr.el (read-key-full-map): Add new keymap used by 'read-key'.
(read-key): Add new parameter 'fallbacks-disabled' to prevent running
any of the unbound fallbacks normally run by 'read-key-sequence'.
(read--potential-mouse-event): Add new function that calls 'read-key'
or 'read-event' depending on if 'xterm-mouse-mode' is set.
* lisp/foldout.el (foldout-mouse-swallow-events):
* lisp/isearch.el (isearch-pre-command-hook):
* lisp/mouse-drag.el (mouse-drag-throw, mouse-drag-drag):
* lisp/mouse.el (mouse-drag-secondary):
* lisp/ruler-mode.el (ruler-mode-mouse-grab-any-column)
(ruler-mode-mouse-drag-any-column-iteration):
* lisp/strokes.el (strokes-read-stroke, strokes-read-complex-stroke):
* lisp/textmodes/artist.el (artist-mouse-draw-continously)
(artist-mouse-draw-poly, artist-mouse-draw-2points):
* lisp/vc/ediff-wind.el (ediff-get-window-by-clicking):
* lisp/wid-edit.el (widget-button--check-and-call-button)
(widget-button-click): Call 'read--potential-mouse-event' instead of
'read-event'.
* lisp/wid-edit.el (widget-key-sequence-read-event): Call 'read-key'
with 'fallbacks-disabled' set instead of 'read-event'.  Unlike above
changes, this is unconditionally applied so it works for function
keys too.  Apply 'local-function-key-map' instead of
'function-key-map' as that contains the full terminal translations.
* lisp/vc/ediff.el (ediff-windows): Use 'display-mouse-p' to check if
a mouse is available.
* src/lread.c (Fread_event): Recommend 'read-key' in docstring for
'read-event' for non-character events.
2021-01-15 13:50:07 +02:00
..
artist.el Make libraries works with xterm-mouse-mode. 2021-01-15 13:50:07 +02:00
bib-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
bibtex-style.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
bibtex.el bibtex-mode: Extend widget bibtex-entry-alist 2021-01-02 13:44:23 -06:00
conf-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
css-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
dns-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
enriched.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
fill.el Improve fill-region-as-paragraph when there's a fill prefix 2021-01-10 15:04:48 +01:00
flyspell.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
ispell.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
less-css-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
makeinfo.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
mhtml-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
nroff-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
page-ext.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
page.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
paragraphs.el Revert mark-paragraph change and add tests 2021-01-07 13:08:52 +01:00
picture.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
po.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
refbib.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
refer.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
refill.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-auc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-cite.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-dcr.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-global.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-index.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-parse.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-ref.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-sel.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-toc.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
reftex-vars.el ; Update docstring 2021-01-12 20:42:03 +01:00
reftex.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
remember.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
rst.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
sgml-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
table.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tex-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
texinfmt.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
texinfo.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
texnfo-upd.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
text-mode.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
tildify.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
two-column.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00
underline.el Update copyright year to 2021 2021-01-01 01:13:56 -08:00