mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 10:27:41 +00:00
* 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'.
This commit is contained in:
parent
0f679e866c
commit
014690de70
4 changed files with 30 additions and 2 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2013-11-17 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc.texi (Customizing Calc): Mention new variable
|
||||
`calc-context-sensitive-enter'.
|
||||
|
||||
2013-11-12 Aaron Ecay <aaronecay@gmail.com>
|
||||
|
||||
* org.texi (Exporting code blocks): Document the 'inline-only
|
||||
|
|
|
|||
|
|
@ -35696,6 +35696,14 @@ have different dimensions. The default value of @code{calc-ensure-consistent-uni
|
|||
is @code{nil}.
|
||||
@end defvar
|
||||
|
||||
@defvar calc-context-sensitive-enter
|
||||
The command @code{calc-enter} will typically duplicate the top of the
|
||||
stack. If @code{calc-context-sensitive-enter} is non-@code{nil},
|
||||
then the @code{calc-enter} will copy the element at the cursor to the
|
||||
top of the stack. The default value of
|
||||
@code{calc-context-sensitive-enter} is @code{nil}.
|
||||
@end 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.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,8 @@
|
|||
2013-11-17 Jay Belanger <jay.p.belanger@gmail.com>
|
||||
|
||||
* calc/calc.el (calc-context-sensitive-enter): New variable.
|
||||
(calc-enter): Use `calc-context-sensitive-enter'.
|
||||
|
||||
2013-11-16 Teodor Zlatanov <tzz@lifelogs.com>
|
||||
|
||||
* progmodes/cfengine.el: Version bump.
|
||||
|
|
|
|||
|
|
@ -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 @@ when converting units."
|
|||
: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 @@ the United States."
|
|||
((= 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")
|
||||
|
|
|
|||
Loading…
Reference in a new issue