]> git.eshelyaron.com Git - emacs.git/commitdiff
calc/calc-forms.el (math-normalize-hms): Do a better check for
authorJay Belanger <jay.p.belanger@gmail.com>
Fri, 5 Sep 2014 01:04:47 +0000 (20:04 -0500)
committerJay Belanger <jay.p.belanger@gmail.com>
Fri, 5 Sep 2014 01:04:47 +0000 (20:04 -0500)
"negative" hms forms.

lisp/ChangeLog
lisp/calc/calc-forms.el

index b2912deb23e26be94c18a12dc80923178592eb70..dc0c06709d51b77cdc31cfc511150b44cd5c6df6 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-05  Jay Belanger  <jay.p.belanger@gmail.com>
+
+       * calc/calc-forms.el (math-normalize-hms): Do a better check for
+       "negative" hms forms.
+
 2014-09-04  Rasmus Pank Roulund  <emacs@pank.eu>
 
        * vc/vc-git.el (vc-git-conflicted-files): Fix bug when git status
index dbde4cd0c418b315fc743e31aa8938c55320c729..a48075cce91041ed1d8c200264cbf01899944588 100644 (file)
        (m (math-normalize (nth 2 a)))
        (s (let ((calc-internal-prec (max (- calc-internal-prec 4) 3)))
             (math-normalize (nth 3 a)))))
-    (if (math-negp h)
+    (if (or 
+         (math-negp h)
+         (and (= h 0) (math-negp m))
+         (and (= h 0) (= m 0) (math-negp s)))
        (progn
          (if (math-posp s)
              (setq s (math-add s -60)