]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoCEDET: Try and (re)fix bug#56902, in a better way
Stefan Monnier [Wed, 3 Aug 2022 08:50:54 +0000 (04:50 -0400)]
CEDET: Try and (re)fix bug#56902, in a better way

* lisp/cedet/semantic/complete.el (semantic-displayer-abstract):
Move definition before first use (in `semantic-displayer-focus-abstract`).

2 years agoRevert "; Fix last change (bug#56902)"
Stefan Monnier [Wed, 3 Aug 2022 08:48:01 +0000 (04:48 -0400)]
Revert "; Fix last change (bug#56902)"

This reverts commit 99bbc1fa23c3a54f1cbd2c56c57773dd471b3ef3.

2 years agoRemove some XEmacs compat code from url-util.el
Stefan Kangas [Wed, 3 Aug 2022 08:06:39 +0000 (10:06 +0200)]
Remove some XEmacs compat code from url-util.el

These functions only exist in the XEmacs GTK support.
* lisp/url/url-util.el (url-display-percentage): Remove XEmacs
compat code.

2 years agoMake url-util space trimming functions obsolete
Stefan Kangas [Wed, 3 Aug 2022 08:00:34 +0000 (10:00 +0200)]
Make url-util space trimming functions obsolete

* lisp/url/url-util.el (url-eat-trailing-space)
(url-strip-leading-spaces): Make obsolete in favor of
'string-trim'.  Update caller.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Wed, 3 Aug 2022 07:50:35 +0000 (09:50 +0200)]
Merge from origin/emacs-28

f23d456039 * lisp/term.el: Doc fix; don't mention rlogin.
f522d2d90b ; * admin/make-tarball.txt: Minor tweaks.

2 years agoImprove X server time computation
Po Lu [Wed, 3 Aug 2022 07:13:14 +0000 (15:13 +0800)]
Improve X server time computation

