Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/emacs into emacs-30

This commit is contained in:
Eli Zaretskii 2024-07-03 13:55:13 +03:00
commit 81a7358a33
3 changed files with 19 additions and 14 deletions

View file

@ -1806,7 +1806,7 @@ is better to write ``Emacs and XEmacs.''
* Deleting menus and menu options:: * Deleting menus and menu options::
* Turning on syntax highlighting:: * Turning on syntax highlighting::
* Scrolling only one line:: * Scrolling only one line::
* Editing MS-DOS files:: * Editing Windows files::
* Filling paragraphs with a single space:: * Filling paragraphs with a single space::
* Escape sequences in shell output:: * Escape sequences in shell output::
* Start Emacs maximized:: * Start Emacs maximized::
@ -1874,7 +1874,7 @@ customize, with completion.
Colors and faces are supported in non-windowed mode, i.e., on Unix and Colors and faces are supported in non-windowed mode, i.e., on Unix and
GNU/Linux text-only terminals and consoles, and when invoked as GNU/Linux text-only terminals and consoles, and when invoked as
@samp{emacs -nw} on X, MS-DOS and MS-Windows. Emacs automatically @samp{emacs -nw} on X, MS-Windows and MS-DOS. Emacs automatically
detects color support at startup and uses it if available. If you detects color support at startup and uses it if available. If you
think that your terminal supports colors, but Emacs won't use them, think that your terminal supports colors, but Emacs won't use them,
check the @code{termcap} entry for your display type for color-related check the @code{termcap} entry for your display type for color-related
@ -3162,22 +3162,22 @@ Alternatively, use the following Lisp form in your init file
(setq scroll-conservatively most-positive-fixnum) (setq scroll-conservatively most-positive-fixnum)
@end lisp @end lisp
@node Editing MS-DOS files @node Editing Windows files
@section How can I edit MS-DOS files using Emacs? @section How can I edit Windows files using Emacs?
@cindex Editing MS-DOS files
@cindex MS-DOS files, editing
@cindex Microsoft files, editing @cindex Microsoft files, editing
@cindex Windows files, editing @cindex Windows files, editing
@cindex Editing MS-DOS files
@cindex MS-DOS files, editing
Detection and handling of MS-DOS (and Windows) files is performed Detection and handling of Windows (and MS-DOS) files is performed
transparently. You can open MS-DOS files on a Unix system, edit it, transparently. You can open Windows files on a Unix system, edit it,
and save it without having to worry about the file format. and save it without having to worry about the file format.
When editing an MS-DOS style file, the mode line will indicate that it When editing a Windows style file, the mode line will indicate that it
is a DOS file. On Unix and GNU/Linux systems, and also on a Macintosh, is a Windows file. On GNU/Linux, Unix and macOS systems, the string
the string @samp{(DOS)} will appear near the left edge of the mode line; @samp{(DOS)} will appear near the left edge of the mode line; on Windows
on DOS and Windows, where the DOS end-of-line (EOL) format is the and MS-DOS, where the DOS end-of-line (EOL) format is the default, a
default, a backslash (@samp{\}) will appear in the mode line. backslash (@samp{\}) will appear in the mode line.
@node Filling paragraphs with a single space @node Filling paragraphs with a single space
@section How can I tell Emacs to fill paragraphs with a single space after each period? @section How can I tell Emacs to fill paragraphs with a single space after each period?
@ -4540,7 +4540,7 @@ display or is invoked with @samp{emacs -nw}, you typically need to use
@code{set-terminal-coding-system} to tell Emacs what the terminal can @code{set-terminal-coding-system} to tell Emacs what the terminal can
display, even after setting the language environment; otherwise display, even after setting the language environment; otherwise
non-@acronym{ASCII} characters will display as @samp{?}. On other operating non-@acronym{ASCII} characters will display as @samp{?}. On other operating
systems, such as MS-DOS and MS-Windows, Emacs queries the OS about the systems, such as MS-Windows and MS-DOS, Emacs queries the OS about the
character set supported by the display, and sets up the required character set supported by the display, and sets up the required
terminal coding system automatically. terminal coding system automatically.

View file

@ -158,6 +158,7 @@ removed."
(string-trim (replace-regexp-in-string blank " " string t t) (string-trim (replace-regexp-in-string blank " " string t t)
blank blank))) blank blank)))
;;;###autoload
(defun string-fill (string length) (defun string-fill (string length)
"Try to word-wrap STRING so that no lines are longer than LENGTH. "Try to word-wrap STRING so that no lines are longer than LENGTH.
Wrapping is done where there is whitespace. If there are Wrapping is done where there is whitespace. If there are
@ -172,6 +173,7 @@ result will have lines that are longer than LENGTH."
(fill-region (point-min) (point-max))) (fill-region (point-min) (point-max)))
(buffer-string))) (buffer-string)))
;;;###autoload
(defun string-limit (string length &optional end coding-system) (defun string-limit (string length &optional end coding-system)
"Return a substring of STRING that is (up to) LENGTH characters long. "Return a substring of STRING that is (up to) LENGTH characters long.
If STRING is shorter than or equal to LENGTH characters, return the If STRING is shorter than or equal to LENGTH characters, return the
@ -253,6 +255,7 @@ than this function."
(end (substring string (- (length string) length))) (end (substring string (- (length string) length)))
(t (substring string 0 length))))) (t (substring string 0 length)))))
;;;###autoload
(defun string-pad (string length &optional padding start) (defun string-pad (string length &optional padding start)
"Pad STRING to LENGTH using PADDING. "Pad STRING to LENGTH using PADDING.
If PADDING is nil, the space character is used. If not nil, it If PADDING is nil, the space character is used. If not nil, it
@ -272,6 +275,7 @@ the string."
(start (concat (make-string pad-length (or padding ?\s)) string)) (start (concat (make-string pad-length (or padding ?\s)) string))
(t (concat string (make-string pad-length (or padding ?\s))))))) (t (concat string (make-string pad-length (or padding ?\s)))))))
;;;###autoload
(defun string-chop-newline (string) (defun string-chop-newline (string)
"Remove the final newline (if any) from STRING." "Remove the final newline (if any) from STRING."
(declare (pure t) (side-effect-free t)) (declare (pure t) (side-effect-free t))

View file

@ -842,6 +842,7 @@ visible_end.)"
'missing)) 'missing))
(goto-char (point-max)) (goto-char (point-max))
(insert "]") (insert "]")
(treesit-parser-root-node parser)
(should (treesit-node-check array-node 'outdated)))) (should (treesit-node-check array-node 'outdated))))
;;; Defun navigation ;;; Defun navigation