[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115127: * calc/calc.el (calc-context-sensitive-ente
From: |
Jay Belanger |
Subject: |
[Emacs-diffs] trunk r115127: * calc/calc.el (calc-context-sensitive-enter): New variable. |
Date: |
Sun, 17 Nov 2013 04:22:30 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115127
revision-id: address@hidden
parent: address@hidden
committer: Jay Belanger <address@hidden>
branch nick: trunk
timestamp: Sat 2013-11-16 22:22:24 -0600
message:
* calc/calc.el (calc-context-sensitive-enter): New variable.
(calc-enter): Use `calc-context-sensitive-enter'.
* doc/misc/calc.texi (Customizing Calc): Mention the new variable
`calc-context-sensitive-enter'.
modified:
doc/misc/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-6331
doc/misc/calc.texi calc.texi-20091113204419-o5vbwnq5f7feedwu-6290
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/calc/calc.el calc.el-20091113204419-o5vbwnq5f7feedwu-2306
=== modified file 'doc/misc/ChangeLog'
--- a/doc/misc/ChangeLog 2013-11-12 13:06:26 +0000
+++ b/doc/misc/ChangeLog 2013-11-17 04:22:24 +0000
@@ -1,3 +1,8 @@
+2013-11-17 Jay Belanger <address@hidden>
+
+ * calc.texi (Customizing Calc): Mention new variable
+ `calc-context-sensitive-enter'.
+
2013-11-12 Aaron Ecay <address@hidden>
* org.texi (Exporting code blocks): Document the 'inline-only
=== modified file 'doc/misc/calc.texi'
--- a/doc/misc/calc.texi 2013-10-17 03:37:05 +0000
+++ b/doc/misc/calc.texi 2013-11-17 04:22:24 +0000
@@ -35696,6 +35696,14 @@
is @code{nil}.
@end defvar
address@hidden calc-context-sensitive-enter
+The command @code{calc-enter} will typically duplicate the top of the
+stack. If @code{calc-context-sensitive-enter} is address@hidden,
+then the @code{calc-enter} will copy the element at the cursor to the
+top of the stack. The default value of
address@hidden is @code{nil}.
address@hidden defvar
+
@defvar calc-undo-length
The variable @code{calc-undo-length} determines the number of undo
steps that Calc will keep track of when @code{calc-quit} is called.
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-11-16 22:36:14 +0000
+++ b/lisp/ChangeLog 2013-11-17 04:22:24 +0000
@@ -1,3 +1,8 @@
+2013-11-17 Jay Belanger <address@hidden>
+
+ * calc/calc.el (calc-context-sensitive-enter): New variable.
+ (calc-enter): Use `calc-context-sensitive-enter'.
+
2013-11-16 Teodor Zlatanov <address@hidden>
* progmodes/cfengine.el: Version bump.
=== modified file 'lisp/calc/calc.el'
--- a/lisp/calc/calc.el 2013-09-11 03:31:56 +0000
+++ b/lisp/calc/calc.el 2013-11-17 04:22:24 +0000
@@ -146,6 +146,7 @@
(declare-function calc-set-language "calc-lang" (lang &optional option
no-refresh))
(declare-function calc-edit-finish "calc-yank" (&optional keep))
(declare-function calc-edit-cancel "calc-yank" ())
+(declare-function calc-locate-cursor-element "calc-yank" (pt))
(declare-function calc-do-quick-calc "calc-aent" ())
(declare-function calc-do-calc-eval "calc-aent" (str separator args))
(declare-function calc-do-keypad "calc-keypd" (&optional full-display
interactive))
@@ -426,6 +427,13 @@
:version "24.3"
:type 'boolean)
+(defcustom calc-context-sensitive-enter
+ nil
+ "If non-nil, the stack element under the cursor will be copied by
`calc-enter'."
+ :group 'calc
+ :version "24.4"
+ :type 'boolean)
+
(defcustom calc-undo-length
100
"The number of undo steps that will be preserved when Calc is quit."
@@ -2257,8 +2265,10 @@
((= n 0)
(calc-push-list (calc-top-list (calc-stack-size))))
(t
- (calc-push-list (calc-top-list n))))))
-
+ (if (not calc-context-sensitive-enter)
+ (calc-push-list (calc-top-list n))
+ (let ((num (max 1 (calc-locate-cursor-element (point)))))
+ (calc-push-list (calc-top-list n num))))))))
(defun calc-pop (n)
(interactive "P")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115127: * calc/calc.el (calc-context-sensitive-enter): New variable.,
Jay Belanger <=