]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoAdd an ldefs-boot.el target to the Makefile
Lars Ingebrigtsen [Wed, 1 Dec 2021 03:54:20 +0000 (04:54 +0100)]
Add an ldefs-boot.el target to the Makefile

* lisp/Makefile.in (ldefs-boot.el): Add a target to regenerate the
ldefs-boot.el file.

2 years agoMake "make force-autoloads" produce the correct result
Lars Ingebrigtsen [Wed, 1 Dec 2021 03:51:01 +0000 (04:51 +0100)]
Make "make force-autoloads" produce the correct result

* lisp/emacs-lisp/autoload.el (cl-lib): We need the cl-macs at
runtime to expand cl-defmacros to find declare indent forms.

2 years agoDon't include the other loaddef files in the no-autoloads section
Lars Ingebrigtsen [Wed, 1 Dec 2021 02:55:17 +0000 (03:55 +0100)]
Don't include the other loaddef files in the no-autoloads section

* lisp/emacs-lisp/autoload.el (make-directory-autoloads): Don't
include the other loaddef files in the no-autoloads section.

2 years agoAvoid unnecessary call when pixel scrolling
Po Lu [Wed, 1 Dec 2021 03:22:58 +0000 (11:22 +0800)]
Avoid unnecessary call when pixel scrolling

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down):
Avoid unnecessary call to `posn-at-point'

2 years agoMake pixel scrolling faster
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.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Wed, 1 Dec 2021 00:57:24 +0000 (01:57 +0100)]
; Auto-commit of loaddefs files.

2 years ago* lisp/loadup.el (paren): Preload it (again).
Andrea Corallo [Tue, 30 Nov 2021 18:12:52 +0000 (19:12 +0100)]
* lisp/loadup.el (paren): Preload it (again).

2 years ago; * src/comp.c (syms_of_comp): Fix first lines of doc strings.
Eli Zaretskii [Tue, 30 Nov 2021 18:16:25 +0000 (20:16 +0200)]
; * src/comp.c (syms_of_comp): Fix first lines of doc strings.

2 years ago; Fix last change.
Eli Zaretskii [Tue, 30 Nov 2021 18:09:08 +0000 (20:09 +0200)]
; Fix last change.

2 years agoImprove documentation of pixel-fill
Eli Zaretskii [Tue, 30 Nov 2021 18:07:19 +0000 (20:07 +0200)]
Improve documentation of pixel-fill

* doc/lispref/text.texi (Filling): Describe the arguments of
'pixel-fill-region'.  Add index entry.

* lisp/textmodes/pixel-fill.el (pixel-fill-region): Doc fix.

2 years agoUse pixel-fill-width in shr.el
Lars Ingebrigtsen [Tue, 30 Nov 2021 15:54:34 +0000 (16:54 +0100)]
Use pixel-fill-width in shr.el

* lisp/net/shr.el (shr--window-width): Factor out into own function.
(shr-insert-document): Use it.
(shr-fill-text): Ditto.

2 years agoDocument pixel-fill-region
Lars Ingebrigtsen [Tue, 30 Nov 2021 15:46:24 +0000 (16:46 +0100)]
Document pixel-fill-region

* doc/lispref/text.texi (Filling): Document pixel-fill-region.

* lisp/textmodes/pixel-fill.el (pixel-fill-width): Add new helper
function.

2 years agoRevert "Preload paren.el"
Andrea Corallo [Tue, 30 Nov 2021 12:49:36 +0000 (13:49 +0100)]
Revert "Preload paren.el"

Reverting as the previous commit make this fix not anymore necessary.

This reverts commit 340e527bed83ff0382446132c871088ad61d1745.

2 years agoImprove native compiler startup circular dependecy prevention mechanism
Andrea Corallo [Tue, 30 Nov 2021 13:18:58 +0000 (14:18 +0100)]
Improve native compiler startup circular dependecy prevention mechanism

* src/comp.c (maybe_defer_native_compilation): Update to accumulate
delayed objects in `comp--delayed-sources'.
(syms_of_comp): Add `comp--delayed-sources' and `comp--loadable'
vars.

