From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,bd78b6bffebbeb9f X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!news4.google.com!news.glorb.com!peer1.news.newnet.co.uk!194.159.246.34.MISMATCH!peer-uk.news.demon.net!kibo.news.demon.net!mutlu.news.demon.net!news.demon.co.uk!demon!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: AdaGIDE 7.42 and tabs Date: Mon, 11 Dec 2006 20:36:11 +0000 Organization: Pushface Message-ID: References: <1vtafevdmhdyx.d4kq1ryzk298.dlg@40tude.net> <1d1qpxmqm6ila.t4zxivn7nn6a.dlg@40tude.net> <1bm9ssz6kcf6n.h15q4kj1brbz.dlg@40tude.net> NNTP-Posting-Host: pogner.demon.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.demon.co.uk 1165869371 2874 62.49.19.209 (11 Dec 2006 20:36:11 GMT) X-Complaints-To: abuse@demon.net NNTP-Posting-Date: Mon, 11 Dec 2006 20:36:11 +0000 (UTC) Cancel-Lock: sha1:Wfq1LL46ZSSLt8v9fBOPAHoDJOk= User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin) Xref: g2news2.google.com comp.lang.ada:7893 Date: 2006-12-11T20:36:11+00:00 List-Id: "Dmitry A. Kazakov" writes: > That would be fine to me, unfortunately indent-block inserts HTs. In this ada-mode, there's a write-file-hook that removes trailing spaces & untabifies the buffer. (defun ada-set-write-file-hook () "Reset the `local-write-file-hooks' for support of ada-mode. As a result, the buffer is cleaned up upon saving, according to the rules described for `ada-clean-buffer-before-saving'." (if (and ada-clean-buffer-before-saving (null local-write-file-hooks)) (progn ;; remove all spaces at the end of lines in the whole buffer. (add-hook 'local-write-file-hooks 'delete-trailing-whitespace) ;; convert all tabs to the correct number of spaces. (add-hook 'local-write-file-hooks (lambda () (untabify (point-min) (point-max)))) )))