mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
When the remote endpoint is handling a local request 'LR' it can sometimes make a remote sync request 'RR' as part of its handling. Some endpoints (like Go's gopls) wait for Emacs's reply to 'RR' before responding to 'LR'. Others (like Julia's JETLS) respond to 'LR' immediately, and only then wait for Emacs's reply to 'RR'. Both approaches are valid. However, in the latter case, the handling of 'RR' (which could well be waiting for user input from the minibuffer to complete) is vulnerable to 'throw' from process filters handling (which is just what happens when the endpoints replies to 'LR'), so if that happens it will unexpectedly be aborted when the reply to 'LR' comes in, suprising the user and causing a spurious -32603 reply to be sent. To solve this problem, this commit first refactors the sync request/anxious queue handling and replace plain integer keys of the rebaptized "scontrol" alist with structured (:local ID) / (:remote ID) pairs, using `equal' for comparisons. This is to introduce some clarity/sanity into this somewhat hairy code. Then, the 'RR' situation is fixed: we push a (:remote ID) entry onto the top of the 'jsonrpc-connection--control' stack and only then call rdispatcher. Any 'LR' reply arriving during dispatch is deferred as an "anxious" continuation rather than firing its `throw' immediately. When rdispatcher is done, we call jsonrpc--continue at a safe point, this will run any "anxious" continuations. * lisp/jsonrpc.el (jsonrpc-connection): Rename -sync-request-alist to -scontrol; accessor from jsonrpc--sync-request-alist to jsonrpc--scontrol; update docstring for new key structure. (jsonrpc-connection-receive): Update with-slots binding to scontrol. Tighten anxious check to match (:local ID) keys with `equal'. In remote-request branch, push (:remote ID) entry before rdispatcher and call jsonrpc--continue after jsonrpc--reply. (jsonrpc-request): Pass (:local ID) to jsonrpc--continue. (jsonrpc--continue): Use jsonrpc--scontrol; change `=' to `equal' in sanity check. p (jsonrpc--async-request-1): Push (:local ID) entry. (jsonrpc--log-event): Use jsonrpc--scontrol. |
||
|---|---|---|
| .. | ||
| calc | ||
| calendar | ||
| cedet | ||
| emacs-lisp | ||
| emulation | ||
| erc | ||
| eshell | ||
| gnus | ||
| image | ||
| international | ||
| language | ||
| leim/quail | ||
| mh-e | ||
| net | ||
| nxml | ||
| obsolete | ||
| org | ||
| play | ||
| progmodes | ||
| term | ||
| textmodes | ||
| url | ||
| use-package | ||
| vc | ||
| abbrev.el | ||
| align.el | ||
| allout-widgets.el | ||
| allout.el | ||
| ansi-color.el | ||
| ansi-osc.el | ||
| apropos.el | ||
| arc-mode.el | ||
| array.el | ||
| auth-source-pass.el | ||
| auth-source.el | ||
| autoinsert.el | ||
| autorevert.el | ||
| avoid.el | ||
| battery.el | ||
| bind-key.el | ||
| bindings.el | ||
| bookmark.el | ||
| bs.el | ||
| buff-menu.el | ||
| button.el | ||
| calculator.el | ||
| case-table.el | ||
| ChangeLog.1 | ||
| ChangeLog.2 | ||
| ChangeLog.3 | ||
| ChangeLog.4 | ||
| ChangeLog.5 | ||
| ChangeLog.6 | ||
| ChangeLog.7 | ||
| ChangeLog.8 | ||
| ChangeLog.9 | ||
| ChangeLog.10 | ||
| ChangeLog.11 | ||
| ChangeLog.12 | ||
| ChangeLog.13 | ||
| ChangeLog.14 | ||
| ChangeLog.15 | ||
| ChangeLog.16 | ||
| ChangeLog.17 | ||
| char-fold.el | ||
| chistory.el | ||
| cmuscheme.el | ||
| color.el | ||
| comint.el | ||
| completion-preview.el | ||
| completion.el | ||
| composite.el | ||
| COPYING | ||
| cus-dep.el | ||
| cus-edit.el | ||
| cus-face.el | ||
| cus-start.el | ||
| cus-theme.el | ||
| custom.el | ||
| dabbrev.el | ||
| delim-col.el | ||
| delsel.el | ||
| descr-text.el | ||
| desktop.el | ||
| dframe.el | ||
| dired-aux.el | ||
| dired-x.el | ||
| dired.el | ||
| dirtrack.el | ||
| disp-table.el | ||
| display-fill-column-indicator.el | ||
| display-line-numbers.el | ||
| dnd.el | ||
| doc-view.el | ||
| dom.el | ||
| dos-fns.el | ||
| dos-vars.el | ||
| dos-w32.el | ||
| double.el | ||
| dynamic-setting.el | ||
| ebuff-menu.el | ||
| ecomplete.el | ||
| editorconfig-conf-mode.el | ||
| editorconfig-core-handle.el | ||
| editorconfig-core.el | ||
| editorconfig-fnmatch.el | ||
| editorconfig-tools.el | ||
| editorconfig.el | ||
| edmacro.el | ||
| ehelp.el | ||
| elec-pair.el | ||
| electric.el | ||
| elide-head.el | ||
| emacs-lock.el | ||
| env.el | ||
| epa-dired.el | ||
| epa-file.el | ||
| epa-hook.el | ||
| epa-ks.el | ||
| epa-mail.el | ||
| epa.el | ||
| epg-config.el | ||
| epg.el | ||
| expand.el | ||
| external-completion.el | ||
| ezimage.el | ||
| face-remap.el | ||
| facemenu.el | ||
| faces.el | ||
| ffap.el | ||
| filecache.el | ||
| fileloop.el | ||
| filenotify.el | ||
| files-x.el | ||
| files.el | ||
| filesets.el | ||
| find-cmd.el | ||
| find-dired.el | ||
| find-file.el | ||
| find-lisp.el | ||
| finder.el | ||
| flow-ctrl.el | ||
| foldout.el | ||
| follow.el | ||
| font-core.el | ||
| font-lock.el | ||
| format-spec.el | ||
| format.el | ||
| forms.el | ||
| frame.el | ||
| frameset.el | ||
| fringe.el | ||
| generic-x.el | ||
| help-at-pt.el | ||
| help-fns.el | ||
| help-macro.el | ||
| help-mode.el | ||
| help.el | ||
| hex-util.el | ||
| hexl.el | ||
| hfy-cmap.el | ||
| hi-lock.el | ||
| hilit-chg.el | ||
| hippie-exp.el | ||
| hl-line.el | ||
| htmlfontify.el | ||
| ibuf-ext.el | ||
| ibuf-macs.el | ||
| ibuffer.el | ||
| icomplete.el | ||
| ido.el | ||
| ielm.el | ||
| iimage.el | ||
| image-file.el | ||
| image-mode.el | ||
| image.el | ||
| imenu.el | ||
| indent-aux.el | ||
| indent.el | ||
| info-look.el | ||
| info-xref.el | ||
| info.el | ||
| informat.el | ||
| isearch.el | ||
| isearchb.el | ||
| jit-lock.el | ||
| jka-cmpr-hook.el | ||
| jka-compr.el | ||
| json.el | ||
| jsonrpc.el | ||
| keymap.el | ||
| kmacro.el | ||
| ldefs-boot.el | ||
| loadhist.el | ||
| loadup.el | ||
| locate.el | ||
| lpr.el | ||
| ls-lisp.el | ||
| macros.el | ||
| Makefile.in | ||
| man.el | ||
| master.el | ||
| mb-depth.el | ||
| md4.el | ||
| menu-bar.el | ||
| midnight.el | ||
| minibuf-eldef.el | ||
| minibuffer.el | ||
| misc.el | ||
| misearch.el | ||
| mouse-copy.el | ||
| mouse-drag.el | ||
| mouse.el | ||
| mpc.el | ||
| msb.el | ||
| mwheel.el | ||
| newcomment.el | ||
| notifications.el | ||
| novice.el | ||
| obarray.el | ||
| outline.el | ||
| paren.el | ||
| password-cache.el | ||
| pcmpl-cvs.el | ||
| pcmpl-git.el | ||
| pcmpl-gnu.el | ||
| pcmpl-linux.el | ||
| pcmpl-rpm.el | ||
| pcmpl-unix.el | ||
| pcmpl-x.el | ||
| pcomplete.el | ||
| pgtk-dnd.el | ||
| pixel-scroll.el | ||
| plstore.el | ||
| printing.el | ||
| proced.el | ||
| profiler.el | ||
| ps-bdf.el | ||
| ps-mule.el | ||
| ps-print.el | ||
| ps-samp.el | ||
| pulse.el | ||
| README | ||
| recentf.el | ||
| rect.el | ||
| register.el | ||
| registry.el | ||
| repeat.el | ||
| replace.el | ||
| reposition.el | ||
| reveal.el | ||
| rfn-eshadow.el | ||
| ring-bell-fns.el | ||
| rot13.el | ||
| rtree.el | ||
| ruler-mode.el | ||
| savehist.el | ||
| saveplace.el | ||
| scroll-all.el | ||
| scroll-bar.el | ||
| scroll-lock.el | ||
| select.el | ||
| send-to.el | ||
| server.el | ||
| ses.el | ||
| shadowfile.el | ||
| shell.el | ||
| simple.el | ||
| skeleton.el | ||
| so-long.el | ||
| sort.el | ||
| soundex.el | ||
| speedbar.el | ||
| sqlite-mode.el | ||
| sqlite.el | ||
| startup.el | ||
| strokes.el | ||
| subr.el | ||
| svg.el | ||
| system-sleep.el | ||
| system-taskbar.el | ||
| t-mouse.el | ||
| tab-bar.el | ||
| tab-line.el | ||
| tabify.el | ||
| talk.el | ||
| tar-mode.el | ||
| tempo.el | ||
| term.el | ||
| thingatpt.el | ||
| thread.el | ||
| time-stamp.el | ||
| time.el | ||
| timezone.el | ||
| tmm.el | ||
| tool-bar.el | ||
| tooltip.el | ||
| touch-screen.el | ||
| transient.el | ||
| tree-widget.el | ||
| treesit-x.el | ||
| treesit.el | ||
| tty-tip.el | ||
| tutorial.el | ||
| type-break.el | ||
| uniquify.el | ||
| userlock.el | ||
| vcursor.el | ||
| version.el | ||
| view.el | ||
| visual-wrap.el | ||
| w32-fns.el | ||
| w32-vars.el | ||
| wdired.el | ||
| which-key.el | ||
| whitespace.el | ||
| wid-browse.el | ||
| wid-edit.el | ||
| widget.el | ||
| windmove.el | ||
| window-tool-bar.el | ||
| window-x.el | ||
| window.el | ||
| winner.el | ||
| woman.el | ||
| x-dnd.el | ||
| xdg.el | ||
| xml.el | ||
| xt-mouse.el | ||
| xwidget.el | ||
| yank-media.el | ||
This directory contains source code for the parts of Emacs that are
written in Emacs Lisp. *.el files are Emacs Lisp source, and the
corresponding *.elc files are byte-compiled versions. Byte-compiled
files are architecture-independent.
The term subdirectory contains Lisp files that customize Emacs for
certain terminal types. When Emacs starts, it checks the TERM
environment variable to get the terminal type and loads
'term/${TERM}.el' if it exists.
The other subdirectories hold Lisp packages grouped by their general
purpose.