--- python.el.orig 2009-02-23 19:06:19.000000000 +0100 +++ python.el 2009-02-23 19:18:37.000000000 +0100 @@ -2013,17 +2013,18 @@ (list (region-beginning) (region-end) current-prefix-arg) (list (line-beginning-position) (line-end-position) current-prefix-arg))) (if count - (setq count (prefix-numeric-value count)) + (setq count (* python-indent (prefix-numeric-value count))) (setq count python-indent)) - (when (> count 0) - (save-excursion - (goto-char start) - (while (< (point) end) - (if (and (< (current-indentation) count) - (not (looking-at "[ \t]*$"))) - (error "Can't shift all lines enough")) - (forward-line)) - (indent-rigidly start end (- count))))) + (let (deactivate-mark) + (when (> count 0) + (save-excursion + (goto-char start) + (while (< (point) end) + (if (and (< (current-indentation) count) + (not (looking-at "[ \t]*$"))) + (error "Can't shift all lines enough")) + (forward-line)) + (indent-rigidly start end (- count)))))) (add-to-list 'debug-ignored-errors "^Can't shift all lines enough") @@ -2036,10 +2037,11 @@ (if mark-active (list (region-beginning) (region-end) current-prefix-arg) (list (line-beginning-position) (line-end-position) current-prefix-arg))) - (if count - (setq count (prefix-numeric-value count)) - (setq count python-indent)) - (indent-rigidly start end count)) + (let (deactivate-mark) + (if count + (setq count (* python-indent (prefix-numeric-value count))) + (setq count python-indent)) + (indent-rigidly start end count))) (defun python-outline-level () "`outline-level' function for Python mode.