|
|
@@ -1267,33 +1267,39 @@ delete; o: select other; j, l: enlarge; h, k: shrink; q: quit." |
|
|
|
(interactive) |
|
|
|
(my-dired-next-line (- (window-height) 1))) |
|
|
|
|
|
|
|
;; (defun my-dired-forward-line (arg) |
|
|
|
;; "" |
|
|
|
;; (interactive "p")) |
|
|
|
|
|
|
|
(defun my-dired-previous-line (arg) |
|
|
|
"" |
|
|
|
(interactive "p") |
|
|
|
(when (> arg 0) |
|
|
|
;; (ignore 'my-dired-print-current-dir-and-file) |
|
|
|
(dired-previous-line 1) |
|
|
|
(when (eq (line-number-at-pos) |
|
|
|
2) |
|
|
|
(goto-char (point-max)) |
|
|
|
(forward-line -1) |
|
|
|
(dired-move-to-filename)) |
|
|
|
(my-dired-previous-line (- arg 1)) |
|
|
|
)) |
|
|
|
(if (> arg 0) |
|
|
|
(progn |
|
|
|
;; (ignore 'my-dired-print-current-dir-and-file) |
|
|
|
(forward-line -1) |
|
|
|
(when (eq (line-number-at-pos) |
|
|
|
1) |
|
|
|
(goto-char (point-max))) |
|
|
|
(my-dired-previous-line (if (dired-get-filename nil t) |
|
|
|
(- arg 1) |
|
|
|
arg))) |
|
|
|
(dired-move-to-filename))) |
|
|
|
|
|
|
|
(defun my-dired-next-line (arg) |
|
|
|
"" |
|
|
|
(interactive "p") |
|
|
|
(when (> arg 0) |
|
|
|
;; (ignore 'my-dired-print-current-dir-and-file) |
|
|
|
(dired-next-line 1) |
|
|
|
(when (eq (point) |
|
|
|
(point-max)) |
|
|
|
(goto-char (point-min)) |
|
|
|
(forward-line 2) |
|
|
|
(dired-move-to-filename)) |
|
|
|
(my-dired-next-line (- arg 1)) |
|
|
|
)) |
|
|
|
(if (> arg 0) |
|
|
|
(progn |
|
|
|
;; (ignore 'my-dired-print-current-dir-and-file) |
|
|
|
(forward-line 1) |
|
|
|
(when (eq (point) |
|
|
|
(point-max)) |
|
|
|
(goto-char (point-min))) |
|
|
|
(my-dired-next-line (if (dired-get-filename nil t) |
|
|
|
(- arg 1) |
|
|
|
arg))) |
|
|
|
(dired-move-to-filename))) |
|
|
|
|
|
|
|
(defun my-dired-print-current-dir-and-file () |
|
|
|
(message "%s %s" |
|
|
|