From: Jay Belanger Date: Wed, 1 Aug 2012 15:36:37 +0000 (-0500) Subject: calc-mode.el (calc-set-simplify-mode): Use `cond' instead of nested `if's. X-Git-Tag: emacs-24.2.90~918 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a0f95636d5aec4a8b07158818fc0ff763cbc9ac5;p=emacs.git calc-mode.el (calc-set-simplify-mode): Use `cond' instead of nested `if's. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bc0496e0ca6..abd61048c77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-08-01 Jay Belanger + + * calc/calc-mode.el (calc-set-simplify-mode): Use `cond' instead + of nested `if's. + 2012-08-01 Glenn Morris * progmodes/autoconf.el (autoconf-definition-regexp): diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 333485d8f94..f64e37dc0bf 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -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")))