|
@@ -1268,7 +1268,9 @@ the list." |
|
|
;; dired |
|
|
;; dired |
|
|
|
|
|
|
|
|
(defun my-dired-echo-file-head (arg) |
|
|
(defun my-dired-echo-file-head (arg) |
|
|
"" |
|
|
|
|
|
|
|
|
"Echo head of current file. |
|
|
|
|
|
|
|
|
|
|
|
ARG is num to show, or defaults to 7." |
|
|
(interactive "P") |
|
|
(interactive "P") |
|
|
(let ((f (dired-get-filename))) |
|
|
(let ((f (dired-get-filename))) |
|
|
(message "%s" |
|
|
(message "%s" |
|
@@ -1283,7 +1285,7 @@ the list." |
|
|
(point-at-eol))))))) |
|
|
(point-at-eol))))))) |
|
|
|
|
|
|
|
|
(defun my-dired-diff () |
|
|
(defun my-dired-diff () |
|
|
"" |
|
|
|
|
|
|
|
|
"Show diff of marked file and file of current line." |
|
|
(interactive) |
|
|
(interactive) |
|
|
(let ((files (dired-get-marked-files nil nil nil t))) |
|
|
(let ((files (dired-get-marked-files nil nil nil t))) |
|
|
(if (eq (car files) |
|
|
(if (eq (car files) |
|
@@ -1292,7 +1294,7 @@ the list." |
|
|
(message "One file must be marked!")))) |
|
|
(message "One file must be marked!")))) |
|
|
|
|
|
|
|
|
(defun dired-get-file-info () |
|
|
(defun dired-get-file-info () |
|
|
"dired get file info" |
|
|
|
|
|
|
|
|
"Print information of current line file." |
|
|
(interactive) |
|
|
(interactive) |
|
|
(let ((f (shell-quote-argument (dired-get-filename t)))) |
|
|
(let ((f (shell-quote-argument (dired-get-filename t)))) |
|
|
(if (file-directory-p f) |
|
|
(if (file-directory-p f) |
|
@@ -1304,12 +1306,12 @@ the list." |
|
|
f))))) |
|
|
f))))) |
|
|
|
|
|
|
|
|
(defun my-dired-scroll-up () |
|
|
(defun my-dired-scroll-up () |
|
|
"" |
|
|
|
|
|
|
|
|
"Scroll up." |
|
|
(interactive) |
|
|
(interactive) |
|
|
(my-dired-previous-line (- (window-height) 1))) |
|
|
(my-dired-previous-line (- (window-height) 1))) |
|
|
|
|
|
|
|
|
(defun my-dired-scroll-down () |
|
|
(defun my-dired-scroll-down () |
|
|
"" |
|
|
|
|
|
|
|
|
"Scroll down." |
|
|
(interactive) |
|
|
(interactive) |
|
|
(my-dired-next-line (- (window-height) 1))) |
|
|
(my-dired-next-line (- (window-height) 1))) |
|
|
|
|
|
|
|
@@ -1318,7 +1320,7 @@ the list." |
|
|
;; (interactive "p")) |
|
|
;; (interactive "p")) |
|
|
|
|
|
|
|
|
(defun my-dired-previous-line (arg) |
|
|
(defun my-dired-previous-line (arg) |
|
|
"" |
|
|
|
|
|
|
|
|
"Move ARG lines up." |
|
|
(interactive "p") |
|
|
(interactive "p") |
|
|
(if (> arg 0) |
|
|
(if (> arg 0) |
|
|
(progn |
|
|
(progn |
|
@@ -1333,7 +1335,7 @@ the list." |
|
|
(dired-move-to-filename))) |
|
|
(dired-move-to-filename))) |
|
|
|
|
|
|
|
|
(defun my-dired-next-line (arg) |
|
|
(defun my-dired-next-line (arg) |
|
|
"" |
|
|
|
|
|
|
|
|
"Move ARG lines down." |
|
|
(interactive "p") |
|
|
(interactive "p") |
|
|
(if (> arg 0) |
|
|
(if (> arg 0) |
|
|
(progn |
|
|
(progn |
|
|