]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years ago; * src/composite.c (find_automatic_composition): Fix a typo.
Eli Zaretskii [Thu, 4 Aug 2022 09:47:32 +0000 (12:47 +0300)]
; * src/composite.c (find_automatic_composition): Fix a typo.

2 years agoImprove Bidi with long lines.
Gregory Heytings [Thu, 4 Aug 2022 09:01:55 +0000 (09:01 +0000)]
Improve Bidi with long lines.

* src/composite.c (composition_compute_stop_pos): Use an 'endpos' that
is not too far away.
(find_automatic_composition): Use a 'head' that is not too far away.
Also make sure that this code path is not taken when long line
optimizations are disabled.

* src/dispextern.h (struct composition_it): Add a field that points
to the parent iterator.

* src/xdisp.c (init_iterator): Set it.

2 years ago; * src/xdisp.c (get_visually_first_element): Fix last change.
Gregory Heytings [Mon, 1 Aug 2022 16:46:09 +0000 (16:46 +0000)]
; * src/xdisp.c (get_visually_first_element): Fix last change.

2 years ago* src/xdisp.c (get_visually_first_element): Fix a typo.
Eli Zaretskii [Mon, 1 Aug 2022 16:13:16 +0000 (19:13 +0300)]
* src/xdisp.c (get_visually_first_element): Fix a typo.

2 years agoVarious improvements to long lines handling.
Gregory Heytings [Mon, 1 Aug 2022 15:52:12 +0000 (15:52 +0000)]
Various improvements to long lines handling.

* src/xdisp.c (get_visually_first_element,
(move_it_vertically_backward): Do not go back too far with bidi.
(get_narrowed_begv): Do not return 0 anymore instead of BEGV.
(handle_fontified_prop): Simplify accordingly.

* src/keyboard.c (safe_run_hooks_maybe_narrowed): Simplify accordingly.

* src/composite.c (find_automatic_composition): Ditto.

2 years ago; * src/xdisp.c (reseat): Improve recomputations.
Gregory Heytings [Mon, 1 Aug 2022 15:01:15 +0000 (15:01 +0000)]
; * src/xdisp.c (reseat): Improve recomputations.

2 years agoFix forgotten initialization for long line optimizations.
Gregory Heytings [Mon, 1 Aug 2022 13:27:02 +0000 (13:27 +0000)]
Fix forgotten initialization for long line optimizations.

* src/xdisp.c (init_iterator): Initialize the 'narrowed_begv'
field.

* src/buffer.c (syms_of_buffer): Docstring clarification.

2 years agoMove the computation of narrowing bounds for long line optimizations.
Gregory Heytings [Sun, 31 Jul 2022 22:36:55 +0000 (22:36 +0000)]
Move the computation of narrowing bounds for long line optimizations.

* src/xdisp.c (init_iterator): Move the computation from here...
(reseat): ... to here.  Also recompute the position in certain cases.

2 years agoAdd locked narrowing around pre- and post-command-hook
Gregory Heytings [Sun, 31 Jul 2022 20:32:15 +0000 (20:32 +0000)]
Add locked narrowing around pre- and post-command-hook

* src/keyboard.c (safe_run_hooks_maybe_narrowed): New function.
(command_loop_1): Use it for 'pre-command-hook' and 'post-command-hook'.
(syms_of_keyboard): Update docstrings of 'pre-command-hook' and
'post-command-hook'.

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

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 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.

2 years agoDelete additional items obsolete since 20, 21 and 22
Stefan Kangas [Sun, 31 Jul 2022 09:33:42 +0000 (11:33 +0200)]
Delete additional items obsolete since 20, 21 and 22

* lisp/font-lock.el (font-lock-reference-face): Delete variable
alias obsolete since 20.3.
* lisp/progmodes/cc-cmds.el (c-toggle-auto-state): Delete alias
obsolete since 22.1.
* lisp/replace.el (query-replace-regexp-eval): Delete function
obsolete since 22.1.
(replace-count, replace-re-search-function): Doc fixes; adjust for
above deleted function.

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

* lisp/progmodes/compile.el (compilation--default-buffer-name):
* lisp/kmacro.el (kmacro-name-last-macro):
* lisp/emacs-lisp/package.el (package--activate-all): Autoload to
avoid byte-compilation warnings when byte-compiling loaddefs.el.

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

* lisp/emacs-lisp/rx.el (rx--to-expr, rx--pcase-transform):
Autoload to avoid warning when byte-compiling loaddefs.el.

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

* lisp/mail/sendmail.el (mail-send-and-exit): Autoload since it's
referred to by autoloaded code in loaddefs.el.

2 years agotramp fixes for byte-compiling loaddefs.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:24:23 +0000 (11:24 +0200)]
tramp fixes for byte-compiling loaddefs.el

