[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 0160fecf90 05/22: Override TAB to do completion
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 0160fecf90 05/22: Override TAB to do completion in julia-mode buffers |
Date: |
Thu, 4 May 2023 11:00:51 -0400 (EDT) |
branch: elpa/julia-mode
commit 0160fecf90b4cfcbc5ebdadb868a3829eba19140
Author: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Commit: Adam Beckmeyer <adam_gpg@thebeckmeyers.xyz>
Override TAB to do completion in julia-mode buffers
---
julia-mode.el | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/julia-mode.el b/julia-mode.el
index c367e5cada..4cab2d6975 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -52,6 +52,13 @@
:safe (lambda (n) (and (> n 1) (<= n 8)))
:type 'integer)
+(defcustom julia-force-tab-complete t
+ "Use Tab for completion instead of M-Tab in `julia-mode'.
+This overrides `tab-always-indent' in `julia-mode' buffers. It also
+enables `abbrev-mode' so that inserting a space character will replace
+a LaTeX string with a unicode symbol."
+ :type 'boolean)
+
(defface julia-macro-face
'((t :inherit font-lock-preprocessor-face))
"Face for Julia macro invocations.")
@@ -773,6 +780,11 @@ Return nil if point is not in a function, otherwise point."
#'julia-mode-latexsub-completion-at-point-before nil t)
(add-hook 'completion-at-point-functions
#'julia-mode-latexsub-completion-at-point-around nil t)
+ (when julia-force-tab-complete
+ (setq-local tab-always-indent 'complete)
+ ;; To substitute a symbol for an abbrev, user will have to either
+ ;; insert a space after or call expand-abbrev (C-x a e)
+ (abbrev-mode 1))
(setq indent-tabs-mode nil)
(setq imenu-generic-expression julia-imenu-generic-expression)
(imenu-add-to-menubar "Imenu"))
@@ -906,6 +918,9 @@ following commands are defined:
(setq-local font-lock-defaults '(julia-font-lock-keywords t))
(setq-local paragraph-start julia-prompt-regexp)
(setq-local indent-line-function #'julia-indent-line)
+ (when julia-force-tab-complete
+ (setq-local tab-always-indent 'complete)
+ (abbrev-mode 1))
(add-hook 'completion-at-point-functions
#'julia-mode-latexsub-completion-at-point-before nil t)
(add-hook 'completion-at-point-functions
- [nongnu] elpa/julia-mode updated (a20367f282 -> 7e301f4414), ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 8078bb9d88 01/22: Add completion-at-point functions for completing LaTeX strings, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 307b4afa9a 03/22: Create julia-mode-abbrev-table filled with latexsub abbrevs, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d52cb3e885 10/22: Provide alternative to indent-for-tab-command for use with company, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 77ff4f1146 15/22: comment code, fix docstring width, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d684bf172a 17/22: further byte compilation docstring warning fixes, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 759e8a8e57 18/22: Merge branch 'master' into tp/find-latexsub-end, ELPA Syncer, 2023/05/04
- [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 <=
- [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, 2023/05/04
- [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