[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 344e6c2 283/352: Merge pull request #42 from an
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 344e6c2 283/352: Merge pull request #42 from antoine-levitt/math-insert |
Date: |
Sun, 29 Aug 2021 11:23:02 -0400 (EDT) |
branch: elpa/julia-mode
commit 344e6c2a32b528eef87165ac32151990193a70f1
Merge: 47d2fb0 b66f8a4
Author: Yichao Yu <yyc1992@gmail.com>
Commit: GitHub <noreply@github.com>
Merge pull request #42 from antoine-levitt/math-insert
Insertion of math symbols in julia using auctex's mechanism
---
julia-mode.el | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/julia-mode.el b/julia-mode.el
index f88632f..bff71fb 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -3214,6 +3214,28 @@ strings."
(puthash "\\mtteight" "𝟾" julia-latexsubs)
(puthash "\\mttnine" "𝟿" julia-latexsubs)
+;; Math insertion in julia. Use it with
+;; (add-hook 'julia-mode-hook 'julia-math-mode)
+;; (add-hook 'inferior-julia-mode-hook 'julia-math-mode)
+
+(when (require 'latex nil t)
+ (defun julia-math-insert (s)
+ "Inserts math symbol given by `s'"
+ (when s
+ (let ((sym (gethash (concat "\\" s) julia-latexsubs)))
+ (when sym
+ (insert sym)))))
+
+ (define-minor-mode julia-math-mode
+ "A minor mode with easy access to TeX math commands. The
+command is only entered if it is supported in Julia. The
+following commands are defined:
+
+\\{LaTeX-math-mode-map}"
+ nil nil (list (cons (LaTeX-math-abbrev-prefix) LaTeX-math-keymap))
+ (if julia-math-mode
+ (set (make-local-variable 'LaTeX-math-insert-function)
'julia-math-insert))))
+
;; Code for `inferior-julia-mode'
(require 'comint)
- [nongnu] elpa/julia-mode ec01995 285/352: Merge pull request #54 from jamii/patch-1, (continued)
- [nongnu] elpa/julia-mode ec01995 285/352: Merge pull request #54 from jamii/patch-1, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 68181e6 293/352: Replace IntSet by BitSet, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode cb6d4bd 267/352: Fix badge URL, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 6a0f756 288/352: Merge pull request #67 from tpapp/tp/latexsubs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0d9a793 287/352: Move LaTeX substitutions to a separate file, clean up generating script., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode deda1e2 284/352: Add test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 69439e2 055/352: Fix Stephan's last name in .mailmap., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5762e13 133/352: remove * and div for Char, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 40c5e82 185/352: Fix indentation when we're indenting a line that has an open paren after point., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4f72dfa 246/352: Merge pull request #13 from JuliaLang/keywords_in_comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 344e6c2 283/352: Merge pull request #42 from antoine-levitt/math-insert,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 115d4dc 277/352: Regenerate latex auto completion (#45), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode db84928 299/352: Merge pull request #74 from non-Jedi/emoji, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d21b83d 316/352: Merge pull request #93 from non-Jedi/julia-mode-latexsubs_feature, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 839726a 336/352: Merge pull request #123 from ronisbr/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 2395931 142/352: Since julia-mode.el contains utf-8 chars, mark the file as utf-8., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5e52d81 188/352: Don't error if the first line of the file is empty., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b66f8a4 274/352: Insertion of math symbols in julia using auctex's mechanism, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 864e124 311/352: remove newline, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 686bed3 309/352: remove unused lexical args that gave a warning, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4515765 320/352: add a changelog (#96), ELPA Syncer, 2021/08/29