[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 003759a6dca: Explain effect of variable-pitch fonts on fill-col
From: |
Eli Zaretskii |
Subject: |
emacs-29 003759a6dca: Explain effect of variable-pitch fonts on fill-column |
Date: |
Wed, 22 Feb 2023 08:17:04 -0500 (EST) |
branch: emacs-29
commit 003759a6dca730df6fae6c9bc8d4a47761b10014
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Explain effect of variable-pitch fonts on fill-column
* doc/emacs/text.texi (Fill Commands):
* doc/emacs/display.texi (Displaying Boundaries):
* lisp/display-fill-column-indicator.el
(display-fill-column-indicator-mode): Document caveats of using
variable-pitch fonts with 'fill-column' and its indicator.
(Bug#61677)
---
doc/emacs/display.texi | 6 +++++-
doc/emacs/text.texi | 7 ++++++-
lisp/display-fill-column-indicator.el | 3 +++
3 files changed, 14 insertions(+), 2 deletions(-)
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/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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 003759a6dca: Explain effect of variable-pitch fonts on fill-column,
Eli Zaretskii <=