Skip to content

Commit

Permalink
fix(cape): enable cape-elisp-block in org-mode only
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Dec 24, 2023
1 parent ae23a0e commit 8331f8e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions core/me-completion.el
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
:after minemacs-loaded
:demand t
:init
(defcustom +cape-global-capes
'(tempel-complete :completion cape-dict)
(defcustom +cape-global-capes '(tempel-complete :completion cape-dict)
"A list of global capes to be available at all times.
The key `:completion' is used to specify where completion candidates should be
placed, otherwise they come first."
Expand All @@ -40,11 +39,14 @@ placed, otherwise they come first."
(when (< emacs-major-version 29)
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify))

(+add-hook! 'completion-at-point-functions '(cape-file cape-elisp-block cape-keyword cape-dict))
(+add-hook! 'completion-at-point-functions '(cape-file cape-keyword cape-dict))

(+add-hook! (emacs-lisp-mode git-commit-mode)
(add-hook 'completion-at-point-functions #'cape-elisp-symbol nil t))

(+add-hook! org-mode
(add-hook 'completion-at-point-functions #'cape-elisp-block nil t))

(+add-hook! (TeX-mode LaTeX-mode)
(add-hook 'completion-at-point-functions #'cape-tex nil t))

Expand Down

0 comments on commit 8331f8e

Please sign in to comment.