Mu4e: follow function naming conventions
Rename +mu4e-msg-to-agenda and +get-string-width
This commit is contained in:
parent
8e0001f6fd
commit
b1f7e9b9f9
2 changed files with 6 additions and 7 deletions
|
@ -81,7 +81,7 @@ default/fallback account."
|
||||||
;; Icons need a bit of work
|
;; Icons need a bit of work
|
||||||
;; Spacing needs to be determined and adjucted
|
;; Spacing needs to be determined and adjucted
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +get-string-width (str)
|
(defun +mu4e--get-string-width (str)
|
||||||
"Return the width in pixels of a string in the current
|
"Return the width in pixels of a string in the current
|
||||||
window's default font. If the font is mono-spaced, this
|
window's default font. If the font is mono-spaced, this
|
||||||
will also be the width of all other printable characters."
|
will also be the width of all other printable characters."
|
||||||
|
@ -103,8 +103,8 @@ will also be the width of all other printable characters."
|
||||||
(icon (if colour
|
(icon (if colour
|
||||||
(apply icon-set `(,name :face ,(intern (concat "all-the-icons-" colour)) :height ,height :v-adjust ,v-adjust))
|
(apply icon-set `(,name :face ,(intern (concat "all-the-icons-" colour)) :height ,height :v-adjust ,v-adjust))
|
||||||
(apply icon-set `(,name :height ,height :v-adjust ,v-adjust))))
|
(apply icon-set `(,name :height ,height :v-adjust ,v-adjust))))
|
||||||
(icon-width (+get-string-width icon))
|
(icon-width (+mu4e--get-string-width icon))
|
||||||
(space-width (+get-string-width " "))
|
(space-width (+mu4e--get-string-width " "))
|
||||||
(space-factor (- 2 (/ (float icon-width) space-width))))
|
(space-factor (- 2 (/ (float icon-width) space-width))))
|
||||||
(concat (propertize " " 'display `(space . (:width ,space-factor))) icon)))
|
(concat (propertize " " 'display `(space . (:width ,space-factor))) icon)))
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ will also be the width of all other printable characters."
|
||||||
;; Perfect for when you see an email you want to reply to
|
;; Perfect for when you see an email you want to reply to
|
||||||
;; later, but don't want to forget about
|
;; later, but don't want to forget about
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +mu4e-msg-to-agenda (arg)
|
(defun +mu4e/refile-msg-to-agenda (arg)
|
||||||
"Refile a message and add a entry in the agenda file with a
|
"Refile a message and add a entry in the agenda file with a
|
||||||
deadline. Default deadline is today. With one prefix, deadline
|
deadline. Default deadline is today. With one prefix, deadline
|
||||||
is tomorrow. With two prefixes, select the deadline."
|
is tomorrow. With two prefixes, select the deadline."
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
:ne "h" #'+workspace/other)
|
:ne "h" #'+workspace/other)
|
||||||
|
|
||||||
(map! :map mu4e-headers-mode-map
|
(map! :map mu4e-headers-mode-map
|
||||||
:e "l" #'+mu4e-msg-to-agenda)
|
:vne "l" #'mu4e/refile-msg-to-agenda)
|
||||||
|
|
||||||
(map! :localleader
|
(map! :localleader
|
||||||
:map mu4e-compose-mode-map
|
:map mu4e-compose-mode-map
|
||||||
|
@ -188,8 +188,7 @@
|
||||||
:v "*" #'mu4e-headers-mark-for-something
|
:v "*" #'mu4e-headers-mark-for-something
|
||||||
:v "!" #'mu4e-headers-mark-for-read
|
:v "!" #'mu4e-headers-mark-for-read
|
||||||
:v "?" #'mu4e-headers-mark-for-unread
|
:v "?" #'mu4e-headers-mark-for-unread
|
||||||
:v "u" #'mu4e-headers-mark-for-unmark
|
:v "u" #'mu4e-headers-mark-for-unmark))
|
||||||
:vn "l" #'+mu4e-msg-to-agenda))
|
|
||||||
|
|
||||||
(add-hook 'mu4e-compose-pre-hook '+mu4e-set-from-address)
|
(add-hook 'mu4e-compose-pre-hook '+mu4e-set-from-address)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue