From 3b1fb6186b2ddc0b34103cffa8bb6c1607926acd Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 27 Feb 2021 03:23:39 +0100 Subject: [PATCH] Use lexical-binding in progmodes/icon.el * lisp/progmodes/icon.el: Use lexical-binding. (electric-icon-brace): Very minor cleanup. --- lisp/progmodes/icon.el | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index d81fe1c753b..e9a21d4a0cf 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -1,4 +1,4 @@ -;;; icon.el --- mode for editing Icon code +;;; icon.el --- mode for editing Icon code -*- lexical-binding: t -*- ;; Copyright (C) 1989, 2001-2021 Free Software Foundation, Inc. @@ -197,12 +197,11 @@ with no args, if that value is non-nil." (progn (insert last-command-event) (icon-indent-line) - (if icon-auto-newline - (progn - (newline) - ;; (newline) may have done auto-fill - (setq insertpos (- (point) 2)) - (icon-indent-line))) + (when icon-auto-newline + (newline) + ;; (newline) may have done auto-fill + (setq insertpos (- (point) 2)) + (icon-indent-line)) (save-excursion (if insertpos (goto-char (1+ insertpos))) (delete-char -1)))) -- 2.39.2