[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use tab key to indent both region AND line?
From: |
weber |
Subject: |
Re: Use tab key to indent both region AND line? |
Date: |
20 Apr 2007 15:12:49 -0700 |
User-agent: |
G2/1.0 |
On Apr 20, 4:07 pm, mopi <52ha...@gmail.com> wrote:
> Wohoo!
>
> I found this little thing in easymacs.el that does exactly what I
> want.
>
> (defun easymacs-rigidly-indent-line-or-region ()
> (interactive)
> (if mark-active
> (increase-left-margin (region-beginning) (region-end) nil)
> (increase-left-margin (point-at-bol) (point-at-eol) nil))
> (setq deactivate-mark nil))
>
> (defun easymacs-rigidly-unindent-line-or-region ()
> (interactive)
> (if mark-active
> (decrease-left-margin (region-beginning) (region-end) nil)
> (decrease-left-margin (point-at-bol) (point-at-eol) nil))
> (setq deactivate-mark nil))
>
> (global-set-key [tab] 'easymacs-rigidly-indent-line-or-region)
> (global-set-key [S-tab] 'easymacs-rigidly-unindent-line-or-
> region)
Hummm I want that also :)