Po Lu [Sun, 5 Dec 2021 13:34:54 +0000 (21:34 +0800)]
Interpolate large pixel scrolls
* lisp/pixel-scroll.el
(pixel-scroll-precision-large-scroll-height): New user option.
(pixel-scroll-precision-interpolate): New function.
(pixel-scroll-precision): Interpolate scrolls under some
circumstances.
Stefan Kangas [Sun, 5 Dec 2021 05:30:35 +0000 (06:30 +0100)]
Merge from origin/emacs-28
c086358574 Update to Org 9.5.1-15-gdb4805 fef3e60061 * lisp/emacs-lisp/edebug.el (edebug-eval-defun): Minor doc... a1e30e4106 ; Fix most remaining AUTHORS warnings f3e6a432c5 ; * doc/misc/efaq.texi (New in Emacs 28): Add more news. 00236cc802 Fix the enumeration values returned by 'try_scrolling'
* lisp/help.el (help--describe-command): `help-function' buttons
are defined in help-mode.el, so it might not exist yet when
calling `documentation' directly (bug#52291).
Earl Hyatt [Sun, 5 Dec 2021 01:41:39 +0000 (02:41 +0100)]
Update the Info documentation of Eshell's built-in commands
* doc/misc/eshell.texi (Built-in commands): Add the remaining
built-in Eshell commands to the list of built-ins. Expand some of
the descriptions and mention user options affecting command
behavior. Sort these commands in alphabetical order (bug#52289).
Avoid having gud bug out if `C-x C-a' has been bound
* lisp/progmodes/gdb-mi.el (gud-global-map): Use gud-global-map.
* lisp/progmodes/gud.el (gud-global-map): Define a map instead of
assuming that `C-x C-a' is undefined (bug#6035).
(gud-def): Use the map.
Eric Abrahamsen [Sat, 4 Dec 2021 21:41:23 +0000 (13:41 -0800)]
Don't swallow gnus-search errors when creating nnselect groups
* lisp/gnus/gnus-search.el (gnus-search-run-query): Modify
condition-case to re-signal any gnus-search related errors; the user
should see them.
(gnus-search-error): Define a new parent error for all gnus-search
errors.
(isearch-filter-visible): Move text-property-not-all higher
to not call isearch-range-invisible on inhibit-isearch text.
Remove min/max since arguments are always in the right order.
Stefan Monnier [Sat, 4 Dec 2021 18:47:19 +0000 (13:47 -0500)]
eieio-core.el: Allow assignment to cl-structs through `slot-value`
* lisp/emacs-lisp/eieio-core.el (eieio--validate-slot-value):
Obey the `:read-only` property of the slot.
(eieio-oset): Allow use on cl-structs as well.
(eieio-read-only): New error.
* test/lisp/emacs-lisp/eieio-tests/eieio-tests.el (eieio-test--struct):
Make the last field read-only.
(eieio-test-defstruct-slot-value): Test that cl-struct slots can be
assigned via `slot-value`.
Paul Eggert [Sat, 4 Dec 2021 18:33:32 +0000 (10:33 -0800)]
Fix (date-to-time "2021-12-04")
This should complete the fix for Bug#52209.
* lisp/calendar/time-date.el (date-to-time): Apply
decoded-time-set-defaults only to the output of (parse-time-string
date), and only when the output has a year (to avoid confusion
when dates lack years). There is no point applying it after
timezone-make-date-arpa-standard since the latter fills in all the
blanks. And the former code mistakenly called encode-time on an
already-encoded time. This goes back to the code a couple of days
ago, except with changed behavior (to fix Bug#52209) only when
timezone-make-date-arpa-standard is not called.
* test/lisp/calendar/time-date-tests.el (test-date-to-time)
(test-days-between): New tests.
Po Lu [Sat, 4 Dec 2021 06:01:59 +0000 (14:01 +0800)]
Make precision pixel scrolling work in an hscrolled window
* lisp/pixel-scroll.el
(pixel-scroll-precision-scroll-down-page)
(pixel-scroll-precision-scroll-up-page): Use beginning of visual
line as window start if hscrolled.
(pixel-scroll-precision): Don't delegate to mwheel-scroll if
window is hscrolled.
Stefan Kangas [Sat, 4 Dec 2021 05:30:32 +0000 (06:30 +0100)]
Merge from origin/emacs-28
745a732ae4 ; Further author fixes in authors.el bef17bca21 * src/dosfns.c (Fint86): Doc fix; don't use obsolete names. bc55dc04af * doc/misc/erc.texi (Keystroke Summary): Fix doc for TAB. ef4d216eb3 Remove reference to variable obsolete since 24.1 7282e492d5 * doc/misc/efaq.texi (New in Emacs 28): New node. eafcccd38f ; FAQ: Normalize references to the NEWS.NN file c006c490eb ; * doc/misc/efaq.texi (Latest version of Emacs): Update v... 9fbc4fa0e7 Add Tramp version integrated in Emacs 28.1
Po Lu [Sat, 4 Dec 2021 01:43:44 +0000 (09:43 +0800)]
Make last change work for deltas that are multiples of max-height
* lisp/pixel-scroll.el (pixel-scroll-precision-scroll-down-page)
(pixel-scroll-precision-scroll-up-page): Use `max-height' that
is slightly less than the text height of the window.
Ensure that MAIN_FIRST have finished compilation before doing the rest
* lisp/Makefile.in (main-first): Ensure that we're done with the
main bits before starting on the rest.
(GREP_OPTIONS): Depend on main-first.
(MAIN_FIRST): Compile cconv.el before c-by.el (bug#8764).
Paul Eggert [Fri, 3 Dec 2021 21:05:31 +0000 (13:05 -0800)]
Port to Tiny C on x86-64
This allows Emacs to build on Ubuntu 21.10 x86-64 with
‘./configure --without-modules CC=tcc’.
* configure.ac (GC_SETJMP_WORKS):
Accept __x86_64__ as an alias for __amd64__.
* src/lisp.h (alignas): Provide a no-op substitute.
I disagree with the need to make it more prominent than the
warning face. The warning face is prominent enough. We
never decided to annoy people like that.
Paul Eggert [Fri, 3 Dec 2021 17:47:22 +0000 (09:47 -0800)]
Prefer rsvg_handle_get_intrinsic_size_in_pixels
Use rsvg_handle_get_intrinsic_size_in_pixels if available,
as this is simpler and better than what we were doing.
From a comment by by Alan Third (Bug#44655#56).
* src/image.c (init_svg_functions): Arrange for the new function.
(svg_load_image): Prefer the results of
rsvg_handle_get_intrinsic_size_in_pixels if available.
Paul Eggert [Fri, 3 Dec 2021 17:47:22 +0000 (09:47 -0800)]
Improve overflow checking in svg_load_image
* src/image.c: Include math.h, for lrint.
(scale_image_size, compute_image_size): Use ‘double’, not ‘int’
for image size args, since librsvg uses ‘double’ for pixel counts.
(scale_image_size): Use ceil instead of rounding, to avoid
discarding fractional SVG pixels. Divisor and multiplier are now
double instead of int, for better portability to librsvg
functions with fractional pixel sizes.
(image_get_dimension, compute_image_size, svg_load_image):
Be more careful about ignoring, rejecting or clipping scale
factors or sizes that are out of integer range.
(compute_image_size): Don’t bother to calculate :max-width if
:width is specified, and likewise for :max-height and :height.
Paul Eggert [Fri, 3 Dec 2021 17:47:22 +0000 (09:47 -0800)]
More-robust svg_load_image fallback
Suggested by Alan Third (Bug#44655#56).
* src/image.c (svg_load_image): Fall back on
rsvg_handle_get_geometry_for_layer if the
rsvg_handle_get_intrinsic_dimensions computations yielded unusable
viewbox width and height, instead of falling back only if
rsvg_handle_get_intrinsic_dimensions did not report image width
and height, or did not report a viewbox.
Katsumi Yamaoka [Fri, 3 Dec 2021 16:28:48 +0000 (17:28 +0100)]
Fix regression introduced by the previous date-to-time change
* lisp/calendar/time-date.el (date-to-time): The function needs to
test if `parse-time-string' returns a valid data as the old
version did it with the help of `encode-time' (bug#52209).
Stefan Kangas [Fri, 3 Dec 2021 15:55:27 +0000 (16:55 +0100)]
emacs-lisp-mode: Use error face for "/d" indicator
* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Use 'error' face for
the dynamic scoping ("/d") indicator in the mode line to make it stand
out more.
Stefan Kangas [Fri, 3 Dec 2021 15:42:24 +0000 (16:42 +0100)]
Don't support obsolete sregex syntax in re-builder
* lisp/emacs-lisp/re-builder.el (reb-lisp-mode)
(reb-lisp-syntax-p, reb-change-syntax, reb-cook-regexp): Remove final
remaining references to the long obsolete sregex syntax.
Stefan Kangas [Fri, 3 Dec 2021 14:57:56 +0000 (15:57 +0100)]
; FAQ: Normalize references to the NEWS.NN file
* doc/misc/efaq.texi (New in Emacs 26, New in Emacs 25)
(New in Emacs 24, New in Emacs 23, New in Emacs 22)
(New in Emacs 21, New in Emacs 20): Normalize the format for
referring to the NEWS.NN file.
Stefan Kangas [Fri, 3 Dec 2021 14:13:32 +0000 (15:13 +0100)]
image-mode: Advertize viewing as text less eagerly
* lisp/image-mode.el (image-text-based-formats): New defcustom.
(image-mode--setup-mode): Don't show message to show image as text
unless it is a text based image format. Don't mention key binding
for editing as hex. (Bug#51961)
(image-mode-as-text): Don't mention key binding for editing as hex.
(image-mode-as-hex): Minor cleanup.
Michael Albinus [Fri, 3 Dec 2021 13:24:43 +0000 (14:24 +0100)]
Adapt directory summary line handling in Tramp
* lisp/net/tramp-sh.el (tramp-sh-handle-insert-directory):
* lisp/net/tramp-smb.el (tramp-smb-handle-insert-directory):
Do not add or modify summary line when `dired-free-space' is bound.
Po Lu [Fri, 3 Dec 2021 05:55:39 +0000 (13:55 +0800)]
Improve velocity calculation in momentum scrolling
* lisp/pixel-scroll.el
(pixel-scroll-precision-momentum-factor): Remove option.
(pixel-scroll-precision-initial-velocity-factor)
(pixel-scroll-precision-momentum-min-velocity): New user
options.
(pixel-scroll-accumulate-velocity): Clear velocity ring
if sign is different.
(pixel-scroll-calculate-velocity): Use current time.
(pixel-scroll-start-momentum): Use better algorithm.
Stefan Kangas [Fri, 3 Dec 2021 05:30:26 +0000 (06:30 +0100)]
Merge from origin/emacs-28
9c222b9c1a Port to C compilers that lack size-0 arrays fed35a8951 Port emacsclient to Solaris 10 f35d6a9c73 * CONTRIBUTE: Improve commit message instructions e0ee1d003a Work around IBM XL C compiler bug 6b99b6eb8b * admin/make-tarball.txt: Various clarifications. bbf4140091 * admin/diff-tar-files: Don't assume .tar.gz. 0a50ad11db * lisp/tab-bar.el (tab-bar-close-other-tabs): Fix regression.
Paul Eggert [Fri, 3 Dec 2021 03:01:33 +0000 (19:01 -0800)]
Port to C compilers that lack size-0 arrays
The C standard does not allow size-zero arrays, so redo struct
Lisp_Subr to not use size-zero arrays when native compilation is
not being used. Formerly, the code was using size-zero arrays (a
GNU C extension) to avoid using memory unnecessarily when
HAVE_NATIVE_COMP is not defined. Replace this hack with the
more-traditional hack of putting the relevant members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/alloc.c (cleanup_vector, mark_object):
* src/comp.c (make_subr):
* src/data.c (Fsubr_native_lambda_list, Fsubr_native_comp_unit):
* src/eval.c (init_eval_once, funcall_lambda):
* src/lisp.h (SUBR_NATIVE_COMPILEDP, SUBR_NATIVE_COMPILED_DYNP)
(SUBR_TYPE):
* src/lread.c (Fload):
Conditionally compile with ‘#ifdef HAVE_NATIVE_COMP’ instead of
with ‘if (NATIVE_COMP_FLAG)’. Redo members like native_comp_u[0]
to be plain native_comp_u. Put all uses of these members inside
‘#ifdef HAVE_NATIVE_COMP’.
* src/lisp.h (struct Lisp_Subr): Members native_comp_u,
native_c_name, lambda_list, type are now all ifdeffed out if
HAVE_NATIVE_COMP is not defined, instead of being size-zero
arrays. All uses changed.
* src/pdumper.c (dump_subr, dump_cold_native_subr)
(dump_do_dump_relocation):
* src/comp.h (NATIVE_COMP_FLAG): Remove; no longer needed.
Paul Eggert [Fri, 3 Dec 2021 02:43:43 +0000 (18:43 -0800)]
Port emacsclient to Solaris 10
Without this patch, the build fails on Solaris 10 with the diagnostic
“Undefined symbol acl_trivial first referenced in file
../lib/libgnu.a(file-has-acl.o)”.
* lib-src/Makefile.in (LIB_HAS_ACL): New macro.
(emacsclient${EXEEXT}): Link with $(LIB_HAS_ACL).