1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-05 22:20:24 -08:00

Merge from origin/emacs-29

5bb5590dec Fix blunder in labeled_narrow_to_region
78ddb32fad Fix documentation of icon-elements
725a3f32f8 ; Fix typos in symbol names
6653ee66ca Improve two docstrings in ox-latex
7d869a0402 Doc fix in auth-source-read-char-choice
f149de223b Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
1f97a87879 Fix info-xref-tests
51f391998b Add @kindex in manuals for existing keybindings on 'C-x x...
This commit is contained in:
Eli Zaretskii 2024-01-20 06:25:59 -05:00
commit 1b31a784bf
24 changed files with 97 additions and 23 deletions

View file

@ -146,7 +146,7 @@ Names should be as they appear in loaddefs.el.")
(defvar cus-test-errors nil
"List of problematic variables found by `cus-test-apropos'.
Each element is (VARIABLE . PROBLEM); see `cus-test--format-problem'.")
Each element is (VARIABLE . PROBLEM); see `cus-test--format-errors'.")
(defvar cus-test-tested-variables nil
"List of options tested by last call of `cus-test-apropos'.")

View file

@ -262,12 +262,14 @@ non-@code{nil}. If you change the option @code{view-read-only} to a
non-@code{nil} value, making the buffer read-only with @kbd{C-x C-q}
also enables View mode in the buffer (@pxref{View Mode}).
@kindex C-x x r
@findex rename-buffer
@kbd{C-x x r} (@code{rename-buffer} changes the name of the current
buffer. You specify the new name as a minibuffer argument; there is
no default. If you specify a name that is in use for some other
buffer, an error happens and no renaming is done.
@kindex C-x x u
@findex rename-uniquely
@kbd{C-x x u} (@code{rename-uniquely}) renames the current buffer to
a similar name with a numeric suffix added to make it both different
@ -282,6 +284,7 @@ buffers with particular names. (With some of these features, such as
buffer before using the command again, otherwise it will reuse the
current buffer despite the name change.)
@kindex C-x x i
The commands @kbd{M-x append-to-buffer} and @kbd{C-x x i}
(@code{insert-buffer}) can also be used to copy text from one buffer
to another. @xref{Accumulating Text}.

View file

@ -1986,6 +1986,7 @@ the fringe indicates truncation at either end of the line. On text
terminals, this is indicated with @samp{$} signs in the rightmost
and/or leftmost columns.
@kindex C-x x t
@vindex truncate-lines
@findex toggle-truncate-lines
Horizontal scrolling automatically causes line truncation

View file

@ -1061,6 +1061,7 @@ revert it automatically if it has changed---provided the buffer itself
is not modified. (If you have edited the text, it would be wrong to
discard your changes.)
@kindex C-x x g
@vindex revert-buffer-quick-short-answers
@findex revert-buffer-quick
The @kbd{C-x x g} keystroke is bound to the

View file

@ -287,7 +287,7 @@ Delete all windows in the selected frame except the selected window
Delete the selected window and kill the buffer that was showing in it
(@code{kill-buffer-and-window}). The last character in this key
sequence is a zero.
@item M-x delete-windows-on @key{RET} @var{buffer} @key{RET}
@item C-x w 0 @key{RET} @var{buffer} @key{RET}
Delete windows showing the specified @var{buffer}.
@item C-x ^
Make selected window taller (@code{enlarge-window}).

View file

@ -3769,7 +3769,7 @@ the first line of your Emacs Lisp file:
;;; -*- lexical-binding: t -*-
@end example
For more information about this, @pxref{Selecting Lisp Dialect, , ,
For more information about this, @pxref{Variable Scoping, , ,
elisp, The Emacs Lisp Reference Manual}.
@menu

View file

@ -1148,6 +1148,7 @@ move between menu items.
@section @kbd{M-n} creates a new independent Info buffer in Emacs
@kindex M-n @r{(Info mode)}
@kindex C-x x n
@findex clone-buffer
@cindex multiple Info buffers
If you are reading Info in Emacs, you can select a new independent

View file

@ -1275,7 +1275,7 @@ which see."
(setq font-lock-multiline nil))
(defun abbrev--possibly-save (query &optional arg)
"Hook function for use by `save-some-buffer-functions'.
"Hook function for use by `save-some-buffers-functions'.
Maybe save abbrevs, and record whether we either saved them or asked to."
;; Query mode.

View file

@ -330,7 +330,6 @@ If the value is not a list, symmetric encryption will be used."
(defun auth-source-read-char-choice (prompt choices)
"Read one of CHOICES by `read-char-choice', or `read-char'.
`dropdown-list' support is disabled because it doesn't work reliably.
Only one of CHOICES will be returned. The PROMPT is augmented
with \"[a/b/c] \" if CHOICES is \(?a ?b ?c)."
(when choices

View file

@ -1553,7 +1553,7 @@ the archive of the file moved to, creating it if it does not exist."
(prin1 todo-categories (current-buffer)))
;; If archive was just created, save it to avoid "File
;; <xyz> no longer exists!" message on invoking
;; `todo-view-archived-items'.
;; `todo-find-archive'.
(unless (file-exists-p (buffer-file-name))
(save-buffer))
(todo-category-number (or new cat))

View file

@ -164,7 +164,7 @@ If OBJECT is an icon, return the icon properties."
(defun icon-elements (name)
"Return the elements of icon NAME.
The elements are represented as a plist where the keys are
`string', `face' and `display'. The `image' element is only
`string', `face' and `image'. The `image' element is only
present if the icon is represented by an image."
(let ((string (icon-string name)))
(list 'face (get-text-property 0 'face string)

View file

@ -691,6 +691,17 @@ With optional CLEANUP, kill any associated buffers."
(cl-defun jsonrpc--process-filter (proc string)
"Called when new data STRING has arrived for PROC."
(when jsonrpc--in-process-filter
;; Problematic recursive process filters may happen if
;; `jsonrpc-connection-receive', called by us, eventually calls
;; client code which calls `process-send-string' (which see) to,
;; say send a follow-up message. If that happens to writes enough
;; bytes for pending output to be received, we will lose JSONRPC
;; messages. In that case, remove recursiveness by re-scheduling
;; ourselves to run from within a timer as soon as possible
;; (bug#60088)
(run-at-time 0 nil #'jsonrpc--process-filter proc string)
(cl-return-from jsonrpc--process-filter))
(when (buffer-live-p (process-buffer proc))
(with-current-buffer (process-buffer proc)
(let* ((conn (process-get proc 'jsonrpc-connection))

View file

@ -1101,9 +1101,9 @@ as follows.
;; Ognyan Kulev <ogi@fmi.uni-sofia.bg> wrote:
;; I would suggest future `cyrillic-translit' to be with the
;; modification of `cyrillic-translit-bulgarian' applied and the
;; modification of `cyrillic-translit-bulgarian' (now deleted) applied and the
;; latter to disappear. It could be used by people who write
;; bulgarian e-mails with latin letters for kick start (phonetic input
;; Bulgarian e-mails with latin letters for kick start (phonetic input
;; method is not so obvious as translit input method but each letter
;; is one keypress and a *lot* of people know it).

View file

@ -6556,7 +6556,7 @@ the expected result."
(error "org-element: Parsing aborted by user. Cache has been cleared.
If you observe Emacs hangs frequently, please report this to Org mode mailing list (M-x org-submit-bug-report)."))
(message (substitute-command-keys
"`org-element--parse-buffer': Suppressed `\\[keyboard-quit]'. Press `\\[keyboard-quit]' %d more times to force interruption.")
"`org-element--parse-to': Suppressed `\\[keyboard-quit]'. Press `\\[keyboard-quit]' %d more times to force interruption.")
(- org-element--cache-interrupt-C-g-max-count
org-element--cache-interrupt-C-g-count)))
(unless element

View file

@ -433,7 +433,7 @@ Return nil when there is no matching folding spec."
(org-fold-core-get-folding-spec-from-alias spec-or-alias))
(defsubst org-fold-core--check-spec (spec-or-alias)
"Throw an error if SPEC-OR-ALIAS is not in `org-fold-core--spec-priority-list'."
"Throw an error if SPEC-OR-ALIAS is not in `org-fold-core-folding-spec-list'."
(unless (org-fold-core-folding-spec-p spec-or-alias)
(error "%s is not a valid folding spec" spec-or-alias)))

View file

@ -1072,7 +1072,7 @@ Return width in pixels when PIXELS is non-nil."
;; FIXME: Fallback to old limited version, because
;; `window-pixel-width' is buggy in older Emacs.
(org--string-width-1 string)
;; Wrap/line prefix will make `window-text-pizel-size' return too
;; Wrap/line prefix will make `window-text-pixel-size' return too
;; large value including the prefix.
(remove-text-properties 0 (length string)
'(wrap-prefix t line-prefix t)

View file

@ -978,7 +978,7 @@ The most comprehensive option can be set with,
which causes source code to be run through
`engrave-faces-latex-buffer', which generates colorings using
Emacs' font-lock information. This requires the Emacs package
engrave-faces (available from ELPA), and the LaTeX package
engrave-faces (available from GNU ELPA), and the LaTeX package
fvextra be installed.
The styling of the engraved result can be customized with
@ -1262,9 +1262,10 @@ block-specific options, you may use the following syntax:
(defcustom org-latex-engraved-theme nil
"The theme that should be used for engraved code, when non-nil.
This can be set to any theme defined in `engrave-faces-themes' or
loadable by Emacs. When set to t, the current Emacs theme is
used. When nil, no theme is applied."
This can be set to any theme defined in `engrave-faces-themes'
(from the engrave-faces package) or loadable by Emacs. When set
to t, the current Emacs theme is used. When nil, no theme is
applied."
:group 'org-export-latex
:package-version '(Org . "9.6")
:type 'symbol)
@ -3666,7 +3667,7 @@ CONTENTS is the contents of the object."
;; takes care of tables with a "verbatim" mode. Otherwise, it
;; delegates the job to either `org-latex--table.el-table',
;; `org-latex--org-table', `org-latex--math-table' or
;; `org-latex--org-tabbing' functions,
;; `org-latex--org-align-string-tabbing' functions,
;; depending of the type of the table and the mode requested.
;;
;; `org-latex--align-string' is a subroutine used to build alignment

View file

@ -1797,6 +1797,55 @@ If optional MARKER, return a marker instead"
;;; More helpers
(defconst eglot--uri-path-allowed-chars
(let ((vec (copy-sequence url-path-allowed-chars)))
(aset vec ?: nil) ;; see github#639
vec)
"Like `url-path-allowed-chars' but more restrictive.")
(defun eglot--path-to-uri (path)
"URIfy PATH."
(let ((truepath (file-truename path)))
(if (and (url-type (url-generic-parse-url path))
;; It might be MS Windows path which includes a drive
;; letter that looks like a URL scheme (bug#59338)
(not (and (eq system-type 'windows-nt)
(file-name-absolute-p truepath))))
;; Path is already a URI, so forward it to the LSP server
;; untouched. The server should be able to handle it, since
;; it provided this URI to clients in the first place.
path
(concat "file://"
;; Add a leading "/" for local MS Windows-style paths.
(if (and (eq system-type 'windows-nt)
(not (file-remote-p truepath)))
"/")
(url-hexify-string
;; Again watch out for trampy paths.
(directory-file-name (file-local-name truepath))
eglot--uri-path-allowed-chars)))))
(declare-function w32-long-file-name "w32proc.c" (fn))
(defun eglot--uri-to-path (uri)
"Convert URI to file path, helped by `eglot--current-server'."
(when (keywordp uri) (setq uri (substring (symbol-name uri) 1)))
(let* ((server (eglot-current-server))
(remote-prefix (and server (eglot--trampish-p server)))
(url (url-generic-parse-url uri)))
;; Only parse file:// URIs, leave other URI untouched as
;; `file-name-handler-alist' should know how to handle them
;; (bug#58790).
(if (string= "file" (url-type url))
(let* ((retval (url-unhex-string (url-filename url)))
;; Remove the leading "/" for local MS Windows-style paths.
(normalized (if (and (not remote-prefix)
(eq system-type 'windows-nt)
(cl-plusp (length retval)))
(w32-long-file-name (substring retval 1))
retval)))
(concat remote-prefix normalized))
uri)))
(defun eglot--snippet-expansion-fn ()
"Compute a function to expand snippets.
Doubles as an indicator of snippet support."

View file

@ -1109,7 +1109,7 @@ variable `term-input-autoexpand', and addition is controlled by the
variable `term-input-ignoredups'.
Input to, and output from, the subprocess can cause the window to scroll to
the end of the buffer. See variables `term-scroll-to-bottom-on-input',
the end of the buffer. See variables `term-scroll-snap-to-bottom',
and `term-scroll-to-bottom-on-output'.
If you accidentally suspend your process, use \\[term-continue-subjob]

View file

@ -47,7 +47,7 @@
;; This was copied from etc/rgb.txt, except that some values were changed
;; a bit to make them consistent with DOS console colors, and the RGB
;; values were scaled up to 16 bits, as `tty-define-color' requires.
;; values were scaled up to 16 bits, as `tty-color-define' requires.
;;;
;; The mapping between the 16 standard EGA/VGA colors and X color names
;; was done by running a Unix version of Emacs inside an X client and a

View file

@ -1665,7 +1665,7 @@ no-node
comment-end
Matches if text after point matches `treesit-comment-end'.
Matches if text after point matches `comment-end-skip'.
catch-all

View file

@ -8625,7 +8625,7 @@ buffer. ALIST is a buffer display action alist as compiled by
canonical frame lines. If it is the constant `full-height',
prefer a full-height window.
If ALIST contains a non-nil `inhibit-same--window' entry, do not
If ALIST contains a non-nil `inhibit-same-window' entry, do not
return the selected window."
(let ((windows
(window-list-1 nil 'nomini (cdr (assq 'lru-frames alist))))

View file

@ -2877,9 +2877,9 @@ void
labeled_narrow_to_region (Lisp_Object begv, Lisp_Object zv,
Lisp_Object label)
{
Finternal__labeled_narrow_to_region (begv, zv, label);
record_unwind_protect (restore_point_unwind, Fpoint_marker ());
record_unwind_protect (unwind_labeled_narrow_to_region, label);
Finternal__labeled_narrow_to_region (begv, zv, label);
}
DEFUN ("widen", Fwiden, Swiden, 0, 0, "",

View file

@ -92,7 +92,15 @@ text.
"
)
(write-region nil nil file nil 'silent))
(should (equal 0 (call-process "makeinfo" file))))
(if (and (eq system-type 'windows-nt)
(executable-find "sh"))
;; If we are running from MSYS Bash, makeinfo.bat might find the
;; wrong version of Perl, so make sure to run the shell script
;; named just 'makeinfo' instead, because it names the correct
;; Perl.
(should (equal 0 (call-process "sh" nil t nil
"-c" (format "makeinfo '%s'" file))))
(should (equal 0 (call-process "makeinfo" file)))))
(ert-deftest info-xref-test-makeinfo ()
"Test that info-xref can parse basic makeinfo output."