From 1d72b744c632bb66c81a1ab9a0fe5b5abe4061bb Mon Sep 17 00:00:00 2001 From: Andreas Gerler Date: Sun, 22 Dec 2024 13:05:03 +0100 Subject: [PATCH] update julia-mode Signed-off-by: Andreas Gerler --- .../julia-mode-pkg.el | 8 -- .../julia-mode-autoloads.el | 31 ++--- .../julia-mode-latexsubs.el | 110 ++++++++------- .../julia-mode-pkg.el | 8 ++ .../julia-mode.el | 127 ++++++++++++++---- elpa/julia-mode-readme.txt | 1 - 6 files changed, 180 insertions(+), 105 deletions(-) delete mode 100644 elpa/julia-mode-20230712.1524/julia-mode-pkg.el rename elpa/{julia-mode-20230712.1524 => julia-mode-20241213.1620}/julia-mode-autoloads.el (58%) rename elpa/{julia-mode-20230712.1524 => julia-mode-20241213.1620}/julia-mode-latexsubs.el (99%) create mode 100644 elpa/julia-mode-20241213.1620/julia-mode-pkg.el rename elpa/{julia-mode-20230712.1524 => julia-mode-20241213.1620}/julia-mode.el (88%) delete mode 100644 elpa/julia-mode-readme.txt diff --git a/elpa/julia-mode-20230712.1524/julia-mode-pkg.el b/elpa/julia-mode-20230712.1524/julia-mode-pkg.el deleted file mode 100644 index fd30280a..00000000 --- a/elpa/julia-mode-20230712.1524/julia-mode-pkg.el +++ /dev/null @@ -1,8 +0,0 @@ -(define-package "julia-mode" "20230712.1524" "Major mode for editing Julia source code" - '((emacs "26.1")) - :commit "7a8c868e0d3e51ba4a2c621ee22ca9599e0e4bbb" :keywords - '("languages") - :url "https://github.com/JuliaEditorSupport/julia-emacs") -;; Local Variables: -;; no-byte-compile: t -;; End: diff --git a/elpa/julia-mode-20230712.1524/julia-mode-autoloads.el b/elpa/julia-mode-20241213.1620/julia-mode-autoloads.el similarity index 58% rename from elpa/julia-mode-20230712.1524/julia-mode-autoloads.el rename to elpa/julia-mode-20241213.1620/julia-mode-autoloads.el index 5c8539a7..a973d233 100644 --- a/elpa/julia-mode-20230712.1524/julia-mode-autoloads.el +++ b/elpa/julia-mode-20241213.1620/julia-mode-autoloads.el @@ -1,41 +1,38 @@ -;;; julia-mode-autoloads.el --- automatically extracted autoloads -*- lexical-binding: t -*- -;; +;;; julia-mode-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- +;; Generated by the `loaddefs-generate' function. + +;; This file is part of GNU Emacs. + ;;; Code: -(add-to-list 'load-path (directory-file-name - (or (file-name-directory #$) (car load-path)))) +(add-to-list 'load-path (or (and load-file-name (directory-file-name (file-name-directory load-file-name))) (car load-path))) + -;;;### (autoloads nil "julia-mode" "julia-mode.el" (0 0 0 0)) ;;; Generated autoloads from julia-mode.el (add-to-list 'auto-mode-alist '("\\.jl\\'" . julia-mode)) - (autoload 'julia-mode "julia-mode" "\ Major mode for editing julia code. -\(fn)" t nil) - +(fn)" t) (register-definition-prefixes "julia-mode" '("julia-")) -;;;*** -;;;### (autoloads nil "julia-mode-latexsubs" "julia-mode-latexsubs.el" -;;;;;; (0 0 0 0)) ;;; Generated autoloads from julia-mode-latexsubs.el (register-definition-prefixes "julia-mode-latexsubs" '("julia-")) - -;;;*** -;;;### (autoloads nil nil ("julia-mode-pkg.el") (0 0 0 0)) +;;; End of scraped data + +(provide 'julia-mode-autoloads) -;;;*** - ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t -;; coding: utf-8 +;; no-native-compile: t +;; coding: utf-8-emacs-unix ;; End: + ;;; julia-mode-autoloads.el ends here diff --git a/elpa/julia-mode-20230712.1524/julia-mode-latexsubs.el b/elpa/julia-mode-20241213.1620/julia-mode-latexsubs.el similarity index 99% rename from elpa/julia-mode-20230712.1524/julia-mode-latexsubs.el rename to elpa/julia-mode-20241213.1620/julia-mode-latexsubs.el index b79f5159..914f9ffb 100644 --- a/elpa/julia-mode-20230712.1524/julia-mode-latexsubs.el +++ b/elpa/julia-mode-20241213.1620/julia-mode-latexsubs.el @@ -23,6 +23,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\:copyright:" "©" nil :system t) (puthash "\\ordfeminine" "ª" table) (define-abbrev julia-latexsub-abbrev-table "\\ordfeminine" "ª" nil :system t) + (puthash "\\guillemotleft" "«" table) + (define-abbrev julia-latexsub-abbrev-table "\\guillemotleft" "«" nil :system t) (puthash "\\neg" "¬" table) (define-abbrev julia-latexsub-abbrev-table "\\neg" "¬" nil :system t) (puthash "\\:registered:" "®" table) @@ -47,6 +49,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\^1" "¹" nil :system t) (puthash "\\ordmasculine" "º" table) (define-abbrev julia-latexsub-abbrev-table "\\ordmasculine" "º" nil :system t) + (puthash "\\guillemotright" "»" table) + (define-abbrev julia-latexsub-abbrev-table "\\guillemotright" "»" nil :system t) (puthash "\\1/4" "¼" table) (define-abbrev julia-latexsub-abbrev-table "\\1/4" "¼" nil :system t) (puthash "\\1/2" "½" table) @@ -309,14 +313,14 @@ (define-abbrev julia-latexsub-abbrev-table "\\Kappa" "Κ" nil :system t) (puthash "\\Lambda" "Λ" table) (define-abbrev julia-latexsub-abbrev-table "\\Lambda" "Λ" nil :system t) - (puthash "\\upMu" "Μ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upMu" "Μ" nil :system t) - (puthash "\\upNu" "Ν" table) - (define-abbrev julia-latexsub-abbrev-table "\\upNu" "Ν" nil :system t) + (puthash "\\Mu" "Μ" table) + (define-abbrev julia-latexsub-abbrev-table "\\Mu" "Μ" nil :system t) + (puthash "\\Nu" "Ν" table) + (define-abbrev julia-latexsub-abbrev-table "\\Nu" "Ν" nil :system t) (puthash "\\Xi" "Ξ" table) (define-abbrev julia-latexsub-abbrev-table "\\Xi" "Ξ" nil :system t) - (puthash "\\upOmicron" "Ο" table) - (define-abbrev julia-latexsub-abbrev-table "\\upOmicron" "Ο" nil :system t) + (puthash "\\Omicron" "Ο" table) + (define-abbrev julia-latexsub-abbrev-table "\\Omicron" "Ο" nil :system t) (puthash "\\Pi" "Π" table) (define-abbrev julia-latexsub-abbrev-table "\\Pi" "Π" nil :system t) (puthash "\\Rho" "Ρ" table) @@ -343,8 +347,6 @@ (define-abbrev julia-latexsub-abbrev-table "\\gamma" "γ" nil :system t) (puthash "\\delta" "δ" table) (define-abbrev julia-latexsub-abbrev-table "\\delta" "δ" nil :system t) - (puthash "\\upepsilon" "ε" table) - (define-abbrev julia-latexsub-abbrev-table "\\upepsilon" "ε" nil :system t) (puthash "\\varepsilon" "ε" table) (define-abbrev julia-latexsub-abbrev-table "\\varepsilon" "ε" nil :system t) (puthash "\\zeta" "ζ" table) @@ -365,8 +367,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\nu" "ν" nil :system t) (puthash "\\xi" "ξ" table) (define-abbrev julia-latexsub-abbrev-table "\\xi" "ξ" nil :system t) - (puthash "\\upomicron" "ο" table) - (define-abbrev julia-latexsub-abbrev-table "\\upomicron" "ο" nil :system t) + (puthash "\\omicron" "ο" table) + (define-abbrev julia-latexsub-abbrev-table "\\omicron" "ο" nil :system t) (puthash "\\pi" "π" table) (define-abbrev julia-latexsub-abbrev-table "\\pi" "π" nil :system t) (puthash "\\rho" "ρ" table) @@ -387,34 +389,34 @@ (define-abbrev julia-latexsub-abbrev-table "\\psi" "ψ" nil :system t) (puthash "\\omega" "ω" table) (define-abbrev julia-latexsub-abbrev-table "\\omega" "ω" nil :system t) - (puthash "\\upvarbeta" "ϐ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upvarbeta" "ϐ" nil :system t) + (puthash "\\varbeta" "ϐ" table) + (define-abbrev julia-latexsub-abbrev-table "\\varbeta" "ϐ" nil :system t) (puthash "\\vartheta" "ϑ" table) (define-abbrev julia-latexsub-abbrev-table "\\vartheta" "ϑ" nil :system t) (puthash "\\phi" "ϕ" table) (define-abbrev julia-latexsub-abbrev-table "\\phi" "ϕ" nil :system t) (puthash "\\varpi" "ϖ" table) (define-abbrev julia-latexsub-abbrev-table "\\varpi" "ϖ" nil :system t) - (puthash "\\upoldKoppa" "Ϙ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upoldKoppa" "Ϙ" nil :system t) - (puthash "\\upoldkoppa" "ϙ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upoldkoppa" "ϙ" nil :system t) + (puthash "\\oldKoppa" "Ϙ" table) + (define-abbrev julia-latexsub-abbrev-table "\\oldKoppa" "Ϙ" nil :system t) + (puthash "\\oldkoppa" "ϙ" table) + (define-abbrev julia-latexsub-abbrev-table "\\oldkoppa" "ϙ" nil :system t) (puthash "\\Stigma" "Ϛ" table) (define-abbrev julia-latexsub-abbrev-table "\\Stigma" "Ϛ" nil :system t) - (puthash "\\upstigma" "ϛ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upstigma" "ϛ" nil :system t) + (puthash "\\stigma" "ϛ" table) + (define-abbrev julia-latexsub-abbrev-table "\\stigma" "ϛ" nil :system t) (puthash "\\Digamma" "Ϝ" table) (define-abbrev julia-latexsub-abbrev-table "\\Digamma" "Ϝ" nil :system t) (puthash "\\digamma" "ϝ" table) (define-abbrev julia-latexsub-abbrev-table "\\digamma" "ϝ" nil :system t) (puthash "\\Koppa" "Ϟ" table) (define-abbrev julia-latexsub-abbrev-table "\\Koppa" "Ϟ" nil :system t) - (puthash "\\upkoppa" "ϟ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upkoppa" "ϟ" nil :system t) + (puthash "\\koppa" "ϟ" table) + (define-abbrev julia-latexsub-abbrev-table "\\koppa" "ϟ" nil :system t) (puthash "\\Sampi" "Ϡ" table) (define-abbrev julia-latexsub-abbrev-table "\\Sampi" "Ϡ" nil :system t) - (puthash "\\upsampi" "ϡ" table) - (define-abbrev julia-latexsub-abbrev-table "\\upsampi" "ϡ" nil :system t) + (puthash "\\sampi" "ϡ" table) + (define-abbrev julia-latexsub-abbrev-table "\\sampi" "ϡ" nil :system t) (puthash "\\varkappa" "ϰ" table) (define-abbrev julia-latexsub-abbrev-table "\\varkappa" "ϰ" nil :system t) (puthash "\\varrho" "ϱ" table) @@ -905,10 +907,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\:arrow_upper_left:" "↖" nil :system t) (puthash "\\nwarrow" "↖" table) (define-abbrev julia-latexsub-abbrev-table "\\nwarrow" "↖" nil :system t) - (puthash "\\nearrow" "↗" table) - (define-abbrev julia-latexsub-abbrev-table "\\nearrow" "↗" nil :system t) (puthash "\\:arrow_upper_right:" "↗" table) (define-abbrev julia-latexsub-abbrev-table "\\:arrow_upper_right:" "↗" nil :system t) + (puthash "\\nearrow" "↗" table) + (define-abbrev julia-latexsub-abbrev-table "\\nearrow" "↗" nil :system t) (puthash "\\:arrow_lower_right:" "↘" table) (define-abbrev julia-latexsub-abbrev-table "\\:arrow_lower_right:" "↘" nil :system t) (puthash "\\searrow" "↘" table) @@ -1161,10 +1163,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\circ" "∘" nil :system t) (puthash "\\vysmblkcircle" "∙" table) (define-abbrev julia-latexsub-abbrev-table "\\vysmblkcircle" "∙" nil :system t) - (puthash "\\sqrt" "√" table) - (define-abbrev julia-latexsub-abbrev-table "\\sqrt" "√" nil :system t) (puthash "\\surd" "√" table) (define-abbrev julia-latexsub-abbrev-table "\\surd" "√" nil :system t) + (puthash "\\sqrt" "√" table) + (define-abbrev julia-latexsub-abbrev-table "\\sqrt" "√" nil :system t) (puthash "\\cbrt" "∛" table) (define-abbrev julia-latexsub-abbrev-table "\\cbrt" "∛" nil :system t) (puthash "\\fourthroot" "∜" table) @@ -1307,6 +1309,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\questeq" "≟" nil :system t) (puthash "\\ne" "≠" table) (define-abbrev julia-latexsub-abbrev-table "\\ne" "≠" nil :system t) + (puthash "\\neq" "≠" table) + (define-abbrev julia-latexsub-abbrev-table "\\neq" "≠" nil :system t) (puthash "\\equiv" "≡" table) (define-abbrev julia-latexsub-abbrev-table "\\equiv" "≡" nil :system t) (puthash "\\nequiv" "≢" table) @@ -1507,18 +1511,18 @@ (define-abbrev julia-latexsub-abbrev-table "\\hermitconjmatrix" "⊹" nil :system t) (puthash "\\intercal" "⊺" table) (define-abbrev julia-latexsub-abbrev-table "\\intercal" "⊺" nil :system t) - (puthash "\\veebar" "⊻" table) - (define-abbrev julia-latexsub-abbrev-table "\\veebar" "⊻" nil :system t) (puthash "\\xor" "⊻" table) (define-abbrev julia-latexsub-abbrev-table "\\xor" "⊻" nil :system t) + (puthash "\\veebar" "⊻" table) + (define-abbrev julia-latexsub-abbrev-table "\\veebar" "⊻" nil :system t) (puthash "\\barwedge" "⊼" table) (define-abbrev julia-latexsub-abbrev-table "\\barwedge" "⊼" nil :system t) (puthash "\\nand" "⊼" table) (define-abbrev julia-latexsub-abbrev-table "\\nand" "⊼" nil :system t) - (puthash "\\nor" "⊽" table) - (define-abbrev julia-latexsub-abbrev-table "\\nor" "⊽" nil :system t) (puthash "\\barvee" "⊽" table) (define-abbrev julia-latexsub-abbrev-table "\\barvee" "⊽" nil :system t) + (puthash "\\nor" "⊽" table) + (define-abbrev julia-latexsub-abbrev-table "\\nor" "⊽" nil :system t) (puthash "\\rightanglearc" "⊾" table) (define-abbrev julia-latexsub-abbrev-table "\\rightanglearc" "⊾" nil :system t) (puthash "\\varlrtriangle" "⊿" table) @@ -1597,8 +1601,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\nsqsupseteq" "⋣" nil :system t) (puthash "\\sqsubsetneq" "⋤" table) (define-abbrev julia-latexsub-abbrev-table "\\sqsubsetneq" "⋤" nil :system t) - (puthash "\\sqspne" "⋥" table) - (define-abbrev julia-latexsub-abbrev-table "\\sqspne" "⋥" nil :system t) + (puthash "\\sqsupsetneq" "⋥" table) + (define-abbrev julia-latexsub-abbrev-table "\\sqsupsetneq" "⋥" nil :system t) (puthash "\\lnsim" "⋦" table) (define-abbrev julia-latexsub-abbrev-table "\\lnsim" "⋦" nil :system t) (puthash "\\gnsim" "⋧" table) @@ -2043,10 +2047,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\venus" "♀" nil :system t) (puthash "\\female" "♀" table) (define-abbrev julia-latexsub-abbrev-table "\\female" "♀" nil :system t) - (puthash "\\male" "♂" table) - (define-abbrev julia-latexsub-abbrev-table "\\male" "♂" nil :system t) (puthash "\\mars" "♂" table) (define-abbrev julia-latexsub-abbrev-table "\\mars" "♂" nil :system t) + (puthash "\\male" "♂" table) + (define-abbrev julia-latexsub-abbrev-table "\\male" "♂" nil :system t) (puthash "\\jupiter" "♃" table) (define-abbrev julia-latexsub-abbrev-table "\\jupiter" "♃" nil :system t) (puthash "\\saturn" "♄" table) @@ -2057,18 +2061,18 @@ (define-abbrev julia-latexsub-abbrev-table "\\neptune" "♆" nil :system t) (puthash "\\pluto" "♇" table) (define-abbrev julia-latexsub-abbrev-table "\\pluto" "♇" nil :system t) - (puthash "\\:aries:" "♈" table) - (define-abbrev julia-latexsub-abbrev-table "\\:aries:" "♈" nil :system t) (puthash "\\aries" "♈" table) (define-abbrev julia-latexsub-abbrev-table "\\aries" "♈" nil :system t) + (puthash "\\:aries:" "♈" table) + (define-abbrev julia-latexsub-abbrev-table "\\:aries:" "♈" nil :system t) (puthash "\\:taurus:" "♉" table) (define-abbrev julia-latexsub-abbrev-table "\\:taurus:" "♉" nil :system t) (puthash "\\taurus" "♉" table) (define-abbrev julia-latexsub-abbrev-table "\\taurus" "♉" nil :system t) - (puthash "\\:gemini:" "♊" table) - (define-abbrev julia-latexsub-abbrev-table "\\:gemini:" "♊" nil :system t) (puthash "\\gemini" "♊" table) (define-abbrev julia-latexsub-abbrev-table "\\gemini" "♊" nil :system t) + (puthash "\\:gemini:" "♊" table) + (define-abbrev julia-latexsub-abbrev-table "\\:gemini:" "♊" nil :system t) (puthash "\\:cancer:" "♋" table) (define-abbrev julia-latexsub-abbrev-table "\\:cancer:" "♋" nil :system t) (puthash "\\cancer" "♋" table) @@ -2081,10 +2085,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\:virgo:" "♍" nil :system t) (puthash "\\virgo" "♍" table) (define-abbrev julia-latexsub-abbrev-table "\\virgo" "♍" nil :system t) - (puthash "\\:libra:" "♎" table) - (define-abbrev julia-latexsub-abbrev-table "\\:libra:" "♎" nil :system t) (puthash "\\libra" "♎" table) (define-abbrev julia-latexsub-abbrev-table "\\libra" "♎" nil :system t) + (puthash "\\:libra:" "♎" table) + (define-abbrev julia-latexsub-abbrev-table "\\:libra:" "♎" nil :system t) (puthash "\\scorpio" "♏" table) (define-abbrev julia-latexsub-abbrev-table "\\scorpio" "♏" nil :system t) (puthash "\\:scorpius:" "♏" table) @@ -2097,10 +2101,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\capricornus" "♑" nil :system t) (puthash "\\:capricorn:" "♑" table) (define-abbrev julia-latexsub-abbrev-table "\\:capricorn:" "♑" nil :system t) - (puthash "\\aquarius" "♒" table) - (define-abbrev julia-latexsub-abbrev-table "\\aquarius" "♒" nil :system t) (puthash "\\:aquarius:" "♒" table) (define-abbrev julia-latexsub-abbrev-table "\\:aquarius:" "♒" nil :system t) + (puthash "\\aquarius" "♒" table) + (define-abbrev julia-latexsub-abbrev-table "\\aquarius" "♒" nil :system t) (puthash "\\pisces" "♓" table) (define-abbrev julia-latexsub-abbrev-table "\\pisces" "♓" nil :system t) (puthash "\\:pisces:" "♓" table) @@ -2193,10 +2197,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\:soccer:" "⚽" nil :system t) (puthash "\\:baseball:" "⚾" table) (define-abbrev julia-latexsub-abbrev-table "\\:baseball:" "⚾" nil :system t) - (puthash "\\:snowman:" "⛄" table) - (define-abbrev julia-latexsub-abbrev-table "\\:snowman:" "⛄" nil :system t) (puthash "\\:snowman_without_snow:" "⛄" table) (define-abbrev julia-latexsub-abbrev-table "\\:snowman_without_snow:" "⛄" nil :system t) + (puthash "\\:snowman:" "⛄" table) + (define-abbrev julia-latexsub-abbrev-table "\\:snowman:" "⛄" nil :system t) (puthash "\\:partly_sunny:" "⛅" table) (define-abbrev julia-latexsub-abbrev-table "\\:partly_sunny:" "⛅" nil :system t) (puthash "\\:ophiuchus:" "⛎" table) @@ -2291,6 +2295,8 @@ (define-abbrev julia-latexsub-abbrev-table "\\whiteinwhitetriangle" "⟁" nil :system t) (puthash "\\perp" "⟂" table) (define-abbrev julia-latexsub-abbrev-table "\\perp" "⟂" nil :system t) + (puthash "\\veedot" "⟇" table) + (define-abbrev julia-latexsub-abbrev-table "\\veedot" "⟇" nil :system t) (puthash "\\bsolhsub" "⟈" table) (define-abbrev julia-latexsub-abbrev-table "\\bsolhsub" "⟈" nil :system t) (puthash "\\suphsol" "⟉" table) @@ -2309,10 +2315,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\bigbot" "⟘" nil :system t) (puthash "\\bigtop" "⟙" table) (define-abbrev julia-latexsub-abbrev-table "\\bigtop" "⟙" nil :system t) - (puthash "\\openbracketleft" "⟦" table) - (define-abbrev julia-latexsub-abbrev-table "\\openbracketleft" "⟦" nil :system t) (puthash "\\llbracket" "⟦" table) (define-abbrev julia-latexsub-abbrev-table "\\llbracket" "⟦" nil :system t) + (puthash "\\openbracketleft" "⟦" table) + (define-abbrev julia-latexsub-abbrev-table "\\openbracketleft" "⟦" nil :system t) (puthash "\\openbracketright" "⟧" table) (define-abbrev julia-latexsub-abbrev-table "\\openbracketright" "⟧" nil :system t) (puthash "\\rrbracket" "⟧" table) @@ -2535,6 +2541,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\ReverseUpEquilibrium" "⥯" nil :system t) (puthash "\\RoundImplies" "⥰" table) (define-abbrev julia-latexsub-abbrev-table "\\RoundImplies" "⥰" nil :system t) + (puthash "\\leftarrowless" "⥷" table) + (define-abbrev julia-latexsub-abbrev-table "\\leftarrowless" "⥷" nil :system t) + (puthash "\\leftarrowsubset" "⥺" table) + (define-abbrev julia-latexsub-abbrev-table "\\leftarrowsubset" "⥺" nil :system t) (puthash "\\Vvert" "⦀" table) (define-abbrev julia-latexsub-abbrev-table "\\Vvert" "⦀" nil :system t) (puthash "\\Elroang" "⦆" table) @@ -3131,10 +3141,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\diamondbotblack" "⬙" nil :system t) (puthash "\\dottedsquare" "⬚" table) (define-abbrev julia-latexsub-abbrev-table "\\dottedsquare" "⬚" nil :system t) - (puthash "\\lgblksquare" "⬛" table) - (define-abbrev julia-latexsub-abbrev-table "\\lgblksquare" "⬛" nil :system t) (puthash "\\:black_large_square:" "⬛" table) (define-abbrev julia-latexsub-abbrev-table "\\:black_large_square:" "⬛" nil :system t) + (puthash "\\lgblksquare" "⬛" table) + (define-abbrev julia-latexsub-abbrev-table "\\lgblksquare" "⬛" nil :system t) (puthash "\\lgwhtsquare" "⬜" table) (define-abbrev julia-latexsub-abbrev-table "\\lgwhtsquare" "⬜" nil :system t) (puthash "\\:white_large_square:" "⬜" table) @@ -6189,10 +6199,10 @@ (define-abbrev julia-latexsub-abbrev-table "\\:pager:" "📟" nil :system t) (puthash "\\:fax:" "📠" table) (define-abbrev julia-latexsub-abbrev-table "\\:fax:" "📠" nil :system t) - (puthash "\\:satellite:" "📡" table) - (define-abbrev julia-latexsub-abbrev-table "\\:satellite:" "📡" nil :system t) (puthash "\\:satellite_antenna:" "📡" table) (define-abbrev julia-latexsub-abbrev-table "\\:satellite_antenna:" "📡" nil :system t) + (puthash "\\:satellite:" "📡" table) + (define-abbrev julia-latexsub-abbrev-table "\\:satellite:" "📡" nil :system t) (puthash "\\:loudspeaker:" "📢" table) (define-abbrev julia-latexsub-abbrev-table "\\:loudspeaker:" "📢" nil :system t) (puthash "\\:mega:" "📣" table) diff --git a/elpa/julia-mode-20241213.1620/julia-mode-pkg.el b/elpa/julia-mode-20241213.1620/julia-mode-pkg.el new file mode 100644 index 00000000..d1ffb91c --- /dev/null +++ b/elpa/julia-mode-20241213.1620/julia-mode-pkg.el @@ -0,0 +1,8 @@ +;; -*- no-byte-compile: t; lexical-binding: nil -*- +(define-package "julia-mode" "20241213.1620" + "Major mode for editing Julia source code." + '((emacs "26.1")) + :url "https://github.com/JuliaEditorSupport/julia-emacs" + :commit "0f4d74f9049df28e2f522733141bfc5b7a0f69a3" + :revdesc "0f4d74f9049d" + :keywords '("languages")) diff --git a/elpa/julia-mode-20230712.1524/julia-mode.el b/elpa/julia-mode-20241213.1620/julia-mode.el similarity index 88% rename from elpa/julia-mode-20230712.1524/julia-mode.el rename to elpa/julia-mode-20241213.1620/julia-mode.el index 7e65daa0..bc9da9d4 100644 --- a/elpa/julia-mode-20230712.1524/julia-mode.el +++ b/elpa/julia-mode-20241213.1620/julia-mode.el @@ -1,8 +1,9 @@ ;;; julia-mode.el --- Major mode for editing Julia source code -*- lexical-binding: t -*- -;; Copyright (C) 2009-2014 Julia contributors, 2015-2020 julia-mode contributors +;; Copyright (C) 2009-2014 Julia contributors, 2015-2024 julia-mode.el contributors ;; URL: https://github.com/JuliaEditorSupport/julia-emacs -;; Version: 0.4 +;; Package-Version: 20241213.1620 +;; Package-Revision: 0f4d74f9049d ;; Keywords: languages ;; Package-Requires: ((emacs "26.1")) @@ -67,21 +68,43 @@ User can still use `abbrev-mode' or `expand-abbrev' to substitute unicode for LaTeX even if disabled." :type 'boolean) +(defcustom julia-latexsub-greedy t + "When `t', `julia-latexsub-or-indent' does not offer options when a complete match is found. Eg for \"\\bar\", \"\\barcap\" etc will not be offered in a prompt." + :type 'boolean) + +(defun julia-latexsub-selector-completing-read (replacements) + "Use `completing-read' to pick an item from REPLACEMENTS." + (completing-read "LaTeX completions: " replacements (lambda (&rest _) t) t)) + +(defvar julia-latexsub-selector 'julia-latexsub-selector-completing-read + "A function that is called when the `julia-latexsub-or-indent' finds multiple matches for a prefix. + +The argument is a list of strings. The function should ALWAYS return an item from this list, otherwise an error occurs. + +The default implementation uses `completing-read'.") + (defconst julia-mode--latexsubs-partials - (let ((table (make-hash-table :test 'equal))) - (maphash (lambda (latex _subst) - (cl-assert (string= (substring latex 0 1) "\\") nil - "LaTeX substitution does not start with \\.") - (let ((len (length latex))) - (cl-assert (< 1 len) nil "Trivially short LaTeX subtitution") - ;; for \foo, put f, fo, foo into the table - (cl-loop for i from 2 to len - do (puthash (substring latex 1 i) t table)))) - julia-mode-latexsubs) - table) + (let ((table-unordered (make-hash-table :test 'equal)) + (table-ordered (make-hash-table :test 'equal))) + (cl-flet ((_append (key replacement) + (puthash key (cons replacement (gethash key table-unordered nil)) table-unordered))) + ;; accumulate partials + (maphash (lambda (latex _unicode) + (cl-assert (string= (substring latex 0 1) "\\") nil + "LaTeX substitution does not start with \\.") + (let ((len (length latex))) + (cl-assert (< 1 len) nil "Trivially short LaTeX subtitution") + ;; for \foo, put \f, \fo, \foo into the table + (cl-loop for i from 2 to len + do (_append (substring latex 0 i) latex)))) + julia-mode-latexsubs) + ;; order by LaTeX part + (maphash (lambda (partial replacements) + (puthash partial (sort replacements #'string<) table-ordered)) + table-unordered)) + table-ordered) "A hash table containing all partial strings from the LaTeX abbreviations in -`julia-mode-latexsubs' as keys. Values are always `t', the purpose is to -represent a set.") +`julia-mode-latexsubs' as keys. Values are sorted lists of complete \"\\some_string\".") (defun julia-mode--latexsubs-longest-partial-end (beg) "Starting at `beg' (should be the \"\\\"), return the end of the longest @@ -89,13 +112,13 @@ partial match for LaTeX completion, or `nil' when not applicable." (save-excursion (goto-char beg) (when (and (= (char-after) ?\\) (not (eobp))) - (forward-char) (let ((beg (point))) + (forward-char) ; move past the \ (cl-flet ((next-char-matches? () - (let* ((end (1+ (point))) - (str (buffer-substring-no-properties beg end)) - (valid? (gethash str julia-mode--latexsubs-partials))) - valid?))) + (let* ((end (1+ (point))) + (str (buffer-substring-no-properties beg end)) + (valid? (gethash str julia-mode--latexsubs-partials))) + valid?))) (while (and (not (eobp)) (next-char-matches?)) (forward-char))) (point))))) @@ -115,6 +138,10 @@ partial match for LaTeX completion, or `nil' when not applicable." (let ((table (make-syntax-table))) (modify-syntax-entry ?_ "_" table) (modify-syntax-entry ?@ "_" table) + + ;; "!" can be part of both operators (!=) and variable names (append!). Here, we treat + ;; it as being part of a variable name. Care must be taken to account for the special + ;; case where "!" prefixes a variable name and acts as an operator (e.g. !any(...)). (modify-syntax-entry ?! "_" table) (modify-syntax-entry ?# "< 14" table) ; # single-line and multiline start (modify-syntax-entry ?= ". 23bn" table) @@ -267,6 +294,8 @@ partial match for LaTeX completion, or `nil' when not applicable." ;; The function name itself (group (1+ (or word (syntax symbol)))))) +;; TODO: function definitions of form "x + y = 5" or "!x = true" not currently highlighted + ;; functions of form "f(x) = nothing" (defconst julia-function-assignment-regex (rx line-start (* (or space "@inline" "@noinline")) symbol-start @@ -302,7 +331,7 @@ partial match for LaTeX completion, or `nil' when not applicable." (rx "<:" (0+ space) (group (1+ (or word (syntax symbol)))) (0+ space) (or "\n" "{" "}" "end" ","))) (defconst julia-macro-regex - (rx symbol-start (group "@" (1+ (or word (syntax symbol)))))) + (rx symbol-start (0+ ?!) (group "@" (1+ (or word (syntax symbol)))))) (defconst julia-keyword-regex (regexp-opt @@ -310,7 +339,7 @@ partial match for LaTeX completion, or `nil' when not applicable." "try" "catch" "return" "local" "function" "macro" "finally" "break" "continue" "global" "where" "module" "using" "import" "export" "const" "let" "do" - "baremodule" + "baremodule" "public" ;; "importall" ;; deprecated in 0.7 ;; "immutable" "type" "bitstype" "abstract" "typealias" ;; removed in 1.0 "abstract type" "primitive type" "struct" "mutable struct") @@ -329,7 +358,7 @@ partial match for LaTeX completion, or `nil' when not applicable." ;; highlighted as a keyword. (list julia-quoted-symbol-regex 1 ''julia-quoted-symbol-face) (cons julia-keyword-regex 'font-lock-keyword-face) - (cons julia-macro-regex ''julia-macro-face) + (list julia-macro-regex 1 ''julia-macro-face) (cons (regexp-opt ;; constants defined in Core plus true/false @@ -472,9 +501,9 @@ a keyword if used as a field name, X.word, or quoted, :word." (ignore-errors (backward-char)))) (defun julia-following-import-export-using () - "If the current line follows an `export` or `import` keyword -with valid syntax, return the position of the keyword, otherwise -`nil`. Works by stepping backwards through comma-separated + "If the current line follows an `export`, `import`, `using`, or +`public` keyword with valid syntax, return the position of the keyword, +otherwise `nil`. Works by stepping backwards through comma-separated symbol, gives up when this is not true." ;; Implementation accepts a single Module: right after the keyword, and saves ;; the module name for future use, but does not enforce that `export` has no @@ -486,7 +515,7 @@ symbol, gives up when this is not true." (while (and (not done) (< (point-min) (point))) (julia-safe-backward-sexp) (cond - ((looking-at (regexp-opt (list "import" "export" "using"))) + ((looking-at (regexp-opt (list "import" "export" "using" "public"))) (setf done (point))) ((looking-at (rx (group (* (or word (syntax symbol)))) (0+ space) ":")) (if module @@ -904,11 +933,51 @@ buffer where the LaTeX symbol starts." ;; ). Instead of automatic ;; expansion, user can either enable `abbrev-mode' or call `expand-abbrev'. (when-let (((eq status 'finished)) - (symb (abbrev-symbol name julia-latexsub-abbrev-table)) - (end (+ beg (length name)))) + ;; helm-mode passes NAME with an extra whitespace at the end. Since + ;; `julia--latexsub-start-symbol' won't include whitespace, we can safely + ;; strip whitespace. + (clean-name (string-trim-right name)) + (symb (abbrev-symbol clean-name julia-latexsub-abbrev-table)) + (end (+ beg (length clean-name)))) (abbrev-insert symb name beg end))) #'ignore)) +(defun julia-mode--latexsub-before-point () + "When there is a LaTeX substitution that can be made before the point, return (CONS BEG LATEX). + +`beg' is the position of the `\`, `latex' is the string to replace, including the `\`. + +When multiple options match, ask the user to clarify via `julia-latexsub-selector', unless there is a complete match and `julia-latexsub-greedy' is `t'." + (when-let (beg (julia--latexsub-start-symbol)) + (let ((partial (buffer-substring-no-properties beg (point)))) + (when-let (replacements (gethash partial julia-mode--latexsubs-partials)) + (let* ((complete-match (member partial replacements)) + (latex (cond + ;; complete match w/ greedy + ((and complete-match julia-latexsub-greedy) partial) + ;; multiple replacements, ask user + ((cdr replacements) (funcall julia-latexsub-selector replacements)) + ;; single replacement, pick that + (t (car replacements))))) + (cons beg latex)))))) + +(defun julia-latexsub-or-indent (arg) + "Either indent according to Julia mode conventions or perform a LaTeX-like symbol substution. + +When multiple options match, ask the user to clarify via `julia-latexsub-selector', unless there is a complete match and `julia-latexsub-greedy' is `t'. + +Presently, this is not the default. Enable with eg + +(define-key julia-mode-map (kbd \"TAB\") 'julia-latexsub-or-indent) + +eg in your `julia-mode-hook'." + (interactive "*i") + (if-let (replacement (julia-mode--latexsub-before-point)) + (progn + (delete-backward-char (- (point) (car replacement))) + (insert (gethash (cdr replacement) julia-mode-latexsubs))) + (julia-indent-line))) + ;; Math insertion in julia. Use it with ;; (add-hook 'julia-mode-hook 'julia-math-mode) diff --git a/elpa/julia-mode-readme.txt b/elpa/julia-mode-readme.txt deleted file mode 100644 index 19296213..00000000 --- a/elpa/julia-mode-readme.txt +++ /dev/null @@ -1 +0,0 @@ -This is the official Emacs mode for editing Julia programs. -- 2.47.3