aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/calc/calc-sel.el
diff options
context:
space:
mode:
authorColin Walters <[email protected]>2001-11-19 07:44:56 +0000
committerColin Walters <[email protected]>2001-11-19 07:44:56 +0000
commit3132f345bc1ab68e4425178266e3d4ad1b2ccd02 (patch)
tree43339ccf578fb555b44dd0c84aa0e7b0389dc8b0 /lisp/calc/calc-sel.el
parentf269b73e3ea3de8c539d544fd0310b63fc029f20 (diff)
Change all toplevel `setq' forms to `defvar' forms, and move them
before their first use. Use `when', `unless'. Remove trailing periods from error forms. Add description and headers suggested by Emacs Lisp coding conventions.
Diffstat (limited to 'lisp/calc/calc-sel.el')
-rw-r--r--lisp/calc/calc-sel.el14
1 files changed, 10 insertions, 4 deletions
diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el
index 139440e248..6a580c990b 100644
--- a/lisp/calc/calc-sel.el
+++ b/lisp/calc/calc-sel.el
@@ -1,6 +1,9 @@
-;; Calculator for GNU Emacs, part II [calc-sel.el]
+;;; calc-sel.el --- data selection functions for Calc
+
;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc.
-;; Written by Dave Gillespie, [email protected].
+
+;; Author: David Gillespie <[email protected]>
+;; Maintainer: Colin Walters <[email protected]>
;; This file is part of GNU Emacs.
@@ -19,7 +22,9 @@
;; file named COPYING. Among other things, the copyright notice
;; and this notice must be preserved on all copies.
+;;; Commentary:
+;;; Code:
;; This file is autoloaded from calc-ext.el.
(require 'calc-ext)
@@ -31,6 +36,8 @@
;;; Selection commands.
+(defvar calc-keep-selection t)
+
(defun calc-select-here (num &optional once keep)
(interactive "P")
(calc-wrapper
@@ -349,6 +356,7 @@
"Selection treats a+b+c as a sum of three terms"
"Selection treats a+b+c as (a+b)+c"))))
+(defvar calc-selection-cache-entry nil)
(defun calc-prepare-selection (&optional num)
(or num (setq num (calc-locate-cursor-element (point))))
(setq calc-selection-true-num num
@@ -371,7 +379,6 @@
(length calc-left-label)
(if calc-line-numbering 4 0))))))
(calc-preserve-point))
-(setq calc-selection-cache-entry nil)
;;; The following ensures that no two subformulas will be "eq" to each other!
(defun calc-encase-atoms (x)
@@ -508,7 +515,6 @@
(t (calc-sel-error))))
(calc-pop-stack n m t)
(calc-push-list vals m)))
-(setq calc-keep-selection t)
(defun calc-delete-selection (n)
(let ((entry (calc-top n 'entry)))