unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
@ 2015-04-16  9:17 Philipp Stephani
  2015-04-18  8:19 ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Stephani @ 2015-04-16  9:17 UTC (permalink / raw)
  To: 20346

The documentation of the `whitespace-style' variable mentions the
following possible symbols:

big-indent
empty
face
indentation
indentation::space
indentation::tab
lines
lines-tail
newline
newline-mark
space-after-tab
space-after-tab::space
space-after-tab::tab
space-before-tab
space-before-tab::space
space-before-tab::tab
space-mark
spaces
tab-mark
tabs
trailing

However, the available customization choices are only:

big-indent
empty
face
indentation
lines
newline
newline-mark
space-after-tab
space-before-tab
space-mark
spaces
tab-mark
tabs
trailing

Also for the type of the customization option, `set' would be more
appropriate than `repeat'.


In GNU Emacs 24.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.10.7)
 of 2014-03-07 on lamiak, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var/lib' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs24:/etc/emacs:/usr/local/share/emacs/24.3/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.3/site-lisp:/usr/share/emacs/site-lisp'
 '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes'
 '--with-x-toolkit=gtk3' '--with-toolkit-scroll-bars'
 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector
 --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall'
 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro'
 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t - e <tab> <return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils time-date tooltip ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-16  9:17 bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent Philipp Stephani
@ 2015-04-18  8:19 ` Eli Zaretskii
  2015-04-18  8:26   ` Philipp Stephani
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2015-04-18  8:19 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 20346

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Thu, 16 Apr 2015 11:17:38 +0200
> 
> The documentation of the `whitespace-style' variable mentions the
> following possible symbols:
> 
> big-indent
> empty
> face
> indentation
> indentation::space
> indentation::tab
> lines
> lines-tail
> newline
> newline-mark
> space-after-tab
> space-after-tab::space
> space-after-tab::tab
> space-before-tab
> space-before-tab::space
> space-before-tab::tab
> space-mark
> spaces
> tab-mark
> tabs
> trailing
> 
> However, the available customization choices are only:
> 
> big-indent
> empty
> face
> indentation
> lines
> newline
> newline-mark
> space-after-tab
> space-before-tab
> space-mark
> spaces
> tab-mark
> tabs
> trailing
> 
> Also for the type of the customization option, `set' would be more
> appropriate than `repeat'.

