[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master ee6e7a9 09/40: Fix some compilation warnings
From: |
Noam Postavsky |
Subject: |
[elpa] master ee6e7a9 09/40: Fix some compilation warnings |
Date: |
Wed, 26 Oct 2016 23:06:32 +0000 (UTC) |
branch: master
commit ee6e7a96024a3a7dd268da0c19a13198a4d3fc55
Author: Stefan Monnier <address@hidden>
Commit: Noam Postavsky <address@hidden>
Fix some compilation warnings
* yasnippet-tests.el (complicated-yas-key-syntaxes): Avoid looking-back.
* yasnippet.el (yas--font-lock-keywords): Escape $, even if first in the
regexp.
(yas--indent): Remove unused var `end'.
(yas--indent-parse-create): Remove unused arg `snippet'. Update caller.
---
yasnippet-tests.el | 2 +-
yasnippet.el | 21 ++++++++++-----------
2 files changed, 11 insertions(+), 12 deletions(-)
diff --git a/yasnippet-tests.el b/yasnippet-tests.el
index 9d2074a..47b6e1f 100644
--- a/yasnippet-tests.el
+++ b/yasnippet-tests.el
@@ -484,7 +484,7 @@ TODO: correct this bug!"
(yas-should-expand '(("foo-barbaz" . "OKfoo-barbazOK"))))
(let ((yas-key-syntaxes
(cons #'(lambda (_start-point)
- (unless (looking-back "-")
+ (unless (eq ?- (char-before))
(backward-char)
'again))
yas-key-syntaxes))
diff --git a/yasnippet.el b/yasnippet.el
index 1ee687a..6573f36 100644
--- a/yasnippet.el
+++ b/yasnippet.el
@@ -896,10 +896,10 @@ Honour `yas-dont-activate-functions', which see."
;; They're "compiled", so extract the source.
(cadr font-lock-keywords)
font-lock-keywords))
- '(("$\\([0-9]+\\)"
+ '(("\\$\\([0-9]+\\)"
(0 font-lock-keyword-face)
(1 font-lock-string-face t))
- ("${\\([0-9]+\\):?"
+ ("\\${\\([0-9]+\\):?"
(0 font-lock-keyword-face)
(1 font-lock-warning-face t))
("\\(\\$(\\)" 1 font-lock-preprocessor-face)
@@ -3855,7 +3855,7 @@ Meant to be called in a narrowed buffer, does various
passes"
(yas--protect-escapes)
;; Parse indent markers: `$>'.
(goto-char parse-start)
- (yas--indent-parse-create snippet)
+ (yas--indent-parse-create)
;; parse fields with {}
;;
(goto-char parse-start)
@@ -3961,12 +3961,11 @@ The SNIPPET's markers are preserved."
(zerop (current-column)))
(indent-to-column yas--indent-original-column)))
((eq yas-indent-line 'auto)
- (let ((end (set-marker (make-marker) (point-max))))
- (unless yas-also-auto-indent-first-line
- (forward-line 1))
- (yas--indent-region (line-beginning-position)
- (point-max)
- snippet))))))
+ (unless yas-also-auto-indent-first-line
+ (forward-line 1))
+ (yas--indent-region (line-beginning-position)
+ (point-max)
+ snippet)))))
(defun yas--collect-snippet-markers (snippet)
"Make a list of all the markers used by SNIPPET."
@@ -4073,8 +4072,8 @@ with their evaluated value into
`yas--backquote-markers-and-strings'."
(set-marker-insertion-type marker nil)
marker))
-(defun yas--indent-parse-create (snippet)
- "Parse the \"$>\" indentation markers in SNIPPET."
+(defun yas--indent-parse-create ()
+ "Parse the \"$>\" indentation markers just inserted."
(setq yas--indent-markers ())
(while (search-forward "$>" nil t)
(delete-region (match-beginning 0) (match-end 0))
- [elpa] master 1735a28 02/40: Add region contents to new snippet, (continued)
- [elpa] master 1735a28 02/40: Add region contents to new snippet, Noam Postavsky, 2016/10/26
- [elpa] master ee4efdb 05/40: Revert "Separate parsing from evaluation of backquote lisp", Noam Postavsky, 2016/10/26
- [elpa] master 85f39ce 06/40: Warn about backquote exprs modifying the buffer, Noam Postavsky, 2016/10/26
- [elpa] master e21420a 04/40: Separate parsing from evaluation of backquote lisp, Noam Postavsky, 2016/10/26
- [elpa] master c744148 03/40: Make yas-describe-tables easier to use from lisp, Noam Postavsky, 2016/10/26
- [elpa] master d218ed8 11/40: Do indent the first line of mirrors, but in correct order, Noam Postavsky, 2016/10/26
- [elpa] master 0db65ee 20/40: Don't clobber match data in modification hooks, Noam Postavsky, 2016/10/26
- [elpa] master dc098cf 25/40: Fix yas--message verbosity levels, Noam Postavsky, 2016/10/26
- [elpa] master 5af9276 27/40: Support yas/ symbols in yas-define-menu, Noam Postavsky, 2016/10/26
- [elpa] master ea9581f 22/40: Fix some quoting problems in doc strings, Noam Postavsky, 2016/10/26
- [elpa] master ee6e7a9 09/40: Fix some compilation warnings,
Noam Postavsky <=
- [elpa] master 7661dc1 19/40: yasnippet.el (yas-escape-text): No error on nil text, Noam Postavsky, 2016/10/26
- [elpa] master 351c1e3 10/40: Don't indent first line of mirrors, Noam Postavsky, 2016/10/26
- [elpa] master 655bda8 07/40: Merge: restore backquote evaluation behaviour, Noam Postavsky, 2016/10/26
- [elpa] master 8907fd1 14/40: Escape yas-selected-text for new snippet., Noam Postavsky, 2016/10/26
- [elpa] master a4fafc3 16/40: Add test for loading snippet with same uuid, Noam Postavsky, 2016/10/26
- [elpa] master 8ca8c7d 13/40: Merge: a different fix for #712., Noam Postavsky, 2016/10/26
- [elpa] master 85a43ad 35/40: Explain about backquote expressions in doc, Noam Postavsky, 2016/10/26
- [elpa] master 3129040 24/40: Load snippet after saving, Noam Postavsky, 2016/10/26
- [elpa] master 1532e66 33/40: Fix saving of new snippets, Noam Postavsky, 2016/10/26
- [elpa] master 0ee86a2 23/40: Simplify `yas-new-snippet' load&save logic, Noam Postavsky, 2016/10/26