* src/xterm.c (x_sync_get_monotonic_time): Use that if
available.
(x_display_set_last_user_time): Compute an offset between the
monotonic time and the X server time if they are not identical.
* src/xterm.h (struct x_display_info): New field
`server_time_offset'.

2 years ago; Fix last change (bug#56902)
Gerd Möllmann [Wed, 3 Aug 2022 06:46:52 +0000 (08:46 +0200)]
; Fix last change (bug#56902)

* lisp/cedet/semantic/complete.el (semantic-displayer-focus-abstract):
Define after base class has been defined.

2 years agoPrevent GC threshold from exceeding fixnum limit during precision scrolling
Po Lu [Wed, 3 Aug 2022 03:42:22 +0000 (11:42 +0800)]
Prevent GC threshold from exceeding fixnum limit during precision scrolling

* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Prevent GC
threshold from exceeding most-positive-fixnum.

2 years agoAdd preparations for animation frame timing support
Po Lu [Wed, 3 Aug 2022 03:38:27 +0000 (11:38 +0800)]
Add preparations for animation frame timing support

* src/xterm.c (x_sync_get_monotonic_time)
(x_sync_current_monotonic_time, x_sync_note_frame_times): New
functions.
(x_sync_wait_for_frame_drawn_event, x_sync_update_begin)
(x_sync_handle_frame_drawn): Note frame times.
(x_display_set_last_user_time): Check if the X server time is
probably the same as CLOCK_MONOTONIC.

* src/xterm.h (struct x_display_info, struct x_output): New
fields and flags for clock handling and frame times.

2 years agoFix window iconification, raising and lowering frames, etc
Po Lu [Wed, 3 Aug 2022 01:28:44 +0000 (09:28 +0800)]
Fix window iconification, raising and lowering frames, etc

* src/xterm.c (XFlush): Remove define to 0.
(x_clear_frame, x_scroll_run, x_draw_window_cursor)
(x_free_frame_resources): Remove calls to XFlush where it is not
really necessary.  Leave the calls that actually are intact.

2 years agoAvoid cl-cXXXr compat aliases
Stefan Kangas [Tue, 2 Aug 2022 23:40:32 +0000 (01:40 +0200)]
Avoid cl-cXXXr compat aliases

* lisp/emacs-lisp/cl-lib.el (cl-third, cl-fourth):
* lisp/emacs-lisp/cl-macs.el (cl--do-&aux, cl--do-arglist)
(cl--parse-loop-clause, cl--loop-let, cl--loop-build-ands)
(cl--do-proclaim, cl-defstruct): Prefer using cXXXr functions
directly, instead of cl-cXXXr prefixed compat aliases.

2 years ago* doc/misc/vtable.texi (Commands): Fix typo. (Bug#56899)
Stefan Kangas [Tue, 2 Aug 2022 23:20:51 +0000 (01:20 +0200)]
* doc/misc/vtable.texi (Commands): Fix typo.  (Bug#56899)

2 years agoPrefer defvar-keymap in footnote.el
Stefan Kangas [Tue, 2 Aug 2022 22:48:07 +0000 (00:48 +0200)]
Prefer defvar-keymap in footnote.el

* lisp/mail/footnote.el (footnote-mode-map)
(footnote-minor-mode-map): Prefer defvar-keymap.

2 years agoObsolete unused variable footnote-use-message-mode
Stefan Kangas [Tue, 2 Aug 2022 22:37:24 +0000 (00:37 +0200)]
Obsolete unused variable footnote-use-message-mode

* lisp/mail/footnote.el (footnote-use-message-mode): Make
obsolete.

2 years ago; Fix system-info in url-privacy.el
Eli Zaretskii [Tue, 2 Aug 2022 17:27:46 +0000 (20:27 +0300)]
; Fix system-info in url-privacy.el

* lisp/url/url-privacy.el (url-setup-privacy-info): Fix MS-Windows
configurations.

2 years agoImprove sendmail-program doc string
Lars Ingebrigtsen [Tue, 2 Aug 2022 10:44:06 +0000 (12:44 +0200)]
Improve sendmail-program doc string

* lisp/mail/sendmail.el (sendmail-program): Document that the
program shouldn't output text (bug#56855).

2 years ago* src/xdisp.c (redisplay_window): Use BEG rather than hard coding 1
Stefan Monnier [Tue, 2 Aug 2022 14:38:53 +0000 (10:38 -0400)]
* src/xdisp.c (redisplay_window): Use BEG rather than hard coding 1

2 years agoCEDET: Remove left-over uses of obsolete <class>-child-p predicates
Stefan Monnier [Tue, 2 Aug 2022 14:22:00 +0000 (10:22 -0400)]
CEDET: Remove left-over uses of obsolete <class>-child-p predicates

Those predicates were still sometimes used in a few places, notably via
`:type ... <class>-child` which was never technically correct.

* lisp/cedet/ede/config.el (ede-extra-config, ede-project-with-config):
* lisp/cedet/ede/base.el (ede-project-placeholder): Avoid pseudo-type
`<class>-child`.

* lisp/cedet/semantic/complete.el (semantic-displayer-focus-abstract):
Move before use of `cl-typep` on it.
(semantic-complete-current-match):
* lisp/cedet/ede/speedbar.el (ede-speedbar-menu): Use `cl-typep`
instead of `<class>-child-p`.

* lisp/cedet/semantic/db.el (semanticdb-get-buffer):
Use `cl-defgeneric` for the main/default definition.
(semantic-tag-parent-buffer): Add method.

* lisp/cedet/semantic/tag-file.el (semantic-tag-parent-buffer):
New generic function extracted from `semantic-go-to-tag`.
This allows us to keep the semanticdb-table part in semantic/db and
thus break a cyclic dependency.
(semantic-go-to-tag): Use it.
Demote to a plain `defun` since it's not overloaded anywhere.

* lisp/cedet/semantic/util.el (semanticdb-abstract-table-child-p):
Remove unused declaration.

* lisp/cedet/srecode/compile.el (srecode-template-inserter-newline-child-p):
Remove unused declaration.
(srecord-compile-inserter-newline-p): New generic function, so we can
move the `srecode-template-inserter-newline` case to `srecode/insert.el`,
to avoid a cyclic dependency.

* lisp/cedet/srecode/insert.el (srecord-compile-inserter-newline-p):
New method.

2 years ago; * lisp/url/url-privacy.el (url-setup-privacy-info): Simplify.
Stefan Kangas [Tue, 2 Aug 2022 16:49:17 +0000 (18:49 +0200)]
; * lisp/url/url-privacy.el (url-setup-privacy-info): Simplify.

2 years agoDelete obsolete variable nntp-authinfo-file
Stefan Kangas [Sat, 16 Jul 2022 07:54:59 +0000 (09:54 +0200)]
Delete obsolete variable nntp-authinfo-file

* lisp/gnus/nntp.el (nntp-authinfo-file): Delete variable obsolete
since 24.1.

2 years ago* lisp/textmodes/sgml-mode.el (html-tag-alist): Add https.
Stefan Kangas [Tue, 2 Aug 2022 15:11:29 +0000 (17:11 +0200)]
* lisp/textmodes/sgml-mode.el (html-tag-alist): Add https.

2 years ago* lisp/term.el: Doc fix; don't mention rlogin.
Stefan Kangas [Tue, 2 Aug 2022 15:18:22 +0000 (17:18 +0200)]
* lisp/term.el: Doc fix; don't mention rlogin.

2 years ago; Clarify documentation of "locked narrowing"
Eli Zaretskii [Tue, 2 Aug 2022 13:24:00 +0000 (16:24 +0300)]
; Clarify documentation of "locked narrowing"

* src/editfns.c (Fwiden, Fnarrow_to_region):
* doc/lispref/positions.texi (Narrowing): Explain when
'narrow-to-region' and 'widen' might have no effect.

2 years agoSignal error on duplicate key definitions
Robert Pluim [Tue, 2 Aug 2022 12:22:32 +0000 (14:22 +0200)]
Signal error on duplicate key definitions

* lisp/keymap.el (define-keymap, defvar-keymap): Signal error if the
same key is specified twice.  (Bug#56873)

* doc/lispref/keymaps.texi (Creating Keymaps): Document error
signaling behaviour.

* test/src/keymap-tests.el (keymap-test-duplicate-definitions): Test
duplicate definition detection.

2 years agoRemove duplicate key definitions from keymaps
Robert Pluim [Tue, 2 Aug 2022 12:20:42 +0000 (14:20 +0200)]
Remove duplicate key definitions from keymaps

* lisp/gnus/gnus-srvr.el (gnus-browse-mode-map): Remove binding for
'gnus-browse-prev-map'.
* lisp/gnus/gnus-sum.el (gnus-summary-mode-map): Remove
'gnus-summary-down-thread' binding, and by symmetry
'gnus-summary-up-thread' (it's still available on "T-u").
* lisp/ibuffer.el (ibuffer-mode-map): Remove binding for
'ibuffer-mark-for-delete'.
* lisp/wdired.el (wdired-perm-mode-map): Remove duplicate binding of
"s" to 'wdired-set-bit'.

* etc/NEWS: Announce 'gnus-summary-up-thread' change.

2 years agourl-about: Ignore missing directories in load-path
Stefan Kangas [Tue, 2 Aug 2022 12:00:50 +0000 (14:00 +0200)]
url-about: Ignore missing directories in load-path

* lisp/url/url-about.el (url-probe-protocols): Ignore missing
directories in load-path.

2 years ago; * admin/make-tarball.txt: Minor tweaks.
Stefan Kangas [Tue, 2 Aug 2022 11:45:13 +0000 (13:45 +0200)]
; * admin/make-tarball.txt: Minor tweaks.

2 years agoFix find-dired over tramp
Lars Ingebrigtsen [Tue, 2 Aug 2022 10:33:44 +0000 (12:33 +0200)]
Fix find-dired over tramp

* lisp/find-dired.el (find-dired-with-command): Set the
filter/sentinel immediately -- scheduling may make process output
(and exit) happen before these are set otherwise (bug#56865).
(find-dired-sort-by-filename): Don't bug out on error messages
from find.

2 years agoDelete function alias x-selection obsolete since 23.3
Stefan Kangas [Tue, 2 Aug 2022 09:55:16 +0000 (11:55 +0200)]
Delete function alias x-selection obsolete since 23.3

* lisp/select.el (x-selection): Delete function alias obsolete since
23.3.

2 years ago* lisp/mail/binhex.el: Improve commentary.
Stefan Kangas [Tue, 2 Aug 2022 09:39:56 +0000 (11:39 +0200)]
* lisp/mail/binhex.el: Improve commentary.

2 years agoConsider built-in packages to be installed
Matt Armstrong [Tue, 2 Aug 2022 10:14:09 +0000 (12:14 +0200)]
Consider built-in packages to be installed

* lisp/emacs-lisp/package.el (package-installed-p): Check for built-in
packages before initialization. (bug#56877).

2 years agoDon't disable eldoc when doing edebug
Lars Ingebrigtsen [Tue, 2 Aug 2022 09:56:55 +0000 (11:56 +0200)]
Don't disable eldoc when doing edebug

* lisp/emacs-lisp/eldoc.el
(eldoc-display-message-no-interference-p): Don't disable eldoc
when edebugging (bug#56459).  There should be no interference in
that case, because edebug messaging is done after stepping, and
eldoc messaging is done after other movements.

2 years agoFix url-dired obsoletion warning
Lars Ingebrigtsen [Tue, 2 Aug 2022 09:19:59 +0000 (11:19 +0200)]
Fix url-dired obsoletion warning

* lisp/url/url-file.el (url-file): Don't use obsolete url-dired
function.

2 years ago; * lisp/textmodes/texinfo.el: Remove stale comment.
Stefan Kangas [Tue, 2 Aug 2022 09:00:18 +0000 (11:00 +0200)]
; * lisp/textmodes/texinfo.el: Remove stale comment.

2 years agoMake url-dired.el obsolete (part 2/2)
Stefan Kangas [Mon, 1 Aug 2022 09:35:55 +0000 (11:35 +0200)]
Make url-dired.el obsolete (part 2/2)

* lisp/obsolete/url-dired.el: Add "Obsolete-since" header.
(url-dired-minor-mode-map): Minor fix.
* lisp/url/url-file.el (url-dired): Don't require.
* etc/NEWS: Announce its obsoletion.

2 years agoMake url-dired.el obsolete (part 1/2)
Stefan Kangas [Mon, 1 Aug 2022 09:32:37 +0000 (11:32 +0200)]
Make url-dired.el obsolete (part 1/2)

It doesn't have any real effect since 2007.
Ref: https://lists.gnu.org/r/emacs-devel/2022-07/msg01156.html

* lisp/url/url-dired.el: Move from here...
* lisp/obsolete/url-dired.el: ...to here.

2 years agoMake gnus-url-unhex into alias for url-unhex
Stefan Kangas [Mon, 1 Aug 2022 23:17:05 +0000 (01:17 +0200)]
Make gnus-url-unhex into alias for url-unhex

* lisp/gnus/gnus-util.el (gnus-url-unhex): Make into obsolete function
alias for url-unhex; they are identical.  Update callers.

2 years agoAdd tests for url-{hexify,unhex}-string
Stefan Kangas [Mon, 1 Aug 2022 23:12:19 +0000 (01:12 +0200)]
Add tests for url-{hexify,unhex}-string

* test/lisp/url/url-util-tests.el (url-unhex-string-tests)
(url-hexify-string-tests): New tests.

2 years agoRemove extraneous defvars from edmacro.el
Stefan Kangas [Mon, 1 Aug 2022 20:29:53 +0000 (22:29 +0200)]
Remove extraneous defvars from edmacro.el

* lisp/edmacro.el (edmacro-fix-menu-commands): Remove extraneous
defvars; they are already declared above.

2 years agoFurther reduce monitor change event duplication
Po Lu [Tue, 2 Aug 2022 07:15:03 +0000 (15:15 +0800)]
Further reduce monitor change event duplication

* src/xterm.c (handle_one_xevent): Also don't store duplicate
events for ConfigureNotify events bound for the root window.

2 years ago; * etc/emacs_lldb.py: Don't print '->' in type summary
Gerd Möllmann [Tue, 2 Aug 2022 07:12:47 +0000 (09:12 +0200)]
; * etc/emacs_lldb.py: Don't print '->' in type summary

2 years agoMerge from origin/emacs-28
Stefan Kangas [Tue, 2 Aug 2022 04:30:28 +0000 (06:30 +0200)]
Merge from origin/emacs-28

e6af4968f9 ; Update ChangeLog and AUTHORS

2 years agoAvoid extra consing on monitor configuration change
Po Lu [Tue, 2 Aug 2022 01:41:02 +0000 (09:41 +0800)]
Avoid extra consing on monitor configuration change

* src/xterm.c (x_find_monitors_changed_event): New function.
(x_monitors_changed_cb, handle_one_xevent): Look through the
entire event queue to skip delivering monitor change events.

2 years agoFix compilation warning in spam.el
Lars Ingebrigtsen [Mon, 1 Aug 2022 19:22:57 +0000 (21:22 +0200)]
Fix compilation warning in spam.el

* lisp/gnus/spam.el (spam-check-blackholes): Adjust now that
query-dig is obsolete.

2 years agoWrap around the search on typing a letter (bug#56535)
Juri Linkov [Mon, 1 Aug 2022 19:19:01 +0000 (22:19 +0300)]
Wrap around the search on typing a letter (bug#56535)

* doc/emacs/search.texi (Repeat Isearch): Improve values no/no-ding.

* lisp/isearch.el (isearch-search-and-update): Try to repeat the search
on an error when isearch-wrap-pause is no/no-ding.

2 years agoFix the bytecode incompatibility due to the change to 'narrow-to-region'.
Gregory Heytings [Mon, 1 Aug 2022 19:11:01 +0000 (19:11 +0000)]
Fix the bytecode incompatibility due to the change to 'narrow-to-region'.

* src/editfns.c (narrow_to_region_internal): New function, which
contains the body previously in 'Fnarrow_to_region' but accepts
a third argument.
(Fnarrow_to_region): Use the new function. Update the docstring.
(Fwiden): Update the docstring.

* src/lisp.h: Prototype of the new function.

* src/xdisp.c (handle_fontified_prop): Use the new function instead
of 'Fnarrow_to_region'.

* src/process.c (Finternal_default_process_filter):
* src/lread.c (readevalloop): Remove the third argument to
'Fnarrow_to_region'.

* src/bytecode.c (exec_byte_code):
* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst):
* lisp/emacs-lisp/bytecomp.el: Restore the statu quo ante.

* etc/NEWS: Remove the entry about the new optional argument.

* doc/lispref/positions.texi (Narrowing): Update the documentation.

2 years agoDon't bind non-existent command in picture-mode-map
Stefan Kangas [Mon, 1 Aug 2022 17:46:23 +0000 (19:46 +0200)]
Don't bind non-existent command in picture-mode-map

* lisp/textmodes/picture.el (picture-mode-map): Remove ineffectual
binding of non-existent command.

2 years ago* src/eval.c (Fdefvaralias): Clarify error messages. (Bug#56863)
Eli Zaretskii [Mon, 1 Aug 2022 17:01:51 +0000 (20:01 +0300)]
* src/eval.c (Fdefvaralias): Clarify error messages.  (Bug#56863)

2 years agoPrefer command remapping to substitute-key-definition
Stefan Kangas [Mon, 1 Aug 2022 16:15:51 +0000 (18:15 +0200)]
Prefer command remapping to substitute-key-definition

* lisp/textmodes/reftex-index.el (reftex-index-mode-map):
* lisp/textmodes/reftex-sel.el (reftex-select-shared-map):
* lisp/textmodes/reftex-toc.el (reftex-toc-mode-map): Prefer command
remapping to 'substitute-key-definition'.

2 years ago; Update ChangeLog and AUTHORS emacs-28.1.91
Stefan Kangas [Mon, 1 Aug 2022 16:13:13 +0000 (18:13 +0200)]
; Update ChangeLog and AUTHORS

* ChangeLog.3:
* etc/AUTHORS: Update.

2 years agoFix loaddefs quirk w.r.t. pinyin-convert
Lars Ingebrigtsen [Mon, 1 Aug 2022 12:28:05 +0000 (14:28 +0200)]
Fix loaddefs quirk w.r.t. pinyin-convert

* lisp/international/titdic-cnv.el (pinyin-convert): Use
`generate-lisp-file' for the file.  This avoids having it scanned
by loaddefs-gen, which will trigger re-compilation of Emacs since
pinyin.el is generated after Emacs is built.

