/[emacs]/emacs/lisp/calc/calc-sel.el
ViewVC logotype

Diff of /emacs/lisp/calc/calc-sel.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by walters, Wed Nov 14 09:07:04 2001 UTC revision 1.4 by walters, Mon Nov 19 07:37:51 2001 UTC
# Line 1  Line 1 
1  ;; Calculator for GNU Emacs, part II [calc-sel.el]  ;;; calc-sel.el --- data selection functions for Calc
2    
3  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.  ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
4  ;; Written by Dave Gillespie, daveg@synaptics.com.  
5    ;; Author: David Gillespie <daveg@synaptics.com>
6    ;; Maintainer: Colin Walters <walters@debian.org>
7    
8  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
9    
# Line 19  Line 22 
22  ;; file named COPYING.  Among other things, the copyright notice  ;; file named COPYING.  Among other things, the copyright notice
23  ;; and this notice must be preserved on all copies.  ;; and this notice must be preserved on all copies.
24    
25    ;;; Commentary:
26    
27    ;;; Code:
28    
29  ;; This file is autoloaded from calc-ext.el.  ;; This file is autoloaded from calc-ext.el.
30  (require 'calc-ext)  (require 'calc-ext)
# Line 31  Line 36 
36    
37  ;;; Selection commands.  ;;; Selection commands.
38    
39    (defvar calc-keep-selection t)
40    
41  (defun calc-select-here (num &optional once keep)  (defun calc-select-here (num &optional once keep)
42    (interactive "P")    (interactive "P")
43    (calc-wrapper    (calc-wrapper
# Line 349  Line 356 
356                  "Selection treats a+b+c as a sum of three terms"                  "Selection treats a+b+c as a sum of three terms"
357                "Selection treats a+b+c as (a+b)+c"))))                "Selection treats a+b+c as (a+b)+c"))))
358    
359    (defvar calc-selection-cache-entry nil)
360  (defun calc-prepare-selection (&optional num)  (defun calc-prepare-selection (&optional num)
361    (or num (setq num (calc-locate-cursor-element (point))))    (or num (setq num (calc-locate-cursor-element (point))))
362    (setq calc-selection-true-num num    (setq calc-selection-true-num num
# Line 371  Line 379 
379                     (length calc-left-label)                     (length calc-left-label)
380                     (if calc-line-numbering 4 0))))))                     (if calc-line-numbering 4 0))))))
381    (calc-preserve-point))    (calc-preserve-point))
 (setq calc-selection-cache-entry nil)  
382    
383  ;;; The following ensures that no two subformulas will be "eq" to each other!  ;;; The following ensures that no two subformulas will be "eq" to each other!
384  (defun calc-encase-atoms (x)  (defun calc-encase-atoms (x)
# Line 508  Line 515 
515           (t (calc-sel-error))))           (t (calc-sel-error))))
516      (calc-pop-stack n m t)      (calc-pop-stack n m t)
517      (calc-push-list vals m)))      (calc-push-list vals m)))
 (setq calc-keep-selection t)  
518    
519  (defun calc-delete-selection (n)  (defun calc-delete-selection (n)
520    (let ((entry (calc-top n 'entry)))    (let ((entry (calc-top n 'entry)))

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26