Skip to content

Commit 9f624c1

Browse files
committed
Migrate blank line travel to block-travel
1 parent 0790afd commit 9f624c1

File tree

5 files changed

+12
-31
lines changed

5 files changed

+12
-31
lines changed

lisp/func/jcs-nav.el

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,6 @@
101101
(< (point) max-pt))
102102
(forward-char 1))))
103103

104-
;;
105-
;; (@* "Navigating Blank Line" )
106-
;;
107-
108-
(defun jcs-previous-blank-line ()
109-
"Move to the previous line containing nothing but whitespaces or tabs."
110-
(interactive)
111-
(let ((sr-pt (save-excursion (re-search-backward "^[ \t]*\n" nil t))))
112-
(goto-char (or sr-pt (point-min)))))
113-
114-
(defun jcs-next-blank-line ()
115-
"Move to the next line containing nothing but whitespaces or tabs."
116-
(interactive)
117-
(when (jcs-current-line-empty-p) (forward-line 1))
118-
(let ((sr-pt (save-excursion (re-search-forward "^[ \t]*\n" nil t))))
119-
(goto-char (or sr-pt (point-max)))
120-
(when sr-pt (forward-line -1))))
121-
122104
;;
123105
;; (@* "Character Navigation" )
124106
;;

lisp/jcs-key.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,8 @@
313313
(jcs-leaf-key*
314314
`(("\eq" . (lambda () (interactive) (other-window -1)))
315315
("\ew" . other-window)
316-
([C-up] . jcs-previous-blank-line)
317-
([C-down] . jcs-next-blank-line)
316+
([C-up] . block-travel-up)
317+
([C-down] . block-travel-down)
318318
((kbd "C-d") . jcs-kill-whole-line)
319319
((kbd "C-x") . kill-region)
320320
((kbd "C-c") . kill-ring-save)

lisp/jcs-plugin.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@
583583
(leaf multiple-cursors
584584
:init
585585
(defconst jcs-mc/cancel-commands
586-
'( jcs-previous-blank-line jcs-next-blank-line
586+
'( block-travel-down block-travel-up
587587
jcs-isearch-backward-symbol-at-point
588588
isearch-forward-symbol-at-point
589589
jcs-isearch-repeat-backward
@@ -623,12 +623,11 @@
623623

624624
(leaf page-break-lines
625625
:init
626-
(setq page-break-lines-modes '(browse-kill-ring-mode
627-
emacs-lisp-mode
628-
lisp-mode
629-
scheme-mode
630-
outline-mode
631-
help-mode)))
626+
(setq page-break-lines-modes '( browse-kill-ring-mode
627+
emacs-lisp-mode lisp-mode
628+
scheme-mode
629+
outline-mode
630+
help-mode)))
632631

633632
(leaf popup
634633
:defer-config

lisp/mode/jcs-python-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585

8686
(jcs-key-local
8787
`(([C-backspace] . jcs-backward-delete-word)
88-
([M-up] . jcs-previous-blank-line)
89-
([M-down] . jcs-next-blank-line)
88+
([M-up] . block-travel-up)
89+
([M-down] . block-travel-down)
9090
((kbd "RET") . jcs-py-return))))
9191

9292
(provide 'jcs-python-mode)

lisp/mode/jcs-shell-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
((kbd "<up>") . comint-previous-input)
2525
((kbd "<down>") . comint-next-input)
2626
((kbd "<tab>") . comint-next-matching-input-from-input)
27-
([C-up] . jcs-previous-blank-line)
28-
([C-down] . jcs-next-blank-line)
27+
([C-up] . block-travel-up)
28+
([C-down] . block-travel-down)
2929
((kbd "C-~") . (lambda () (interactive)
3030
(shell-pop (multi-shell--next-valid-index))))
3131
((kbd "C-_") . multi-shell-prev)

0 commit comments

Comments
 (0)