branch: scratch/editorconfig-cc commit 153013ff48dee9bb56f27e7b68f192054066fe52 Author: 10sr <8.slas...@gmail.com> Commit: Stefan Monnier <monn...@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))