2 years ago* lisp/net/dig.el: Improve Commentary.
Stefan Kangas [Mon, 1 Aug 2022 11:13:25 +0000 (13:13 +0200)]
* lisp/net/dig.el: Improve Commentary.

2 years agoDoc fix in eudc-hotlist.el
Stefan Kangas [Mon, 1 Aug 2022 10:14:57 +0000 (12:14 +0200)]
Doc fix in eudc-hotlist.el

* lisp/net/eudc-hotlist.el (eudc-hotlist-mode): Doc fix; use command
substitution.

2 years agoFix namespacing issue in dig.el
Stefan Kangas [Mon, 1 Aug 2022 10:10:43 +0000 (12:10 +0200)]
Fix namespacing issue in dig.el

* lisp/net/dig.el (dig-query): Rename from 'query-dig'.
(query-dig): Make into obsolete function alias for 'dig-query'.

2 years agoImprove handling of xsettings events
Po Lu [Mon, 1 Aug 2022 11:00:48 +0000 (19:00 +0800)]
Improve handling of xsettings events

* src/xsettings.c (xft_settings_event):
* src/xsettings.h: Return if the event was handled.
* src/xterm.c (handle_one_xevent): If it was, don't handle the
event any further.

2 years ago; * lisp/net/net-utils.el: Delete code commented out since 2000.
Stefan Kangas [Mon, 1 Aug 2022 09:52:32 +0000 (11:52 +0200)]
; * lisp/net/net-utils.el: Delete code commented out since 2000.