* lisp/startup.el (startup--honor-delayed-native-compilations): New
function.
(normal-top-level): Call it.

2 years agoAllow storing buffer names in registers
Lars Ingebrigtsen [Tue, 30 Nov 2021 14:14:16 +0000 (15:14 +0100)]
Allow storing buffer names in registers

* 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).

2 years agoGeneralise CPS-conversion let optimisation
Mattias Engdegård [Tue, 30 Nov 2021 14:04:46 +0000 (15:04 +0100)]
Generalise CPS-conversion let optimisation

* 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.

2 years agoAllow inhibiting warnings about obsolete macros again
Lars Ingebrigtsen [Tue, 30 Nov 2021 13:38:15 +0000 (14:38 +0100)]
Allow inhibiting warnings about obsolete macros again

* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Inhibit
warning if requested (bug#50984).

2 years ago* src/nsterm.m (Vns_scroll_event_delta_factor): Fix doc string.
Po Lu [Tue, 30 Nov 2021 13:10:36 +0000 (21:10 +0800)]
* src/nsterm.m (Vns_scroll_event_delta_factor): Fix doc string.

2 years agoFix pixel scrolling again
Po Lu [Tue, 30 Nov 2021 12:49:59 +0000 (20:49 +0800)]
Fix pixel scrolling again

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix
confusion about absolutivity of `window-edges'.

2 years agoFix 1-off errors in pixel scrolling code
Po Lu [Tue, 30 Nov 2021 12:44:54 +0000 (20:44 +0800)]
Fix 1-off errors in pixel scrolling code

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix
one-off errors.

2 years agoImprove upwards pixel scrolling for large images
Po Lu [Tue, 30 Nov 2021 12:35:11 +0000 (20:35 +0800)]
Improve upwards pixel scrolling for large images

This fixes most of the problem, but with a large image the
vscroll can sometimes jump about, which has to be fixed.

* lisp/pixel-scroll.el (pixel-scroll-precision-up): Handle
vscrolling large images in the first unseen line.

2 years agoBetter CPS conversion of multi-binding `let`
Mattias Engdegård [Tue, 30 Nov 2021 10:32:20 +0000 (11:32 +0100)]
Better CPS conversion of multi-binding `let`

* 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.

2 years ago* lisp/pixel-scroll.el (pixel-scroll-precision): Handle zero delta.
Po Lu [Tue, 30 Nov 2021 11:28:04 +0000 (19:28 +0800)]
* lisp/pixel-scroll.el (pixel-scroll-precision): Handle zero delta.

2 years agoMerge from origin/emacs-28
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

# Conflicts:
# doc/misc/modus-themes.org

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Tue, 30 Nov 2021 06:35:37 +0000 (07:35 +0100)]
; Merge from origin/emacs-28

The following commit was skipped:

de9d27f679 Avoid undefined behaviour when copying part of structure

2 years agoFix annoying bell rings when pixel scrolling to buffer limits
Po Lu [Tue, 30 Nov 2021 06:05:18 +0000 (14:05 +0800)]
Fix annoying bell rings when pixel scrolling to buffer limits

* lisp/pixel-scroll.el (pixel-scroll-precision): Don't ding at
buffer limits.

2 years agoAdd `ns-scroll-event-delta-factor'
Po Lu [Tue, 30 Nov 2021 05:41:16 +0000 (13:41 +0800)]
Add `ns-scroll-event-delta-factor'

* src/nsterm.m (- mouseDown): Take delta factor into account.
(Vns_scroll_event_delta_factor): New variable.

* lisp/cus-start.el: Add option.

2 years agoAllow non-float values in x-scroll-event-delta-factor
Po Lu [Tue, 30 Nov 2021 01:46:25 +0000 (09:46 +0800)]
Allow non-float values in x-scroll-event-delta-factor

* src/xterm.c (handle_one_xevent): Use XFLOATINT instead of
XFLOAT_DATA.

2 years agoAdd new package pixel-fill.el
Lars Ingebrigtsen [Tue, 30 Nov 2021 01:07:22 +0000 (02:07 +0100)]
Add new package pixel-fill.el

* 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.

* lisp/textmodes/pixel-fill.el: New package.

2 years agoAudit the Emacs manual for keymap-*-related changes
Lars Ingebrigtsen [Mon, 29 Nov 2021 23:14:51 +0000 (00:14 +0100)]
Audit the Emacs manual for keymap-*-related changes

* doc/emacs/programs.texi (Other C Commands):
* doc/emacs/msdos-xtra.texi (MS-DOS Keyboard):
* doc/emacs/custom.texi (Init Examples):
* doc/emacs/abbrevs.texi (Editing Abbrevs): Change some examples
to use keymap-* functions.

2 years agoFix some of the argument handling in keymap-set and keymap-substitute
Lars Ingebrigtsen [Mon, 29 Nov 2021 23:13:47 +0000 (00:13 +0100)]
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.

2 years agoEdit the lispref manual for define-key/keymap-set fallout
Lars Ingebrigtsen [Mon, 29 Nov 2021 22:54:48 +0000 (23:54 +0100)]
Edit the lispref manual for define-key/keymap-set fallout

* doc/lispref/variables.texi (Tips for Defining):
* doc/lispref/text.texi (Clickable Text):
* doc/lispref/modes.texi (Derived Modes):
(Example Major Modes):
* doc/lispref/loading.texi (Autoload):
(Hooks for Loading):
* doc/lispref/keymaps.texi (Creating Keymaps):
(Inheritance and Keymaps):
(Controlling Active Maps):
(Changing Key Bindings):
(Low-Level Key Binding):
(Remapping Commands):
(Translation Keymaps):
(Key Binding Commands):
* doc/lispref/help.texi (Help Functions):
* doc/lispref/display.texi (Abstract Display Example):
* doc/lispref/commands.texi (Interactive Codes):
(Keyboard Events):
(Misc Events):
(Classifying Events):
(Strings of Events): Prefer `keymap-set' instead of `define-key'
most places, and use `defvar-keymap' in some of the examples.

2 years agoFix build on macOS
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.

2 years agoFix NS port text decorations (bug#52156)
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.

2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Mon, 29 Nov 2021 21:40:38 +0000 (22:40 +0100)]
Regenerate ldefs-boot.el

2 years agoFix up generation of help text for ldefs-boot.el
Lars Ingebrigtsen [Mon, 29 Nov 2021 21:39:57 +0000 (22:39 +0100)]
Fix up generation of help text for ldefs-boot.el

* lisp/emacs-lisp/autoload.el (autoload-rubric): Don't put the
help text into cedet/*/loaddefs.el (bug#51744).

2 years ago* test/infra/gitlab-ci.yml (.job-template): Modify find scripts.
Michael Albinus [Mon, 29 Nov 2021 20:36:51 +0000 (21:36 +0100)]
* test/infra/gitlab-ci.yml (.job-template): Modify find scripts.

2 years agoMerge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28
Eli Zaretskii [Mon, 29 Nov 2021 20:30:37 +0000 (22:30 +0200)]
Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28

2 years agoRemove problematic characters from modus-themes.org (bug#52126)
Protesilaos Stavrou [Mon, 29 Nov 2021 19:06:52 +0000 (21:06 +0200)]
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.

2 years agoRemove problematic characters from modus-themes.org (bug#52126)
Protesilaos Stavrou [Mon, 29 Nov 2021 19:13:55 +0000 (21:13 +0200)]
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.

2 years agoDon't return whitespace for thing-at-point in whitespace-only buffers
Lars Ingebrigtsen [Mon, 29 Nov 2021 16:18:49 +0000 (17:18 +0100)]
Don't return whitespace for thing-at-point in whitespace-only buffers

* lisp/thingatpt.el (bounds-of-thing-at-point): If the buffer is
empty, return nil for most things (bug#52098).

2 years agoMake Re: recognition in ispell-message less ambiguous
Lars Ingebrigtsen [Mon, 29 Nov 2021 16:08:11 +0000 (17:08 +0100)]
Make Re: recognition in ispell-message less ambiguous

* lisp/textmodes/ispell.el (ispell-message): Require a "Re" as a
word, not as a word ending (bug#52104).

2 years agoMake `group' widgets prettier in Customize
Brahimi Saifullah [Mon, 29 Nov 2021 15:52:26 +0000 (16:52 +0100)]
Make `group' widgets prettier in Customize

* lisp/wid-edit.el (group): Make the ":" invisible so that the
buffer looks prettier (bug#52143).

Copyright-paperwork-exempt: yes

2 years agoproject-kill-buffers can display list of buffers to kill
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).

2 years agoSignal a better error in tabulated-list-sort
Lars Ingebrigtsen [Mon, 29 Nov 2021 15:39:02 +0000 (16:39 +0100)]
Signal a better error in tabulated-list-sort

* lisp/emacs-lisp/tabulated-list.el (tabulated-list-sort): Signal
error earlier on invalid column numbers (bug#52154).

2 years agoUse mupdf in doc-view-mode if gs is not installed
Daniel Martín [Mon, 29 Nov 2021 14:48:03 +0000 (15:48 +0100)]
Use mupdf in doc-view-mode if gs is not installed

* lisp/doc-view.el (doc-view-mode-p): Use mupdf to render PDF and
related formats if gs is not installed (bug#52170).

2 years agoMake fill-region-as-paragraph clear the markers it creates
Ikumi Keita [Mon, 29 Nov 2021 14:40:19 +0000 (15:40 +0100)]
Make fill-region-as-paragraph clear the markers it creates

* lisp/textmodes/fill.el (fill-region-as-paragraph): Clear
temporary markers (bug#52175).

Copyright-paperwork-exempt: yes

2 years agoDo not buttonize key bindings outside of *Help* buffers
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.

2 years agoAvoid undefined behaviour when copying part of structure
Andreas Schwab [Mon, 29 Nov 2021 09:29:40 +0000 (10:29 +0100)]
Avoid undefined behaviour when copying part of structure

* src/dispnew.c (copy_row_except_pointers): Don't use address of
subobject as starting point.

(cherry picked from commit 6943786b5c1fe76ea05a3a810512bd6777883710)

2 years agoReally make `x-scroll-event-delta-factor' dependent on system
Po Lu [Mon, 29 Nov 2021 10:25:10 +0000 (18:25 +0800)]
Really make `x-scroll-event-delta-factor' dependent on system

* lisp/cus-start.el: Move X specific builtins that start
with "x-" before the catch-all test.

2 years agoAvoid undefined behaviour when copying part of structure
Andreas Schwab [Mon, 29 Nov 2021 09:29:40 +0000 (10:29 +0100)]
Avoid undefined behaviour when copying part of structure

* src/dispnew.c (copy_row_except_pointers): Don't use address of
subobject as starting point.

2 years agoFix last change for non-X platforms
Po Lu [Mon, 29 Nov 2021 09:19:27 +0000 (17:19 +0800)]
Fix last change for non-X platforms

* lisp/cus-start.el: Don't announce
`scroll-bar-adjust-thumb-portion' on non-X systems.

2 years agoAllow customizing the pixel delta of wheel events on X
Po Lu [Mon, 29 Nov 2021 07:36:15 +0000 (15:36 +0800)]
Allow customizing the pixel delta of wheel events on X

* lisp/cus-start.el: Add `x-scroll-event-delta-factor'.
* src/xterm.c (handle_one_xevent): Apply scroll event
delta factor to wheel events with pixel data.
(Vx_scroll_event_delta_factor): New user option.

2 years agoMake overhangs in ftcrfont work on Haiku
Po Lu [Mon, 29 Nov 2021 07:12:25 +0000 (07:12 +0000)]
Make overhangs in ftcrfont work on Haiku

* src/ftcrfont.c (ftcrfont_draw): Dump left overhang clipping
on Haiku and always set `background_filled_p'.

2 years ago* doc/emacs/haiku.texi (Haiku Basics): Fix a typo.
Po Lu [Mon, 29 Nov 2021 06:55:58 +0000 (06:55 +0000)]
* doc/emacs/haiku.texi (Haiku Basics): Fix a typo.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Mon, 29 Nov 2021 06:00:25 +0000 (07:00 +0100)]
Merge from origin/emacs-28

