# HG changeset patch # User Ali Bahrami # Date 1424104553 25200 # Node ID 9a588fb8b9a1da45f3935890587ebb55df3f1f0a # Parent 6e696f960e14f28d6938558893ceb134d438dd83 20270656 calc: sign change of hh.mm value puts Emacs into tight loop diff -r 6e696f960e14 -r 9a588fb8b9a1 components/emacs/README --- a/components/emacs/README Thu Jan 29 08:22:55 2015 -0800 +++ b/components/emacs/README Mon Feb 16 09:35:53 2015 -0700 @@ -18,7 +18,7 @@ # # CDDL HEADER END # -# Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved. # NAME: emacs @@ -36,6 +36,13 @@ - We patch the following changes to the emacs sources: + calc-forms.patch + calc has a flaw that puts the X11 versions of emacs into a + tight loop. This patch comes from the calc maintainer. The + fix was applied to the GNU emacs "master" branch, in September + 2014. It will be in version 25.1. We should be able to drop + this patch when we upgrade to, or past, that release. + face_for_font.patch xdisp.c has a call to face_for_font(), a function that is only present when window system support is included, which is diff -r 6e696f960e14 -r 9a588fb8b9a1 components/emacs/patches/calc-forms.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/components/emacs/patches/calc-forms.patch Mon Feb 16 09:35:53 2015 -0700 @@ -0,0 +1,18 @@ +# Prevent uninterruptible infinite loop. This is the fix for +# 20270656 calc: sign change of hh.mm value puts Emacs into tight loop +# See components/emacs/README. +# +--- emacs-24.3.orig/lisp/calc/calc-forms.el 2013-01-01 13:37:17.000000000 -0700 ++++ emacs-24.3/lisp/calc/calc-forms.el 2015-01-02 14:57:36.824358166 -0700 +@@ -271,7 +271,10 @@ + (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)