refactor: prefer cl-lib over dash
This commit is contained in:
parent
c17b5473d0
commit
b70acaa3f6
1 changed files with 13 additions and 13 deletions
26
config.org
26
config.org
|
|
@ -2093,21 +2093,21 @@ Problem solved, right? Not quite. We can't just read the variable it returns, be
|
||||||
"Guess the indent offset of the current buffer based on
|
"Guess the indent offset of the current buffer based on
|
||||||
`editorconfig--get-indentation'."
|
`editorconfig--get-indentation'."
|
||||||
(require 'editorconfig)
|
(require 'editorconfig)
|
||||||
(require 'dash)
|
|
||||||
(let* ((indent-value 720720)
|
(let* ((indent-value 720720)
|
||||||
(alist (editorconfig--get-indentation nil (number-to-string indent-value))))
|
(alist (editorconfig--get-indentation nil (number-to-string indent-value))))
|
||||||
(--some (pcase it
|
(cl-some (lambda (entry)
|
||||||
;; Non-mode-specific variables - ignore
|
(pcase entry
|
||||||
(`(tab-width . ,_) nil)
|
;; Non-mode-specific variables - ignore
|
||||||
(`(evil-shift-width . ,_) nil)
|
(`(tab-width . ,_) nil)
|
||||||
(`(,var . ,val)
|
(`(evil-shift-width . ,_) nil)
|
||||||
(cond ((zerop val) nil)
|
(`(,var . ,val)
|
||||||
((= val indent-value) (symbol-value var))
|
(cond ((zerop val) nil)
|
||||||
((zerop (mod indent-value val))
|
((= val indent-value) (symbol-value var))
|
||||||
(* (symbol-value var) (/ indent-value val)))
|
((zerop (mod indent-value val))
|
||||||
((zerop (mod val indent-value))
|
(* (symbol-value var) (/ indent-value val)))
|
||||||
(/ (symbol-value var) (/ val indent-value))))))
|
((zerop (mod val indent-value))
|
||||||
alist)))
|
(/ (symbol-value var) (/ val indent-value)))))))
|
||||||
|
alist)))
|
||||||
|
|
||||||
(advice-add #'indent-bars--guess-spacing
|
(advice-add #'indent-bars--guess-spacing
|
||||||
:before-until #'~/guess-offset-from-editorconfig)
|
:before-until #'~/guess-offset-from-editorconfig)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue