Commit a336300c authored by Jimmy Aguilar Mena's avatar Jimmy Aguilar Mena

;Corrected display-fill-column-indicator mode.

Small corrections in the documentation and code format to merge into master.
parent 5b842bd7
......@@ -1181,10 +1181,11 @@ When the mode is enabled through the functions
@code{display-fill-column-indicator-mode} or
@code{global-display-fill-column-indicator-mode}, the initialization
functions check if this variable is @code{non-nil}, otherwise the
initialization tries to set it to U+2502 or '|'.
initialization tries to set it to U+2502 or @sampl{|}.
@item fill-column-face
Specifies the face used to display the indicator it inherits its
@item fill-column-indicator
@vindex fill-column-indicator
Specifies the face used to display the indicator. It inherits its
default values from shadow and the default face.
@end table
......
......@@ -340,7 +340,7 @@ longer.
** Multicolor fonts such as "Noto Color Emoji" can be displayed on
Emacs configured with Cairo drawing and linked with cairo >= 1.16.0.
---
+++
** Emacs now optionally displays a fill column indicator.
This is similar to what 'fill-column-indicator' package provides, but
......@@ -354,28 +354,7 @@ The indicator is not displayed at all in minibuffer windows and
in tooltips, as it is not useful there.
There are 2 new buffer local variables and 1 face to customize this
mode:
*** 'display-fill-column-indicator-column' is the column where the
indicator should be set. It can take positive numerical values for
the column or the special value t. Any other value disables the
indicator. The default value is t.
When the value is t it means that the variable 'fill-column' will
be used.
*** 'display-fill-column-indicator-char' is the character used for the
indicator. This character can be any valid char including unicode
ones if the user's font supports them.
When the mode is enabled throw the functions
'display-fill-column-indicator-mode' and
'global-display-fill-column-indicator-mode', they check if there
is a value non-nil for this variable, otherwise the initialization
tries to set it to U+2502 or '|'.
*** 'fill-column-face' is the face used to display the indicator it
inherits it default values from shadow and the default faces.
mode they are described in the manual "(emacs) Display".
* Editing Changes in Emacs 27.1
......
......@@ -650,11 +650,14 @@ since it could result in memory overflow and make Emacs crash."
"26.1")
(display-fill-column-indicator display-fill-column-indicator
(choice
(const :tag "Off (nil)" :value nil)
(const :tag "On (t)" :value t))
"27.1")
boolean "27.1")
(display-fill-column-indicator-column display-fill-column-indicator
(choice
(const :tag "Use fill-column variable"
:value t)
(const :tag "Fixed column number"
:value 70
:format "%v"))
integer "27.1")
(display-fill-column-indicator-character display-fill-column-indicator
character "27.1")
......
;;; display-fill-column-indicator.el --- interface for display-fill-column-indicator -*- lexical-binding: t -*-
;; Copyright (C) 2017-2019 Free Software Foundation, Inc.
;; Copyright (C) 2019 Free Software Foundation, Inc.
;; Maintainer: emacs-devel@gnu.org
;; Keywords: convenience
......@@ -37,18 +37,18 @@
;;; Code:
(defgroup display-fill-column-indicator nil
"Display a fill column indicator in th buffer."
"Display a fill column indicator in the buffer."
:group 'convenience
:group 'display)
;;;###autoload
(define-minor-mode display-fill-column-indicator-mode
"Toggle display fill column indicator.
"Toggle display of fill-column indicator.
This uses `display-fill-column-indicator' internally.
To change the position of the column displayed by default,
customize `display-fill-column-indicator-column' you can change the
To change the position of the column displayed by default
customize `display-fill-column-indicator-column'. You can change the
character for the indicator setting `display-fill-column-indicator-character'."
:lighter nil
(if display-fill-column-indicator-mode
......
......@@ -2501,15 +2501,11 @@ unwanted effects."
:group 'display-line-numbers)
;; Definition stolen from display-line-numbers.
(defface fill-column-face
(defface fill-column-indicator
'((t :inherit (shadow default)))
"Face for displaying fill column indicator line.
"Face for displaying fill column indicator.
This face is used when `display-fill-column-indicator-mode' is
non-nil.
If you customize the font of this face, make sure it is a
monospaced font, otherwise the line's characters will not line
up horizontally."
non-nil."
:version "27.1"
:group 'basic-faces
:group 'display-fill-column-indicator)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment