diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index a86c12a0db7..7ec843180b8 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -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 diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index 3cc5f10582a..7037c8c943a 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -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 diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index 486171a080a..d513726979b 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -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}), diff --git a/lisp/display-fill-column-indicator.el b/lisp/display-fill-column-indicator.el index 7ad09de0765..45bdca2f5a5 100644 --- a/lisp/display-fill-column-indicator.el +++ b/lisp/display-fill-column-indicator.el @@ -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 diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index cf0b734bd28..567443f5329 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -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." diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el index 994555acecf..0279b0a0bc4 100644 --- a/lisp/erc/erc-common.el +++ b/lisp/erc/erc-common.el @@ -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) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 11632e7f28e..8e2a75a418f 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -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)))) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 0d714c31e9e..eab5e70af33 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -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))) diff --git a/lisp/simple.el b/lisp/simple.el index 5f23910efc6..b6efb06fc27 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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. diff --git a/src/xdisp.c b/src/xdisp.c index f5d54974b13..b64f1d35cbc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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 diff --git a/test/lisp/erc/erc-tests.el b/test/lisp/erc/erc-tests.el index 40a2d2de657..d6c63934163 100644 --- a/test/lisp/erc/erc-tests.el +++ b/test/lisp/erc/erc-tests.el @@ -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))