Sfoglia il codice sorgente

Add custom hook for readonly

master
10sr 6 anni fa
parent
commit
65474a9f7c
Firmato da: 10sr ID Chiave GPG: 7BEC428194130EB2
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. +7
    -0
      emacs.el

+ 7
- 0
emacs.el Vedi File

@@ -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))


Caricamento…
Annulla
Salva