diff options
| author | Christopher Schmidt | 2014-10-28 19:37:37 -0500 |
|---|---|---|
| committer | Jay Belanger | 2014-10-28 19:37:37 -0500 |
| commit | 3f3b46d49bbf90ebbaa66c42d0ccffb5c9621eb7 (patch) | |
| tree | 038d70f578436248984d5e462cb8e4440bcd47b3 | |
| parent | e4bf229c3c94cf93a013f97fadea724d5dd85a45 (diff) | |
| download | emacs-3f3b46d49bbf90ebbaa66c42d0ccffb5c9621eb7.tar.gz emacs-3f3b46d49bbf90ebbaa66c42d0ccffb5c9621eb7.zip | |
doc/misc/calc.texi (Quick Calculator): Mention prefix argument of
`quick-calc'.
etc/NEWS: Mention prefix argument of `quick-calc'.
lisp/calc/calc.el (quick-calc):
lisp/calc/calc-aent.el (calc-do-quick-calc): New argument INSERT.
| -rw-r--r-- | doc/misc/ChangeLog | 5 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 7 | ||||
| -rw-r--r-- | etc/ChangeLog | 4 | ||||
| -rw-r--r-- | etc/NEWS | 5 | ||||
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/calc/calc-aent.el | 5 | ||||
| -rw-r--r-- | lisp/calc/calc.el | 12 |
7 files changed, 33 insertions, 10 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog index 462e7b6bbd3..c5daf44af91 100644 --- a/doc/misc/ChangeLog +++ b/doc/misc/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-10-28 Christopher Schmidt <ch@ristopher.com> | ||
| 2 | |||
| 3 | * calc.texi (Quick Calculator): Mention prefix argument of | ||
| 4 | `quick-calc'. | ||
| 5 | |||
| 1 | 2014-10-26 Eric S. Raymond <esr@thyrsus.com> | 6 | 2014-10-26 Eric S. Raymond <esr@thyrsus.com> |
| 2 | 7 | ||
| 3 | * efaq-w32.texi: Neutralized language specific to a repository type. | 8 | * efaq-w32.texi: Neutralized language specific to a repository type. |
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 2e9d71acd4f..ede9598c281 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -10168,9 +10168,10 @@ to yank the result into the next @kbd{C-x * q} input line as a more | |||
| 10168 | explicit alternative to @kbd{$} notation, or to yank the result | 10168 | explicit alternative to @kbd{$} notation, or to yank the result |
| 10169 | into the Calculator stack after typing @kbd{C-x * c}. | 10169 | into the Calculator stack after typing @kbd{C-x * c}. |
| 10170 | 10170 | ||
| 10171 | If you finish your formula by typing @key{LFD} (or @kbd{C-j}) instead | 10171 | If you give a prefix argument to @kbd{C-x * q} or finish your formula |
| 10172 | of @key{RET}, the result is inserted immediately into the current | 10172 | by typing @key{LFD} (or @kbd{C-j}) instead of @key{RET}, the result is |
| 10173 | buffer rather than going into the kill ring. | 10173 | inserted immediately into the current buffer rather than going into |
| 10174 | the kill ring. | ||
| 10174 | 10175 | ||
| 10175 | Quick Calculator results are actually evaluated as if by the @kbd{=} | 10176 | Quick Calculator results are actually evaluated as if by the @kbd{=} |
| 10176 | key (which replaces variable names by their stored values, if any). | 10177 | key (which replaces variable names by their stored values, if any). |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 1a33d958b50..4717d3011f5 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-09-13 Christopher Schmidt <ch@ristopher.com> | ||
| 2 | |||
| 3 | * NEWS: Mention prefix argument of `quick-calc'. | ||
| 4 | |||
| 1 | 2014-10-20 Glenn Morris <rgm@gnu.org> | 5 | 2014-10-20 Glenn Morris <rgm@gnu.org> |
| 2 | 6 | ||
| 3 | * Merge in all changes up to 24.4 release. | 7 | * Merge in all changes up to 24.4 release. |
| @@ -127,6 +127,11 @@ Unicode standards. | |||
| 127 | 127 | ||
| 128 | * Changes in Specialized Modes and Packages in Emacs 25.1 | 128 | * Changes in Specialized Modes and Packages in Emacs 25.1 |
| 129 | 129 | ||
| 130 | ** Calc | ||
| 131 | +++ | ||
| 132 | *** If `quick-calc' is called with a prefix argument, insert the | ||
| 133 | result of the calculation into the current buffer. | ||
| 134 | |||
| 130 | ** ElDoc | 135 | ** ElDoc |
| 131 | *** New minor mode global-eldoc-mode | 136 | *** New minor mode global-eldoc-mode |
| 132 | *** eldoc-documentation-function now defaults to nil | 137 | *** eldoc-documentation-function now defaults to nil |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1c166b164ee..967e4a74c14 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-10-28 Christopher Schmidt <ch@ristopher.com> | ||
| 2 | |||
| 3 | * calc/calc.el (quick-calc): | ||
| 4 | * calc/calc-aent.el (calc-do-quick-calc): New argument INSERT. | ||
| 5 | |||
| 1 | 2014-10-28 Sam Steingold <sds@gnu.org> | 6 | 2014-10-28 Sam Steingold <sds@gnu.org> |
| 2 | 7 | ||
| 3 | * net/rcirc.el (rcirc-fill-column): Allow any symbolic value for | 8 | * net/rcirc.el (rcirc-fill-column): Allow any symbolic value for |
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 107c0ae4ce4..968d30ee60a 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -52,7 +52,7 @@ | |||
| 52 | "The history list for quick-calc.") | 52 | "The history list for quick-calc.") |
| 53 | 53 | ||
| 54 | ;;;###autoload | 54 | ;;;###autoload |
| 55 | (defun calc-do-quick-calc () | 55 | (defun calc-do-quick-calc (&optional insert) |
| 56 | (require 'calc-ext) | 56 | (require 'calc-ext) |
| 57 | (calc-check-defines) | 57 | (calc-check-defines) |
| 58 | (if (eq major-mode 'calc-mode) | 58 | (if (eq major-mode 'calc-mode) |
| @@ -108,7 +108,8 @@ | |||
| 108 | (setq buf long)))) | 108 | (setq buf long)))) |
| 109 | (calc-handle-whys) | 109 | (calc-handle-whys) |
| 110 | (message "Result: %s" buf))) | 110 | (message "Result: %s" buf))) |
| 111 | (if (eq last-command-event 10) | 111 | (if (or insert |
| 112 | (eq last-command-event 10)) | ||
| 112 | (insert shortbuf) | 113 | (insert shortbuf) |
| 113 | (kill-new shortbuf))))) | 114 | (kill-new shortbuf))))) |
| 114 | 115 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 04d852e5cb3..85266fbac32 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -147,7 +147,7 @@ | |||
| 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-locate-cursor-element "calc-yank" (pt)) |
| 150 | (declare-function calc-do-quick-calc "calc-aent" ()) | 150 | (declare-function calc-do-quick-calc "calc-aent" (&optional insert)) |
| 151 | (declare-function calc-do-calc-eval "calc-aent" (str separator args)) | 151 | (declare-function calc-do-calc-eval "calc-aent" (str separator args)) |
| 152 | (declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive)) | 152 | (declare-function calc-do-keypad "calc-keypd" (&optional full-display interactive)) |
| 153 | (declare-function calcFunc-unixtime "calc-forms" (date &optional zone)) | 153 | (declare-function calcFunc-unixtime "calc-forms" (date &optional zone)) |
| @@ -1549,10 +1549,12 @@ commands given here will actually operate on the *Calculator* stack." | |||
| 1549 | (and kbuf (bury-buffer kbuf)))))) | 1549 | (and kbuf (bury-buffer kbuf)))))) |
| 1550 | 1550 | ||
| 1551 | ;;;###autoload | 1551 | ;;;###autoload |
| 1552 | (defun quick-calc () | 1552 | (defun quick-calc (&optional insert) |
| 1553 | "Do a quick calculation in the minibuffer without invoking full Calculator." | 1553 | "Do a quick calculation in the minibuffer without invoking full Calculator. |
| 1554 | (interactive) | 1554 | With prefix argument INSERT, insert the result in the current |
| 1555 | (calc-do-quick-calc)) | 1555 | buffer. Otherwise, the result is copied into the kill ring." |
| 1556 | (interactive "P") | ||
| 1557 | (calc-do-quick-calc insert)) | ||
| 1556 | 1558 | ||
| 1557 | ;;;###autoload | 1559 | ;;;###autoload |
| 1558 | (defun calc-eval (str &optional separator &rest args) | 1560 | (defun calc-eval (str &optional separator &rest args) |