Skip to content

Commit

Permalink
Merge pull request #192 from non-Jedi/patch-1
Browse files Browse the repository at this point in the history
Remove attempt to be smart with company completion
  • Loading branch information
tpapp authored May 10, 2023
2 parents 7e301f4 + cf060ee commit b35e668
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions julia-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -908,24 +908,6 @@ buffer where the LaTeX symbol starts."
(abbrev-insert symb name beg end)))
#'ignore))

;; company-mode doesn't work via `indent-for-tab-command'. In order to have a consistent
;; completion UI, we must dynamically choose between `company-indent-or-complete-common' and
;; `indent-for-tab-command' based on whether `company-mode' is active. First we need to
;; pacify the byte-compiler though.
(declare-function company-indent-or-complete-common "company")
(defvar company-mode)

(defun julia--company-indent-for-tab-command (arg)
"Call `indent-for-tab-command' or `company-indent-or-complete-common'."
(interactive "P")
(if company-mode
(company-indent-or-complete-common arg)
(indent-for-tab-command arg)))

(with-eval-after-load 'company
(define-key julia-mode-map [remap indent-for-tab-command]
#'julia--company-indent-for-tab-command))

;; Math insertion in julia. Use it with
;; (add-hook 'julia-mode-hook 'julia-math-mode)
;; (add-hook 'inferior-julia-mode-hook 'julia-math-mode)
Expand Down

0 comments on commit b35e668

Please sign in to comment.