emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] scratch/editorconfig-cc 153013ff48 297/351: Return early when e


From: Stefan Monnier
Subject: [nongnu] scratch/editorconfig-cc 153013ff48 297/351: Return early when expecting coding-system has been already set
Date: Thu, 13 Jun 2024 18:39:04 -0400 (EDT)

branch: scratch/editorconfig-cc
commit 153013ff48dee9bb56f27e7b68f192054066fe52
Author: 10sr <8.slashes@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    Return early when expecting coding-system has been already set
---
 editorconfig.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/editorconfig.el b/editorconfig.el
index 3ace919bf2..25e220038f 100644
--- a/editorconfig.el
+++ b/editorconfig.el
@@ -397,6 +397,11 @@ Make a message by passing ARGS to `format-message'."
                      :debug)
     (when (eq coding-system 'undecided)
       (cl-return-from editorconfig-set-coding-system))
+    (when (and buffer-file-coding-system
+               (memq buffer-file-coding-system
+                     (coding-system-aliases (merge-coding-systems coding-system
+                                                                  
buffer-file-coding-system))))
+      (cl-return-from editorconfig-set-coding-system))
     (unless (file-readable-p buffer-file-name)
       (set-buffer-file-coding-system coding-system)
       (cl-return-from editorconfig-set-coding-system))



reply via email to

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