Skip to content

Commit 20d7695

Browse files
authored
Merge pull request #50 from tsuu32/dont-run-c-mode-hook
Avoid running c-mode-hook.
2 parents 47f15b2 + 5247076 commit 20d7695

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

solidity-mode.el

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ Possible values are:
6363
:package-version '(solidity . "0.1.7")
6464
:safe #'symbolp)
6565

66+
(defcustom solidity-mode-disable-c-mode-hook t
67+
"If non-nil, do not run `c-mode-hook'."
68+
:group 'solidity
69+
:type 'boolean)
70+
6671
(defvar solidity-mode-map
6772
(let ((map (make-sparse-keymap)))
6873
(define-key map "\C-j" 'newline-and-indent)
@@ -542,6 +547,9 @@ Cursor must be at the function's name. Does not currently work for constructors
542547
(set (make-local-variable 'comment-line-break-function)
543548
'c-indent-new-comment-line)
544549

550+
(when solidity-mode-disable-c-mode-hook
551+
(set (make-local-variable 'c-mode-hook) nil))
552+
545553
;; set imenu
546554
(setq imenu-generic-expression
547555
(solidity-mode-imenu-generic-expression))

0 commit comments

Comments
 (0)