emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r109371: calc-mode.el (calc-set-simpl


From: Jay Belanger
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r109371: calc-mode.el (calc-set-simplify-mode): Use `cond' instead of nested `if's.
Date: Wed, 01 Aug 2012 10:36:37 -0500
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 109371
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Wed 2012-08-01 10:36:37 -0500
message:
  calc-mode.el (calc-set-simplify-mode): Use `cond' instead of nested `if's.
modified:
  lisp/ChangeLog
  lisp/calc/calc-mode.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-08-01 07:34:28 +0000
+++ b/lisp/ChangeLog    2012-08-01 15:36:37 +0000
@@ -1,3 +1,8 @@
+2012-08-01  Jay Belanger  <address@hidden>
+
+       * calc/calc-mode.el (calc-set-simplify-mode): Use `cond' instead
+       of nested `if's.
+
 2012-08-01  Glenn Morris  <address@hidden>
 
        * progmodes/autoconf.el (autoconf-definition-regexp):

=== modified file 'lisp/calc/calc-mode.el'
--- a/lisp/calc/calc-mode.el    2012-07-31 21:38:18 +0000
+++ b/lisp/calc/calc-mode.el    2012-08-01 15:36:37 +0000
@@ -497,11 +497,11 @@
 
 (defun calc-set-simplify-mode (mode arg msg)
   (calc-change-mode 'calc-simplify-mode
-                   (if arg
-                       (and (> (prefix-numeric-value arg) 0)
-                            mode)
-                     (and (not (eq calc-simplify-mode mode))
-                          mode)))
+                    (cond
+                     (arg mode)
+                     ((eq calc-simplify-mode mode)
+                      'alg)
+                     (t mode)))
   (message "%s" (if (eq calc-simplify-mode mode)
               msg
             "Algebraic simplification occurs by default")))


reply via email to

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