|
@@ -716,17 +716,22 @@ found, otherwise returns nil." |
|
|
'editorconfig-mode-apply t))) |
|
|
'editorconfig-mode-apply t))) |
|
|
|
|
|
|
|
|
(when (fboundp 'editorconfig-custom-majormode) |
|
|
(when (fboundp 'editorconfig-custom-majormode) |
|
|
(add-hook 'editorconfig-custom-hooks |
|
|
|
|
|
|
|
|
(add-hook 'editorconfig-after-apply-functions |
|
|
'editorconfig-custom-majormode)) |
|
|
'editorconfig-custom-majormode)) |
|
|
|
|
|
|
|
|
;; Add readonly=true to set read-only-mode |
|
|
;; Add readonly=true to set read-only-mode |
|
|
(add-hook 'editorconfig-custom-hooks |
|
|
|
|
|
|
|
|
(add-hook 'editorconfig-after-apply-functions |
|
|
(lambda (props) |
|
|
(lambda (props) |
|
|
(let ((r (gethash 'readonly props))) |
|
|
(let ((r (gethash 'readonly props))) |
|
|
(when (and (string= r "true") |
|
|
(when (and (string= r "true") |
|
|
(not buffer-read-only)) |
|
|
(not buffer-read-only)) |
|
|
(read-only-mode 1))))) |
|
|
(read-only-mode 1))))) |
|
|
|
|
|
|
|
|
|
|
|
(add-hook 'editorconfig-hack-properties-functions |
|
|
|
|
|
'(lambda (props) |
|
|
|
|
|
(when (derived-mode-p makefile-mode) |
|
|
|
|
|
(puthash 'indent_style \"tab\" props)))) |
|
|
|
|
|
|
|
|
;; (when (fboundp 'editorconfig-charset-extras) |
|
|
;; (when (fboundp 'editorconfig-charset-extras) |
|
|
;; (add-hook 'editorconfig-custom-hooks |
|
|
;; (add-hook 'editorconfig-custom-hooks |
|
|
;; 'editorconfig-charset-extras)) |
|
|
;; 'editorconfig-charset-extras)) |
|
|