diff options
| author | Ravi R Kiran <aine.marina@gmail.com> | 2014-03-02 23:38:57 (GMT) |
|---|---|---|
| committer | Ravikiran Rajagopal <aine.marina@gmail.com> | 2014-03-02 23:38:57 (GMT) |
| commit | aa8a8272df638c53e254ab32bb1c25f6b9821eb8 (patch) | |
| tree | 718e9f00b0a82babd5e0e461f6c83e178e025ebb /ravi-init-navigation.el | |
| parent | 6efd466e282ac0bf209e1e927af975dbe69dd680 (diff) | |
| download | dotemacs-aa8a8272df638c53e254ab32bb1c25f6b9821eb8.zip dotemacs-aa8a8272df638c53e254ab32bb1c25f6b9821eb8.tar.gz dotemacs-aa8a8272df638c53e254ab32bb1c25f6b9821eb8.tar.bz2 | |
Use default versions first before enhanced versions
Diffstat (limited to 'ravi-init-navigation.el')
| -rw-r--r-- | ravi-init-navigation.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/ravi-init-navigation.el b/ravi-init-navigation.el index b698210..d291fca 100644 --- a/ravi-init-navigation.el +++ b/ravi-init-navigation.el @@ -168,7 +168,7 @@ (bind-key "C-:" 'ravi/kyle-sherman-duplicate-line) (defun ravi/back-to-indentation-or-beginning () (interactive) - (if (= (point) (progn (back-to-indentation) (point))) + (if (bolp) (back-to-indentation) (beginning-of-line))) (bind-key "C-a" 'ravi/back-to-indentation-or-beginning) @@ -180,9 +180,7 @@ (not (nth 3 syn))))) (defun ravi/Fuco-end-of-code-or-line+ (arg) - "Move to the end of code. If already there, move to the end of line, - that is after the possible comment. If at the end of line, move to the - end of code. + "Move to the end of line. If already there, move to the end of code. Comments are recognized in any mode that sets syntax-ppss properly." (interactive "P") @@ -192,13 +190,13 @@ (backward-char)) (skip-chars-backward " \t") (point)))) - (cond ((= (point) eoc) - (move-end-of-line arg)) - (t + (cond ((eolp) (move-end-of-line arg) (while (ravi/Fuco-point-in-comment) (backward-char)) - (skip-chars-backward " \t"))))) + (skip-chars-backward " \t")) + (t + (move-end-of-line arg))))) (bind-key "C-e" 'ravi/Fuco-end-of-code-or-line+) ;; Use current line for region-based commands if no region selected |
