From fb5ec068ddd50f6bce41c7a0bad45673db787940 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Tue, 1 Sep 2020 10:17:43 +0100 Subject: More Elisp linting This should cover most of the remaining linting errors. After this, I expect fewer than ten linting errors. --- emacs/.emacs.d/wpc/ivy-helpers.el | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'emacs/.emacs.d/wpc/ivy-helpers.el') diff --git a/emacs/.emacs.d/wpc/ivy-helpers.el b/emacs/.emacs.d/wpc/ivy-helpers.el index b76e5fae75ca..068598082975 100644 --- a/emacs/.emacs.d/wpc/ivy-helpers.el +++ b/emacs/.emacs.d/wpc/ivy-helpers.el @@ -1,5 +1,9 @@ ;;; ivy-helpers.el --- More interfaces to ivy -*- lexical-binding: t -*- + ;; Author: William Carroll +;; Version: 0.0.1 +;; URL: https://git.wpcarro.dev/wpcarro/briefcase +;; Package-Requires: ((emacs "24.3")) ;;; Commentary: ;; Hopefully to improve my workflows. @@ -16,7 +20,7 @@ ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(cl-defun ivy-helpers/kv (prompt kv f) +(cl-defun ivy-helpers-kv (prompt kv f) "PROMPT users with the keys in KV and return its corresponding value. Calls F with the key and value from KV." (ivy-read @@ -26,7 +30,7 @@ with the key and value from KV." :action (lambda (entry) (funcall f (car entry) (cdr entry))))) -(defun ivy-helpers/do-run-external-command (cmd) +(defun ivy-helpers-do-run-external-command (cmd) "Execute the specified CMD and notify the user when it finishes." (message "Starting %s..." cmd) (set-process-sentinel @@ -35,7 +39,7 @@ with the key and value from KV." (when (string= event "finished\n") (message "%s process finished." process))))) -(defun ivy-helpers/list-external-commands () +(defun ivy-helpers-list-external-commands () "Creates a list of all external commands available on $PATH while filtering NixOS wrappers." (cl-loop @@ -51,14 +55,14 @@ NixOS wrappers." append lsdir into completions finally return (sort completions 'string-lessp))) -(defun ivy-helpers/run-external-command () +(defun ivy-helpers-run-external-command () "Prompts the user with a list of all installed applications and lets them select one to launch." (interactive) - (let ((external-commands-list (ivy-helpers/list-external-commands))) + (let ((external-commands-list (ivy-helpers-list-external-commands))) (ivy-read "Command:" external-commands-list :require-match t - :action #'ivy-helpers/do-run-external-command))) + :action #'ivy-helpers-do-run-external-command))) ;;; Code: (provide 'ivy-helpers) -- cgit 1.4.1