summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ravi-init-navigation.el14
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