* doc/lispref/processes.texi (Asynchronous Processes): Document it.
* lisp/cus-start.el (standard): Customize.
* src/process.c (read_process_output_error_handler)
(exec_sentinel_error_handler): Use it.
(syms_of_process): New variable process-error-pause-time (bug#19457).
Eli Zaretskii [Thu, 2 Dec 2021 10:32:17 +0000 (12:32 +0200)]
Fix recent changes related to 'glyphless-display-mode'
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Fix
spelling of "bidirectional".
* lisp/international/characters.el (char-acronym-table): Fix
acronyms for LRI and RLI: use their accepted shorthands.
(glyphless-char-display-control): Fix spelling of doc string.
* doc/lispref/display.texi (Glyphless Chars): Fix spelling and add
a cross-reference.
Gemini is a relatively new text-based web protocol, similar to
gopher. There's the "elpher" package to browse gopher and gemini
pages. Adding it to the regexp will make Emacs be aware of gemini links,
e.g. in ERC.
* lisp/net/browse-url.el (browse-url-button-regexp): Add support
for the gemini: URL type.
* lisp/international/characters.el (char-acronym-table): Add the
ISOLATE characters.
(update-glyphless-char-display): Implement bidi-control, and mark
all Cf characters we don't know about as UNK.
(glyphless--bidi-control-characters): New variable.
(glyphless-char-display-control): Add a new type -- bidi-control.
* lisp/textmodes/glyphless-mode.el (glyphless-mode-types): Add a
new type -- bidi-control.
cedet/semantic/bovine/c.el:1462:25: Warning: value returned from
(string= s "static") is unused
* lisp/cedet/semantic/bovine/c.el (semantic-tag-protection): Merge two
`when` into an `if` and set `prot` instead of throwing away a result.
Use `pcase` while we're at it.
Po Lu [Thu, 2 Dec 2021 03:01:59 +0000 (11:01 +0800)]
Add some primitive momentum-based precision scrolling
The algorithm used to scroll the display kinetically is very
simple and needs improvement. Someone should work on that
eventually.
* lisp/pixel-scroll.el (pixel-scroll-precision-use-momentum):
New user option.
(pixel-scroll-precision-mode-map): Add
`pixel-scroll-start-momentum'.
(pixel-scroll-kinetic-state):
(pixel-scroll-accumulate-velocity):
(pixel-scroll-calculate-velocity): New functions.
(pixel-scroll-start-momentum): New command.
* doc/emacs/dired.texi (Misc Dired Features): Document it (bug#23812).
* lisp/dired.el (dired-free-space): New user option.
(dired-insert-directory): Use it from here.
(dired--insert-disk-space): New function that uses the user option.
* lisp/files.el (insert-directory): Don't transform "total" here.
* lisp/ls-lisp.el (ls-lisp--insert-directory): Or here. Instead
just leave the "total <num>" bit alone, and let Dired transform it.
* test/lisp/files-tests.el (files-tests): Move "available" tests
to dired-tests.
* test/lisp/dired-tests.el (data-dir): Moved here.
Juri Linkov [Wed, 1 Dec 2021 17:41:37 +0000 (19:41 +0200)]
* lisp/repeat.el: Use same logic for repeat-check-key and repeat-exit-timeout.
* lisp/repeat.el (repeat-check-key): Use for repeat-check-key the same logic
as is used for repeat-exit-timeout in repeat-post-hook (bug#51390).
(repeat-post-hook): Check for repeat-exit-timeout symbol property.
Juri Linkov [Wed, 1 Dec 2021 17:36:00 +0000 (19:36 +0200)]
* lisp/help.el (help--analyze-key): Prefer posn-set-point over mouse-set-point
* lisp/help.el (help--analyze-key): Use posn-set-point instead of
mouse-set-point that runs the hook mouse-leave-buffer-hook via
mouse-minibuffer-check. Using posn-set-point also unnecessitates
extra conditions added in bug#51421.
* lisp/isearch.el (isearch-describe-key, isearch-describe-mode):
Add precautions to not call isearch-update when the executed
command exited isearch-mode (bug#51173).
Robert Pluim [Wed, 1 Dec 2021 16:11:07 +0000 (17:11 +0100)]
characters.el: remove repetition in glyphless-char-display-control
* lisp/international/characters.el (glyphless-char-display-method):
New custom widget for the different options for displaying glyphless
characters.
(glyphless-char-display-control): Use 'glyphless-char-display-method'.
Fix closure-conversion of shadowed captured lambda-lifted vars
Lambda-lifted variables (ones passed explicitly to lambda-lifted
functions) that are also captured in an outer closure and shadowed
were renamed incorrectly (bug#51982).
Reported by Paul Pogonyshev.
* lisp/emacs-lisp/cconv.el (cconv--lifted-arg): New.
(cconv-convert): Provide correct definiens for the closed-over
variable.
* test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases):
* test/lisp/emacs-lisp/cconv-tests.el (cconv-tests--intern-all)
(cconv-closure-convert-remap-var): Add tests.
Alan Mackenzie [Wed, 1 Dec 2021 15:41:09 +0000 (15:41 +0000)]
CC Mode: Recognise "struct foo {" as introducing a type declaration
This fixes bug #52157.
* lisp/progmodes/cc-engine.el (c-forward-decl-or-cast-1): If such a construct
is parsed, set the flag at-type-decl which is part of the function's return
value.
Use proportional fonts in the Gnus headers by default
* lisp/gnus/gnus-art.el (gnus-header): Inherit from `variable-pitch'.
(gnus--variable-pitch-p): New helper function.
(gnus-article-treat-fold-headers): Fill using pixel filling.
Eli Zaretskii [Wed, 1 Dec 2021 13:36:55 +0000 (15:36 +0200)]
Support precision mouse scrolling on MS-Windows
* src/w32fns.c (w32_wnd_proc): Pass the WM_SETTINGCHANGE message
to the Lisp thread.
* src/w32term.c (w32_construct_mouse_wheel): Support mice with
precision scrolling wheel.
(w32_get_mouse_wheel_vertical_delta): New function.
(w32_read_socket): When the WM_SETTINGCHANGE is received, call
'w32_get_mouse_wheel_vertical_delta'.
(w32_initialize): Call 'w32_get_mouse_wheel_vertical_delta' at
startup.
* src/nsterm.m (syms_of_nsterm):
* src/haikuterm.c (syms_of_haikuterm):
* src/xterm.c (syms_of_xterm): Remove window-system specific
variables for coalescing mwheel events.
* src/keyboard.c (syms_of_keyboard)
<mwheel-coalesce-scroll-events>: New variable, to replace the
above platform-specific ones.
* doc/lispref/commands.texi (Misc Events): Improve wording of the
description of mouse-wheel events.
Stefan Kangas [Wed, 1 Dec 2021 10:23:29 +0000 (11:23 +0100)]
update_autogen: Remove deprecated -I flag
* admin/update_autogen (info_dir): Remove deprecated -I flag; it is no
longer used since info/dir is now generated at install time if needed,
and is not in the repository any more.
Po Lu [Wed, 1 Dec 2021 01:33:35 +0000 (09:33 +0800)]
Make pixel scrolling faster
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Get
rid of big motion loop.
(pixel-scroll-precision-scroll-up): Stop subtracting height of
window lines.
Juri Linkov [Tue, 30 Nov 2021 19:05:05 +0000 (21:05 +0200)]
* lisp/repeat.el: Fix long-standing problem when a random key activates map
* lisp/repeat.el (repeat-check-key): New defcustom (bug#51390).
(repeat--command-property): New internal function.
(repeat-check-key): New function.
(repeat-post-hook): Use repeat--command-property and repeat-check-key.
* test/lisp/repeat-tests.el (repeat-tests-check-key): New test.
* doc/emacs/regs.texi (File and Buffer Registers): Rename and add
doc for `buffer' version.
* lisp/register.el (register-val-jump-to, register-val-describe):
Add support for (buffer . ...) registers (bug#33033).
* lisp/emacs-lisp/generator.el (cps--transform-1):
Eliminate a temporary for the last of any `let` form, not just for
single-binding ones. Suggested by Stefan Monnier.