c4daff9cf8 * Makefile.in (PREFERRED_BRANCH): Now emacs-28.
bca57086be ; Remove an obsolete comment
455b64c336 * src/coding.c (Fdecode_coding_region, Fencode_coding_regi...

2 years ago* Makefile.in (PREFERRED_BRANCH): Now emacs-28.
Stefan Kangas [Mon, 29 Nov 2021 04:57:13 +0000 (05:57 +0100)]
* Makefile.in (PREFERRED_BRANCH): Now emacs-28.

2 years agoUpdate XKB map on MappingNotify
Po Lu [Mon, 29 Nov 2021 04:39:16 +0000 (12:39 +0800)]
Update XKB map on MappingNotify

* src/xterm.c (handle_one_xevent): Update XKB map when X
tells us the keyboard map has been updated.

2 years agoTweak gnus-art key binding
Lars Ingebrigtsen [Sun, 28 Nov 2021 21:59:35 +0000 (22:59 +0100)]
Tweak gnus-art key binding

* lisp/gnus/gnus-art.el (:keymap): Fix mnemonic key binding.

2 years ago; Remove an obsolete comment
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.

2 years ago* src/coding.c (Fdecode_coding_region, Fencode_coding_region): Doc fix.
Eli Zaretskii [Sun, 28 Nov 2021 18:18:16 +0000 (20:18 +0200)]
* src/coding.c (Fdecode_coding_region, Fencode_coding_region): Doc fix.

2 years ago; Don't use remq (breaks bootstrapping)
Mattias Engdegård [Sun, 28 Nov 2021 18:06:33 +0000 (19:06 +0100)]
; Don't use remq (breaks bootstrapping)

2 years agoUse compiler macros for the key syntax checks
Mattias Engdegård [Sun, 28 Nov 2021 17:04:06 +0000 (18:04 +0100)]
Use compiler macros for the key syntax checks

Compile-time key string syntax checks are better written using
compiler macros than with byte-hunk-handlers inside the compiler
proper.

* lisp/emacs-lisp/bytecomp.el (byte-compile-define-keymap)
(byte-compile-define-keymap--define): Remove.
* lisp/keymap.el (keymap--compile-check): New.
(keymap-set, keymap-global-set, keymap-local-set, keymap-global-unset)
(keymap-local-unset, keymap-unset, keymap-substitute)
(keymap-set-after, key-translate, keymap-lookup, keymap-local-lookup)
(keymap-global-lookup): Use compiler-macro for argument checks.
* lisp/subr.el (define-keymap--compile): New.
(define-keymap--define): Fold into define-keymap.
(define-keymap): Use compiler-macro.
(defvar-keymap): Use define-keymap.

2 years agoAvoid unused argument warnings in lambda compiler macros
Mattias Engdegård [Sun, 28 Nov 2021 17:00:44 +0000 (18:00 +0100)]
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.

2 years ago; Use /usr/bin/find in gitlab-ci.yml
Michael Albinus [Sun, 28 Nov 2021 16:05:32 +0000 (17:05 +0100)]
; Use /usr/bin/find in gitlab-ci.yml

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 28 Nov 2021 13:59:44 +0000 (14:59 +0100)]
Merge from origin/emacs-28

