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 functionality especially in @code{prog-mode} and its descendants
(@pxref{Major Modes}) to indicate the position of a specific column (@pxref{Major Modes}) to indicate the position of a specific column
that has some special meaning for formatting the source code of a 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 To activate the fill-column indication display, use the minor modes
@code{display-fill-@-column-indicator-mode} and @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 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 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 @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 @cindex centering
@findex center-line @findex center-line

View file

@ -19808,10 +19808,11 @@ locally stored articles.
@chapter Scoring @chapter Scoring
@cindex scoring @cindex scoring
Other people use @dfn{kill files}, but we here at Gnus Towers like Other people use @dfn{kill files} (@pxref{Kill Files}, but we here at
scoring better than killing, so we'd rather switch than fight. They do Gnus Towers like scoring better than killing, so we'd rather switch
something completely different as well, so sit up straight and pay than fight. Scoring and score files processing are more powerful and
attention! 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 @vindex gnus-summary-mark-below
All articles have a default score (@code{gnus-summary-default-score}), 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'. character for the indicator setting `display-fill-column-indicator-character'.
The globalized version is `global-display-fill-column-indicator-mode', The globalized version is `global-display-fill-column-indicator-mode',
which see. 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." See Info node `Displaying Boundaries' for details."
:lighter nil :lighter nil
(if display-fill-column-indicator-mode (if display-fill-column-indicator-mode

View file

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

View file

@ -48,9 +48,6 @@
;; User data ;; User data
nickname host login full-name info nickname host login full-name info
;; Buffers ;; 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)) (buffers nil))
(cl-defstruct (erc-channel-user (:type vector) :named) (cl-defstruct (erc-channel-user (:type vector) :named)

View file

@ -585,13 +585,15 @@ thumbnail buffer to be selected."
(erase-buffer)) (erase-buffer))
(goto-char (point-max))) (goto-char (point-max)))
(dolist (file files) (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 (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))))) (cl-incf image-dired--number-of-thumbnails)))))
(if (> image-dired--number-of-thumbnails 0)
(if do-not-pop (if do-not-pop
(display-buffer buf) (display-buffer buf)
(pop-to-buffer buf)) (pop-to-buffer buf))
(message "No images selected"))
(image-dired--line-up-with-method) (image-dired--line-up-with-method)
(image-dired--update-header-line)))) (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." "List files containing Python imports that may be useful in the current buffer."
(if-let (((featurep 'project)) ;For compatibility with Emacs < 26 (if-let (((featurep 'project)) ;For compatibility with Emacs < 26
(proj (project-current))) (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)) (project-files proj))
(list default-directory))) (list default-directory)))

View file

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

View file

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

View file

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