More Elisp linting

This should cover most of the remaining linting errors. After this, I expect
fewer than ten linting errors.
This commit is contained in:
William Carroll 2020-09-01 10:17:43 +01:00
parent a638e15c0d
commit fb5ec068dd
47 changed files with 1049 additions and 989 deletions

View file

@ -37,23 +37,23 @@
;; Maximizes the tramp debugging noisiness while I'm still learning about tramp.
(setq tramp-verbose 10)
(defcustom ssh/hosts '("desktop" "socrates")
(defcustom ssh-hosts '("desktop" "socrates")
"List of hosts to which I commonly connect.
Note: It could be interesting to read these values from ~/.ssh/config, but
Note: It could be interesting to read these values from ~/.ssh-config, but
that's more than I need at the moment.")
(defun ssh/sudo-buffer ()
(defun ssh-sudo-buffer ()
"Open the current buffer with sudo rights."
(interactive)
(with-current-buffer (current-buffer)
(if (s-starts-with? "/ssh:" buffer-file-name)
(message "[ssh.el] calling ssh/sudo-buffer for remote files isn't currently supported")
(message "[ssh.el] calling ssh-sudo-buffer for remote files isn't currently supported")
(find-file (format "/sudo::%s" buffer-file-name)))))
(defun ssh/cd-home ()
(defun ssh-cd-home ()
"Prompt for an SSH host and open a dired buffer for wpcarro on that machine."
(interactive)
(let ((machine (completing-read "Machine: " ssh/hosts)))
(let ((machine (completing-read "Machine: " ssh-hosts)))
(find-file (format "/ssh:wpcarro@%s:~" machine))))
(provide 'ssh)