Skip to content

Commit

Permalink
startup optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Chen Bin committed Feb 15, 2024
1 parent 2863931 commit ec286f4
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spellcheck:
@$(EMACS) $(EMACS_BATCH_OPTS) -L site-lisp/wucuo -l site-lisp/wucuo/wucuo.el -l tools/spellcheck.el

compile: install
@$(EMACS) $(EMACS_BATCH_OPTS) -l init.el -l tests/my-byte-compile.el 2>&1 | grep -Ev "docstring wider than 80 characters|an obsolete|wrong usage of unescaped single quotes|Doc string after .declare.|doc-view.*is not known|Warning: Unused lexical argument|Warning: the function .pdf-isearch" | grep -E "[0-9]: ([Ee]rror|[Ww]arning):" && exit 1 || exit 0
@$(EMACS) $(EMACS_BATCH_OPTS) -l init.el -l tests/my-byte-compile.el 2>&1 | grep -Ev "docstring wider than 80 characters|an obsolete|wrong usage of unescaped single quotes|Doc string after .declare.|doc-view.*is not known|Warning: Unused lexical argument|Warning: the function .pdf-isearch|Warning: the function .my-org-leader-def." | grep -E "[0-9]: ([Ee]rror|[Ww]arning):" && exit 1 || exit 0

# Run tests.
test: compile spellcheck
Expand Down
46 changes: 24 additions & 22 deletions lisp/init-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -994,28 +994,30 @@ If N > 0 and in js, only occurrences in current N lines are renamed."
(setq evil-default-cursor t))


;; {{ per-major-mode setup
(general-create-definer my-javascript-leader-def
:prefix "SPC"
:non-normal-prefix "M-SPC"
:states '(normal motion insert emacs)
:keymaps 'js2-mode-map)

(my-javascript-leader-def
"de" 'js2-display-error-list
"nn" 'js2-next-error
"te" 'js2-mode-toggle-element
"tf" 'js2-mode-toggle-hide-functions)

(general-create-definer my-org-leader-def
:prefix ";"
:non-normal-prefix "M-;"
:states '(normal motion visual)
:keymaps 'org-mode-map)

(my-org-leader-def
"f" 'my-navigate-in-pdf
"g" 'my-open-pdf-goto-page)
;; {{ per major-mode setup
(with-eval-after-load 'js2-mode
(general-create-definer my-javascript-leader-def
:prefix "SPC"
:non-normal-prefix "M-SPC"
:states '(normal motion insert emacs)
:keymaps 'js2-mode-map)

(my-javascript-leader-def
"de" 'js2-display-error-list
"nn" 'js2-next-error
"te" 'js2-mode-toggle-element
"tf" 'js2-mode-toggle-hide-functions))

(with-eval-after-load 'org-mode
(general-create-definer my-org-leader-def
:prefix ";"
:non-normal-prefix "M-;"
:states '(normal motion visual)
:keymaps 'org-mode-map)

(my-org-leader-def
"f" 'my-navigate-in-pdf
"g" 'my-open-pdf-goto-page))
;; }}


Expand Down

0 comments on commit ec286f4

Please sign in to comment.