Function: editorconfig-core--get-handles
editorconfig-core--get-handles is a byte-compiled function defined in
editorconfig-core.el.gz.
Signature
(editorconfig-core--get-handles DIR CONFNAME &optional RESULT)
Documentation
Get list of EditorConfig handlers for DIR from CONFNAME.
In the resulting list, the handle for root config file comes first, and the nearest comes last. The list may contains nil when no file was found for directories. RESULT is used internally and normally should not be used.
Source Code
;; Defined in /usr/src/emacs/lisp/editorconfig-core.el.gz
(defun editorconfig-core--get-handles (dir confname &optional result)
"Get list of EditorConfig handlers for DIR from CONFNAME.
In the resulting list, the handle for root config file comes first, and the
nearest comes last.
The list may contains nil when no file was found for directories.
RESULT is used internally and normally should not be used."
(setq dir (expand-file-name dir))
(let ((handle (editorconfig-core-handle (concat (file-name-as-directory dir)
confname)))
(parent (file-name-directory (directory-file-name dir))))
(if (or (string= parent dir)
(and handle (editorconfig-core-handle-root-p handle)))
(cl-remove-if-not #'identity (cons handle result))
(editorconfig-core--get-handles parent
confname
(cons handle result)))))