Note also that the netstat command is officially deprecated.

2 years agoImprove GCC pacification in xterm.c
Paul Eggert [Mon, 1 Aug 2022 07:38:34 +0000 (00:38 -0700)]
Improve GCC pacification in xterm.c

* src/xterm.c (x_dnd_free_toplevels, x_composite_image):
Use UNINIT for initialization needed only to pacify GCC.
(x_dnd_free_toplevels): Add an eassume to pacify GCC 12.1 x86-64
-Wanalyzer-null-dereference.

2022-07-31  Paul Eggert  <eggert@cs.ucla.edu>

2 years agoFix time comparison in primitive-undo
Paul Eggert [Mon, 1 Aug 2022 07:38:34 +0000 (00:38 -0700)]
Fix time comparison in primitive-undo

* lisp/simple.el (primitive-undo): Fix time comparison.
The old code was a circa-2013 mistranslation of what used to be in
src/undo.c’s Fprimitive_undo.

2 years agoUse list-form timestamps in .nnmh-articles
Paul Eggert [Mon, 1 Aug 2022 07:38:34 +0000 (00:38 -0700)]
Use list-form timestamps in .nnmh-articles

* lisp/gnus/nnmh.el (nnmh-update-gnus-unreads): Store list form
timestamps into .nnmh-articles, even if current-time-list is nil.
That way, older Emacs versions can read them.

