Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Tabs in texi files
Date: Thu, 29 Mar 2007 08:12:05 +0900	[thread overview]
Message-ID: <b4mzm5xnet6.fsf@jpl.org> (raw)
In-Reply-To: <873b3pf07b.fsf@zip.com.au>

>>>>> In <873b3pf07b.fsf@zip.com.au> Kevin Ryde wrote:

> Didier Verna <didier@xemacs.org> writes:

>> So what's the general recommendation for texi files ?

> I use the spot of code below to see any tabs that creep in (usually
> from cutting and pasting code).  I've kept meaning to propose
> something like it for texinfo-mode, but I've been through various
> versions and still haven't got to a balance between warning vs fixing
> vs being overly intrusive.

> (defun my-texinfo-tab-warn-face (beg end)
>   "Put `trailing-whitespace' face on any tabs from BEG to END, as a warning."
>   (save-excursion
>     (goto-char beg)
>     (let ((modified (buffer-modified-p)))
>       (while (re-search-forward "\t+" end t)
>         (put-text-property (match-beginning 0) (match-end 0)
>                            'face 'trailing-whitespace))
>       (set-buffer-modified-p modified))))

> (add-hook 'after-change-functions
>           (lambda (beg end prev-len)
>             (if (eq major-mode 'texinfo-mode)
>                 (my-texinfo-tab-warn-face beg end))))

> (add-hook 'texinfo-mode-hook
>           (lambda ()
>             (my-texinfo-tab-warn-face (point-min) (point-max))))

I use:

http://www.jpl.org/ftp/pub/elisp/develock.el.gz
(or ftp://ftp.jpl.org/pub/elisp/develock.el.gz)



  reply	other threads:[~2007-03-28 23:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-28 15:17 Katsumi Yamaoka
2007-03-28 16:21 ` Didier Verna
2007-03-28 16:37   ` Didier Verna
2007-03-28 22:32     ` Katsumi Yamaoka
2007-03-28 22:54     ` Kevin Ryde
2007-03-28 23:12       ` Katsumi Yamaoka [this message]
2007-03-28 16:47   ` Reiner Steib
2007-03-28 23:01     ` Miles Bader

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=b4mzm5xnet6.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.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).