summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el14
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 240ebbcb229..44bc31d36d6 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -249,14 +249,12 @@ Normally set to either `plain-tex-mode' or `latex-mode'."
:group 'tex)
(put 'tex-fontify-script 'safe-local-variable 'booleanp)
-(defcustom tex-font-script-display '(-0.2 . 0.2)
+(defcustom tex-font-script-display '(-0.2 0.2)
"Display specification for subscript and superscript content.
-The car is used for subscript, the cdr is used for superscripts."
+The first is used for subscript, the second is used for superscripts."
:group 'tex
- :type '(cons (choice (float :tag "Subscript")
- (const :tag "No lowering" nil))
- (choice (float :tag "Superscript")
- (const :tag "No raising" nil))))
+ :type '(list (float :tag "Subscript")
+ (float :tag "Superscript")))
(defvar tex-last-temp-file nil
"Latest temporary file generated by \\[tex-region] and \\[tex-buffer].
@@ -609,7 +607,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
odd))
(if (eq (char-after pos) ?_)
`(face subscript display (raise ,(car tex-font-script-display)))
- `(face superscript display (raise ,(cdr tex-font-script-display))))))
+ `(face superscript display (raise ,(cadr tex-font-script-display))))))
(defun tex-font-lock-match-suscript (limit)
"Match subscript and superscript patterns up to LIMIT."
@@ -669,7 +667,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
(let ((next (next-single-property-change beg 'display nil end))
(prop (get-text-property beg 'display)))
(if (and (eq (car-safe prop) 'raise)
- (member (car-safe (cdr prop)) '(-0.3 +0.3))
+ (member (car-safe (cdr prop)) tex-font-script-display)
(null (cddr prop)))
(put-text-property beg next 'display nil))
(setq beg next))))