Merge branch 'emacs-29' of git.sv.gnu.org:/srv/git/emacs into emacs-29

This commit is contained in:
Michael Albinus 2023-02-22 15:35:48 +01:00
commit 20c654b6f8
11 changed files with 65 additions and 51 deletions

View file

@ -1402,7 +1402,11 @@ right-to-left paragraphs.
functionality especially in @code{prog-mode} and its descendants
(@pxref{Major Modes}) to indicate the position of a specific column
that has some special meaning for formatting the source code of a
program.
program. This assumes the buffer uses a fixed-pitch font, where all
the characters (with the possible exception of double-width
characters) have the same width on display. If the buffer uses
variable-pitch fonts, the fill-column indicators on different lines
might appear unaligned.
To activate the fill-column indication display, use the minor modes
@code{display-fill-@-column-indicator-mode} and

View file

@ -619,7 +619,12 @@ variable @code{fill-column}. The default value (@pxref{Locals}) is
is to use the command @kbd{C-x f} (@code{set-fill-column}). With a
numeric argument, it uses that as the new fill column. With just
@kbd{C-u} as argument, it sets @code{fill-column} to the current
horizontal position of point.
horizontal position of point. Note that, by its very nature,
@code{fill-column} is measured in column units; the actual position of
that column on a graphical display depends on the font being used. In
particular, using variable-pitch fonts will cause the
@code{fill-column} occupy different horizontal positions on display in
different lines.
@cindex centering
@findex center-line

View file

