[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 38b74a9 164/352: emacs-mode fix for emacs 22: n
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode 38b74a9 164/352: emacs-mode fix for emacs 22: need to check whether codepoints outside the BMP are supported by emacs |
Date: |
Sun, 29 Aug 2021 11:22:37 -0400 (EDT) |
branch: elpa/julia-mode
commit 38b74a902c8a692f86884e74252fc6da2ec45bed
Author: Steven G. Johnson <stevenj@alum.mit.edu>
Commit: Yichao Yu <yyc1992@gmail.com>
emacs-mode fix for emacs 22: need to check whether codepoints outside the
BMP are supported by emacs
---
julia-mode.el | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index 7fe5ea6..d01ee28 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -381,12 +381,18 @@ Do not move back beyond MIN."
; LaTeX-like symbol substitutions, equivalent to those in the Julia REPL,
; generated by:
-; for (k,v) in sort!(collect(Base.REPLCompletions.latex_symbols), by=x->x[2])
+;for (k,v) in sort!(collect(Base.REPLCompletions.latex_symbols), by=x->x[2])
+; ks = escape_string(k)
; vs = escape_string(v)
-; vs = replace(vs, r"\\U[0-9A-Fa-f]+",
-; s -> "\\U" * hex(parseint(s[3:end], 16), 8))
-; println("(puthash \"$(escape_string(k))\" \"$vs\" julia-latexsubs)")
-; end
+; if ismatch(r"^\\U[0-9A-Fa-f]+$", vs)
+; # codepoints outside the BMP can be problematic in older Emacsen
+; cp = vs[3:end]
+; println("(let ((c (decode-char 'ucs #x$cp)))\n",
+; " (if c (puthash \"$ks\" (char-to-string c)
julia-latexsubs)))")
+; else
+; println("(puthash \"$ks\" \"$vs\" julia-latexsubs)")
+; end
+;end
(puthash "\\textexclamdown" "ยก" julia-latexsubs)
(puthash "\\sterling" "ยฃ" julia-latexsubs)
(puthash "\\yen" "ยฅ" julia-latexsubs)
@@ -2024,7 +2030,8 @@ Do not move back beyond MIN."
(puthash "\\mscri" "๐พ" julia-latexsubs)
(puthash "\\mscrj" "๐ฟ" julia-latexsubs)
(puthash "\\mscrk" "๐" julia-latexsubs)
-(puthash "\\mscrl" "\U0001d4c1" julia-latexsubs)
+(let ((c (decode-char 'ucs #x1d4c1)))
+ (if c (puthash "\\mscrl" (char-to-string c) julia-latexsubs)))
(puthash "\\mscrm" "๐" julia-latexsubs)
(puthash "\\mscrn" "๐" julia-latexsubs)
(puthash "\\mscrp" "๐
" julia-latexsubs)
@@ -2494,8 +2501,10 @@ Do not move back beyond MIN."
(puthash "\\mttx" "๐ก" julia-latexsubs)
(puthash "\\mtty" "๐ข" julia-latexsubs)
(puthash "\\mttz" "๐ฃ" julia-latexsubs)
-(puthash "\\imath" "\U0001d6a4" julia-latexsubs)
-(puthash "\\jmath" "\U0001d6a5" julia-latexsubs)
+(let ((c (decode-char 'ucs #x1d6a4)))
+ (if c (puthash "\\imath" (char-to-string c) julia-latexsubs)))
+(let ((c (decode-char 'ucs #x1d6a5)))
+ (if c (puthash "\\jmath" (char-to-string c) julia-latexsubs)))
(puthash "\\mbfAlpha" "๐จ" julia-latexsubs)
(puthash "\\mbfBeta" "๐ฉ" julia-latexsubs)
(puthash "\\mbfGamma" "๐ช" julia-latexsubs)
@@ -2786,8 +2795,10 @@ Do not move back beyond MIN."
(puthash "\\mbfitsansvarphi" "๐" julia-latexsubs)
(puthash "\\mbfitsansvarrho" "๐" julia-latexsubs)
(puthash "\\mbfitsansvarpi" "๐" julia-latexsubs)
-(puthash "\\mbfDigamma" "\U0001d7ca" julia-latexsubs)
-(puthash "\\mbfdigamma" "\U0001d7cb" julia-latexsubs)
+(let ((c (decode-char 'ucs #x1d7ca)))
+ (if c (puthash "\\mbfDigamma" (char-to-string c) julia-latexsubs)))
+(let ((c (decode-char 'ucs #x1d7cb)))
+ (if c (puthash "\\mbfdigamma" (char-to-string c) julia-latexsubs)))
(puthash "\\mbfzero" "๐" julia-latexsubs)
(puthash "\\mbfone" "๐" julia-latexsubs)
(puthash "\\mbftwo" "๐" julia-latexsubs)
- [nongnu] elpa/julia-mode 75dc105 124/352: Merge ESS changes to julia-mode.el with backwards compatibility., (continued)
- [nongnu] elpa/julia-mode 75dc105 124/352: Merge ESS changes to julia-mode.el with backwards compatibility., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode b829e08 131/352: Added DataType to the list of highlighted type words in julia-mode.el., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9dd8281 134/352: Add support for multiline comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c74045a 125/352: emacs mode: change underscores back to word characters, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 873639b 127/352: emacs mode: make @ a word character again, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 314a731 136/352: more sensible sorting of substitutions; only search backwards as in REPL, and allow a wider range of chars (for things like #6927), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 070bd0c 140/352: Adding proper header and footer (use M-x checkdoc to confirm)., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c718e8c 145/352: Use regexp-opt for keyword and constant regexps, because it outputs, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 03325fc 144/352: Highlight function names and type names., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 15051b5 157/352: updated julia-mode.el for recent latex-symbol additions (#7961 and #7962), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 38b74a9 164/352: emacs-mode fix for emacs 22: need to check whether codepoints outside the BMP are supported by emacs,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 91f2a15 101/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 099b687 107/352: organize Core exports list, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e51b039 099/352: fixing a bug in emacs mode with block start at beginning of buffer, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 267cebf 118/352: Autoload julia-mode., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 88aab43 121/352: Merge in changes from ESS' version of julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode cde82a9 120/352: Add Float16 to julia-mode.el, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 72d2e0f 123/352: Add support for Float16 to various array constructors, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 90ef8a2 137/352: julia-mode LaTeX symbol-table update, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c6b59d0 126/352: use spaces for indenting in julia mode again, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode c924bd0 128/352: update SGJ mailmap entries, ELPA Syncer, 2021/08/29