Преглед изворни кода

Add custom hook for readonly

master
10sr пре 5 година
родитељ
комит
65474a9f7c
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 измењених фајлова са 7 додато и 0 уклоњено
  1. +7
    -0
      emacs.el

+ 7
- 0
emacs.el Прегледај датотеку

@@ -643,6 +643,13 @@ found, otherwise returns nil."
(add-hook 'editorconfig-custom-hooks
'editorconfig-custom-majormode))

(add-hook 'editorconfig-custom-hooks
(lambda (props)
(let ((r (gethash 'readonly props)))
(when (and (string= r "true")
(not buffer-read-only))
(read-only-mode 1)))))

;; (when (fboundp 'editorconfig-charset-extras)
;; (add-hook 'editorconfig-custom-hooks
;; 'editorconfig-charset-extras))


Loading…
Откажи
Сачувај