2 years agoPrefer ‘time-equal-p’ to ‘equal’ on timestamps
Paul Eggert [Mon, 1 Aug 2022 07:38:34 +0000 (00:38 -0700)]
Prefer ‘time-equal-p’ to ‘equal’ on timestamps

This is more robust since timestamps can have multiple forms.
* lisp/auth-source.el (auth-source-netrc-parse):
* lisp/bookmark.el (bookmark--watch-file-already-queried-p)
(bookmark-maybe-load-default-file):
* lisp/cedet/semantic/db.el (semanticdb-needs-refresh-p):
* lisp/dired.el (dired-directory-changed-p):
* lisp/files.el (dir-locals-find-file):
* lisp/gnus/gnus-util.el (gnus-cache-file-contents):
* lisp/gnus/nneething.el (nneething-create-mapping):
* lisp/gnus/nnfolder.el (nnfolder-read-folder):
* lisp/gnus/nnmaildir.el (nnmaildir--update-nov)
(nnmaildir--scan, nnmaildir-request-scan)
(nnmaildir-request-update-info):
* lisp/gnus/nnmh.el (nnmh-update-gnus-unreads):
* lisp/gnus/spam-stat.el (spam-stat-load):
* lisp/mail/mailabbrev.el (mail-abbrevs-sync-aliases):
* lisp/mail/sendmail.el (sendmail-sync-aliases):
* lisp/net/netrc.el (netrc-parse):
* lisp/nxml/rng-loc.el (rng-get-parsed-schema-locating-file):
* lisp/play/cookie1.el (cookie-snarf):
* lisp/vc/vc-cvs.el (vc-cvs-state-heuristic):
* lisp/vc/vc-hg.el (vc-hg--ignore-patterns-valid-p)
(vc-hg--cached-dirstate-search):
* lisp/vc/vc-hooks.el (vc-after-save):
Prefer ‘time-equal-p’ to ‘equal’ when comparing
timestamps for equality.

2 years agoSimplify a few timestamps
Paul Eggert [Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)]
Simplify a few timestamps

* lisp/calendar/time-date.el (safe-date-to-time):
* lisp/calendar/timeclock.el (timeclock-generate-report):
* lisp/epg.el (epg--start):
* lisp/gnus/gnus-demon.el (gnus-demon-nntp-close-connection):
* lisp/gnus/gnus-util.el (gnus-date-get-time):
* lisp/gnus/nnheader.el (nnheader-last-message-time):
* lisp/gnus/nnrss.el (nnrss-request-expire-articles):
* lisp/vc/ediff-util.el (ediff-command-begin-time)
(ediff-calc-command-time, ediff-profile):
Prefer an integer like 0 to a timestamp list like (0 0)
where either will do.

2 years agoOmit some (current-time) calls
Paul Eggert [Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)]
Omit some (current-time) calls

