aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calc/calc.el14
2 files changed, 17 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2b4f941048c..faa2243ca3b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-11-17 Jay Belanger <jay.p.belanger@gmail.com>
2
3 * calc/calc.el (calc-context-sensitive-enter): New variable.
4 (calc-enter): Use `calc-context-sensitive-enter'.
5
12013-11-16 Teodor Zlatanov <tzz@lifelogs.com> 62013-11-16 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * progmodes/cfengine.el: Version bump. 8 * progmodes/cfengine.el: Version bump.
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 2795a177a41..72d456957c7 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -146,6 +146,7 @@
146(declare-function calc-set-language "calc-lang" (lang &optional option no-refresh)) 146(declare-function calc-set-language "calc-lang" (lang &optional option no-refresh))
147(declare-function calc-edit-finish "calc-yank" (&optional keep)) 147(declare-function calc-edit-finish "calc-yank" (&optional keep))
148(declare-function calc-edit-cancel "calc-yank" ()) 148(declare-function calc-edit-cancel "calc-yank" ())
149(declare-function calc-locate-cursor-element "calc-yank" (pt))
149(declare-function calc-do-quick-calc "calc-aent" ()) 150(declare-function calc-do-quick-calc "calc-aent" ())
150(declare-function calc-do-calc-eval "calc-aent" (str separator args)) 151(declare-function calc-do-calc-eval "calc-aent" (str separator args))
151(declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive)) 152(declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive))
@@ -426,6 +427,13 @@ when converting units."
426 :version "24.3" 427 :version "24.3"
427 :type 'boolean) 428 :type 'boolean)
428 429
430(defcustom calc-context-sensitive-enter
431 nil
432 "If non-nil, the stack element under the cursor will be copied by `calc-enter'."
433 :group 'calc
434 :version "24.4"
435 :type 'boolean)
436
429(defcustom calc-undo-length 437(defcustom calc-undo-length
430 100 438 100
431 "The number of undo steps that will be preserved when Calc is quit." 439 "The number of undo steps that will be preserved when Calc is quit."
@@ -2257,8 +2265,10 @@ the United States."
2257 ((= n 0) 2265 ((= n 0)
2258 (calc-push-list (calc-top-list (calc-stack-size)))) 2266 (calc-push-list (calc-top-list (calc-stack-size))))
2259 (t 2267 (t
2260 (calc-push-list (calc-top-list n)))))) 2268 (if (not calc-context-sensitive-enter)
2261 2269 (calc-push-list (calc-top-list n))
2270 (let ((num (max 1 (calc-locate-cursor-element (point)))))
2271 (calc-push-list (calc-top-list n num))))))))
2262 2272
2263(defun calc-pop (n) 2273(defun calc-pop (n)
2264 (interactive "P") 2274 (interactive "P")