calc-mode.el (calc-set-simplify-mode): Use cond' instead of nested if's.

This commit is contained in:
Jay Belanger 2012-08-01 10:36:37 -05:00
parent bb2e3a6e4f
commit a0f95636d5
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2012-08-01 Jay Belanger <jay.p.belanger@gmail.com>
* calc/calc-mode.el (calc-set-simplify-mode): Use `cond' instead
of nested `if's.
2012-08-01 Glenn Morris <rgm@gnu.org>
* progmodes/autoconf.el (autoconf-definition-regexp):

View file

@ -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")))