;;; calc-ext.el --- various extension functions for Calc
;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 3, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(define-key calc-mode-map "\M-k" 'calc-copy-as-kill)
(define-key calc-mode-map "\C-w" 'calc-kill-region)
(define-key calc-mode-map "\M-w" 'calc-copy-region-as-kill)
+ (define-key calc-mode-map "\M-\C-w" 'kill-ring-save)
(define-key calc-mode-map "\C-_" 'calc-undo)
(define-key calc-mode-map "\C-xu" 'calc-undo)
(define-key calc-mode-map "\M-\C-m" 'calc-last-args)
(define-key calc-mode-map "mX" 'calc-load-everything)
(define-key calc-mode-map "r" nil)
+ (define-key calc-mode-map "ri" 'calc-insert-register)
+ (define-key calc-mode-map "rs" 'calc-copy-to-register)
(define-key calc-mode-map "r?" 'calc-r-prefix-help)
(define-key calc-mode-map "s" nil)
("calc-yank" calc-alg-edit calc-clean-newlines
calc-do-grab-rectangle calc-do-grab-region calc-finish-stack-edit
+calc-copy-to-register calc-insert-register
+calc-append-to-register calc-prepend-to-register
calc-force-refresh calc-locate-cursor-element calc-show-edit-buffer)
))
("calc-stuff" calc-clean calc-clean-num calc-flush-caches
calc-less-recursion-depth calc-more-recursion-depth calc-num-prefix
-calc-version calc-why)
+calc-why)
("calc-trail" calc-trail-backward calc-trail-first calc-trail-forward
calc-trail-in calc-trail-isearch-backward calc-trail-isearch-forward
(if (boundp 'overriding-terminal-local-map)
(setq overriding-terminal-local-map calc-fancy-prefix-map)
(let ((event (calc-read-key t)))
- (if (eq (setq last-command-char (car event)) ?\C-u)
+ (if (eq (setq last-command-event (car event)) ?\C-u)
(universal-argument)
- (if (or (not (integerp last-command-char))
- (and (>= last-command-char 0) (< last-command-char ? )
- (not (memq last-command-char '(?\e)))))
+ (if (or (not (integerp last-command-event))
+ (and (>= last-command-event 0) (< last-command-event ? )
+ (not (memq last-command-event '(?\e)))))
(calc-wrapper)) ; clear flags if not a Calc command.
(setq last-command-event (cdr event))
- (if (or (not (integerp last-command-char))
- (eq last-command-char ?-))
+ (if (or (not (integerp last-command-event))
+ (eq last-command-event ?-))
(calc-unread-command)
(digit-argument n))))))))
(defun calc-fancy-prefix-other-key (arg)
(interactive "P")
(if (and
- (not (eq last-command-char 'tab))
- (not (eq last-command-char 'M-tab))
- (or (not (integerp last-command-char))
- (and (>= last-command-char 0) (< last-command-char ? )
- (not (eq last-command-char meta-prefix-char)))))
+ (not (eq last-command-event 'tab))
+ (not (eq last-command-event 'M-tab))
+ (or (not (integerp last-command-event))
+ (and (>= last-command-event 0) (< last-command-event ? )
+ (not (eq last-command-event meta-prefix-char)))))
(calc-wrapper)) ; clear flags if not a Calc command.
(setq prefix-arg arg)
(calc-unread-command)