Commit graph

82693 commits

Author SHA1 Message Date
Lars Ingebrigtsen
1f9834cd76 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.
2021-12-01 04:55:18 +01:00
Po Lu
541f61b378 Avoid unnecessary call when pixel scrolling
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down):
Avoid unnecessary call to `posn-at-point'
2021-12-01 11:22:58 +08:00
Po Lu
034d8a3ea8 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.
2021-12-01 09:35:10 +08:00
Stefan Kangas
aa0162ddfa ; Auto-commit of loaddefs files. 2021-12-01 01:57:43 +01:00
Andrea Corallo
a7dfb2acfc * lisp/loadup.el (paren): Preload it (again). 2021-11-30 19:16:54 +01:00
Eli Zaretskii
7433e74571 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.
2021-11-30 20:07:19 +02:00
Lars Ingebrigtsen
a2d98c54f7 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.
2021-11-30 16:54:34 +01:00
Lars Ingebrigtsen
10d371e4fa 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.
2021-11-30 16:46:28 +01:00
Andrea Corallo
99c276b3c0 Revert "Preload paren.el"
Reverting as the previous commit make this fix not anymore necessary.

This reverts commit 340e527bed.
2021-11-30 15:42:41 +01:00
Andrea Corallo
9b381a95ef 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.
2021-11-30 15:42:41 +01:00
Lars Ingebrigtsen
7b235b1ec0 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).
2021-11-30 15:17:39 +01:00
Mattias Engdegård
3966a28454 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.
2021-11-30 15:06:27 +01:00
Lars Ingebrigtsen
5fb9a033f8 Allow inhibiting warnings about obsolete macros again
* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Inhibit
warning if requested (bug#50984).
2021-11-30 14:38:15 +01:00
Po Lu
55151f94ea Fix pixel scrolling again
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix
confusion about absolutivity of `window-edges'.
2021-11-30 20:49:59 +08:00
Po Lu
6c17cdc1dc Fix 1-off errors in pixel scrolling code
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down): Fix
one-off errors.
2021-11-30 20:44:54 +08:00
Po Lu
b79d779ae8 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.
2021-11-30 20:36:43 +08:00
Mattias Engdegård
68c09c6b74 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.
2021-11-30 13:03:49 +01:00
Po Lu
f633116c09 * lisp/pixel-scroll.el (pixel-scroll-precision): Handle zero delta. 2021-11-30 19:28:04 +08:00
Po Lu
3cba568886 Fix annoying bell rings when pixel scrolling to buffer limits
* lisp/pixel-scroll.el (pixel-scroll-precision): Don't ding at
buffer limits.
2021-11-30 14:05:18 +08:00
Po Lu
f3bb2b80b4 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.
2021-11-30 13:41:16 +08:00
Lars Ingebrigtsen
72b7fccc15 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.
2021-11-30 02:07:22 +01:00
Lars Ingebrigtsen
1bd7b5dd51 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.
2021-11-30 00:13:47 +01:00
Lars Ingebrigtsen
0c1c6f0ba7 Regenerate ldefs-boot.el 2021-11-29 22:40:38 +01:00
Lars Ingebrigtsen
c623746241 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).
2021-11-29 22:39:57 +01:00
Lars Ingebrigtsen
c2c9e7e3cb 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).
2021-11-29 17:18:49 +01:00
Lars Ingebrigtsen
73cf27aa45 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).
2021-11-29 17:08:11 +01:00
Brahimi Saifullah
f0eba4ea5e 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
2021-11-29 16:52:26 +01:00
Matthias Meulien
0d2f184a11 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).
2021-11-29 16:42:02 +01:00
Lars Ingebrigtsen
4de13ef147 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).
2021-11-29 16:39:02 +01:00
Daniel Martín
e3351f6152 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).
2021-11-29 15:48:03 +01:00
Ikumi Keita
247ed6ccbc 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
2021-11-29 15:40:19 +01:00
Gregory Heytings
49422d2e69 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.
2021-11-29 15:13:31 +01:00
Po Lu
d8dd705e9d 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.
2021-11-29 18:27:12 +08:00
Po Lu
4320180111 Fix last change for non-X platforms
* lisp/cus-start.el: Don't announce
`scroll-bar-adjust-thumb-portion' on non-X systems.
2021-11-29 17:19:27 +08:00
Po Lu
618070d4b4 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.
2021-11-29 15:37:41 +08:00
Lars Ingebrigtsen
c8df4d1ca3 Tweak gnus-art key binding
* lisp/gnus/gnus-art.el (:keymap): Fix mnemonic key binding.
2021-11-28 22:59:35 +01:00
Mattias Engdegård
9a0492ca7c ; Don't use remq (breaks bootstrapping) 2021-11-28 19:06:33 +01:00
Mattias Engdegård
d50e0bdbac 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.
2021-11-28 18:10:23 +01:00
Mattias Engdegård
1e8074f5ea 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.
2021-11-28 18:10:23 +01:00
Stefan Kangas
f5498a608f 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...
2021-11-28 14:59:44 +01:00
Stefan Kangas
1fffe9a210 ; * lisp/org/org.el: Fix version header. 2021-11-28 14:54:24 +01:00
Po Lu
44c856dccc Make haiku-win build correctly on non-Haiku systems
* lisp/term/haiku-win.el (haiku-selection-targets): Add
missing declaration.
2021-11-28 07:39:22 +00:00
Po Lu
3c2afa66a2 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.
2021-11-28 09:06:11 +08:00
Mike Kupfer
2a4de5e5e5 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!).
2021-11-27 13:41:12 -08:00
Kyle Meyer
b8b2dd17c5 Update to Org 9.5.1-11-g96d91b 2021-11-27 16:25:09 -05:00
Po Lu
f9457b8b01 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.
2021-11-27 20:09:33 +08:00
Eli Zaretskii
6072370db7 ; Improve doc string of 'glyphless-char-display-control'
* lisp/international/characters.el
(glyphless-char-display-control): Doc fix.
2021-11-27 09:02:12 +02:00
Po Lu
3dc9eb8bbd 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'.
2021-11-27 14:10:49 +08:00
Po Lu
141425ce3b Make `pixel-scroll-precision-scroll-up' slightly more robust
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-up):
Subtract from existing vscroll if feasible.
2021-11-27 13:46:35 +08:00
Po Lu
d329014574 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.
2021-11-27 13:03:54 +08:00