~ufleisch/python-mode/improve-completion

« back to all changes in this revision

Viewing changes to python-components-move.el

  • Committer: Andreas Röhler
  • Date: 2015-12-25 18:45:27 UTC
  • Revision ID: speck@sprache.kasten-20151225184527-00e6j20xm6gkkq35
`py-kill-indent', new command

Edit-commands will reach beginning-of-line if reasonable
Edit-commands suffixed "-bol" dropped 


Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
  (unless (bobp)
62
62
    (let ((orig (point))
63
63
          (indent (when (eq (current-indentation) (current-column)) (current-column)))
64
 
 
65
64
          erg)
66
65
      (py--travel-this-indent-backward-bol)
67
 
      (when erg (goto-char erg)
68
 
            (beginning-of-line)
69
 
            (setq erg (point)))
 
66
      ;; (when erg (goto-char erg)
 
67
      ;; (beginning-of-line)
 
68
      ;; (setq erg (point)))
70
69
      (when (and py-verbose-p (called-interactively-p 'any)) (message "%s" erg))
71
70
      erg)))
72
71
 
90
89
          (setq indent (and (py-backward-statement)(current-indentation)))))
91
90
      (py--travel-this-indent-forward)
92
91
      (when erg (goto-char erg))
 
92
      ;; navigation doesn't reach BOL
93
93
      (unless (eolp) (setq erg (py-forward-statement)))
94
94
      (when (eq (current-column) (current-indentation)) (py-end-of-statement))
95
95
      (when (and py-verbose-p (called-interactively-p 'any)) (message "%s" erg))
112
112
      (when erg (goto-char erg)
113
113
            (unless (eolp) (setq erg (py-forward-statement))))
114
114
      (when erg
115
 
        (when (eq (current-column) (current-indentation)) (py-end-of-statement))
 
115
        (when (eq (current-column) (current-indentation)) (py-forward-statement))
116
116
        (unless (eobp) (forward-line 1) (beginning-of-line)))
117
117
      (when (and py-verbose-p (called-interactively-p 'any)) (message "%s" erg))
118
118
      erg)))
376
376
             (and (py-backward-statement orig)
377
377
                  (progn (beginning-of-line)
378
378
                         (setq erg (point)))))
379
 
            ((py--beginning-of-statement-p)
380
 
             (beginning-of-line)
381
 
             (setq erg (point)))
382
379
            (t (setq erg
383
380
                     (and
384
381
                      (py-backward-statement)