diff --git a/config.org b/config.org index 16a2875..c4f370e 100644 --- a/config.org +++ b/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 `editorconfig--get-indentation'." (require 'editorconfig) - (require 'dash) (let* ((indent-value 720720) (alist (editorconfig--get-indentation nil (number-to-string indent-value)))) - (--some (pcase it - ;; Non-mode-specific variables - ignore - (`(tab-width . ,_) nil) - (`(evil-shift-width . ,_) nil) - (`(,var . ,val) - (cond ((zerop val) nil) - ((= val indent-value) (symbol-value var)) - ((zerop (mod indent-value val)) - (* (symbol-value var) (/ indent-value val))) - ((zerop (mod val indent-value)) - (/ (symbol-value var) (/ val indent-value)))))) - alist))) + (cl-some (lambda (entry) + (pcase entry + ;; Non-mode-specific variables - ignore + (`(tab-width . ,_) nil) + (`(evil-shift-width . ,_) nil) + (`(,var . ,val) + (cond ((zerop val) nil) + ((= val indent-value) (symbol-value var)) + ((zerop (mod indent-value val)) + (* (symbol-value var) (/ indent-value val))) + ((zerop (mod val indent-value)) + (/ (symbol-value var) (/ val indent-value))))))) + alist))) (advice-add #'indent-bars--guess-spacing :before-until #'~/guess-offset-from-editorconfig)