* lisp/net/tramp-archive.el (tramp-archive-file-name-handler):
Move to the main loaddefs file since it's referred to by functions
there.
* lisp/net/tramp.el (tramp-file-name-handler): Autoload to avoid
warning when byte-compiling loaddefs.el.

2 years agoFix further package.el loaddefs byte-compile warnings
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:21:47 +0000 (11:21 +0200)]
Fix further package.el loaddefs byte-compile warnings

* lisp/emacs-lisp/package.el (package-directory-list)
(package-quickstart-file): Specify group to avoid warning when
byte-compiling loaddefs.el.
(package-activated-list): Autoload since we're assigning the
variable from a function completely autoloaded.

2 years agoFix loaddefs byte-compile warnings from grep.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:16:37 +0000 (11:16 +0200)]
Fix loaddefs byte-compile warnings from grep.el

* lisp/progmodes/grep.el (grep-highlight-matches)
(grep-match-face): Autoload to avoid byte-compile warnings from
loaddefs.el.

2 years agoFix loaddefs byte-compile warning from package.el
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:15:58 +0000 (11:15 +0200)]
Fix loaddefs byte-compile warning from package.el

* lisp/emacs-lisp/package.el (package-user-dir): :group has to be
explicit for autoloaded defcustoms.

2 years agoReformulate compile-command condition
Lars Ingebrigtsen [Sun, 31 Jul 2022 09:07:04 +0000 (11:07 +0200)]
Reformulate compile-command condition

* lisp/progmodes/compile.el: Reformulate to avoid a byte-compile
warning when compiling loaddefs.el.

2 years agoDelete aliases obsolete since 21.1 and 22.1
Stefan Kangas [Sun, 31 Jul 2022 08:56:35 +0000 (10:56 +0200)]
Delete aliases obsolete since 21.1 and 22.1

* lisp/ls-lisp.el (ls-lisp-dired-ignore-case):
* lisp/files.el (find-file-not-found-hooks): Delete variable aliases,
obsolete since 21.1 and 22.1 respectively.

2 years agoSupport keyboard input and display of U+1E9E
Eli Zaretskii [Sun, 31 Jul 2022 08:22:29 +0000 (11:22 +0300)]
Support keyboard input and display of U+1E9E

* lisp/international/latin1-disp.el (latin1-display):
* lisp/international/iso-transl.el (iso-transl-char-map)
(iso-transl-language-alist): Add U+1E9E capital sharp S.

2 years ago; * src/xterm.c (XTset_vertical_scroll_bar): Fix yet another typo.
Po Lu [Sun, 31 Jul 2022 07:10:14 +0000 (15:10 +0800)]
; * src/xterm.c (XTset_vertical_scroll_bar): Fix yet another typo.

Reported by Lars Ingebrigtsen <larsi@gnus.org>.

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

eb11dae499 Improve documentation of column-related functions
c95a34c960 * src/macfont.m (macfont_open): Initialize font->space_wid...
31a6a37d45 Improve indexing of keymap variables

