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

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

[elpa] externals/auctex 1b1361c 01/26: Make TeX-fold-mode aware of super


From: Tassilo Horn
Subject: [elpa] externals/auctex 1b1361c 01/26: Make TeX-fold-mode aware of superscript and subscript
Date: Thu, 12 Aug 2021 11:18:19 -0400 (EDT)

branch: externals/auctex
commit 1b1361c034c8bf0c671d5b58873581b29dcaa210
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Make TeX-fold-mode aware of superscript and subscript
    
    * tex-fold.el (TeX-fold-hide-item): Copy `display' property of
    underlying text to displayed text to raise superscript and lower
    subscript suitably.
---
 tex-fold.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tex-fold.el b/tex-fold.el
index 9eab077..dd26742 100644
--- a/tex-fold.el
+++ b/tex-fold.el
@@ -807,6 +807,12 @@ That means, put respective properties onto overlay OV."
                                     (skip-chars-forward " \t")
                                     (point))))
       (overlay-put ov 'mouse-face 'highlight)
+      (when font-lock-mode
+        ;; Add raise adjustment for superscript and subscript.
+        ;; (bug#42209)
+        (setq display-string
+              (propertize display-string
+                          'display (get-text-property ov-start 'display))))
       (overlay-put ov 'display display-string)
       (when font-lock-mode
         (overlay-put ov 'face TeX-fold-folded-face))



reply via email to

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