* lisp/emacs-lisp/ert.el (ert-write-junit-test-summary-report):
* lisp/emacs-lisp/shortdoc.el (file):
* lisp/find-lisp.el (find-lisp-find-dired-insert-file):
* lisp/progmodes/hideif.el (hide-ifdefs):
* lisp/tar-mode.el (tar-subfile-save-buffer):
Prefer nil or omitted arg to (current-time) where this is better
or more-efficient.

2 years ago* lisp/vc/vc.el: Remove stray comment hyphen.
Paul Eggert [Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)]
* lisp/vc/vc.el: Remove stray comment hyphen.

2 years agoFix "cons up a storm" issue in type-break
Paul Eggert [Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)]
Fix "cons up a storm" issue in type-break

* lisp/type-break.el (type-break-time-last-command)
(type-break-mode, type-break, type-break-check)
(type-break-time-sum, type-break-keystroke-reset):
Use integer timestamps; that’s good enough for this module.

2 years agoFix year-285428751 bug in hanoi-unix-64
Paul Eggert [Mon, 1 Aug 2022 07:38:33 +0000 (00:38 -0700)]
Fix year-285428751 bug in hanoi-unix-64

* lisp/play/hanoi.el (hanoi-move-period, hanoi, hanoi-unix)
(hanoi-unix-64): Use integers, not floating point, to avoid
rounding errors for timestamps greater than 2**53.

2 years ago* src/timefns.c (Ffloat_time): Fix doc string.
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
* src/timefns.c (Ffloat_time): Fix doc string.

2 years agoImprove time-equal-p etc. performance
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
Improve time-equal-p etc. performance

* src/timefns.c (time_cmp): Return EMACS_INT, not int; no need to
change callers.  Compare (X . Z) to (Y . Z) quickly if X and Y are
fixnums.

2 years agoImprove float-time etc. performance
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
Improve float-time etc. performance

* src/timefns.c (decode_float_time): Assume T is finite.
All callers changed.
(decode_time_components): Assume FORM is not TIMEFORM_FLOAT.
All callers changed.
(decode_lisp_time): If the specified time is a float,
signal an error if it is not finite.
(Ffloat_time): If the specified time is a float,
simply return it.

2 years agoMake time arithmetic more like comparison
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
Make time arithmetic more like comparison

Since time comparison says X == X, have time arithmetic behave
similarly for X - X.  This should also be a bit faster due to not
having to test for floats and NaNs.
* src/timefns.c (time_arith, time_cmp):
Simplify by not worrying about NaNs, which are not time values.
(time_arith): Simplify by not worrying about subtracting nil from
nil; the caller now handles this.
(Ftime_subtract): Handle subtracting X from X specially.

2 years agoFix get-internal-runtime precision
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
Fix get-internal-runtime precision

* src/sysdep.c (make_lisp_s_us): Also define if HAVE_GETRUSAGE.
(Fget_internal_run_time): Don’t generate more precision than the
underlying primitives.

2 years ago(time-equal-p nil X) returns nil
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
(time-equal-p nil X) returns nil

* src/timefns.c (Ftime_equal_p): nil compares unequal to non-nil.

2 years agoTune blv_found
Paul Eggert [Mon, 1 Aug 2022 07:38:32 +0000 (00:38 -0700)]
Tune blv_found

* src/lisp.h (blv_found): Prefer BASE_EQ to EQ where either will do.