2 years agoFix NS unexec build
Po Lu [Sun, 31 Jul 2022 02:55:06 +0000 (10:55 +0800)]
Fix NS unexec build

* nextstep/Makefile.in (all): Only build Emacs.pdmp on pdumper
builds.

* src/sheap.h: Make STATIC_HEAP_SIZE bigger, otherwise I get:
static heap exhausted: avail 67108864 used 67101824 failed
request 20480

2 years ago; * src/xterm.c (XTset_vertical_scroll_bar): Fix typo in last change.
Po Lu [Sun, 31 Jul 2022 02:42:51 +0000 (10:42 +0800)]
; * src/xterm.c (XTset_vertical_scroll_bar): Fix typo in last change.

2 years agoFix frame synchronization with scroll bar movement
Po Lu [Sun, 31 Jul 2022 02:41:58 +0000 (10:41 +0800)]
Fix frame synchronization with scroll bar movement

* src/xfns.c (x_set_inhibit_double_buffering): Stop condeming
scroll bars.

* src/xterm.c (x_scroll_bar_create): Create an InputOnly window.
Update event masks accordingly and stop allocating back buffer.
(x_scroll_bar_remove): Stop deallocating back buffer.
(XTset_vertical_scroll_bar, x_scroll_bar_set_handle): Draw onto
the edit window so they can be synchronized with buffer flips.
(x_scroll_bar_clear): Redraw scroll bars instead of just
clearing them.
(x_scroll_bar_handle_expose, x_scroll_bar_redraw): New
functions.
(x_scroll_bar_expose, x_scroll_bar_end_update): Delete
functions.
(handle_one_xevent): Update exposure logic accordingly.

