emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2dad332a14: (hack-local-variables--find-variables): Use `user-err


From: Stefan Monnier
Subject: master 2dad332a14: (hack-local-variables--find-variables): Use `user-error`
Date: Mon, 17 Jan 2022 16:28:10 -0500 (EST)

branch: master
commit 2dad332a1439b59a62cd5ed0d8e3626d9e91e3e5
Author: Stefan Monnier <monnier@iro.umontreal.ca>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    (hack-local-variables--find-variables): Use `user-error`
    
    * lisp/files.el (hack-local-variables--find-variables):
    Incorrect formatting are not coding errors.
---
 lisp/files.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/files.el b/lisp/files.el
index 1d9d450e4d..51c6968cff 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3968,12 +3968,12 @@ major-mode."
                ;; Discard the prefix.
                (if (looking-at prefix)
                    (delete-region (point) (match-end 0))
-                 (error "Local variables entry is missing the prefix"))
+                 (user-error "Local variables entry is missing the prefix"))
                (end-of-line)
                ;; Discard the suffix.
                (if (looking-back suffix (line-beginning-position))
                    (delete-region (match-beginning 0) (point))
-                 (error "Local variables entry is missing the suffix"))
+                 (user-error "Local variables entry is missing the suffix"))
                (forward-line 1))
              (goto-char (point-min))
 
@@ -3981,9 +3981,9 @@ major-mode."
                               (and (eq handle-mode t) result)))
                ;; Find the variable name;
                (unless (looking-at hack-local-variable-regexp)
-                  (error "Malformed local variable line: %S"
-                         (buffer-substring-no-properties
-                          (point) (line-end-position))))
+                  (user-error "Malformed local variable line: %S"
+                              (buffer-substring-no-properties
+                               (point) (line-end-position))))
                 (goto-char (match-end 1))
                (let* ((str (match-string 1))
                       (var (intern str))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]