I'm not sure I understand the report: are you saying that the
documentation is wrong (doesn't fit the code), or are you saying that
the customize form is wrong/incomplete?

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-18  8:19 ` Eli Zaretskii
@ 2015-04-18  8:26   ` Philipp Stephani
  2015-04-18  8:34     ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Stephani @ 2015-04-18  8:26 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20346

[-- Attachment #1: Type: text/plain, Size: 1320 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Sa., 18. Apr. 2015 um 10:19 Uhr:

> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Thu, 16 Apr 2015 11:17:38 +0200
> >
> > The documentation of the `whitespace-style' variable mentions the
> > following possible symbols:
> >
> > big-indent
> > empty
> > face
> > indentation
> > indentation::space
> > indentation::tab
> > lines
> > lines-tail
> > newline
> > newline-mark
> > space-after-tab
> > space-after-tab::space
> > space-after-tab::tab
> > space-before-tab
> > space-before-tab::space
> > space-before-tab::tab
> > space-mark
> > spaces
> > tab-mark
> > tabs
> > trailing
> >
> > However, the available customization choices are only:
> >
> > big-indent
> > empty
> > face
> > indentation
> > lines
> > newline
> > newline-mark
> > space-after-tab
> > space-before-tab
> > space-mark
> > spaces
> > tab-mark
> > tabs
> > trailing
> >
> > Also for the type of the customization option, `set' would be more
> > appropriate than `repeat'.
>
> I'm not sure I understand the report: are you saying that the
> documentation is wrong (doesn't fit the code), or are you saying that
> the customize form is wrong/incomplete?
>
>
From my experience the documentation is correct, and it's the customization
option list that's incomplete. I can send a patch if you like.

[-- Attachment #2: Type: text/html, Size: 1955 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-18  8:26   ` Philipp Stephani
@ 2015-04-18  8:34     ` Eli Zaretskii
  2015-04-18  8:44       ` Philipp Stephani
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2015-04-18  8:34 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 20346

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 18 Apr 2015 08:26:21 +0000
> Cc: 20346@debbugs.gnu.org
> 
> From my experience the documentation is correct, and it's the customization
> option list that's incomplete. I can send a patch if you like. 

Please do, and thanks!





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-18  8:34     ` Eli Zaretskii
@ 2015-04-18  8:44       ` Philipp Stephani
  2015-04-18  9:40         ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Philipp Stephani @ 2015-04-18  8:44 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 20346


[-- Attachment #1.1: Type: text/plain, Size: 399 bytes --]

Eli Zaretskii <eliz@gnu.org> schrieb am Sa., 18. Apr. 2015 um 10:35 Uhr:

> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Sat, 18 Apr 2015 08:26:21 +0000
> > Cc: 20346@debbugs.gnu.org
> >
> > From my experience the documentation is correct, and it's the
> customization
> > option list that's incomplete. I can send a patch if you like.
>
> Please do, and thanks!
>

Patch is attached.

[-- Attachment #1.2: Type: text/html, Size: 814 bytes --]

[-- Attachment #2: 0001-Overhaul-customization-type-for-whitespace-style.patch --]
[-- Type: application/octet-stream, Size: 3418 bytes --]

From 18218b6558bafca0e08339f0688e41ca690a72c3 Mon Sep 17 00:00:00 2001
From: Philipp Stephani <phst@google.com>
Date: Sat, 18 Apr 2015 10:42:54 +0200
Subject: [PATCH] Overhaul customization type for `whitespace-style'.

Use `set' instead of a `repeat' because the option is really set-like.
Add missing options.
Reorder options to match the order in the documentation.
---
 lisp/whitespace.el | 53 ++++++++++++++++++++++++++++-------------------------
 1 file changed, 28 insertions(+), 25 deletions(-)

diff --git a/lisp/whitespace.el b/lisp/whitespace.el
index b4cd67f..fad3e2f 100644
--- a/lisp/whitespace.el
+++ b/lisp/whitespace.el
@@ -538,31 +538,34 @@ cleaning up a buffer.  See `whitespace-cleanup' and
 `whitespace-cleanup-region' for documentation.
 
 See also `whitespace-display-mappings' for documentation."
-  :type '(repeat :tag "Kind of Blank"
-		 (choice :tag "Kind of Blank Face"
-			 (const :tag "(Face) Face visualization"
-				face)
-			 (const :tag "(Face) Trailing TABs, SPACEs and HARD SPACEs"
-				trailing)
-			 (const :tag "(Face) SPACEs and HARD SPACEs"
-				spaces)
-			 (const :tag "(Face) TABs" tabs)
-			 (const :tag "(Face) Lines" lines)
-			 (const :tag "(Face) SPACEs before TAB"
-				space-before-tab)
-			 (const :tag "(Face) NEWLINEs" newline)
-			 (const :tag "(Face) Indentation SPACEs"
-				indentation)
-			 (const :tag "(Face) Too much line indentation"
-				big-indent)
-			 (const :tag "(Face) Empty Lines At BOB And/Or EOB"
-				empty)
-			 (const :tag "(Face) SPACEs after TAB"
-				space-after-tab)
-			 (const :tag "(Mark) SPACEs and HARD SPACEs"
-				space-mark)
-			 (const :tag "(Mark) TABs" tab-mark)
-			 (const :tag "(Mark) NEWLINEs" newline-mark)))
+  :type '(set :tag "Kind of Blank"
+              (const :tag "(Face) Face visualization" face)
+              (const :tag "(Face) Trailing TABs, SPACEs and HARD SPACEs"
+                     trailing)
+              (const :tag "(Face) TABs" tabs)
+              (const :tag "(Face) SPACEs and HARD SPACEs" spaces)
+              (const :tag "(Face) Lines" lines)
+              (const :tag "(Face) Lines, only overlong part" lines-tail)
+              (const :tag "(Face) NEWLINEs" newline)
+              (const :tag "(Face) Empty Lines At BOB And/Or EOB" empty)
+              (const :tag "(Face) Indentation SPACEs" indentation::tab)
+              (const :tag "(Face) Indentation TABs"
+                     indentation::space)
+              (const :tag "(Face) Indentation TABs or SPACEs" indentation)
+              (const :tag "(Face) Too much line indentation" big-indent)
+              (const :tag "(Face) SPACEs after TAB: SPACEs"
+                     space-after-tab::tab)
+              (const :tag "(Face) SPACEs after TAB: TABs"
+                     space-after-tab::space)
+              (const :tag "(Face) SPACEs after TAB" space-after-tab)
+              (const :tag "(Face) SPACEs before TAB: SPACEs"
+                     space-before-tab::tab)
+              (const :tag "(Face) SPACEs before TAB: TABs"
+                     space-before-tab::space)
+              (const :tag "(Face) SPACEs before TAB" space-before-tab)
+              (const :tag "(Mark) SPACEs and HARD SPACEs" space-mark)
+              (const :tag "(Mark) TABs" tab-mark)
+              (const :tag "(Mark) NEWLINEs" newline-mark))
   :group 'whitespace)
 
 (defvar whitespace-space 'whitespace-space
-- 
2.3.5


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-18  8:44       ` Philipp Stephani
@ 2015-04-18  9:40         ` Eli Zaretskii
  2015-05-02  9:17           ` Eli Zaretskii
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2015-04-18  9:40 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 20346

> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Sat, 18 Apr 2015 08:44:43 +0000
> Cc: 20346@debbugs.gnu.org
> 
> Patch is attached. 

Thanks.  Please in the future include a ChangeLog-style log entry.

Let's wait for a few days to let others comment, and then I will push
this.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent
  2015-04-18  9:40         ` Eli Zaretskii
@ 2015-05-02  9:17           ` Eli Zaretskii
  0 siblings, 0 replies; 7+ messages in thread
From: Eli Zaretskii @ 2015-05-02  9:17 UTC (permalink / raw)
  To: p.stephani2; +Cc: 20346-done

> Date: Sat, 18 Apr 2015 12:40:56 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 20346@debbugs.gnu.org
> 
> > From: Philipp Stephani <p.stephani2@gmail.com>
> > Date: Sat, 18 Apr 2015 08:44:43 +0000
> > Cc: 20346@debbugs.gnu.org
> > 
> > Patch is attached. 
> 
> Thanks.  Please in the future include a ChangeLog-style log entry.
> 
> Let's wait for a few days to let others comment, and then I will push
> this.

No comments, so I pushed this, and I'm marking this bug done.

Thanks again for working on this.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-05-02  9:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16  9:17 bug#20346: 24.3; Variable `whitespace-style': documentation and custom choices inconsistent Philipp Stephani
2015-04-18  8:19 ` Eli Zaretskii
2015-04-18  8:26   ` Philipp Stephani
2015-04-18  8:34     ` Eli Zaretskii
2015-04-18  8:44       ` Philipp Stephani
2015-04-18  9:40         ` Eli Zaretskii
2015-05-02  9:17           ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).