[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/relint c733b47 05/15: Use text quoting for all messages
From: |
Mattias Engdegård |
Subject: |
[elpa] externals/relint c733b47 05/15: Use text quoting for all messages |
Date: |
Sat, 29 Feb 2020 17:22:28 -0500 (EST) |
branch: externals/relint
commit c733b4725e5c1a09234fe1f3c69535197574045d
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Use text quoting for all messages
Use format-message to convert the backquote-quote (grave) quoting into
the appropriate text-quoting-style. The test reference files are kept
in the grave style.
---
relint-test.el | 5 ++++-
relint.el | 17 ++++++++++-------
test/1.expected | 2 +-
3 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/relint-test.el b/relint-test.el
index 622a8fe..8dbbd54 100644
--- a/relint-test.el
+++ b/relint-test.el
@@ -98,7 +98,10 @@ and a path."
(defun relint-test--scan-file (file)
"Scan FILE and return the results as a string."
(with-temp-buffer
- (relint--scan-buffer (find-file-noselect file t) (current-buffer) t)
+ ;; The reference files (*.expected) are kept in the `grave' style,
+ ;; to make the test independent of `text-quoting-style'.
+ (let ((text-quoting-style 'grave))
+ (relint--scan-buffer (find-file-noselect file t) (current-buffer) t))
(buffer-string)))
(defun relint-test--read-file (file)
diff --git a/relint.el b/relint.el
index 00f21dc..afd6ed9 100644
--- a/relint.el
+++ b/relint.el
@@ -302,12 +302,14 @@ list of list indices to follow to target)."
(if sym
(if (memq sym seen)
(push (cons i (relint--escape-string
- (format "Duplicated syntax code `%c'" c)
+ (format-message
+ "Duplicated syntax code `%c'" c)
nil))
errs)
(push sym seen))
(push (cons i (relint--escape-string
- (format "Invalid char `%c' in syntax string" c)
+ (format-message
+ "Invalid char `%c' in syntax string" c)
nil))
errs)))))
(nreverse errs)))
@@ -1112,9 +1114,10 @@ EXPANDED is a list of expanded functions, to prevent
recursion."
(defun relint--check-non-regexp-provenance (skip-function form file pos path)
(let ((reg-gen (relint--regexp-generators form nil)))
(when reg-gen
- (relint--report file pos path
- (format "`%s' cannot be used for arguments to `%s'"
- (car reg-gen) skip-function)))))
+ (relint--report
+ file pos path
+ (format-message "`%s' cannot be used for arguments to `%s'"
+ (car reg-gen) skip-function)))))
(defun relint--check-format-mixup (template args file pos path)
"Look for a format expression that suggests insertion of a regexp
@@ -1150,7 +1153,7 @@ parameter is regexp-generating."
(when reg-gen
(relint--report
file pos (cons (+ index 2) path)
- (format
+ (format-message
"Value from `%s' cannot be spliced into `[...]'"
(car reg-gen))))))
(unless (eq type ?%)
@@ -1175,7 +1178,7 @@ character alternative: `[' followed by a
regexp-generating expression."
(when reg-gen
(relint--report
file pos (cons (1+ index) path)
- (format
+ (format-message
"Value from `%s' cannot be spliced into `[...]'"
(car reg-gen)))))))
(setq index (1+ index))
diff --git a/test/1.expected b/test/1.expected
index e5c832d..07daa8a 100644
--- a/test/1.expected
+++ b/test/1.expected
@@ -133,7 +133,7 @@
1.elisp:65:25: In bad-custom-5: Unescaped literal `^' (pos 2)
"^x^"
..^
-1.elisp:69:25: In bad-custom-6: Error: No character class ‘[:bah:]’:
"[[:bah:]]"
+1.elisp:69:25: In bad-custom-6: Error: No character class `[:bah:]':
"[[:bah:]]"
1.elisp:73:25: In bad-custom-7: Duplicated `a' inside character alternative
(pos 2)
"[aa]"
..^
- [elpa] externals/relint updated (3315f03 -> c2d3f3b), Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 55070de 02/15: Update copyright year to 2020, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint a2a29d6 03/15: Scan arguments to search-{forward, backward}-regexp, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint c733b47 05/15: Use text quoting for all messages,
Mattias Engdegård <=
- [elpa] externals/relint b46ee8b 04/15: Update copyright year to 2020, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint bb7d8a1 10/15: Fix mistake in previous commit, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 1741e2c 09/15: Locate error position in 'concat' forms, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 8cc1017 12/15: Rename relint--pos-from-toplevel-pos-path, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 9de65a6 11/15: Remove package description in relint.el, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint c33b893 06/15: Refactor error reporting, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 803579c 01/15: More font-lock-keywords detection, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 47490f3 08/15: Add relint-buffer for easier use of relint as a library, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint 159a210 13/15: Simplify line/column computation and reindent, Mattias Engdegård, 2020/02/29
- [elpa] externals/relint c2d3f3b 15/15: Increment version to 1.14, Mattias Engdegård, 2020/02/29