emacs-diffs
[Top][All Lists]
Advanced

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

master 3b1fb61: Use lexical-binding in progmodes/icon.el


From: Stefan Kangas
Subject: master 3b1fb61: Use lexical-binding in progmodes/icon.el
Date: Fri, 26 Feb 2021 22:13:53 -0500 (EST)

branch: master
commit 3b1fb6186b2ddc0b34103cffa8bb6c1607926acd
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    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 d81fe1c..e9a21d4a 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))))



reply via email to

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