summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc-menu.el30
2 files changed, 32 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 09fd7fe55c2..890d0194156 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-27 Jay Belanger <jay.p.belanger@gmail.com>
+
+ * calc-menu.el (calc-modes-menu): Add normal and incomplete
+ algebraic modes.
+
2007-11-26 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/lisp.el (end-of-defun): Restructure so that
diff --git a/lisp/calc/calc-menu.el b/lisp/calc/calc-menu.el
index e826da2ab34..22c42adc124 100644
--- a/lisp/calc/calc-menu.el
+++ b/lisp/calc/calc-menu.el
@@ -1052,18 +1052,42 @@
:style radio
:selected (eq (car-safe calc-float-format) 'eng)])
(list "Algebraic"
+ ["Normal"
+ (progn
+ (require 'calc-mode)
+ (cond
+ (calc-incomplete-algebraic-mode
+ (calc-algebraic-mode t))
+ (calc-algebraic-mode
+ (calc-algebraic-mode nil))))
+ :style radio
+ :selected (not calc-algebraic-mode)]
["Algebraic mode"
(progn
(require 'calc-mode)
- (call-interactively 'calc-algebraic-mode))
+ (if (or
+ calc-incomplete-algebraic-mode
+ (not calc-algebraic-mode))
+ (calc-algebraic-mode nil)))
:keys "m a"
:style radio
- :selected (eq calc-algebraic-mode t)
+ :selected (and calc-algebraic-mode
+ (not calc-incomplete-algebraic-mode))
:help "Keys which start numeric entry also start algebraic entry"]
+ ["Incomplete algebraic mode"
+ (progn
+ (require 'calc-mode)
+ (unless calc-incomplete-algebraic-mode
+ (calc-algebraic-mode t)))
+ :keys "C-u m a"
+ :style radio
+ :selected calc-incomplete-algebraic-mode
+ :help "Only ( and [ begin algebraic entry"]
["Total algebraic mode"
(progn
(require 'calc-mode)
- (call-interactively 'calc-total-algebraic-mode))
+ (unless (eq calc-algebraic-mode 'total)
+ (calc-total-algebraic-mode nil)))
:keys "m t"
:style radio
:selected (eq calc-algebraic-mode 'total)