[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode f854352d76 11/22: Fix byte-compilation warnings
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/julia-mode f854352d76 11/22: Fix byte-compilation warnings for company-integration code |
|
Date: |
Thu, 4 May 2023 11:00:52 -0400 (EDT) |
branch: elpa/julia-mode
commit f854352d76672fbbf1a0ede20e0520f27f88dfdb
Author: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Commit: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Fix byte-compilation warnings for company-integration code
This follows the pattern for conditional integration code from
"net/tramp-integration.el".
---
julia-mode.el | 21 +++++++++++++--------
1 file changed, 13 insertions(+), 8 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index 466a547efc..953944aa47 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -876,16 +876,21 @@ buffer where the LaTeX symbol starts."
;; 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.
+;; `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
- (defun julia-company-indent-for-tab-command (arg)
- "Call `indent-for-tab-command' or `company-indent-or-complete-common' as
appropriate."
- (interactive "P")
- (if company-mode
- (company-indent-or-complete-common arg)
- (indent-for-tab-command arg)))
(define-key julia-mode-map [remap indent-for-tab-command]
- #'julia-company-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)
- [nongnu] elpa/julia-mode c87949315f 02/22: Remove hack for indentation in strings, (continued)
- [nongnu] elpa/julia-mode c87949315f 02/22: Remove hack for indentation in strings, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 4d2047666f 04/22: Remove old latexsub implementation, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 0160fecf90 05/22: Override TAB to do completion in julia-mode buffers, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f92227a87f 09/22: Fix whitespace, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f359fd01c5 12/22: Add predicate to "around" latex symbol completion, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 347c5c11c5 14/22: cleanup tests, bit more verbose to compare matched string, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 74e13dc460 16/22: use cl-flet, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 15326d6992 08/22: Remove extraneous -mode suffix from julia-- functions, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 016721004c 19/22: Merge pull request #185 from JuliaEditorSupport/tp/find-latexsub-end, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 8f3afcb99e 21/22: ignore warnings on snaphot, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f854352d76 11/22: Fix byte-compilation warnings for company-integration code,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 7e301f4414 22/22: Merge pull request #186 from tpapp/tp/remove-emacs-25, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d2b28644d2 06/22: Stop overriding regex in julia-mode-abbrev-table, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode c8e33f81fa 13/22: Use a hash table to look up where symbols end., ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode a39c9d2dd3 07/22: Automatically substitute LaTeX symbols after completion., ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 26a1c2bfa9 20/22: require Emacs 26, ELPA Syncer, 2023/05/04