2 years ago; * nextstep/Makefile.in: Fix last change (bug#56853).
Gerd Möllmann [Mon, 1 Aug 2022 07:48:39 +0000 (09:48 +0200)]
; * nextstep/Makefile.in: Fix last change (bug#56853).

2 years agoImprove frame synchronization support on Haiku
Po Lu [Mon, 1 Aug 2022 06:24:15 +0000 (06:24 +0000)]
Improve frame synchronization support on Haiku

* src/ftcrfont.c (ftcrfont_draw):
* src/haikufns.c (haiku_set_background_color):
* src/haikuterm.c (haiku_clip_to_string):
(haiku_clip_to_string_exactly):
(haiku_clear_frame_area):
(haiku_clear_frame):
(haiku_draw_box_rect):
(haiku_draw_relief_rect):
(haiku_draw_underwave):
(haiku_draw_text_decoration):
(haiku_draw_plain_background):
(haiku_draw_stipple_background):
(haiku_draw_glyph_string_foreground):
(haiku_draw_glyphless_glyph_string_foreground):
(haiku_draw_stretch_glyph_string):
(haiku_start_clip):
(haiku_end_clip):
(haiku_clip_to_row):
(haiku_draw_composite_glyph_string_foreground):
(haiku_draw_image_glyph_string):
(haiku_draw_glyph_string):
(haiku_after_update_window_line):
(haiku_draw_hollow_cursor):
(haiku_draw_bar_cursor):
(haiku_draw_vertical_window_border):
(haiku_draw_window_divider):
(haiku_scroll_bar_create):
(haiku_set_horizontal_scroll_bar):
(haiku_set_vertical_scroll_bar):
(haiku_draw_fringe_bitmap):
(haiku_scroll_run):
(haiku_read_socket):
(haiku_flash):
(haiku_clear_under_internal_border):
(haiku_scroll_bar_remove):
* src/haikuterm.h (MAKE_FRAME_DIRTY):
(FRAME_CR_CONTEXT): Don't dirty frames if not necessary.

2 years agoImplement primitive frame synchronization on Haiku
Po Lu [Mon, 1 Aug 2022 05:51:59 +0000 (05:51 +0000)]
Implement primitive frame synchronization on Haiku

Instead of relying on a compositor to do the work, we simply
wait for VBLANK and hope that the update finishes soon enough.

* doc/lispref/frames.texi (Management Parameters): Document that
frame synchronization is now supported on Haiku.

* src/haiku_support.cc (class EmacsView): New field
`use_frame_synchronization'.
(FlipBuffers): Wait for vertical blanking period.
(be_set_use_frame_synchronization): New function.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (haiku_create_frame): Set
`use-frame-synchronization'.

(haiku_set_use_frame_synchronization)
(haiku_frame_parm_handlers): New param handler.

2 years ago* lisp/cedet/ede/base.el (ede-project): Fix warning when loading EDE.
Po Lu [Mon, 1 Aug 2022 05:34:02 +0000 (13:34 +0800)]
* lisp/cedet/ede/base.el (ede-project): Fix warning when loading EDE.

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Mon, 1 Aug 2022 04:30:26 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

78759ddcb0 * src/lisp.h (CHECK_INTEGER): Fix the predicate.  (Bug#56856)

2 years agoUpdate publicsuffix.txt from upstream
Stefan Kangas [Mon, 1 Aug 2022 04:01:07 +0000 (06:01 +0200)]
Update publicsuffix.txt from upstream

* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2022-07-28 15:23:34 UTC.

2 years ago; Auto-commit of loaddefs files.
Stefan Kangas [Mon, 1 Aug 2022 03:07:18 +0000 (05:07 +0200)]
; Auto-commit of loaddefs files.

2 years agoMake frame synchronization a frame parameter
Po Lu [Mon, 1 Aug 2022 01:56:12 +0000 (09:56 +0800)]
Make frame synchronization a frame parameter

* doc/lispref/frames.texi (Management Parameters): Document
`use-frame-synchronization'.
* etc/NEWS: Update entry.

* src/frame.c (frame_parms): New frame parameter
`use-frame-synchronization'.
(syms_of_frame): New defsym.
* src/haikufns.c (haiku_frame_parm_handlers):
* src/nsfns.m (ns_frame_parm_handlers):
* src/pgtkfns.c (pgtk_frame_parm_handlers):
* src/w32fns.c (w32_frame_parm_handlers): Update frame param
handlers correctly.
* src/xfns.c (x_set_use_frame_synchronization): New function.
(Fx_create_frame): Set default value of said parameter.
(x_frame_parm_handlers): Add handler.

* src/xterm.c (x_sync_wait_for_frame_drawn_event): Clear
parameter if sync fails.

2 years agoRegenerate ldefs-boot.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 18:00:25 +0000 (20:00 +0200)]
Regenerate ldefs-boot.el

2 years agoAllow specifying that loaddefs files shouldn't not be compiled
Lars Ingebrigtsen [Sun, 31 Jul 2022 17:57:55 +0000 (19:57 +0200)]
Allow specifying that loaddefs files shouldn't not be compiled

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
Allow specifying that we shouldn't include a no-compile cookie
(bug#53024).

2 years agoDeclare `key-valid-p` and `readablep` as error-free
Mattias Engdegård [Sun, 31 Jul 2022 13:45:16 +0000 (15:45 +0200)]
Declare `key-valid-p` and `readablep` as error-free

* lisp/keymap.el (key-valid-p):
* lisp/subr.el (readablep): These functions are effect-free; declare
them correspondingly.  Note that readablep is not pure since its
return value depends on ambient state.

2 years agoMake ps-def.el obsolete (part 2/2)
Stefan Kangas [Sun, 31 Jul 2022 16:19:06 +0000 (18:19 +0200)]
Make ps-def.el obsolete (part 2/2)

* lisp/obsolete/ps-def.el: Add "Obsolete-since".
* lisp/ps-print.el (ps-def): Don't require.

2 years agoMake ps-def.el obsolete (part 1/2)
Stefan Kangas [Sun, 31 Jul 2022 16:16:45 +0000 (18:16 +0200)]
Make ps-def.el obsolete (part 1/2)

This file was created to maintain Emacs/XEmacs compat code more
easily, and no longer serves any purpose.  It currently contains only
obsolete function and variable aliases.

* lisp/ps-def.el: Move from here...
* lisp/obsolete/ps-def.el: ...to here.

2 years agoDon't make a custom-save-icons section if there's nothing to save
Lars Ingebrigtsen [Sun, 31 Jul 2022 16:16:54 +0000 (18:16 +0200)]
Don't make a custom-save-icons section if there's nothing to save

* lisp/cus-edit.el (custom-save-icons): Only make an entry when
there's something to save (bug#56860).  Also autoload.

2 years agoMove some definitions from ps-def.el to ps-print.el
Stefan Kangas [Sun, 31 Jul 2022 16:15:55 +0000 (18:15 +0200)]
Move some definitions from ps-def.el to ps-print.el

* lisp/ps-def.el (ps-face-bold-p, ps-face-italic-p)
(ps-face-strikeout-p, ps-face-overline-p, ps-face-box-p)
(ps-color-format, ps-float-format)
(ps-generate-postscript-with-faces1): Move from here...
* lisp/ps-print.el (ps-face-bold-p, ps-face-italic-p)
(ps-face-strikeout-p, ps-face-overline-p, ps-face-box-p)
(ps-color-format, ps-float-format)
(ps-generate-postscript-with-faces1): ...to here.

2 years agoRemove some leftover compat code from ps-print
Stefan Kangas [Sun, 31 Jul 2022 11:15:22 +0000 (13:15 +0200)]
Remove some leftover compat code from ps-print

* lisp/ps-def.el (ps-mark-active-p): Make obsolete in favor of
'mark-active'.  Update callers.
(ps-face-foreground-name): Make obsolete in favor of
'face-foreground'.  Update callers.
(ps-face-background-name): Make obsolete in favor of
'face-background'.  Update callers.
(ps-color-device): Make into obsolete function alias for
'display-color-p'.  Update callers.

2 years ago* src/lisp.h (CHECK_INTEGER): Fix the predicate. (Bug#56856)
Eli Zaretskii [Sun, 31 Jul 2022 15:05:09 +0000 (18:05 +0300)]
* src/lisp.h (CHECK_INTEGER): Fix the predicate.  (Bug#56856)

2 years agoDeclare Tramp function for backward compatibility
Michael Albinus [Sun, 31 Jul 2022 13:45:34 +0000 (15:45 +0200)]
Declare Tramp function for backward compatibility

* lisp/net/tramp.el (tramp-archive-file-name-handler):
* lisp/net/tramp-ftp.el (tramp-archive-file-name-handler): Declare.

2 years agoReduce internal rx autoloads
Mattias Engdegård [Sun, 31 Jul 2022 10:54:53 +0000 (12:54 +0200)]
Reduce internal rx autoloads

* lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform):
Don't autoload.
(rx--pcase-macroexpander): Extract body into...
(rx--pcase-expand): ...a separate function, which is autoloaded.

2 years ago; Use values instead of trying to ignore them
Mattias Engdegård [Sun, 31 Jul 2022 09:48:56 +0000 (11:48 +0200)]
; Use values instead of trying to ignore them

* test/lisp/subr-tests.el (test-print-unreadable-function):
* test/src/print-tests.el (test-print-unreadable-function-buffer):
Instead of binding the value of nominally side-effect-free
expressions to an ignored variable (_), make use of them.
This is more robust and provides useful extra checks in the test.

2 years agoFix electric paring in rcirc buffers
Philip Kaludercic [Sun, 31 Jul 2022 10:45:29 +0000 (12:45 +0200)]
Fix electric paring in rcirc buffers

* rcirc.el (rcirc--electric-pair-inhibit): Add new predicate function.
(rcirc-mode): Use rcirc--electric-pair-inhibit.

2 years ago* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read): Simplify.
Stefan Kangas [Sun, 31 Jul 2022 10:01:01 +0000 (12:01 +0200)]
* lisp/emacs-lisp/eieio-base.el (eieio-persistent-read): Simplify.

2 years ago; Simplify two functions after recent change
Stefan Kangas [Sun, 31 Jul 2022 09:46:31 +0000 (11:46 +0200)]
; Simplify two functions after recent change

* lisp/textmodes/bib-mode.el (bib-capitalize-title):
* lisp/textmodes/refbib.el (r2b-capitalize-title): Simplify.

2 years agoFix compilation warnings in tramp-loaddefs.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 10:01:10 +0000 (12:01 +0200)]
Fix compilation warnings in tramp-loaddefs.el

* lisp/files.el (file-name-quoted-p): Autoload because it's
referred to from tramp-loaddefs.
* lisp/net/tramp.el (defvar): Put the entire form into the
loaddefs file instead of eval-and-compile -- this fixes a
dependency problem when byte-compiling the loaddefs file.
(tramp-methods, tramp-default-method-alist)
(tramp-default-user-alist, tramp-default-host-alist)
(tramp-local-host-regexp, tramp-terminal-type)
(tramp-foreign-file-name-handler-alist): Autoload to avoid
compilation warnings.  Also put (require 'cl-lib) into the
loaddefs file for the same reason.
(tramp-ensure-dissected-file-name)
(tramp-set-completion-function)
(tramp-register-foreign-file-name-handler): Autoload.

2 years agoFix org.el byte-compile warning in org-loaddefs.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:43:48 +0000 (11:43 +0200)]
Fix org.el byte-compile warning in org-loaddefs.el

* lisp/org/org.el (org-dynamic-block-define): Autoload because
it's referred to in org-loaddefs.el.

2 years agoFix ede byte-compile warnings in loaddefs.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:38:27 +0000 (11:38 +0200)]
Fix ede byte-compile warnings in loaddefs.el

* lisp/emacs-lisp/eieio.el (make-instance):
* lisp/cedet/ede/auto.el (ede-add-project-autoload): Autoload
functions referred to by ede/loaddefs.el.

2 years agoRemove loaddefs debug code
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:37:45 +0000 (11:37 +0200)]
Remove loaddefs debug code

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--rubric):
Remove code inadvertantly checked in.

2 years agoFix cl byte-compile warning in cl-loaddefs.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:33:47 +0000 (11:33 +0200)]
Fix cl byte-compile warning in cl-loaddefs.el

* lisp/emacs-lisp/cl-macs.el (cl--optimize)
(cl-struct-sequence-type, cl-struct-slot-offset): Autoload since
they are referred to by code in cl-loaddefs.el.