From: Simon Wright <simon.j.wright@mac.com>
Subject: Re: AdaGIDE 7.42 and tabs
Date: Mon, 11 Dec 2006 20:36:11 +0000
Date: 2006-12-11T20:36:11+00:00 [thread overview]
Message-ID: <m2wt4yw4p0.fsf@grendel.local> (raw)
In-Reply-To: 1bm9ssz6kcf6n.h15q4kj1brbz.dlg@40tude.net
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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))))
)))
next prev parent reply other threads:[~2006-12-11 20:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-10 14:26 AdaGIDE 7.42 and tabs Dmitry A. Kazakov
2006-12-10 14:34 ` Jeffrey R. Carter
2006-12-10 15:15 ` Dmitry A. Kazakov
2006-12-11 4:53 ` Jeffrey R. Carter
2006-12-11 8:45 ` Dmitry A. Kazakov
2006-12-11 10:07 ` gautier_niouzes
2006-12-11 14:05 ` Dmitry A. Kazakov
2006-12-11 13:21 ` Stephen Leake
2006-12-11 14:01 ` Dmitry A. Kazakov
2006-12-11 20:36 ` Simon Wright [this message]
2006-12-13 0:35 ` Stephen Leake
2006-12-14 21:07 ` Simon Wright
2006-12-11 20:55 ` Jeffrey R. Carter
2006-12-12 18:34 ` Dmitry A. Kazakov
2006-12-13 0:36 ` Stephen Leake
2006-12-12 18:13 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox