diff options
| author | Jay Belanger | 2005-05-07 21:26:30 +0000 |
|---|---|---|
| committer | Jay Belanger | 2005-05-07 21:26:30 +0000 |
| commit | 1d64910fe974b28607b19c0f669fc12dec0cec6a (patch) | |
| tree | 4e472bf70a75acdaebc91e5b3b6167893ee39246 | |
| parent | a42e94cac5df3c98a6b8dc1aa63a8a32e1fcae97 (diff) | |
| download | emacs-1d64910fe974b28607b19c0f669fc12dec0cec6a.tar.gz emacs-1d64910fe974b28607b19c0f669fc12dec0cec6a.zip | |
(calc-commute-left, calc-commute-right, calc-sel-unpack)
(calc-sel-isolate): Rename variable reselect to calc-sel-reselect.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/calc/calcsel2.el | 24 |
2 files changed, 23 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 720710ccefc..dc908f5ec4e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2005-05-07 Jay Belanger <belanger@truman.edu> | ||
| 2 | |||
| 3 | * calc/calcsel2.el (calc-commute-left, calc-commute-right) | ||
| 4 | (calc-sel-unpack, calc-sel-isolate): Rename variable `reselect' to | ||
| 5 | `calc-sel-reselect'. | ||
| 6 | |||
| 7 | * calc/calc-mode.el (calc-save-modes): Reset the modes list if | ||
| 8 | Calc is in embedded mode. | ||
| 9 | |||
| 1 | 2005-05-07 Eli Zaretskii <eliz@gnu.org> | 10 | 2005-05-07 Eli Zaretskii <eliz@gnu.org> |
| 2 | 11 | ||
| 3 | * progmodes/compile.el (compilation-setup): Set | 12 | * progmodes/compile.el (compilation-setup): Set |
diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index 28944755a1b..20020f57468 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el | |||
| @@ -34,6 +34,10 @@ | |||
| 34 | ;; The variable calc-keep-selection is declared and set in calc-sel.el. | 34 | ;; The variable calc-keep-selection is declared and set in calc-sel.el. |
| 35 | (defvar calc-keep-selection) | 35 | (defvar calc-keep-selection) |
| 36 | 36 | ||
| 37 | ;; The variable calc-sel-reselect is local to the methods below, | ||
| 38 | ;; but is used by some functions in calc-sel.el which are called | ||
| 39 | ;; by the functions below. | ||
| 40 | |||
| 37 | (defun calc-commute-left (arg) | 41 | (defun calc-commute-left (arg) |
| 38 | (interactive "p") | 42 | (interactive "p") |
| 39 | (if (< arg 0) | 43 | (if (< arg 0) |
| @@ -41,7 +45,7 @@ | |||
| 41 | (calc-wrapper | 45 | (calc-wrapper |
| 42 | (calc-preserve-point) | 46 | (calc-preserve-point) |
| 43 | (let ((num (max 1 (calc-locate-cursor-element (point)))) | 47 | (let ((num (max 1 (calc-locate-cursor-element (point)))) |
| 44 | (reselect calc-keep-selection)) | 48 | (calc-sel-reselect calc-keep-selection)) |
| 45 | (if (= arg 0) (setq arg nil)) | 49 | (if (= arg 0) (setq arg nil)) |
| 46 | (while (or (null arg) (>= (setq arg (1- arg)) 0)) | 50 | (while (or (null arg) (>= (setq arg (1- arg)) 0)) |
| 47 | (let* ((entry (calc-top num 'entry)) | 51 | (let* ((entry (calc-top num 'entry)) |
| @@ -106,14 +110,14 @@ | |||
| 106 | (if (null new) | 110 | (if (null new) |
| 107 | (if arg | 111 | (if arg |
| 108 | (error "Term is already leftmost") | 112 | (error "Term is already leftmost") |
| 109 | (or reselect | 113 | (or calc-sel-reselect |
| 110 | (calc-pop-push-list 1 (list expr) num '(nil))) | 114 | (calc-pop-push-list 1 (list expr) num '(nil))) |
| 111 | (setq arg 0)) | 115 | (setq arg 0)) |
| 112 | (calc-pop-push-record-list | 116 | (calc-pop-push-record-list |
| 113 | 1 "left" | 117 | 1 "left" |
| 114 | (list (calc-replace-sub-formula expr parent new)) | 118 | (list (calc-replace-sub-formula expr parent new)) |
| 115 | num | 119 | num |
| 116 | (list (and (or (not (eq arg 0)) reselect) | 120 | (list (and (or (not (eq arg 0)) calc-sel-reselect) |
| 117 | sel)))))))))) | 121 | sel)))))))))) |
| 118 | 122 | ||
| 119 | (defun calc-commute-right (arg) | 123 | (defun calc-commute-right (arg) |
| @@ -123,7 +127,7 @@ | |||
| 123 | (calc-wrapper | 127 | (calc-wrapper |
| 124 | (calc-preserve-point) | 128 | (calc-preserve-point) |
| 125 | (let ((num (max 1 (calc-locate-cursor-element (point)))) | 129 | (let ((num (max 1 (calc-locate-cursor-element (point)))) |
| 126 | (reselect calc-keep-selection)) | 130 | (calc-sel-reselect calc-keep-selection)) |
| 127 | (if (= arg 0) (setq arg nil)) | 131 | (if (= arg 0) (setq arg nil)) |
| 128 | (while (or (null arg) (>= (setq arg (1- arg)) 0)) | 132 | (while (or (null arg) (>= (setq arg (1- arg)) 0)) |
| 129 | (let* ((entry (calc-top num 'entry)) | 133 | (let* ((entry (calc-top num 'entry)) |
| @@ -189,14 +193,14 @@ | |||
| 189 | (if (null new) | 193 | (if (null new) |
| 190 | (if arg | 194 | (if arg |
| 191 | (error "Term is already rightmost") | 195 | (error "Term is already rightmost") |
| 192 | (or reselect | 196 | (or calc-sel-reselect |
| 193 | (calc-pop-push-list 1 (list expr) num '(nil))) | 197 | (calc-pop-push-list 1 (list expr) num '(nil))) |
| 194 | (setq arg 0)) | 198 | (setq arg 0)) |
| 195 | (calc-pop-push-record-list | 199 | (calc-pop-push-record-list |
| 196 | 1 "rght" | 200 | 1 "rght" |
| 197 | (list (calc-replace-sub-formula expr parent new)) | 201 | (list (calc-replace-sub-formula expr parent new)) |
| 198 | num | 202 | num |
| 199 | (list (and (or (not (eq arg 0)) reselect) | 203 | (list (and (or (not (eq arg 0)) calc-sel-reselect) |
| 200 | sel)))))))))) | 204 | sel)))))))))) |
| 201 | 205 | ||
| 202 | (defun calc-build-assoc-term (op lhs rhs) | 206 | (defun calc-build-assoc-term (op lhs rhs) |
| @@ -225,7 +229,7 @@ | |||
| 225 | (calc-wrapper | 229 | (calc-wrapper |
| 226 | (calc-preserve-point) | 230 | (calc-preserve-point) |
| 227 | (let* ((num (max 1 (calc-locate-cursor-element (point)))) | 231 | (let* ((num (max 1 (calc-locate-cursor-element (point)))) |
| 228 | (reselect calc-keep-selection) | 232 | (calc-sel-reselect calc-keep-selection) |
| 229 | (entry (calc-top num 'entry)) | 233 | (entry (calc-top num 'entry)) |
| 230 | (expr (car entry)) | 234 | (expr (car entry)) |
| 231 | (sel (or (calc-auto-selection entry) expr))) | 235 | (sel (or (calc-auto-selection entry) expr))) |
| @@ -236,14 +240,14 @@ | |||
| 236 | (list (calc-replace-sub-formula | 240 | (list (calc-replace-sub-formula |
| 237 | expr sel (nth 1 sel))) | 241 | expr sel (nth 1 sel))) |
| 238 | num | 242 | num |
| 239 | (list (and reselect (nth 1 sel))))))) | 243 | (list (and calc-sel-reselect (nth 1 sel))))))) |
| 240 | 244 | ||
| 241 | (defun calc-sel-isolate () | 245 | (defun calc-sel-isolate () |
| 242 | (interactive) | 246 | (interactive) |
| 243 | (calc-slow-wrapper | 247 | (calc-slow-wrapper |
| 244 | (calc-preserve-point) | 248 | (calc-preserve-point) |
| 245 | (let* ((num (max 1 (calc-locate-cursor-element (point)))) | 249 | (let* ((num (max 1 (calc-locate-cursor-element (point)))) |
| 246 | (reselect calc-keep-selection) | 250 | (calc-sel-reselect calc-keep-selection) |
| 247 | (entry (calc-top num 'entry)) | 251 | (entry (calc-top num 'entry)) |
| 248 | (expr (car entry)) | 252 | (expr (car entry)) |
| 249 | (sel (or (calc-auto-selection entry) (error "No selection"))) | 253 | (sel (or (calc-auto-selection entry) (error "No selection"))) |
| @@ -266,7 +270,7 @@ | |||
| 266 | (list (calc-replace-sub-formula | 270 | (list (calc-replace-sub-formula |
| 267 | expr eqn soln)) | 271 | expr eqn soln)) |
| 268 | num | 272 | num |
| 269 | (list (and reselect sel))) | 273 | (list (and calc-sel-reselect sel))) |
| 270 | (calc-handle-whys)))) | 274 | (calc-handle-whys)))) |
| 271 | 275 | ||
| 272 | (defun calc-sel-commute (many) | 276 | (defun calc-sel-commute (many) |