[Top][All Lists]

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

master f3f6e84 2/2: Use lexical-binding in mpuz.el

From: Stefan Kangas
Subject: master f3f6e84 2/2: Use lexical-binding in mpuz.el
Date: Fri, 29 Jan 2021 18:38:22 -0500 (EST)

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

    Use lexical-binding in mpuz.el
    * lisp/play/mpuz.el: Use lexical-binding.  Remove redundant :group
    (mpuz-switch-to-window): Minor cleanup.
 lisp/play/mpuz.el | 30 +++++++++++-------------------
 1 file changed, 11 insertions(+), 19 deletions(-)

diff --git a/lisp/play/mpuz.el b/lisp/play/mpuz.el
index 7fff604..838bddf 100644
--- a/lisp/play/mpuz.el
+++ b/lisp/play/mpuz.el
@@ -1,4 +1,4 @@
-;;; mpuz.el --- multiplication puzzle for GNU Emacs
+;;; mpuz.el --- multiplication puzzle for GNU Emacs  -*- lexical-binding: t -*-
 ;; Copyright (C) 1990, 2001-2021 Free Software Foundation, Inc.
@@ -40,49 +40,41 @@
 The value t means never ding, and `error' means only ding on wrong input."
   :type '(choice (const :tag "No" nil)
                 (const :tag "Yes" t)
-                (const :tag "If correct" error))
-  :group 'mpuz)
+                 (const :tag "If correct" error)))
 (defcustom mpuz-solve-when-trivial t
   "Solve any row that can be trivially calculated from what you've found."
-  :type 'boolean
-  :group 'mpuz)
+  :type 'boolean)
 (defcustom mpuz-allow-double-multiplicator nil
   "Allow 2nd factors like 33 or 77."
-  :type 'boolean
-  :group 'mpuz)
+  :type 'boolean)
 (defface mpuz-unsolved
   '((default :weight bold)
     (((class color)) :foreground "red1"))
-  "Face for letters to be solved."
-  :group 'mpuz)
+  "Face for letters to be solved.")
 (defface mpuz-solved
   '((default :weight bold)
     (((class color)) :foreground "green1"))
-  "Face for solved digits."
-  :group 'mpuz)
+  "Face for solved digits.")
 (defface mpuz-trivial
   '((default :weight bold)
     (((class color)) :foreground "blue"))
-  "Face for trivial digits solved for you."
-  :group 'mpuz)
+  "Face for trivial digits solved for you.")
 (defface mpuz-text
   '((t :inherit variable-pitch))
-  "Face for text on right."
-  :group 'mpuz)
+  "Face for text on right.")
 ;; Mpuz mode and keymaps
 (defcustom mpuz-mode-hook nil
   "Hook to run upon entry to mpuz."
-  :type 'hook
-  :group 'mpuz)
+  :type 'hook)
 (defvar mpuz-mode-map
   (let ((map (make-sparse-keymap)))
@@ -341,8 +333,8 @@ You may abort a game by typing 
 (defun mpuz-switch-to-window ()
   "Find or create the Mult-Puzzle buffer, and display it."
-  (let ((buf (mpuz-get-buffer)))
-    (or buf (setq buf (mpuz-create-buffer)))
+  (let ((buf (or (mpuz-get-buffer)
+                 (mpuz-create-buffer))))
     (switch-to-buffer buf)
     (setq buffer-read-only t)

reply via email to

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