Function: editorconfig-call-get-properties-function
editorconfig-call-get-properties-function is a byte-compiled function
defined in editorconfig.el.gz.
Signature
(editorconfig-call-get-properties-function FILENAME)
Documentation
Call editorconfig-core-get-properties-hash with FILENAME and return result.
This function also removes unset properties.
Source Code
;; Defined in /usr/src/emacs/lisp/editorconfig.el.gz
(defun editorconfig-call-get-properties-function (filename)
"Call `editorconfig-core-get-properties-hash' with FILENAME and return result.
This function also removes `unset' properties."
(if (stringp filename)
(setq filename (expand-file-name filename))
(editorconfig-error "Invalid argument: %S" filename))
(let ((props nil))
(condition-case-unless-debug err
(setq props (editorconfig-core-get-properties-hash filename))
(error
(editorconfig-error "Error from editorconfig-core-get-properties-hash: %S"
err)))
(cl-loop for k being the hash-keys of props using (hash-values v)
when (equal v "unset") do (remhash k props))
;; E.g. for `editorconfig-display-current-properties'.
;; FIXME: Use it for memoization as well to avoid the duplicate
;; calls to `editorconfig-core-get-properties-hash' (one for
;; `editorconfig--get-coding-system' and one for
;; `editorconfig--get-dir-local-variables')?
(setq editorconfig-properties-hash props)
props))