@ -19808,10 +19808,11 @@ locally stored articles.
@chapter Scoring
@cindex scoring
Other people use @dfn{kill files}, but we here at Gnus Towers like
scoring better than killing, so we'd rather switch than fight. They do
something completely different as well, so sit up straight and pay
attention!
Other people use @dfn{kill files} (@pxref{Kill Files}, but we here at
Gnus Towers like scoring better than killing, so we'd rather switch
than fight. Scoring and score files processing are more powerful and
faster than processing of kill files. Scoring also does something
completely different as well, so sit up straight and pay attention!
@vindex gnus-summary-mark-below
All articles have a default score (@code{gnus-summary-default-score}),

View file

@ -53,6 +53,9 @@ customize `display-fill-column-indicator-column'. You can change the
character for the indicator setting `display-fill-column-indicator-character'.
The globalized version is `global-display-fill-column-indicator-mode',
which see.
This minor mode assumes the buffer uses a fixed-pitch font; if you
use variable-pitch fonts, the indicators on different lines might
not appear aligned.
See Info node `Displaying Boundaries' for details."
:lighter nil
(if display-fill-column-indicator-mode

View file

@ -883,24 +883,22 @@ Conditionally try to reconnect and take appropriate action."
(erc--unhide-prompt)))
(defun erc--hide-prompt (proc)
(erc-with-all-buffers-of-server
proc nil ; sorta wish this was indent 2
(when (and erc-hide-prompt
(or (eq erc-hide-prompt t)
;; FIXME use `erc--target' after bug#48598
(memq (if (erc-default-target)
(if (erc-channel-p (car erc-default-recipients))
'channel
'query)
'server)
erc-hide-prompt))
(marker-position erc-insert-marker)
(marker-position erc-input-marker)
(get-text-property erc-insert-marker 'erc-prompt))
(with-silent-modifications
(add-text-properties erc-insert-marker (1- erc-input-marker)
`(display ,erc-prompt-hidden)))
(add-hook 'pre-command-hook #'erc--unhide-prompt-on-self-insert 0 t))))
(erc-with-all-buffers-of-server proc nil
(when (and erc-hide-prompt
(or (eq erc-hide-prompt t)
(memq (if erc--target
(if (erc--target-channel-p erc--target)
'channel
'query)
'server)
erc-hide-prompt))
(marker-position erc-insert-marker)
(marker-position erc-input-marker)
(get-text-property erc-insert-marker 'erc-prompt))
(with-silent-modifications
(add-text-properties erc-insert-marker (1- erc-input-marker)
`(display ,erc-prompt-hidden)))
(add-hook 'pre-command-hook #'erc--unhide-prompt-on-self-insert 91 t))))
(defun erc-process-sentinel (cproc event)
"Sentinel function for ERC process."

View file

@ -48,9 +48,6 @@
;; User data
nickname host login full-name info
;; Buffers
;;
;; This is an alist of the form (BUFFER . CHANNEL-DATA), where
;; CHANNEL-DATA is either nil or an erc-channel-user struct.
(buffers nil))
(cl-defstruct (erc-channel-user (:type vector) :named)

View file

@ -585,13 +585,15 @@ thumbnail buffer to be selected."
(erase-buffer))
(goto-char (point-max)))
(dolist (file files)
(let ((thumb (image-dired--get-create-thumbnail-file file)))
(when (string-match-p (image-dired--file-name-regexp) file)
(image-dired-insert-thumbnail
thumb file dired-buf
(image-dired--get-create-thumbnail-file file) file dired-buf
(cl-incf image-dired--number-of-thumbnails)))))
(if do-not-pop
(display-buffer buf)
(pop-to-buffer buf))
(if (> image-dired--number-of-thumbnails 0)
(if do-not-pop
(display-buffer buf)
(pop-to-buffer buf))
(message "No images selected"))
(image-dired--line-up-with-method)
(image-dired--update-header-line))))

View file

@ -6376,7 +6376,7 @@ for key in sorted(result):
"List files containing Python imports that may be useful in the current buffer."
(if-let (((featurep 'project)) ;For compatibility with Emacs < 26
(proj (project-current)))
(seq-filter (lambda (s) (string-match-p "\\.py[ciw]?\\'" s))
(seq-filter (lambda (s) (string-match-p "\\.py[iwx]?\\'" s))
(project-files proj))
(list default-directory)))

View file

@ -937,7 +937,7 @@ column specified by the function `current-left-margin'."
(defcustom read-quoted-char-radix 8
"Radix for \\[quoted-insert] and other uses of `read-quoted-char'.
Legitimate radix values are 8, 10 and 16."
Supported radix values are 8, 10 and 16."
:type '(choice (const 8) (const 10) (const 16))
:group 'editing-basics)
@ -1012,21 +1012,25 @@ any other non-digit terminates the character code and is then used as input."))
This is useful for inserting control characters.
With argument, insert ARG copies of the character.
If the first character you type after this command is an octal digit,
you should type a sequence of octal digits that specify a character code.
Any nondigit terminates the sequence. If the terminator is a RET,
it is discarded; any other terminator is used itself as input.
If the first character you type is an octal digit, the sequence of
one or more octal digits you type is interpreted to specify a
character code. Any character that is not an octal digit terminates
the sequence. If the terminator is a RET, it is discarded; any
other terminator is used itself as input and is inserted.
The variable `read-quoted-char-radix' specifies the radix for this feature;
set it to 10 or 16 to use decimal or hex instead of octal.
set it to 10 or 16 to use decimal or hex instead of octal. If you change
the radix, the characters interpreted as specifying a character code
change accordingly: 0 to 9 for decimal, 0 to F for hex.
In overwrite mode, this function inserts the character anyway, and
does not handle octal digits specially. This means that if you use
overwrite as your normal editing mode, you can use this function to
insert characters when necessary.
does not handle octal (or decimal or hex) digits specially. This means
that if you use overwrite mode as your normal editing mode, you can use
this function to insert characters when necessary.
In binary overwrite mode, this function does overwrite, and octal
digits are interpreted as a character code. This is intended to be
useful for editing binary files."
(or decimal or hex) digits are interpreted as a character code. This
is intended to be useful for editing binary files."
(interactive "*p")
(let* ((char
;; Avoid "obsolete" warnings for translation-table-for-input.

View file

@ -3498,18 +3498,18 @@ init_iterator (struct it *it, struct window *w,
static int
get_narrowed_width (struct window *w)
{
int fact;
/* In a character-only terminal, only one font size is used, so we
can use a smaller factor. */
fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3;
return fact * window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS);
int fact = EQ (Fterminal_live_p (Qnil), Qt) ? 2 : 3;
int width = window_body_width (w, WINDOW_BODY_IN_CANONICAL_CHARS);
return fact * max (1, width);
}
static int
get_narrowed_len (struct window *w)
{
return get_narrowed_width (w) *
window_body_height (w, WINDOW_BODY_IN_CANONICAL_CHARS);
int height = window_body_height (w, WINDOW_BODY_IN_CANONICAL_CHARS);
return get_narrowed_width (w) * max (1, height);
}
ptrdiff_t

View file

@ -147,7 +147,7 @@
(should (looking-at-p (regexp-quote erc-prompt)))
(setq erc-server-process (buffer-local-value 'erc-server-process
(get-buffer "ServNet"))
erc-default-recipients '("#chan")))
erc--target (erc--target-from-string "#chan")))
(with-current-buffer (get-buffer-create "bob")
(erc-tests--send-prep)
@ -155,7 +155,7 @@
(should (looking-at-p (regexp-quote erc-prompt)))
(setq erc-server-process (buffer-local-value 'erc-server-process
(get-buffer "ServNet"))
erc-default-recipients '("bob")))
erc--target (erc--target-from-string "bob")))
(ert-info ("Value: t (default)")
(should (eq erc-hide-prompt t))