* src/xterm.h (struct scroll_bar): Remove `x_drawable' field.

2 years ago; Silence byte-compiler in two tests
Stefan Kangas [Sat, 30 Jul 2022 23:50:38 +0000 (01:50 +0200)]
; Silence byte-compiler in two tests

* test/lisp/subr-tests.el (test-print-unreadable-function):
* test/src/print-tests.el (test-print-unreadable-function-buffer):
Pacify byte-compiler.

2 years agoDelete redisplay-end-trigger-functions and related defuns
Stefan Kangas [Sat, 30 Jul 2022 23:44:22 +0000 (01:44 +0200)]
Delete redisplay-end-trigger-functions and related defuns

This variable and related functions have been obsolete since 23.1.
The last things to depend on this (fast-lock.el and lazy-lock.el) were
recently removed.

* src/dispextern.h (struct it): Delete field
'redisplay_end_trigger_charpos'.
* src/window.c (Fwindow_redisplay_end_trigger)
(Fset_window_redisplay_end_trigger): Delete defuns and corresponding
defsubrs for functions obsolete since 23.1.
* src/window.h (wset_redisplay_end_trigger): Delete function.
(GCALIGNED_STRUCT): Delete 'redisplay_end_trigger'.
* src/xdisp.c (run_redisplay_end_trigger_hook): Delete function.
(syms_of_xdisp) <redisplay_end_trigger_functions>: Delete
variable obsolete since 23.1.
(init_iterator, next_element_from_buffer): Don't run or set above
deleted hook variable.

* lisp/subr.el: Delete obsoletion definitions for above deleted
defuns and variable.
* doc/lispref/hooks.texi (Standard Hooks):
* lisp/emacs-lisp/byte-opt.el (side-effect-free-fns):
* lisp/loadhist.el (unload-feature-special-hooks): Don't mention
above deleted variable.
* admin/coccinelle/window.cocci: Adjust for above changes.

2 years ago; * etc/NEWS: Minor edits.
Stefan Kangas [Sat, 30 Jul 2022 10:52:15 +0000 (12:52 +0200)]
; * etc/NEWS: Minor edits.

2 years agoImprove documentation of column-related functions
Eli Zaretskii [Sat, 30 Jul 2022 16:34:38 +0000 (19:34 +0300)]
Improve documentation of column-related functions

* doc/lispref/text.texi (Primitive Indent, Columns):
* src/indent.c (Fcurrent_indentation, Fmove_to_column): Document
that column counting ignores invisible text.  (Bug#56837)

2 years ago; Fix warnings from #pragma GCC iagnostic pop on macOS
Gerd Möllmann [Sat, 30 Jul 2022 15:36:27 +0000 (17:36 +0200)]
; Fix warnings from #pragma GCC iagnostic pop on macOS

* src/comp.c: Add #pragma GCC diagnostic push in some places.

2 years agoFix native compiler handling of narrow-to-region
Gerd Möllmann [Sat, 30 Jul 2022 15:32:04 +0000 (17:32 +0200)]
Fix native compiler handling of narrow-to-region

* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Use auto for
byte-narrow-to-region.

2 years agoTweak icons.el emoji detection
Lars Ingebrigtsen [Sat, 30 Jul 2022 13:56:49 +0000 (15:56 +0200)]
Tweak icons.el emoji detection

* lisp/emacs-lisp/icons.el (icons--create): Choose another
character that's unlikely to appear in non-Emoji fonts.  (Comment
left in place since this should be fixed in a less breakable way.)

2 years agoMake the symbol icons in outline.el more logical
Lars Ingebrigtsen [Sat, 30 Jul 2022 13:36:16 +0000 (15:36 +0200)]
Make the symbol icons in outline.el more logical

* lisp/outline.el (outline-open, outline-close): Use symbols from
the same series so that it's more likely that they match up (bug#56823).

2 years agoMake sure to preserve point across locked narrowing
Eli Zaretskii [Sat, 30 Jul 2022 13:11:43 +0000 (16:11 +0300)]
Make sure to preserve point across locked narrowing

* src/editfns.c (Fnarrow_to_region): Save the position of point
when locking the restriction, since this function can move point.

2 years ago; * lisp/emacs-lisp/icons.el (icon-preference): repair type
Mattias Engdegård [Sat, 30 Jul 2022 13:06:43 +0000 (15:06 +0200)]
; * lisp/emacs-lisp/icons.el (icon-preference): repair type

2 years agoHandle the optional argument of 'narrow-to-region' in byte-compiled code.
Gregory Heytings [Sat, 30 Jul 2022 12:02:28 +0000 (12:02 +0000)]
Handle the optional argument of 'narrow-to-region' in byte-compiled code.

* lisp/emacs-lisp/bytecomp.el: Adapt the specifications.

* src/bytecode.c (exec_byte_code): Get the optional argument.

2 years agoClarify mail-header address parsing doc strings
Lars Ingebrigtsen [Sat, 30 Jul 2022 11:40:59 +0000 (13:40 +0200)]
Clarify mail-header address parsing doc strings

* lisp/mail/mail-parse.el (mail-header-parse-address-lax):
* lisp/mail/ietf-drums.el (ietf-drums-parse-address): Clarify what
these functions do (bug#56824).

2 years agoFix outline-minor-mode-use-buttons defcustom type
Lars Ingebrigtsen [Sat, 30 Jul 2022 11:18:44 +0000 (13:18 +0200)]
Fix outline-minor-mode-use-buttons defcustom type

* lisp/outline.el (outline-minor-mode-use-buttons): Fix wrong type.

2 years agobuffer-match-p doc string clarification
Lars Ingebrigtsen [Sat, 30 Jul 2022 11:16:12 +0000 (13:16 +0200)]
buffer-match-p doc string clarification

* lisp/subr.el (buffer-match-p): Actually say that nil is a valid
value.

2 years agoAdjust outline--use-buttons-p to buffer-match-p change
Lars Ingebrigtsen [Sat, 30 Jul 2022 10:50:47 +0000 (12:50 +0200)]
Adjust outline--use-buttons-p to buffer-match-p change

* lisp/outline.el (outline-minor-mode-use-buttons): Adjust doc string.
(outline--use-buttons-p): No longer any need to special-case t/nil.

2 years agoMove a test from subr-tests to print-tests
Lars Ingebrigtsen [Sat, 30 Jul 2022 10:45:36 +0000 (12:45 +0200)]
Move a test from subr-tests to print-tests

2 years ago* lisp/apropos.el (apropos-documentation): Simplify.
Stefan Kangas [Sat, 30 Jul 2022 10:06:25 +0000 (12:06 +0200)]
* lisp/apropos.el (apropos-documentation): Simplify.

2 years agoAvoid leaving temp buffers in bib-mode and refbib
Stefan Kangas [Sat, 30 Jul 2022 09:52:05 +0000 (11:52 +0200)]
Avoid leaving temp buffers in bib-mode and refbib

* lisp/textmodes/bib-mode.el (bib-capitalize-title):
* lisp/textmodes/refbib.el (r2b-capitalize-title): Use
with-temp-buffer.

2 years agoPrefer defvar-keymap in dns-mode-map
Stefan Kangas [Sat, 30 Jul 2022 09:22:19 +0000 (11:22 +0200)]
Prefer defvar-keymap in dns-mode-map

* lisp/textmodes/dns-mode.el (dns-mode-map): Prefer defvar-keymap.

2 years agoPrefer defvar-keymap in nroff-mode-map
Stefan Kangas [Sat, 30 Jul 2022 07:46:20 +0000 (09:46 +0200)]
Prefer defvar-keymap in nroff-mode-map

* lisp/textmodes/nroff-mode.el (nroff-mode-map): Prefer defvar-keymap.

2 years agoFix namespace use in bib-mode.el
Stefan Kangas [Fri, 29 Jul 2022 16:31:19 +0000 (18:31 +0200)]
Fix namespace use in bib-mode.el

* lisp/textmodes/bib-mode.el (bib-unread-file, bib-add)
(bib-return-key, bib-mark, bib-unread): Rename from
'unread-bib-file', 'addbib', 'return-key-bib', 'mark-bib', and
'unread-bib' respectively.  Maintain old names as obsolete aliases and
update uses.
(bib-mode-map): Prefer defvar-keymap.

2 years ago; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment.
Stefan Kangas [Fri, 29 Jul 2022 15:56:55 +0000 (17:56 +0200)]
; * lisp/emacs-lisp/regi.el: Delete incorrect "last modified" comment.

2 years ago; * lisp/ffap.el: Comment cleanup.
Stefan Kangas [Fri, 29 Jul 2022 12:52:01 +0000 (14:52 +0200)]
; * lisp/ffap.el: Comment cleanup.

2 years agoMake ffap-newfile-prompt obsolete
Stefan Kangas [Fri, 29 Jul 2022 11:02:48 +0000 (13:02 +0200)]
Make ffap-newfile-prompt obsolete

* lisp/ffap.el (ffap-newfile-prompt): Obsolete in favor of
'find-file-not-found-functions'.

2 years ago* lisp/ffap.el (ffap-url-regexp): Add gemini.
Stefan Kangas [Fri, 29 Jul 2022 08:45:40 +0000 (10:45 +0200)]
* lisp/ffap.el (ffap-url-regexp): Add gemini.

2 years agoMake outline-view-change-hook obsolete
Stefan Kangas [Fri, 15 Jul 2022 16:08:34 +0000 (18:08 +0200)]
Make outline-view-change-hook obsolete

According to a comment, this hook "Seems only used by lazy-lock.
I.e. obsolete."  But lazy-lock has been deleted.
* lisp/outline.el (outline-view-change-hook): Make obsolete.

2 years ago* src/macfont.m (macfont_open): Initialize font->space_width. (Bug#56808)
YAMAMOTO Mitsuharu [Sat, 30 Jul 2022 08:21:54 +0000 (17:21 +0900)]
* src/macfont.m (macfont_open): Initialize font->space_width.  (Bug#56808)

2 years agoImprove indexing of keymap variables
Eli Zaretskii [Sat, 30 Jul 2022 06:32:48 +0000 (09:32 +0300)]
Improve indexing of keymap variables

* doc/lispref/maps.texi (Standard Keymaps):
* doc/lispref/display.texi (Button Buffer Commands)
(Button Properties):
* doc/lispref/keymaps.texi (Translation Keymaps): Improve indexing
of keymaps.  (Bug#56816)

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

e0f54c62ec CC Mode: fontify variables/functions after line comments e...
2c6a94c5b8 ; Correct the meaning of "cf." in tips.texi

2 years agoMinor improvements to precision scroll interpolation
Po Lu [Sat, 30 Jul 2022 03:26:46 +0000 (11:26 +0800)]
Minor improvements to precision scroll interpolation

* lisp/pixel-scroll.el (pixel-scroll-start-momentum): Bump GC
cons threshold temporarily.  This leads to a very noticable
improvement to animation speed.

2 years agoFix failure caused by misreading the frame synchronization spec
Po Lu [Sat, 30 Jul 2022 02:04:26 +0000 (10:04 +0800)]
Fix failure caused by misreading the frame synchronization spec

* src/xterm.c (x_sync_update_begin): Ensure value % 4 is 1.
(x_sync_update_finish): Then, add 3.

2 years agoDon't freeze if the compositing manager crashes
Po Lu [Sat, 30 Jul 2022 01:40:00 +0000 (09:40 +0800)]
Don't freeze if the compositing manager crashes

* src/xterm.c (x_if_event): New function, like XIfEvent but with
a timeout.
(x_sync_wait_for_frame_drawn_event): Disable frame
synchronization if x_if_event times out after 1 second.

2 years agoCC Mode: fontify variables/functions after line comments ending in spaces
Alan Mackenzie [Fri, 29 Jul 2022 20:18:58 +0000 (20:18 +0000)]
CC Mode: fontify variables/functions after line comments ending in spaces

* lisp/progmodes/cc-engine.el (c-forward-comment-minus-1): Take account of
spaces preceding a linefeed when scanning a putative line comment end.

2 years ago; * src/xdisp.c (handle_fontified_prop): Fix BOB case.
Gregory Heytings [Fri, 29 Jul 2022 17:21:20 +0000 (19:21 +0200)]
; * src/xdisp.c (handle_fontified_prop): Fix BOB case.

2 years agoImprove narrowing when iterator has moved outside of narrowing bounds.
Gregory Heytings [Fri, 29 Jul 2022 16:23:16 +0000 (16:23 +0000)]
Improve narrowing when iterator has moved outside of narrowing bounds.

* src/xdisp.c (get_narrowed_begv, get_narrowed_zv): Add 'pos'
parameter.
(init_iterator): Add arguments to 'get_narrowed_begv' and
'get_narrowed_zv'.
(handle_fontified_prop): Recompute the narrowing when iterator
has moved outside of narrowing bounds.

* src/dispextern.h (get_narrowed_begv, get_narrowed_zv): Adapt
prototypes.

* src/composite.c (find_automatic_composition): Add argument
to 'get_narrowed_begv'.

2 years ago; * buffers.texi (Buffer List): Mention t
Philip Kaludercic [Fri, 29 Jul 2022 16:21:54 +0000 (18:21 +0200)]
; * buffers.texi (Buffer List): Mention t

2 years ago* subr.el (buffer-match-p): Add t as trivial a condition
Philip Kaludercic [Fri, 29 Jul 2022 11:54:47 +0000 (13:54 +0200)]
* subr.el (buffer-match-p): Add t as trivial a condition

2 years agoImprovement for long line optimizations.
Gregory Heytings [Fri, 29 Jul 2022 15:26:49 +0000 (15:26 +0000)]
Improvement for long line optimizations.

* src/xdisp.c (handle_fontified_prop): Also apply the forced
narrowing at BOB.

2 years agoAdapt native compiler to change in narrow-to-region
Gerd Möllmann [Fri, 29 Jul 2022 15:28:25 +0000 (17:28 +0200)]
Adapt native compiler to change in narrow-to-region

* lisp/emacs-lisp/comp.el (comp-limplify-lap-inst): Add third
argument nil for narrow-to-region.

2 years agoFix handling of extended frame resize synchronization
Po Lu [Fri, 29 Jul 2022 12:54:30 +0000 (20:54 +0800)]
Fix handling of extended frame resize synchronization

* src/xterm.c (x_sync_wait_for_frame_drawn_event): Don't wait if
the frame is invisible.  If it is mapped again the compositing
manager is obliged to send us another event, so we can wait in
that case.
(x_sync_update_begin, x_sync_update_finish): Handle extended
resize synchronization here.
(XTframe_up_to_date, handle_one_xevent): Save stuff here.

* src/xterm.h (struct x_output): New field
`resize_counter_value'.

