Fix editorconfig file ext 'guesser' in org-edit-src buffers
Fixes editorconfig not correctly guessing style settings in org-edit-src buffers.
This commit is contained in:
parent
e79942de2e
commit
11e5140b98
1 changed files with 5 additions and 4 deletions
|
@ -136,12 +136,13 @@ fundamental-mode) for performance sake."
|
||||||
"Retrieve the properties for the current file. If it doesn't have an
|
"Retrieve the properties for the current file. If it doesn't have an
|
||||||
extension, try to guess one."
|
extension, try to guess one."
|
||||||
(let ((buffer-file-name
|
(let ((buffer-file-name
|
||||||
(if (file-name-extension buffer-file-name)
|
(if (and (not (bound-and-true-p org-src-mode))
|
||||||
|
(file-name-extension buffer-file-name))
|
||||||
buffer-file-name
|
buffer-file-name
|
||||||
(format "%s%s" buffer-file-name
|
(format "%s%s" buffer-file-name
|
||||||
(let ((ext (cdr (assq major-mode doom-editorconfig-mode-alist))))
|
(if-let* ((ext (cdr (assq major-mode doom-editorconfig-mode-alist))))
|
||||||
(or (and ext (concat "." ext))
|
(concat "." ext)
|
||||||
""))))))
|
"")))))
|
||||||
(apply orig-fn args)))
|
(apply orig-fn args)))
|
||||||
(advice-add #'editorconfig-call-editorconfig-exec :around #'doom*editorconfig-smart-detection)
|
(advice-add #'editorconfig-call-editorconfig-exec :around #'doom*editorconfig-smart-detection)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue