[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode b66f8a4 274/352: Insertion of math symbols in j
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode b66f8a4 274/352: Insertion of math symbols in julia using auctex's mechanism |
Date: |
Sun, 29 Aug 2021 11:23:00 -0400 (EDT) |
branch: elpa/julia-mode
commit b66f8a44e9e6bc5e0093d4fd6160646ae5dd2108
Author: Antoine Levitt <antoine.levitt@gmail.com>
Commit: Antoine Levitt <antoine.levitt@gmail.com>
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 737e44a..b67316a 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -3194,6 +3194,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 5762e13 133/352: remove * and div for Char, (continued)
- [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, 2021/08/29
- [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 <=
- [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
- [nongnu] elpa/julia-mode bfa54b2 331/352: Minor point about preferring the rx macro for regexs., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 88d7d87 332/352: Merge pull request #121 from JuliaEditorSupport/tp/prefer-rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d91f1d0 324/352: Remove regexp-opt workarounds for Emacs < 24 (#101), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d69b095 342/352: Removed require statement for auctex that broke prettify. Fixes #99 (#116), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8ea90c7 347/352: Rec/quoted quote (#143), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 5cccdbd 350/352: Fixed installation documentation (#147), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode fe6f6f7 348/352: Allow block indentation inside of parentheticals (#152), ELPA Syncer, 2021/08/29