Checkdoc fixes

This commit is contained in:
contrapunctus 2020-01-12 23:18:12 +05:30
parent 1fd881458b
commit 83521adaff
1 changed files with 18 additions and 9 deletions

27
sxiv.el
View File

@ -1,14 +1,19 @@
;;; sxiv.el --- Run sxiv from Emacs
;;; Commentary:
;;
(require 'dash) (require 'dash)
;;; Code:
(defvar sxiv--directory nil (defvar sxiv--directory nil
"Directory `sxiv' was called from. "Directory `sxiv' was called from.
Used by `sxiv-filter' to know where to mark files.") Used by `sxiv-filter' to know where to mark files.")
(defun sxiv-dired-marked-files-p () (defun sxiv-dired-marked-files-p ()
"Return t if there are marked files in the current Dired "Return t if there are marked files in the current Dired buffer.
buffer. With no marked files, or if not in a Dired buffer, return With no marked files, or if not in a Dired buffer, return nil."
nil."
(interactive)
(if (equal major-mode 'dired-mode) (if (equal major-mode 'dired-mode)
(if (save-excursion (if (save-excursion
(goto-char (point-min)) (goto-char (point-min))
@ -17,8 +22,8 @@ nil."
nil) nil)
nil)) nil))
(defun sxiv-filter (process output) (defun sxiv-filter (_process _output)
"Open a dired buffer and mark any files marked by the user in `sxiv'. "Open a `dired' buffer and mark any files marked by the user in `sxiv'.
Used as process filter for `sxiv'." Used as process filter for `sxiv'."
(find-file sxiv--directory) (find-file sxiv--directory)
(--> output (--> output
@ -27,7 +32,7 @@ Used as process filter for `sxiv'."
(sxiv-dired-mark-files it))) (sxiv-dired-mark-files it)))
(defun sxiv-dired-mark-files (files) (defun sxiv-dired-mark-files (files)
(interactive) "Mark FILES in the current (dired) buffer."
(dired-mark-if (dired-mark-if
(and (not (looking-at-p dired-re-dot)) (and (not (looking-at-p dired-re-dot))
(not (eolp)) (not (eolp))
@ -43,8 +48,8 @@ current directory. Files marked in sxiv will be marked in Dired.
If run from a Dired buffer with marked files, open only those If run from a Dired buffer with marked files, open only those
files. files.
With prefix argument, or when only provided directories, run With prefix argument PREFIX, or when only provided directories,
recursively (-r). run recursively (-r).
If run from a text file containing one file name per line, open If run from a text file containing one file name per line, open
the files listed." the files listed."
@ -86,3 +91,7 @@ the files listed."
;; Local Variables: ;; Local Variables:
;; nameless-current-name: "sxiv" ;; nameless-current-name: "sxiv"
;; End: ;; End:
(provide 'sxiv)
;;; sxiv.el ends here