[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: new mode-line `%'-construct %o meaning "Degree of travel o

From: Kaushal Modi
Subject: Re: Proposal: new mode-line `%'-construct %o meaning "Degree of travel of window through buffer".
Date: Mon, 22 May 2017 02:22:49 +0000

Hi Alan,

I like this feature. Thanks for implementing it. I like both %o and %q.. not sure which one to pick yet.

I only have comments regarding the variable docstrings.

(1) I suggest adding more detail to the docstring of the new variable along these lines:

diff --git a/lisp/bindings.el b/lisp/bindings.el
index 0e6ffc275e..2a079000bf 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -366,10 +366,20 @@ column-number-indicator-zero-based
   :version "26.1")
 (defcustom mode-line-percent-position '(-3 "%p")
-  "Specification of \"percentage offset\" of window through buffer
-This option specifies both the field width and the type of offset
-displayed in `mode-line-position', a component of the default
+  "Specification of \"percentage offset\" of window through buffer.
+This option is a list where the first element specifies the field
+width to space-fill or truncate to, and the second element specifies
+the type of buffer offset to display in `mode-line-position'.
+The field width is specified as an integer.  If the integer is
+negative (-N), the width is truncated to N characters, and if it is
+positive (N), padding is added if needed to make the field N
+characters wide.
+The buffer offset component can be one of \"%o\", \"%p\", \"%P\" or
+\"%q\". See `mode-line-format' for more information on these %
   :type `(radio
           (const :tag "nil:  No offset is displayed" nil)
           (const :tag "\"%o\": Proportion of \"travel\" of the window through the buffer"

(2) The docstring of mode-line-format also needs to be update to explain the new options %o and %q.


Kaushal Modi

reply via email to

[Prev in Thread] Current Thread [Next in Thread]