4 Commits

Author SHA1 Message Date
  10sr 15240f0932
Fix compile errors 2 years ago
  10sr 8918e30e86
Update auto-mode-alist 2 years ago
  10sr 6cf49ec4f3
Update 2 years ago
  10sr 97f06e576e
Update 2 years ago
1 changed files with 19 additions and 16 deletions
Split View
  1. +19
    -16
      emacs.el

+ 19
- 16
emacs.el View File

@@ -91,7 +91,7 @@ Otherwize hook it."
erlang
js2-mode
js-doc
git-commit
;; git-commit
gitignore-mode
adoc-mode
go-mode
@@ -1113,10 +1113,10 @@ THEM are function and its args."
'fic-mode))

(when (fboundp 'global-tree-sitter-mode)
(add-hook 'after-init-hook
(add-hook 'after-first-visit-hook
'global-tree-sitter-mode)
(add-hook 'tree-sitter-after-on-hook
#'tree-sitter-hl-mode))
'tree-sitter-hl-mode))

(with-eval-after-load 'tree-sitter
(require 'tree-sitter-langs nil t))
@@ -1272,15 +1272,15 @@ THEM are function and its args."
(not buffer-read-only))
(read-only-mode 1)))))

(add-hook 'editorconfig-hack-properties-functions
'(lambda (props)
(when (derived-mode-p 'makefile-mode)
(puthash 'indent_style "tab" props))
(when (derived-mode-p 'diff-mode)
(puthash 'trim_trailing_whitespace "false" props)
(puthash 'insert_final_newline "false" props)
)
))
(add-hook 'editorconfig-after-apply-functions
(lambda (props)
(when (derived-mode-p 'makefile-mode)
(setq indent-tabs-mode t))
(when (derived-mode-p 'diff-mode)
(editorconfig-set-trailing-ws "false")
(editorconfig-set-trailing-nl "false")
)
))

(when (fboundp 'editorconfig-auto-apply-enable)
(add-hook 'editorconfig-conf-mode-hook
@@ -1824,11 +1824,12 @@ ORIG-FUNC is the target function, and ARGS is the argument when it is called."
(when (fboundp 'gited-list)
(defalias 'gited 'gited-list))

(when (eval-and-compile (require 'git-commit nil t))
(when (and (eval-and-compile (require 'git-commit nil t))
(fboundp 'global-git-commit-mode))
;; git-commit is defined badly and breaks the convention that only loading a
;; library should not change the Emacs behavior:
;; anyway I enable this manually here.
(global-git-commit-mode 1))
(global-git-commit-mode 1))
(with-eval-after-load 'git-commit
(add-hook 'git-commit-setup-hook
'turn-off-auto-fill t))
@@ -2046,6 +2047,8 @@ ORIG-FUNC is the target function, and ARGS is the argument when it is called."
(add-to-list 'c-default-style
'(c++-mode . "k&r")))

(add-to-list 'auto-mode-alist
'("\\.gs\\'" . js-mode))
(with-eval-after-load 'js2-mode
;; currently do not use js2-mode
;; (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
@@ -3079,8 +3082,8 @@ Any output will be written to current buffer."
(propertize " " 'face (overlay-get mmv-mark-overlay 'face)))
(move-overlay mmv-mark-overlay mark-position mark-position)))))

;; Makes display very slow?
(add-hook 'pre-redisplay-functions #'mmv-draw-mark)
;; ;; Makes display very slow?
;; (add-hook 'pre-redisplay-functions #'mmv-draw-mark)

(defun mmv-toggle-mark-visibility ()
"Toggles the mark's visiblity and redraws it (whether invisible or visible)."


Loading…
Cancel
Save