diff --git a/lsp-inline-completion.el b/lsp-inline-completion.el index 55e492ec6f9..36bb3ea5e7d 100644 --- a/lsp-inline-completion.el +++ b/lsp-inline-completion.el @@ -469,12 +469,12 @@ lsp-inline-completion-mode is active" (add-hook 'lsp-inline-completion-before-show-hook #'lsp-inline-completion--company-save-state-and-hide nil t) (add-hook 'lsp-inline-completion-cancelled-hook #'lsp-inline-completion--company-restore-state nil t) (unless (memq #'lsp-inline-completion-display company--begin-inhibit-commands) - (make-variable-buffer-local 'company--begin-inhibit-commands) - (push #'lsp-inline-completion-display company--begin-inhibit-commands)) + (setq-local company--begin-inhibit-commands + (cons #'lsp-inline-completion-display company--begin-inhibit-commands))) (when (and lsp-inline-completion-mode-inhibit-when-company-active (not (memq #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates))) - (make-variable-buffer-local 'lsp-inline-completion-inhibit-predicates) - (push #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates))) + (setq-local lsp-inline-completion-inhibit-predicates + (cons #'lsp-inline-completion--company-active-p lsp-inline-completion-inhibit-predicates)))) (t (remove-hook 'lsp-inline-completion-before-show-hook #'lsp-inline-completion--company-save-state-and-hide t)