1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-23 13:02:00 -08:00
Commit graph

158659 commits

Author SHA1 Message Date
Stefan Kangas
945e4fa2a0 Merge from origin/emacs-28
e6af4968f9 ; Update ChangeLog and AUTHORS
2022-08-02 06:30:28 +02:00
Po Lu
0c910f689b 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.
2022-08-02 09:41:02 +08:00
Lars Ingebrigtsen
bc7dc792df Fix compilation warning in spam.el
* lisp/gnus/spam.el (spam-check-blackholes): Adjust now that
query-dig is obsolete.
2022-08-01 21:23:13 +02:00
Juri Linkov
7320a812e9 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.
2022-08-01 22:19:01 +03:00
Gregory Heytings
9d8a6c8283 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.
2022-08-01 21:11:49 +02:00
Stefan Kangas
c2ed2e6858 Don't bind non-existent command in picture-mode-map
* lisp/textmodes/picture.el (picture-mode-map): Remove ineffectual
binding of non-existent command.
2022-08-01 19:46:23 +02:00
Eli Zaretskii
914f6b3c2c * src/eval.c (Fdefvaralias): Clarify error messages. (Bug#56863) 2022-08-01 20:01:51 +03:00
Stefan Kangas
de1c98ef0c 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'.
2022-08-01 18:15:51 +02:00
Stefan Kangas
e6af4968f9 ; Update ChangeLog and AUTHORS
* ChangeLog.3:
* etc/AUTHORS: Update.
2022-08-01 18:13:13 +02:00
Lars Ingebrigtsen
3bd9b6132f 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.
2022-08-01 14:28:05 +02:00
Stefan Kangas
7c8bd8802b * lisp/net/dig.el: Improve Commentary. 2022-08-01 13:32:34 +02:00
Stefan Kangas
b9b5657c56 Doc fix in eudc-hotlist.el
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode): Doc fix; use command
substitution.
2022-08-01 13:32:34 +02:00
Stefan Kangas
66c23da444 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'.
2022-08-01 13:32:34 +02:00
Po Lu
e976a935f8 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.
2022-08-01 19:01:37 +08:00
Stefan Kangas
89fbcbb907 ; * lisp/net/net-utils.el: Delete code commented out since 2000.
Note also that the netstat command is officially deprecated.
2022-08-01 11:52:32 +02:00
Paul Eggert
bec8474a45 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>
2022-08-01 01:17:19 -07:00
Paul Eggert
72c3efd7d0 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.
2022-08-01 01:17:18 -07:00
Paul Eggert
4d896c0977 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.
2022-08-01 01:17:18 -07:00
Paul Eggert
2cd204d8bb 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.
2022-08-01 01:17:17 -07:00
Paul Eggert
a51863f73d 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.
2022-08-01 01:17:16 -07:00
Paul Eggert
d634cb0954 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.
2022-08-01 01:17:16 -07:00
Paul Eggert
353413a76b * lisp/vc/vc.el: Remove stray comment hyphen. 2022-08-01 01:17:15 -07:00
Paul Eggert
d6c054a007 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.
2022-08-01 01:17:15 -07:00
Paul Eggert
afa67ed6f2 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.
2022-08-01 01:17:15 -07:00
Paul Eggert
2fd2008e67 * src/timefns.c (Ffloat_time): Fix doc string. 2022-08-01 01:17:14 -07:00
Paul Eggert
24e1123241 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.
2022-08-01 01:17:14 -07:00
Paul Eggert
0a4477415c 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.
2022-08-01 01:17:14 -07:00
Paul Eggert
914cf4b91b 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.
2022-08-01 01:17:13 -07:00
Paul Eggert
e3b6242938 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.
2022-08-01 01:17:13 -07:00
Paul Eggert
9d4633e934 (time-equal-p nil X) returns nil
* src/timefns.c (Ftime_equal_p): nil compares unequal to non-nil.
2022-08-01 01:17:13 -07:00
Paul Eggert
932c0bc1fc Tune blv_found
* src/lisp.h (blv_found): Prefer BASE_EQ to EQ where either will do.
2022-08-01 01:17:12 -07:00
Gerd Möllmann
ee0ce18662 ; * nextstep/Makefile.in: Fix last change (bug#56853). 2022-08-01 09:49:48 +02:00
Po Lu
dd937784a3 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.
2022-08-01 06:24:15 +00:00
Po Lu
99754dad3c 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.
2022-08-01 05:51:59 +00:00
Po Lu
bc03a5b2c4 * lisp/cedet/ede/base.el (ede-project): Fix warning when loading EDE. 2022-08-01 13:35:08 +08:00
Stefan Kangas
cf33f09ee2 ; Merge from origin/emacs-28
The following commit was skipped:

78759ddcb0 * src/lisp.h (CHECK_INTEGER): Fix the predicate.  (Bug#56856)
2022-08-01 06:30:26 +02:00
Stefan Kangas
f647d60cb7 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.
2022-08-01 06:01:07 +02:00
Stefan Kangas
f5e5e96474 ; Auto-commit of loaddefs files. 2022-08-01 05:07:18 +02:00
Po Lu
3b5c03eeb2 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.
2022-08-01 09:56:12 +08:00
Lars Ingebrigtsen
eef591072a Regenerate ldefs-boot.el 2022-07-31 20:00:25 +02:00
Lars Ingebrigtsen
6ef058cec2 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).
2022-07-31 19:57:55 +02:00
Mattias Engdegård
f5cd6b730d 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.
2022-07-31 18:29:02 +02:00
Stefan Kangas
b2fb73db2f 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.
2022-07-31 18:21:01 +02:00
Stefan Kangas
2276f51ff5 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.
2022-07-31 18:20:47 +02:00
Lars Ingebrigtsen
95f987cbd5 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.
2022-07-31 18:17:23 +02:00
Stefan Kangas
97b80912e9 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.
2022-07-31 18:15:55 +02:00
Stefan Kangas
54fed8e1f9 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.
2022-07-31 18:13:49 +02:00
Eli Zaretskii
78759ddcb0 * src/lisp.h (CHECK_INTEGER): Fix the predicate. (Bug#56856) 2022-07-31 18:05:09 +03:00
Michael Albinus
66e01c9608 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.
2022-07-31 15:45:34 +02:00
Mattias Engdegård
ac237334c7 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.
2022-07-31 13:01:26 +02:00