emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] 247/299: Convert font-latex-fontify-sectioning to float when used


From: Stefan Monnier
Subject: [elpa] 247/299: Convert font-latex-fontify-sectioning to float when used as a number.
Date: Sun, 02 Nov 2014 03:11:46 +0000

monnier pushed a commit to branch externals/auctex
in repository elpa.

commit da395f4c139c750a58565bf8e5e6b622a37aec3b
Author: Mosè Giordano <address@hidden>
Date:   Sat May 17 18:26:04 2014 +0200

    Convert font-latex-fontify-sectioning to float when used as a number.
    
    * font-latex.el: Update copyright years.
    (font-latex-update-sectioning-faces): Make sure
    `height-scale' is a floating point number.
    (font-latex-make-sectioning-faces): Ditto.
---
 ChangeLog     |    7 +++++++
 font-latex.el |   12 +++++++++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index b607b40..2f27437 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2014-05-17  Mos� Giordano  <address@hidden>
+
+       * font-latex.el: Update copyright years.
+       (font-latex-update-sectioning-faces): Make sure
+       `height-scale' is a floating point number.
+       (font-latex-make-sectioning-faces): Ditto.
+
 2014-05-10  Mos� Giordano  <address@hidden>
 
        * style/siunitx.el: Update copyright years and specify last
diff --git a/font-latex.el b/font-latex.el
index 39be372..f2ad1f9 100644
--- a/font-latex.el
+++ b/font-latex.el
@@ -1,6 +1,6 @@
 ;;; font-latex.el --- LaTeX fontification for Font Lock mode.
 
-;; Copyright (C) 1996-2013  Free Software Foundation, Inc.
+;; Copyright (C) 1996-2014  Free Software Foundation, Inc.
 
 ;; Authors:    Peter S. Galbraith <address@hidden>
 ;;             Simon Marshall <address@hidden>
@@ -182,7 +182,10 @@ correct value from document properties."
   "Update sectioning commands faces."
   (unless height-scale
     (setq height-scale (if (numberp font-latex-fontify-sectioning)
-                          font-latex-fontify-sectioning
+                          ;; Make sure `height-scale' is a floating point
+                          ;; number because `set-face-attribute' treats
+                          ;; integers differently from floating points.
+                          (float font-latex-fontify-sectioning)
                         1.1)))
   (unless max
     (setq max font-latex-sectioning-max))
@@ -236,7 +239,10 @@ Emacs."
   (unless max (setq max font-latex-sectioning-max))
   (unless height-scale
     (setq height-scale (if (numberp font-latex-fontify-sectioning)
-                          font-latex-fontify-sectioning
+                          ;; Make sure `height-scale' is a floating point
+                          ;; number because the integer type is treated
+                          ;; differently.
+                          (float font-latex-fontify-sectioning)
                         1.1)))
   (dotimes (num max)
     (let* (;; reverse for XEmacs:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]