Boost logo

Boost :

From: Anthony Williams (anthwil_at_[hidden])
Date: 2002-09-09 10:31:01


Douglas Gregor writes:
> On Monday 09 September 2002 10:16 am, David Abrahams wrote:
> > Emacs can do anything.
>
> Actually, would anyone have a bit 'o' elisp to untabify a file when it's
> saved? That would make it rather impossible for Emacs users to add tabs to
> Boost sources :)

M-x customize-variable RET indent-tabs-mode RET
Set it to Off/nil
"Save for future sessions"

Now you can't add tabs when editing files.

If your emacs doesn't support customize, put

(setq-default 'indent-tabs-mode nil)

in your .emacs file.

To remove tabs and save: M-< C-> M-x untabify RET C-x C-s

Alternatively, add the following to your .emacs file:

(defun untabify-and-save-buffer ()
  (interactive)
  (untabify 1 (buffer-size))
  (save-buffer))

(define-key global-map [(control x) (control s)] 'untabify-and-save-buffer)

If you don't use XEmacs, you might need to change the "define-key" call to
something else.

HTH

Anthony


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk