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.
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.
* lisp/emacs-lisp/generator.el (cps--transform-1):
Don't translate single-binding `let` into `let*` with an extra
temporary variable; it just adds two more useless states.
Stefan Kangas [Tue, 30 Nov 2021 06:38:52 +0000 (07:38 +0100)]
Merge from origin/emacs-28
30553d889d Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e... ecf3bf66ba Remove problematic characters from modus-themes.org (bug#5... de9d27f679 Avoid undefined behaviour when copying part of structure
* lisp/net/shr.el (shr-char-breakable-p, shr-char-nospace-p)
(shr-char-kinsoku-bol-p, shr-char-kinsoku-eol-p)
(shr-find-fill-point): Moved to pixel-fill.el and renamed.
(shr-pixel-region): Made obsolete.
(shr-fill-line): Use pixel-fill-region.
Fix some of the argument handling in keymap-set and keymap-substitute
* lisp/keymap.el (keymap-set): Fix handling of binding one key to
another key.
(keymap-substitute): Fix confusion in implementation -- the args
are definitions, not keys.
Alan Third [Mon, 29 Nov 2021 22:11:04 +0000 (22:11 +0000)]
Fix build on macOS
* src/nsterm.h (NSPasteboardTypeMultipleTextSelection):
(NSPasteboardTypePNG): These are already defined on macOS 10.6 and
above and aren't used at all in GNUstep.
Alan Third [Mon, 29 Nov 2021 21:56:13 +0000 (21:56 +0000)]
Fix NS port text decorations (bug#52156)
* src/nsterm.m (ns_draw_text_decoration): Set the correct colors for
decorations other than underline.
(ns_draw_glyph_string): Remove superfluous color setting call.
Remove problematic characters from modus-themes.org (bug#52126)
* doc/misc/modus-themes.org
(Enable and load, Font configurations for Org and others)
(Note on highlight-parentheses.el, Note on god-mode.el): Update links to
headings so that they no longer include the removed portions of text.
(Option for color-coding success state, Option for line highlighting)
(Option for line numbers, Option for parenthesis matching)
(Advanced customization, Per-theme customization settings)
(Case-by-case face specs using the themes' palette)
(Face specs at scale using the themes' palette)
(Remap face with local value, Cycle through arbitrary colors)
(Override colors, Override color saturation)
(Font configurations for Org and others, Configure bold and italic faces)
(Custom Org user faces, Update Org block delimiter fontification)
(Measure color contrast, Load theme depending on time of day)
(Backdrop for pdf-tools, Decrease mode line height)
(A theme-agnostic hook for theme loading, Note on EWW and Elfeed fonts)
(Frequently Asked Questions): Remove parentheses from headings as they
can cause problems in the .texi version of the file.
Remove problematic characters from modus-themes.org (bug#52126)
* doc/misc/modus-themes.org
(Enable and load, Font configurations for Org and others)
(Note on highlight-parentheses.el, Note on god-mode.el): Update links to
headings so that they no longer include the removed portions of text.
(Option for color-coding success state, Option for line highlighting)
(Option for line numbers, Option for parenthesis matching)
(Advanced customization, Per-theme customization settings)
(Case-by-case face specs using the themes' palette)
(Face specs at scale using the themes' palette)
(Remap face with local value, Cycle through arbitrary colors)
(Override colors, Override color saturation)
(Font configurations for Org and others, Configure bold and italic faces)
(Custom Org user faces, Update Org block delimiter fontification)
(Measure color contrast, Load theme depending on time of day)
(Backdrop for pdf-tools)
(A theme-agnostic hook for theme loading, Note on EWW and Elfeed fonts)
(Frequently Asked Questions): Remove parentheses from headings as they
can cause problems in the .texi version of the file.
Matthias Meulien [Mon, 29 Nov 2021 15:42:02 +0000 (16:42 +0100)]
project-kill-buffers can display list of buffers to kill
* lisp/progmodes/project.el
(project-kill-buffers-display-buffer-list): Option to toggle
temporarily display of the list of buffers to kill when calling
project-kill-buffers
(project-kill-buffers): Handle
project-kill-buffers-display-buffer-list option (bug#52148).
Gregory Heytings [Mon, 29 Nov 2021 14:13:31 +0000 (15:13 +0100)]
Do not buttonize key bindings outside of *Help* buffers
* etc/NEWS: Mention the new variable.
* lisp/apropos.el (apropos-describe-plist): Bind the new
variable (bug#52053).
* lisp/button.el (button-describe): Bind the new variable.
* lisp/help-fns.el (describe-function, describe-variable)
(describe-face, describe-symbol, describe-syntax)
(describe-categories, describe-keymap, describe-mode)
(describe-widget): Bind the new variable.
* lisp/help-macro.el (make-help-screen): Bind the new variable.
* lisp/help.el (help-buffer-under-preparation): New variable
that is bound to t by commands that create a *Help* buffer.
(substitute-command-keys): Use the new variable:
help-link-key-to-documentation is supposed to have an effect
only "in *Help* buffers". Fixes bug#52053.
(view-lossage, describe-bindings, describe-key): Bind the new
variable.
* lisp/repeat.el (describe-repeat-maps): Bind the new variable.
* lisp/international/mule-cmds.el (describe-input-method)
(describe-language-environment): Bind the new variable.
* lisp/international/mule-diag.el (describe-character-set)
(describe-coding-system, describe-font, describe-fontset)
((list-fontsets): Bind the new variable.
Karl Fogel [Sun, 28 Nov 2021 19:34:57 +0000 (13:34 -0600)]
; Remove an obsolete comment
* src/editfns.c (Ftranspose_regions): Remove an obsolete comment about
memmove, following up to commit 72af86bd8cf of 8 Jul 2010 by Andreas
Schwab and commit 354f9f0fc6cc of 23 Feb 2016 by Fredrik Bergroth,
both of which added calls to memmove.
Avoid unused argument warnings in lambda compiler macros
* lisp/emacs-lisp/byte-run.el (byte-run--set-compiler-macro):
Don't warn when a compiler macro with lambda-form expander does not
use all the arguments of the function. Nobody expected any warning
since the arguments look like free variables inside the lambda form.