From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rajesh Vaidheeswarran Newsgroups: gmane.emacs.devel Subject: Re: `whitespace-describe' function missing Date: Sun, 13 Apr 2003 22:01:12 -0400 (EDT) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: Reply-To: rv@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1050285753 15850 80.91.224.249 (14 Apr 2003 02:02:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 14 Apr 2003 02:02:33 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Apr 14 04:02:31 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 194tIl-00047V-00 for ; Mon, 14 Apr 2003 04:02:31 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 194tJv-0005so-00 for ; Mon, 14 Apr 2003 04:03:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 194tJB-0007FN-08 for emacs-devel@quimby.gnus.org; Sun, 13 Apr 2003 22:02:57 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 194tIk-0006NA-00 for emacs-devel@gnu.org; Sun, 13 Apr 2003 22:02:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 194tI4-000563-00 for emacs-devel@gnu.org; Sun, 13 Apr 2003 22:01:49 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 194tHV-0004l4-00 for emacs-devel@gnu.org; Sun, 13 Apr 2003 22:01:13 -0400 Original-Received: from localhost ([127.0.0.1] helo=gnu.org) by fencepost.gnu.org with esmtp (Exim 4.10) id 194tHV-0003C7-00; Sun, 13 Apr 2003 22:01:13 -0400 Original-Received: by fencepost.gnu.org with BradMail(MH 6.8.4); Sun, 13 Apr 2003 22:01:12 -0400 (EDT) Original-To: bob@rattlesnake.com In-reply-to: Message from "Robert J. Chassell" of "Fri, 11 Apr 2003 13:21:17 EDT." X-LoopDetect: rv@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:13218 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13218 Hi, I'm not sure which version of whitespace.el you are using... but, the function does exist in 3.1 (installed with emacs on fencepost) and 3.2, which I had checked out last from subversions... rv ;;;###autoload (defun whitespace-describe () "A summary of whitespaces and what this library can do about them. The whitespace library is intended to find and help fix five different types of whitespace problems that commonly exist in source code. 1. Leading space (empty lines at the top of a file). 2. Trailing space (empty lines at the end of a file). 3. Indentation space (8 or more spaces at beginning of line, that should be replaced with TABS). 4. Spaces followed by a TAB. (Almost always, we never want that). 5. Spaces or TABS at the end of a line. Whitespace errors are reported in a buffer, and on the modeline. Modeline will show a W:! to denote a particular type of whitespace, where `x' and `y' can be one (or more) of: e - End-of-Line whitespace. i - Indentation whitespace. l - Leading whitespace. s - Space followed by Tab. t - Trailing whitespace. If any of the whitespace checks is turned off, the modeline will display a !. (since (3) is the most controversial one, here is the rationale: Most terminal drivers and printer drivers have TAB configured or even hardcoded to be 8 spaces. (Some of them allow configuration, but almost always they default to 8.) Changing `tab-width' to other than 8 and editing will cause your code to look different from within Emacs, and say, if you cat it or more it, or even print it. Almost all the popular programming modes let you define an offset (like c-basic-offset or perl-indent-level) to configure the offset, so you should never have to set your `tab-width' to be other than 8 in all these modes. In fact, with an indent level of say, 4, 2 TABS will cause Emacs to replace your 8 spaces with one \t (try it). If vi users in your office complain, tell them to use vim, which distinguishes between tabstop and shiftwidth (vi equivalent of our offsets), and also ask them to set smarttab.) All the above have caused (and will cause) unwanted codeline integration and merge problems. whitespace.el will complain if it detects whitespaces on opening a file, and warn you on closing a file also (in case you had inserted any whitespaces during the process of your editing)." (interactive) (message "Use C-h f whitespace-describe to read about whitespace.el v%s." whitespace-version)) In a previous message, "Robert J. Chassell" writes: > Today's GNU Emacs CVS snapshot, Fri, 2003 Apr 11 12:37 UTC > > In `lisp/whitespace.el', the `whitespace-cleanup' function says > > Use \\[describe-function] whitespace-describe to read a summary of the > whitespace problems." > > but the `whitespace-describe' function does not exist! > > The `whitespace problems' are described in the `whitespace-buffer' > function and in the `lisp/whitespace.el' commentary. > > -- > Robert J. Chassell Rattlesnake Enterprises > http://www.rattlesnake.com GnuPG Key ID: 004B4AC8 > http://www.teak.cc bob@rattlesnake.com > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://mail.gnu.org/mailman/listinfo/emacs-devel >