Commits

mickey  committed 2876902

* Made block shifting far more robust by re-using existing python.el indentation code.

  • Participants
  • Parent commits 5fc012b

Comments (0)

Files changed (1)

File python-extras.el

           (exchange-point-and-mark)
           (if (eq subr 'smart)
               (progn
-                (indent-rigidly (point) (mark)
-                                (-
-                                 (python-calculate-indentation)
-                                 (python-mp-indentation-at-point (point))))))
+                (indent-rigidly (point) (mark) (- (caar (last (python-indentation-levels))) (python-mp-indentation-at-point (point)))))
           (setq deactivate-mark nil)))
     (error "Region shifting only works when transient-mark-mode is enabled.")))