Additional linting
Running `M-x checkdoc` on some of the modules that passed the package-lint but failed additional lints.
This commit is contained in:
parent
2a51698672
commit
5d3bb0b7ea
7 changed files with 29 additions and 31 deletions
|
@ -1,5 +1,9 @@
|
||||||
;;; email.el --- My Emacs email settings -*- lexical-binding: t -*-
|
;;; email.el --- My email settings -*- lexical-binding: t -*-
|
||||||
|
|
||||||
;; Author: William Carroll <wpcarro@gmail.com>
|
;; Author: William Carroll <wpcarro@gmail.com>
|
||||||
|
;; Version: 0.0.1
|
||||||
|
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
||||||
|
;; Package-Requires: ((emacs "24"))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Attempting to configure to `notmuch' for my personal use.
|
;; Attempting to configure to `notmuch' for my personal use.
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
;; Author: William Carroll <wpcarro@gmail.com>
|
;; Author: William Carroll <wpcarro@gmail.com>
|
||||||
;; Version: 0.0.1
|
;; Version: 0.0.1
|
||||||
|
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
||||||
;; Package-Requires: ((emacs "24"))
|
;; Package-Requires: ((emacs "24"))
|
||||||
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
|
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; Sometimes Emacs's function names and argument ordering is great; other times,
|
;; Sometimes Emacs's function names and argument ordering is great; other times,
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defun region-to-string ()
|
(defun region-to-string ()
|
||||||
"Returns the string in the active region."
|
"Return the string in the active region."
|
||||||
(buffer-substring-no-properties (region-beginning)
|
(buffer-substring-no-properties (region-beginning)
|
||||||
(region-end)))
|
(region-end)))
|
||||||
|
|
||||||
|
|
|
@ -107,20 +107,6 @@
|
||||||
(evil-set-initial-state 'exwm-mode 'emacs)
|
(evil-set-initial-state 'exwm-mode 'emacs)
|
||||||
(setq exwm-workspace-number
|
(setq exwm-workspace-number
|
||||||
(list/length window-manager--named-workspaces))
|
(list/length window-manager--named-workspaces))
|
||||||
;; EXWM supports "line-mode" and "char-mode".
|
|
||||||
;;
|
|
||||||
;; Note: It appears that calling `exwm-input-set-key' works if it's called
|
|
||||||
;; during startup. Once a session has started, it seems like this function is
|
|
||||||
;; significantly less useful. Is this a bug?
|
|
||||||
;;
|
|
||||||
;; Glossary:
|
|
||||||
;; - char-mode: All keystrokes except `exwm' global ones are passed to the
|
|
||||||
;; application.
|
|
||||||
;; - line-mode:
|
|
||||||
;;
|
|
||||||
;; `exwm-input-global-keys' = {line,char}-mode; can also call `exwm-input-set-key'
|
|
||||||
;; `exwm-mode-map' = line-mode
|
|
||||||
;; `???' = char-mode. Is there a mode-map for this?
|
|
||||||
(let ((kbds `(
|
(let ((kbds `(
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;; Window sizing
|
;; Window sizing
|
||||||
|
@ -176,7 +162,8 @@
|
||||||
(setq exwm-input-global-keys
|
(setq exwm-input-global-keys
|
||||||
(->> kbds
|
(->> kbds
|
||||||
(-map (lambda (plist)
|
(-map (lambda (plist)
|
||||||
`(,(kbd (plist-get plist :key)) . ,(plist-get plist :fn)))))))
|
`(,(kbd (plist-get plist :key)) .
|
||||||
|
,(plist-get plist :fn)))))))
|
||||||
(setq exwm-input-simulation-keys
|
(setq exwm-input-simulation-keys
|
||||||
;; TODO: Consider supporting M-d and other readline style KBDs.
|
;; TODO: Consider supporting M-d and other readline style KBDs.
|
||||||
'(([?\C-b] . [left])
|
'(([?\C-b] . [left])
|
||||||
|
@ -304,7 +291,8 @@ Ivy is used to capture the user's input."
|
||||||
|
|
||||||
(defun window-manager--label->index (label workspaces)
|
(defun window-manager--label->index (label workspaces)
|
||||||
"Return the index of the workspace in WORKSPACES named LABEL."
|
"Return the index of the workspace in WORKSPACES named LABEL."
|
||||||
(let ((index (-elem-index label (-map #'window-manager--named-workspace-label workspaces))))
|
(let ((index (-elem-index label (-map #'window-manager--named-workspace-label
|
||||||
|
workspaces))))
|
||||||
(if index index (error (format "No workspace found for label: %s" label)))))
|
(if index index (error (format "No workspace found for label: %s" label)))))
|
||||||
|
|
||||||
(defun window-manager--register-kbd (workspace)
|
(defun window-manager--register-kbd (workspace)
|
||||||
|
@ -312,7 +300,8 @@ Ivy is used to capture the user's input."
|
||||||
Currently using super- as the prefix for switching workspaces."
|
Currently using super- as the prefix for switching workspaces."
|
||||||
(let ((handler (lambda ()
|
(let ((handler (lambda ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(window-manager--switch (window-manager--named-workspace-label workspace))))
|
(window-manager--switch
|
||||||
|
(window-manager--named-workspace-label workspace))))
|
||||||
(key (window-manager--named-workspace-kbd workspace)))
|
(key (window-manager--named-workspace-kbd workspace)))
|
||||||
(exwm-input-set-key
|
(exwm-input-set-key
|
||||||
(kbd/for 'workspace key)
|
(kbd/for 'workspace key)
|
||||||
|
@ -321,10 +310,12 @@ Currently using super- as the prefix for switching workspaces."
|
||||||
(defun window-manager--change-workspace (workspace)
|
(defun window-manager--change-workspace (workspace)
|
||||||
"Switch EXWM workspaces to the WORKSPACE struct."
|
"Switch EXWM workspaces to the WORKSPACE struct."
|
||||||
(exwm-workspace-switch
|
(exwm-workspace-switch
|
||||||
(window-manager--label->index (window-manager--named-workspace-label workspace)
|
(window-manager--label->index
|
||||||
|
(window-manager--named-workspace-label workspace)
|
||||||
window-manager--named-workspaces))
|
window-manager--named-workspaces))
|
||||||
(window-manager--alert
|
(window-manager--alert
|
||||||
(string/format "Switched to: %s" (window-manager--named-workspace-label workspace))))
|
(string/format "Switched to: %s"
|
||||||
|
(window-manager--named-workspace-label workspace))))
|
||||||
|
|
||||||
(defun window-manager--switch (label)
|
(defun window-manager--switch (label)
|
||||||
"Switch to a named workspaces using LABEL."
|
"Switch to a named workspaces using LABEL."
|
||||||
|
@ -339,7 +330,8 @@ Currently using super- as the prefix for switching workspaces."
|
||||||
(defun window-manager-toggle-previous ()
|
(defun window-manager-toggle-previous ()
|
||||||
"Focus the previously active EXWM workspace."
|
"Focus the previously active EXWM workspace."
|
||||||
(interactive)
|
(interactive)
|
||||||
(window-manager--change-workspace (cycle/focus-previous! window-manager--workspaces)))
|
(window-manager--change-workspace
|
||||||
|
(cycle/focus-previous! window-manager--workspaces)))
|
||||||
|
|
||||||
(defun window-manager--exwm-buffer? (x)
|
(defun window-manager--exwm-buffer? (x)
|
||||||
"Return t if buffer X is an EXWM buffer."
|
"Return t if buffer X is an EXWM buffer."
|
||||||
|
@ -347,7 +339,8 @@ Currently using super- as the prefix for switching workspaces."
|
||||||
|
|
||||||
(defun window-manager--application-name (buffer)
|
(defun window-manager--application-name (buffer)
|
||||||
"Return the name of the application running in the EXWM BUFFER.
|
"Return the name of the application running in the EXWM BUFFER.
|
||||||
This function asssumes that BUFFER passes the `window-manager--exwm-buffer?' predicate."
|
This function asssumes that BUFFER passes the `window-manager--exwm-buffer?'
|
||||||
|
predicate."
|
||||||
(with-current-buffer buffer exwm-class-name))
|
(with-current-buffer buffer exwm-class-name))
|
||||||
|
|
||||||
;; TODO: Support disambiguating between two or more instances of the same
|
;; TODO: Support disambiguating between two or more instances of the same
|
||||||
|
@ -358,7 +351,8 @@ This function asssumes that BUFFER passes the `window-manager--exwm-buffer?' pre
|
||||||
(interactive)
|
(interactive)
|
||||||
(let* ((buffer-alist (->> (buffer-list)
|
(let* ((buffer-alist (->> (buffer-list)
|
||||||
(-filter #'window-manager--exwm-buffer?)
|
(-filter #'window-manager--exwm-buffer?)
|
||||||
(-map (lambda (buffer)
|
(-map
|
||||||
|
(lambda (buffer)
|
||||||
(cons (window-manager--application-name buffer)
|
(cons (window-manager--application-name buffer)
|
||||||
buffer)))))
|
buffer)))))
|
||||||
(label (completing-read "Switch to EXWM buffer: " buffer-alist)))
|
(label (completing-read "Switch to EXWM buffer: " buffer-alist)))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
;; Author: William Carroll <wpcarro@gmail.com>
|
;; Author: William Carroll <wpcarro@gmail.com>
|
||||||
;; Version: 0.0.1
|
;; Version: 0.0.1
|
||||||
;; Package-Requires: ((emacs "25.1"))
|
;; Package-Requires: ((emacs "25.1"))
|
||||||
;; Homepage: https://user.git.corp.google.com/wpcarro/briefcase
|
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
;; This is the home of any configuration that couldn't find a better home.
|
;; This is the home of any configuration that couldn't find a better home.
|
||||||
|
|
|
@ -24,7 +24,6 @@
|
||||||
:config
|
:config
|
||||||
(evil-set-initial-state 'org-mode 'normal)
|
(evil-set-initial-state 'org-mode 'normal)
|
||||||
(general-add-hook 'org-mode-hook
|
(general-add-hook 'org-mode-hook
|
||||||
;; TODO: consider supporting `(disable (list linum-mode company-mode))'
|
|
||||||
(list (disable linum-mode)
|
(list (disable linum-mode)
|
||||||
(disable company-mode)))
|
(disable company-mode)))
|
||||||
(setq org-startup-folded nil)
|
(setq org-startup-folded nil)
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
;; Author: William Carroll <wpcarro@gmail.com>
|
;; Author: William Carroll <wpcarro@gmail.com>
|
||||||
;; Version: 0.0.1
|
;; Version: 0.0.1
|
||||||
|
;; URL: https://git.wpcarro.dev/wpcarro/briefcase
|
||||||
;; Package-Requires: ((emacs "24"))
|
;; Package-Requires: ((emacs "24"))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
|
Loading…
Reference in a new issue