Przeglądaj źródła

fix my-dired-previous/next-line

pull/1/head
10sr 12 lat temu
rodzic
commit
8f9379d3f5
1 zmienionych plików z 26 dodań i 20 usunięć
  1. +26
    -20
      emacs.el

+ 26
- 20
emacs.el Wyświetl plik

@@ -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"


Ładowanie…
Anuluj
Zapisz