1fffe9a210 ; * lisp/org/org.el: Fix version header.
2a4de5e5e5 Fix Subject when forwarding message with 2-line From
b8b2dd17c5 Update to Org 9.5.1-11-g96d91b
a937f536b3 * doc/lispref/commands.texi (Click Events): Fix wording (b...

2 years ago; * lisp/org/org.el: Fix version header.
Stefan Kangas [Sun, 28 Nov 2021 13:54:24 +0000 (14:54 +0100)]
; * lisp/org/org.el: Fix version header.

2 years agoAdapt gitlab-ci.yml
Michael Albinus [Sun, 28 Nov 2021 12:45:43 +0000 (13:45 +0100)]
Adapt gitlab-ci.yml

* test/infra/gitlab-ci.yml (variables): Set EMACS_TEST_TIMEOUT to 3600.
(.job-template, .test-template): Another approach to catch test
artifacts on emba.

2 years agoMake haiku-win build correctly on non-Haiku systems
Po Lu [Sun, 28 Nov 2021 07:39:22 +0000 (07:39 +0000)]
Make haiku-win build correctly on non-Haiku systems

* lisp/term/haiku-win.el (haiku-selection-targets): Add
missing declaration.

2 years agoFix xwidget popups on XI2 again
Po Lu [Sun, 28 Nov 2021 05:43:19 +0000 (13:43 +0800)]
Fix xwidget popups on XI2 again

* src/xwidget.c (xwidget_button_1): Release seat grab.

2 years agoFix xwidget popups on XI2
Po Lu [Sun, 28 Nov 2021 05:13:06 +0000 (13:13 +0800)]
Fix xwidget popups on XI2

* src/gtkutil.c (xg_is_menu_window): Determine whether wdesc
is a menu generated by a menu bar more reliably.

* src/xwidget.c (xwidget_button_1): Release all XI2 grabs on
click.

2 years agoFix typos in configure.ac
Po Lu [Sun, 28 Nov 2021 02:11:53 +0000 (10:11 +0800)]
Fix typos in configure.ac

* configure.ac: Fix typos in wording of XInput 2 options.

2 years agoMake `pixel-scroll-precision-scroll-up' work better with overlays
Po Lu [Sun, 28 Nov 2021 01:06:11 +0000 (09:06 +0800)]
Make `pixel-scroll-precision-scroll-up' work better with overlays

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up):
Just set vscroll when on overlay.