2 years agoFix outline byte compilation warning from previous change
Lars Ingebrigtsen [Fri, 29 Jul 2022 11:21:45 +0000 (13:21 +0200)]
Fix outline byte compilation warning from previous change

* lisp/outline.el (outline--use-buttons-p): Move around to fix
byte compilation warning.

2 years agoFix up the outline minor mode button logic
Lars Ingebrigtsen [Fri, 29 Jul 2022 11:20:06 +0000 (13:20 +0200)]
Fix up the outline minor mode button logic

* lisp/outline.el (outline-minor-mode-highlight-buffer): Factor
out... (bug#56820).
(outline--use-buttons-p): ... to here.
(outline-hide-subtree, outline--fix-up-all-buttons)
(outline-show-subtree): Use it.

2 years ago; Improve NEWS entries for buttons and icons
Eli Zaretskii [Fri, 29 Jul 2022 11:12:24 +0000 (14:12 +0300)]
; Improve NEWS entries for buttons and icons

* etc/NEWS: Improve documentation of
'outline-minor-mode-use-buttons'.

2 years ago; * doc/emacs/display.texi (Icons): Improve indexing and wording.
Eli Zaretskii [Fri, 29 Jul 2022 10:59:15 +0000 (13:59 +0300)]
; * doc/emacs/display.texi (Icons): Improve indexing and wording.

2 years ago; Minor copyedits of documentation related to long-line handling
Eli Zaretskii [Fri, 29 Jul 2022 10:20:38 +0000 (13:20 +0300)]
; Minor copyedits of documentation related to long-line handling

* src/xdisp.c (syms_of_xdisp) <fontification-functions>:
* etc/NEWS: Fix documentation related to long lines.  (Bug#56682)

2 years ago; * src/xterm.c (x_update_begin): Fix build without DBE.
Po Lu [Fri, 29 Jul 2022 09:23:52 +0000 (17:23 +0800)]
; * src/xterm.c (x_update_begin): Fix build without DBE.

2 years agoMinor additions to last change
Po Lu [Fri, 29 Jul 2022 09:14:05 +0000 (17:14 +0800)]
Minor additions to last change

* doc/emacs/xresources.texi (Table of Resources): Update
description of `extended'.
* etc/NEWS: Announce frame tearing reduction.

* src/xterm.c (x_sync_update_finish, x_sync_update_begin)
(x_update_begin, x_update_end, show_back_buffer, x_flip_and_flush)
(XTframe_up_to_date, handle_one_xevent): Minor redesign of frame
synchronization feature.  Fix crash with overflow and checking.

2 years agoImplement monitor refresh rate synchronization on X
Po Lu [Fri, 29 Jul 2022 08:20:32 +0000 (16:20 +0800)]
Implement monitor refresh rate synchronization on X

* src/xfns.c (x_set_parent_frame, Fx_create_frame): Disable
vsync on child and embedded frames.
* src/xmenu.c (x_menu_show): Fix XMenu position calculation in
child frames.

* src/xterm.c (x_sync_is_frame_drawn_event)
(x_sync_wait_for_frame_drawn_event): New functions.
(x_sync_update_begin): Wait for frame to be drawn if not double
buffered.
(x_sync_update_finish): Set FRAME_X_WAITING_FOR_DRAW (f).
(show_back_buffer): Wait for frame to be drawn before flipping
buffers.
(XTframe_up_to_date): Set FRAME_X_WAITING_FOR_DRAW if bumped.
(handle_one_xevent): Handle frame drawn events.

* src/xterm.h (struct x_output): New fields for frame dirtyness
and vsync.

2 years agoMerge branch 'feature/long-lines-and-font-locking'
Gregory Heytings [Fri, 29 Jul 2022 08:22:03 +0000 (10:22 +0200)]
Merge branch 'feature/long-lines-and-font-locking'

2 years agoFurther minor improvements of documentation
Gregory Heytings [Fri, 29 Jul 2022 08:11:10 +0000 (08:11 +0000)]
Further minor improvements of documentation

* src/xdisp.c (syms_of_xdisp) <fontification-functions>:
* etc/NEWS: Further minor wording improvements.

2 years ago; Correct the meaning of "cf." in tips.texi
Štěpán Němec [Fri, 29 Jul 2022 07:37:50 +0000 (09:37 +0200)]
; Correct the meaning of "cf." in tips.texi

Cf. e.g. https://en.wiktionary.org/wiki/cf.

* doc/lispref/tips.texi (Documentation Tips): Correct the meaning of
"cf.".

2 years agoMinor improvements of recent documentation changes
Eli Zaretskii [Fri, 29 Jul 2022 07:08:50 +0000 (10:08 +0300)]
Minor improvements of recent documentation changes

* src/editfns.c (Fwiden):
* doc/lispref/display.texi (Auto Faces):
* src/xdisp.c (syms_of_xdisp) <fontification-functions>:
* etc/NEWS: Clarify and improve wording of documentation changes.

2 years agoAlso update after buffer flip caused by flush_frame
Po Lu [Fri, 29 Jul 2022 06:52:31 +0000 (14:52 +0800)]
Also update after buffer flip caused by flush_frame

* src/xterm.c (x_flip_and_flush): Mark the end of a sync frame.

2 years ago; Fix wording of some doc strings in selection.el
Eli Zaretskii [Fri, 29 Jul 2022 06:31:26 +0000 (09:31 +0300)]
; Fix wording of some doc strings in selection.el

* lisp/select.el (xselect-dnd-target-available-p)
(xselect-dt-netfile-available-p, xselect-uri-list-available-p):
Doc fixes.

2 years agoImplement extended frame synchronization
Po Lu [Fri, 29 Jul 2022 02:13:54 +0000 (10:13 +0800)]
Implement extended frame synchronization

* src/xterm.c (x_atom_refs): New atom _NET_WM_FRAME_TIMINGS.
(x_sync_update_finish, x_sync_update_begin): New frame.
(x_update_begin, x_update_end, XTframe_up_to_date): Begin and
end frames accordingly if extended frame synchronization is
enabled.
(handle_one_xevent): Ignore timing and frame drawn events.

* src/xterm.h (struct x_display_info): New atom.
(FRAME_X_COUNTER_VALUE): New macro.

2 years agoDon't offer meaningless selection targets during drag-and-drop
Po Lu [Fri, 29 Jul 2022 00:50:55 +0000 (08:50 +0800)]
Don't offer meaningless selection targets during drag-and-drop

* lisp/select.el (xselect-dnd-target-available-p): New function.
(selection-converter-alist): Register it as the availability
function for DND specific targets.