Add 2012 to FSF copyright years for Emacs files
[bpt/emacs.git] / lisp / calc / calc-sel.el
index 62debf5..bdacf65 100644 (file)
@@ -1,7 +1,6 @@
 ;;; calc-sel.el --- data selection functions for Calc
 
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;;   2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 1990-1993, 2001-2012 Free Software Foundation, Inc.
 
 ;; Author: David Gillespie <daveg@synaptics.com>
 ;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
        (setq n (1+ n))))
    (calc-clear-command-flag 'position-point)))
 
+(defvar calc-highlight-selections-with-faces)
+
 (defun calc-show-selections (arg)
   (interactive "P")
   (calc-wrapper
                (setcar (nthcdr 2 calc-selection-cache-entry) nil)
                (calc-change-current-selection sel)))))
    (message (if calc-show-selections
-               "Displaying only selected part of formulas"
-             "Displaying all but selected part of formulas"))))
+                (if calc-highlight-selections-with-faces
+                    "De-emphasizing all but selected part of formulas"
+                  "Displaying only selected part of formulas")
+              (if calc-highlight-selections-with-faces
+                  "Emphasizing selected part of formulas"
+                "Displaying all but selected part of formulas")))))
 
 ;; The variables calc-final-point-line and calc-final-point-column
 ;; are declared in calc.el, and are used throughout.
                              (unless arg
                                (setq rhs (math-expand-term rhs))))))
                   (if (and arg (not no-simp))
-                      (setq rhs (calcFunc-expand rhs (unless (= arg 0) arg))))
+                      (setq rhs (math-simplify
+                                 (calcFunc-expand rhs (unless (= arg 0) arg)))))
                  (setq alg (calc-encase-atoms
                             (calc-normalize (list func lhs rhs)))))
              (setq rhs (list (if divide '* '/) sel alg))
 
 (provide 'calc-sel)
 
-;; arch-tag: e5169792-777d-428f-bff5-acca66813fa2
 ;;; calc-sel.el ends here