2 years agoFix Subject when forwarding message with 2-line From
Mike Kupfer [Fri, 26 Nov 2021 21:59:14 +0000 (13:59 -0800)]
Fix Subject when forwarding message with 2-line From

* lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): Collapse
two-line From headers into a single line (SF#266).  Based on a
suggestion from Lester Buck (many thanks!).

2 years agoUpdate to Org 9.5.1-11-g96d91b
Kyle Meyer [Sat, 27 Nov 2021 21:24:31 +0000 (16:24 -0500)]
Update to Org 9.5.1-11-g96d91b

2 years agoSimplify use of artifacts in emba files
Michael Albinus [Sat, 27 Nov 2021 15:53:05 +0000 (16:53 +0100)]
Simplify use of artifacts in emba files

* test/infra/gitlab-ci.yml (.test-template): Re-insert.
(test-all-inotify, test-filenotify-gio, test-gnustep)
(test-native-comp-speed0):
* test/infra/Makefile.in (subdir_template): Use it when
appropriate.  Remove artifacts.

* test/infra/test-jobs.yml: Regenerate.

2 years ago* test/src/comp-tests.el: Rework last patch
Stefan Monnier [Sat, 27 Nov 2021 15:10:26 +0000 (10:10 -0500)]
* test/src/comp-tests.el: Rework last patch

Move `require`s out of `eval-when-compile` if the functions are called
at run-time.
Don't use #' to quote symbols (i.e. at those places where a lambda
expression couldn't be used).
Don't pre-load comp-test-45603.el and comp-test-pure.el any more.

(comp-deftest pure): Use `declare-function` after loading `comp-test-pure.el`
to silence the byte-compiler.

2 years agoAvoid assertion violations in --enable-checking builds
Eli Zaretskii [Sat, 27 Nov 2021 15:09:51 +0000 (17:09 +0200)]
Avoid assertion violations in --enable-checking builds

* src/xdisp.c (gui_produce_glyphs): Make sure character glyphs
don't trigger assertion violation due to negative ascent or
descent.  This was reporte dto happen with some fonts used by the
xfont backend.

2 years ago* doc/lispref/commands.texi (Click Events): Fix wording (bug#52142).
Eli Zaretskii [Sat, 27 Nov 2021 13:01:46 +0000 (15:01 +0200)]
* doc/lispref/commands.texi (Click Events): Fix wording (bug#52142).

2 years agoImprove documentation of wheel events
Po Lu [Sat, 27 Nov 2021 11:14:43 +0000 (19:14 +0800)]
Improve documentation of wheel events

* doc/lispref/commands.texi (Misc Events): Add missing
parameters to `wheel-up' and `wheel-down'.

2 years agoFix pixel scroll for overlays and text in display properties
Po Lu [Sat, 27 Nov 2021 11:23:31 +0000 (19:23 +0800)]
Fix pixel scroll for overlays and text in display properties

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down):
Just set vscroll if we're scrolling through an overlay or
something to that effect.

2 years ago; Improve doc string of 'glyphless-char-display-control'
Eli Zaretskii [Sat, 27 Nov 2021 07:02:12 +0000 (09:02 +0200)]
; Improve doc string of 'glyphless-char-display-control'

* lisp/international/characters.el
(glyphless-char-display-control): Doc fix.

2 years agoSet motion event time when handling XI2 motion events
Po Lu [Sat, 27 Nov 2021 06:57:59 +0000 (14:57 +0800)]
Set motion event time when handling XI2 motion events

* src/xterm.c (handle_one_xevent): Set motion event time when
handling XI_Motion.

2 years agoRemove GC prone call in `pixel-point-and-height-at-unseen-line'
Po Lu [Sat, 27 Nov 2021 06:10:49 +0000 (14:10 +0800)]
Remove GC prone call in `pixel-point-and-height-at-unseen-line'

* lisp/pixel-scroll.el (pixel-point-and-height-at-unseen-line):
Remove call to unnecessary call to `beginning-of-visual-line'.

2 years agoMake `pixel-scroll-precision-scroll-up' slightly more robust
Po Lu [Sat, 27 Nov 2021 05:46:35 +0000 (13:46 +0800)]
Make `pixel-scroll-precision-scroll-up' slightly more robust

* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up):
Subtract from existing vscroll if feasible.

2 years agoMake `pixel-scroll-precision-scroll-up' use existing logic
Po Lu [Sat, 27 Nov 2021 05:02:10 +0000 (13:02 +0800)]
Make `pixel-scroll-precision-scroll-up' use existing logic

* lisp/pixel-scroll.el (pixel-point-at-unseen-line): Rewrite
to use `pixel-point-and-height-at-unseen-line'.
(pixel-point-and-height-at-unseen-line): New function.
(pixel-scroll-precision-scroll-up): Use existing logic
to determine unseen line position.

2 years agotime-stamp-tests.el: Test more formats
Stephen Gildea [Sat, 27 Nov 2021 04:48:45 +0000 (20:48 -0800)]
time-stamp-tests.el: Test more formats

* test/lisp/time-stamp-tests.el (time-stamp-format-ignored-modifiers):
Additional testing with illegal formats, including "%".
(time-stamp-format-multiple-conversions): Add a test with "%%%".

2 years agoSet initial tab bar parameter on NS
Po Lu [Sat, 27 Nov 2021 00:34:51 +0000 (08:34 +0800)]
Set initial tab bar parameter on NS

* src/nsfns.m (Fx_create_frame): Initialize `tab-bar-lines'
frame parameter during frame creation.

2 years agoSilence NS warnings
Alan Third [Fri, 26 Nov 2021 19:57:07 +0000 (19:57 +0000)]
Silence NS warnings

* src/nsterm.m ([EmacsView mouseDown:]): Move variables into the block
where they're used.

2 years ago* test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105).
Stephen Gildea [Fri, 26 Nov 2021 16:51:38 +0000 (08:51 -0800)]
* test/src/comp-tests.el: Eliminate byte-compiler warnings (Bug#52105).

2 years agoSpecify initial values for glyphless-char-display-control elements
Robert Pluim [Fri, 26 Nov 2021 14:54:49 +0000 (15:54 +0100)]
Specify initial values for glyphless-char-display-control elements

* lisp/international/characters.el (glyphless-char-display-control):
Specify :value for all the elements, since nil is not a valid value.

2 years agoAdapt test/infra/gitlab-ci.yml
Michael Albinus [Fri, 26 Nov 2021 14:41:22 +0000 (15:41 +0100)]
Adapt test/infra/gitlab-ci.yml

* test/infra/gitlab-ci.yml (test-all-inotify)
(test-filenotify-gio, test-gnustep, test-native-comp-speed0):
Add or adapt artifacts.

2 years agoAdd new face `gnus-header'
Lars Ingebrigtsen [Fri, 26 Nov 2021 14:26:14 +0000 (15:26 +0100)]
Add new face `gnus-header'

* lisp/gnus/gnus-art.el (gnus-header): New face.
(gnus-header-from, gnus-header-subject, gnus-header-newsgroups)
(gnus-header-name, gnus-header-content): Inherit from this new face.

2 years ago; * etc/NEWS: Fix wording of a recently-added entry.
Eli Zaretskii [Fri, 26 Nov 2021 13:50:46 +0000 (15:50 +0200)]
; * etc/NEWS: Fix wording of a recently-added entry.

2 years agoAdjust custom-face-attributes for 'regular' weight
Robert Pluim [Fri, 26 Nov 2021 13:08:24 +0000 (14:08 +0100)]
Adjust custom-face-attributes for 'regular' weight

Following the changes to support "medium" weight fonts, the weight for
"normal" fonts is now reported as 'regular', which caused
customize-face to display faces as lisp-expressions, since it didn't
recognize that.  This has been corrected.

* lisp/cus-face.el (custom-face-attributes): Recognize 'regular' as a
weight.

2 years agoAdd an intermediary face for mode lines: `mode-line-active'
Lars Ingebrigtsen [Fri, 26 Nov 2021 13:17:10 +0000 (14:17 +0100)]
Add an intermediary face for mode lines: `mode-line-active'

* doc/emacs/display.texi (Standard Faces): Document the new face.

* lisp/faces.el (mode-line-active): New face.
(mode-line): Don't inherit from vaiable-pitch.

* src/xfaces.c (lookup_basic_face, realize_basic_faces)
(syms_of_xfaces):
* src/xdisp.c (window_box_height, window_text_pixel_size)
(display_mode_lines, Fformat_mode_line):
* src/dispextern.h (CURRENT_MODE_LINE_ACTIVE_FACE_ID_3)
(CURRENT_MODE_LINE_ACTIVE_FACE_ID, enum face_id): Rename from
*MODE_LINE_FACE_ID to *MODE_LINE_ACTIVE_FACE_ID.

2 years agoMove the precision pixel scrolling feature to pixel-scroll.el
Po Lu [Fri, 26 Nov 2021 09:42:45 +0000 (17:42 +0800)]
Move the precision pixel scrolling feature to pixel-scroll.el

* etc/NEWS: Update NEWS entry for 'pixel-scroll-precision-mode'

* lisp/better-pixel-scroll.el: Remove file.

* src/pixel-scroll.el (x-coalesce-scroll-events): New variable
declaration.
(pixel-scroll-precision-mode-map): New variable.
(pixel-scroll-precision-scroll-down):
(pixel-scroll-precision-scroll-up):
(pixel-scroll-precision): New functions.
(pixel-scroll-precision-mode): New minor mode.

2 years agoExplain confusing aspects of XInput 2 scroll wheel reporting
Po Lu [Fri, 26 Nov 2021 11:59:54 +0000 (19:59 +0800)]
Explain confusing aspects of XInput 2 scroll wheel reporting

* src/xterm.c (x_init_master_valuators): Explain how XInput 2
reports scroll wheel movement.

(handle_one_xevent): Explain why XI2 scroll valuators
are reset after each enter events.

2 years agoRemove empty lines from stash read prompt
Dmitry Gutov [Fri, 26 Nov 2021 13:03:30 +0000 (16:03 +0300)]
Remove empty lines from stash read prompt

* lisp/vc/vc-git.el (vc-git-stash-read): Pass OMIT-NULLS (bug#52119).
(vc-git-stash-list): Simplify.

2 years agoMake XInput 2 builds work without cairo
Po Lu [Fri, 26 Nov 2021 09:42:51 +0000 (17:42 +0800)]
Make XInput 2 builds work without cairo

* src/xterm.c: Move some defines around so XI2 code doesn't
get ifdef'd out if Cairo is disabled.