[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dedent in Python-mode
From: |
Markus Triska |
Subject: |
Re: dedent in Python-mode |
Date: |
Mon, 25 Jun 2007 01:44:32 +0200 |
Paul Pogonyshev <address@hidden> writes:
> Can it then behave like TAB, but if this doesn't change indentation
> at all, then start dedenting from what TAB proposes as default?
Put this in your .emacs:
(defun python-personal-dedent ()
(interactive)
(let ((cyclic 'python-indent-line-backward)
(old (current-indentation)))
(setq this-command cyclic)
(python-indent-line-backward)
(setq last-command cyclic)
(when (and (> python-indent-list-length 1)
(= old (current-indentation)))
(python-indent-line-backward))))
(add-hook 'python-mode-hook
(lambda ()
(local-set-key [backtab] 'python-personal-dedent)))
- dedent in Python-mode, Paul Pogonyshev, 2007/06/24
- Re: dedent in Python-mode, Markus Triska, 2007/06/24
- Re: dedent in Python-mode, Paul Pogonyshev, 2007/06/24
- Re: dedent in Python-mode, Markus Triska, 2007/06/24
- Re: dedent in Python-mode, Paul Pogonyshev, 2007/06/24
- Re: dedent in Python-mode,
Markus Triska <=
- Re: dedent in Python-mode, Paul Pogonyshev, 2007/06/25
- Re: dedent in Python-mode, Markus Triska, 2007/06/25
- Re: dedent in Python-mode, Paul Pogonyshev, 2007/06/25
- Re: dedent in Python-mode, Markus Triska, 2007/06/25
- Re: dedent in Python-mode, Paul Pogonyshev, 2007/06/25