Paul Eggert [Mon, 6 Dec 2021 07:00:10 +0000 (23:00 -0800)]
Fix minor clock skew issues
* lisp/midnight.el (clean-buffer-list):
* lisp/progmodes/vhdl-mode.el (vhdl-template-replace-header-keywords):
* lisp/net/rcirc.el (rcirc-connect):
Don’t assume that getting the current time twice in rapid
succession will yield the same date and time.
Paul Eggert [Mon, 6 Dec 2021 03:30:27 +0000 (19:30 -0800)]
Fix image load timekeeping bug
* lisp/image.el (image-animate-timeout): Fix bug that caused the
local variable time-to-load-image to be practically zero, instead
of the time it actually took to load the image. I think
this bug was introduced in 2013-02-16T03:29:30Z!rgm@gnu.org.
Paul Eggert [Mon, 6 Dec 2021 03:11:59 +0000 (19:11 -0800)]
Use time-convert in with-decoded-time-value
* lisp/calendar/time-date.el (with-decoded-time-value):
Prefer time-convert to current-time on the off chance that code
will use this obsolete macro even after current-time returns pairs.
Paul Eggert [Mon, 6 Dec 2021 02:39:28 +0000 (18:39 -0800)]
Simplify message-make-expires
* lisp/gnus/message.el (message-make-expires):
Use time-add instead of doing it by hand. This also calculates the
expiration time more accurately than the old code did.
Paul Eggert [Mon, 6 Dec 2021 02:35:27 +0000 (18:35 -0800)]
Simplify message-unique-id etc.
* lisp/gnus/message.el (message-unique-id):
* lisp/net/sasl.el (sasl-unique-id-function):
Avoid unnecessary consing and reliance on internal timestamp
format by using (time-convert nil 'integer) which typically does
no consing, instead of using (current-time) and then ignoring
the subsecond parts of the generated list.
Paul Eggert [Mon, 6 Dec 2021 01:58:11 +0000 (17:58 -0800)]
Simplify cedet-utest-elapsed-time
* test/manual/cedet/cedet-utests.el (cedet-utest-elapsed-time):
Copy newer (circa-2011) implementation from elp.el, so that the
code matches its documentation again.
Paul Eggert [Mon, 6 Dec 2021 01:44:02 +0000 (17:44 -0800)]
Use time-equal-p to compare timestamps in tests
* test/lisp/calendar/time-date-tests.el (test-days-to-time)
(test-time-since): Use time-equal-p to compare timestamps,
since the default form shouldn’t matter.
* lisp/dired-aux.el
(dired-create-destination-dirs-on-trailing-dirsep): New customization
option.
(dired-do-create-files): Use it.
(dired-create-destination-dirs): Mention the new option in the
docstring.
Stefan Kangas [Mon, 6 Dec 2021 05:47:44 +0000 (06:47 +0100)]
Merge from origin/emacs-28
e3427faf55 Fix typos and improve consistency in ERC manual 0bf10d5082 * test/Makefile.in (check-declare): Add missing --batch. 34f5656137 Document the subtleties of the 'cursor' text property
Make the Git stash commands available in vc-dir Git buffers
* lisp/vc/vc-dir.el (vc-dir): Call the backend-specific minor mode
if it exists.
* lisp/vc/vc-git.el (vc-dir-git-mode-map): New map.
(vc-dir-git-mode): New minor mode.
Stefan Monnier [Mon, 6 Dec 2021 02:07:58 +0000 (21:07 -0500)]
EIEIO: Remove redundant type info in help
`C-h o` returned redundant info when used on EIEIO classes, listing
the same thing both for the type name and for the constructor name.
* lisp/emacs-lisp/eieio.el (help-fns-describe-function-functions):
Remove special case for defclass constructors.
* lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Declare it obsolete.
Don't fill byte-compilation warnings in batch mode
* lisp/emacs-lisp/warnings.el (display-warning): Don't break up
byte-compilation into several lines when in batch mode, because
that makes it difficult for some tools to parse them (bug#52281).
Stefan Kangas [Sun, 5 Dec 2021 18:09:48 +0000 (19:09 +0100)]
Remove no-op calls to decode-char with 'ucs' arg
* lisp/gnus/mm-util.el (mm-ucs-to-char):
* lisp/language/hanja-util.el (hangul-to-hanja-char):
* lisp/leim/quail/hangul.el (hangul3-input-method-internal)
(hangul390-input-method-internal):
* lisp/nxml/rng-cmpct.el (rng-c-process-escapes):
* lisp/nxml/xsd-regexp.el (xsdre-compile-single-char)
(xsdre-range-list-to-char-alternative):
* lisp/xml.el (xml-parse-string, xml--entity-replacement-text)
(xml-substitute-special): Remove calls to decode-char where first
argument is 'ucs'; that is now a no-op. Discussed in Bug#52263.
* lisp/nxml/xmltok.el (xmltok-unicode-to-char): Make into obsolete
function alias for 'identity'. Update single caller.
Eric Abrahamsen [Sat, 4 Dec 2021 20:37:14 +0000 (12:37 -0800)]
Use gnus-error to report mail-source failures
* lisp/gnus/mail-source.el (mail-source-fetch): Instead of querying
the user on mail sources errors -- in effect asking "do you want to
continue, or halt the process?" -- log the error with `gnus-error',
severity 5. The query didn't provide any meaningful control; error
reporting is all that's needed.
(mail-source-ignore-errors): Obsolete this option; users can see the
error or not by configuring `gnus-verbose'.
* doc/misc/gnus.texi (Mail Source Customization): Remove mention of
the above option from the manual.
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).