qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: malc <av1474@comtv.ru>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Patch removing spaces
Date: Tue, 20 May 2008 21:32:39 +0400 (MSD)	[thread overview]
Message-ID: <Pine.LNX.4.64.0805202131330.2426@linmac.oyster.ru> (raw)
In-Reply-To: <f43fc5580805191114h7b4a2a64y4fa7c288c4ea2c23@mail.gmail.com>

On Mon, 19 May 2008, Blue Swirl wrote:

> On 5/19/08, malc <av1474@comtv.ru> wrote:
>> On Mon, 19 May 2008, Ian Jackson wrote:
>>
>>
>>> Balazs Attila-Mihaly \(Cd-MaN\) writes ("[Qemu-devel] Patch removing
>>>
>>>> spaces"): If anyone is interested: a patch which removes spaces from
>>>> the end of the lines. Compressed because it's rather big.
>>>>
>>>
>>> Please don't apply this patch!
>>>
>>> Spaces at the ends of lines are indeed irritating and we should avoid
>>> them.  But going out of our way to remove them is definitely wrong -
>>> it's reformatting, which is nearly always wrong in Free Software.
>>>
>>>
>>
>>  [..snip..]
>>
>>  Preventive measure that makes the code look sufficiently ugly when
>>  tabs or trailing whitespace is present. Hands almost reflectively
>>  reach for `M-x nuke-trailing-whitespace' and `C-x h M-x untabify'
>
> No match for M-x nuke-trailing-whitespace, where is that?

Oh, i have had it in my elisp collection for so long that forgot that
it's not included in XEmacs (not sure about FSF Emacs)

That's the one i use:

;; whitespace.el --- strip trailing whitespace from buffers
;; Author: Noah Friedman <friedman@prep.ai.mit.edu>
;; Created: 1995-02-11

>>  (defface font-lock-ws-face
>>   '((((class color) (background dark)) (:background "white"))
>>     (((class color) (background light)) (:background "black"))
>>     (t (:bold t)))
>>   "Font Lock mode face used to highlight unwated whitespace."
>>   :group 'font-lock-faces)
>>  (setq font-lock-ws-face 'font-lock-ws-face)
>>
>>  (defun font-lock-mode-hook-fn ()
>>   (setq old-font-lock-keywords font-lock-keywords)
>>   (make-variable-buffer-local 'font-lock-keywords)
>>   (let ((elem
>>          (list
>>           (list "\\([ \t]+$\\)\\|\\(\t\\)"
>>                 (list 0 font-lock-ws-face)))))
>>     (setq font-lock-keywords (append font-lock-keywords elem))))
>>
>>  (add-hook 'font-lock-mode-hook 'font-lock-mode-hook-fn)
>
> Thanks, it's ugly!

You are welcome :)

-- 
mailto:av1474@comtv.ru

  parent reply	other threads:[~2008-05-20 17:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-18 16:31 [Qemu-devel] Patch removing spaces Balazs Attila-Mihaly (Cd-MaN)
2008-05-19  9:58 ` Ian Jackson
2008-05-19 10:35   ` Johannes Schindelin
2008-05-19 10:52   ` [Qemu-devel] " Jan Kiszka
2008-05-19 17:58   ` [Qemu-devel] " malc
2008-05-19 18:14     ` Blue Swirl
2008-05-19 20:23       ` Stuart Brady
2008-05-19 20:59         ` Paul Brook
2008-05-20 11:00           ` Laurent Desnogues
2008-05-20 17:32       ` malc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-05-22  4:19 Balazs Attila-Mihaly (Cd-MaN)
2008-05-22 10:29 ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0805202131330.2426@linmac.oyster.ru \
    --to=av1474@comtv.ru \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).