diff options
| author | Jay Belanger | 2015-10-10 22:08:33 -0500 |
|---|---|---|
| committer | Jay Belanger | 2015-10-10 22:08:33 -0500 |
| commit | 54e3734a322aca9d396e4c7b0e73f08ac6c12501 (patch) | |
| tree | 8e7c6ebab8507e7ccdc29e6d00eb6562a9974182 | |
| parent | 4cbd0713000c5f0a184e16df3556e8408ea3b894 (diff) | |
| download | emacs-54e3734a322aca9d396e4c7b0e73f08ac6c12501.tar.gz emacs-54e3734a322aca9d396e4c7b0e73f08ac6c12501.zip | |
Document the optional prefix to `calc-yank'.
* doc/misc/calc.texi (Yanking into the Stack): Document the optional
prefix to `calc-yank'.
* lisp/calc/calc-yank.el (calc-yank): Ensure that things killed from
the Calc buffer are yanked back unchanged.
| -rw-r--r-- | doc/misc/calc.texi | 13 | ||||
| -rw-r--r-- | lisp/calc/calc-yank.el | 2 |
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index ecf2ef9e5c2..8579d0f16f5 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -29903,6 +29903,19 @@ number in its displayed form, 3.142. (Since the default display modes | |||
| 29903 | show all objects to their full precision, this feature normally makes no | 29903 | show all objects to their full precision, this feature normally makes no |
| 29904 | difference.) | 29904 | difference.) |
| 29905 | 29905 | ||
| 29906 | The @kbd{C-y} command can be given a prefix, which will interpret the | ||
| 29907 | text being yanked with a different radix. If the text being yanked can be | ||
| 29908 | interpreted as a binary, octal, hexadecimal, or decimal number, then a | ||
| 29909 | prefix of @kbd{2}, @kbd{8}, @kbd{6} or @kbd{0} will have Calc | ||
| 29910 | interpret the yanked text as a number in the appropriate base. For example, | ||
| 29911 | if @samp{111} has just been killed and is yanked into Calc with a command | ||
| 29912 | of @kbd{C-2 C-y}, then the number @samp{7} will be put on the stack. | ||
| 29913 | If you use the plain prefix @kbd{C-u}, then you will be prompted for a | ||
| 29914 | base to use, which can be any integer from 2 to 36. If Calc doesn't | ||
| 29915 | allow the text being yanked to be read in a different base (such as if | ||
| 29916 | the text is an algebraic expression), then the prefix will have no | ||
| 29917 | effect. | ||
| 29918 | |||
| 29906 | @node Saving Into Registers, Inserting From Registers, Yanking Into Stack, Kill and Yank | 29919 | @node Saving Into Registers, Inserting From Registers, Yanking Into Stack, Kill and Yank |
| 29907 | @section Saving into Registers | 29920 | @section Saving into Registers |
| 29908 | 29921 | ||
diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index c93b64b6436..cd447500ffe 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el | |||
| @@ -195,7 +195,7 @@ alteration." | |||
| 195 | (concat radix-notation "\\&") | 195 | (concat radix-notation "\\&") |
| 196 | thing-raw)) | 196 | thing-raw)) |
| 197 | thing-raw))))) | 197 | thing-raw))))) |
| 198 | (if (eq (car-safe calc-last-kill) thing) | 198 | (if (eq (car-safe calc-last-kill) thing-raw) |
| 199 | (cdr calc-last-kill) | 199 | (cdr calc-last-kill) |
| 200 | (if (stringp thing) | 200 | (if (stringp thing) |
| 201 | (let ((val (math-read-exprs (calc-clean-newlines thing)))) | 201 | (let ((val (math-read-exprs (calc-clean-newlines thing)))) |