[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode ca2fe4b 195/352: Removing julia-in-char.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/julia-mode ca2fe4b 195/352: Removing julia-in-char. |
Date: |
Sun, 29 Aug 2021 11:22:43 -0400 (EDT) |
branch: elpa/julia-mode
commit ca2fe4b34775f610d403ae461f9cd3a45a7fe896
Author: Wilfred Hughes <me@wilfred.me.uk>
Commit: Yichao Yu <yyc1992@gmail.com>
Removing julia-in-char.
It's an expensive function, and julia-in-string handles characters
anyway.
---
julia-mode.el | 35 +++++------------------------------
1 file changed, 5 insertions(+), 30 deletions(-)
diff --git a/julia-mode.el b/julia-mode.el
index 1489c37..bbfc535 100644
--- a/julia-mode.el
+++ b/julia-mode.el
@@ -232,36 +232,11 @@ Handles both single-line and multi-line comments."
(nth 4 (syntax-ppss)))
(defun julia-in-string ()
- "Return non-nil if point is inside a string."
+ "Return non-nil if point is inside a string.
+Note this is Emacs' notion of what is highlighted as a string.
+As a result, it is true inside \"foo\", `foo` and 'f'."
(nth 3 (syntax-ppss)))
-(defun julia-in-char ()
- "Return non-nil if point is inside a character."
- (cond
- ((julia-in-comment) nil)
- ((julia-in-string) nil)
- ((<= (point) (1+ (point-min))) nil)
- (:else
- (save-excursion
- ;; See if point is inside a character, e.g. '|x'
- ;;
- ;; Move back past the single quote.
- (backward-char 1)
- ;; Move back one more character, as julia-char-regex checks
- ;; for whitespace/paren/etc before the single quote.
- (ignore-errors (backward-char 1)) ; ignore error from being at
(point-min)
-
- (if (looking-at julia-char-regex)
- t
- ;; If point was in a \ character (i.e. we started at '\|\'),
- ;; we need to move back once more.
- (ignore-errors
- (if (looking-at (rx "'\\"))
- (progn
- (backward-char 1)
- (looking-at julia-char-regex))
- nil)))))))
-
(defun julia-in-brackets ()
"Return non-nil if point is inside square brackets."
(let ((start-pos (point))
@@ -272,7 +247,7 @@ Handles both single-line and multi-line comments."
(while (< (point) start-pos)
;; Don't count [ or ] inside strings, characters or comments.
- (unless (or (julia-in-string) (julia-in-char) (julia-in-comment))
+ (unless (or (julia-in-string) (julia-in-comment))
(when (looking-at (rx "["))
(incf open-count))
@@ -347,7 +322,7 @@ before point. Returns nil if we're not within nested
parens."
(not (plusp open-count)))
(when (looking-at (rx (any "[" "]" "(" ")")))
- (unless (or (julia-in-string) (julia-in-char) (julia-in-comment))
+ (unless (or (julia-in-string) (julia-in-comment))
(cond ((looking-at (rx (any "[" "(")))
(incf open-count))
((looking-at (rx (any "]" ")")))
- [nongnu] elpa/julia-mode 8442201 152/352: All julia functions and variables should be prefixed., (continued)
- [nongnu] elpa/julia-mode 8442201 152/352: All julia functions and variables should be prefixed., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 662e153 169/352: Update .mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e4f0b02 167/352: Ensure ! in a macro invocation is highlighted correctly., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 47ad8e4 158/352: add 1607 new LaTeX tab completions from the unicode-math package (closes #7657), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 0b96ff5 170/352: Revert "Update .mailmap", ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode d74b8a3 171/352: Use the syntax table to detect if point is in a comment., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 747176f 177/352: fix latex symbol \bot, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode faee243 179/352: Implementing julia-in-string and julia-in-char., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ab58fb7 193/352: Update mailmap, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 96d6597 194/352: Fixing highlighting of long character escape sequences., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode ca2fe4b 195/352: Removing julia-in-char.,
ELPA Syncer <=
- [nongnu] elpa/julia-mode ea54e19 196/352: Fontify strings and chars as strings, not keywords., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 80c6754 197/352: Silencing byte-compiler warning., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode e4d0e09 199/352: Highlight quoted symbols, e.g. :foo., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 4b22a79 205/352: julia-mode.el: remove types that are removed or deprecated, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f84a425 219/352: Clean up stagedfunction, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f378cbc 208/352: Mailmap update., ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode f3b490b 210/352: Added inferior-julia comint mode, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8dd023d 223/352: julia-paren-indent: docstring, test, ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 8d6ea60 233/352: Fix #11549 (top level after paren-indented line), ELPA Syncer, 2021/08/29
- [nongnu] elpa/julia-mode 9cbde7b 236/352: julia-mode: Move tests to new file and improve, ELPA Syncer, 2021/08/29