aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2007-08-10 04:16:21 +0000
committerStefan Monnier2007-08-10 04:16:21 +0000
commit0e1627a71cd4a90232be9db9b696eb5ff9bdbe62 (patch)
tree99c89414f2ce35356667633c0cd0bdb0d796b406
parent021035a85a6ba433ca48ca6f108daa0322a153ba (diff)
downloademacs-0e1627a71cd4a90232be9db9b696eb5ff9bdbe62.tar.gz
emacs-0e1627a71cd4a90232be9db9b696eb5ff9bdbe62.zip
(tex-font-lock-unfontify-region): Take tex-font-script-display into account.
(tex-font-script-display, tex-font-lock-suscript): Change from a cons cell to a list of 2 elements to simplify the unfontify code.
-rw-r--r--lisp/ChangeLog22
-rw-r--r--lisp/textmodes/tex-mode.el14
2 files changed, 20 insertions, 16 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 783281b3012..35f5480f480 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,14 @@
12007-08-10 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * textmodes/tex-mode.el (tex-font-lock-unfontify-region): Fix to
4 take tex-font-script-display into account.
5 (tex-font-script-display, tex-font-lock-suscript): Change from a cons
6 cell to a list of 2 elements to simplify the unfontify code.
7
12007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change) 82007-08-09 Edward O'Connor <hober0@gmail.com> (tiny change)
2 9
3 * url/url-auth.el (url-basic-auth): When prompting for username 10 * url/url-auth.el (url-basic-auth): When prompting for username
4 and password, default to the username and password in the URL. 11 and password, default to the username and password in the URL.
5 12
62007-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br> 132007-08-08 Vinicius Jose Latorre <viniciusjl@ig.com.br>
7 14
@@ -285,16 +292,15 @@
285 (fortran-mode): Use fortran-line-length, and 292 (fortran-mode): Use fortran-line-length, and
286 fortran-font-lock-syntactic-keywords as a function. Add a 293 fortran-font-lock-syntactic-keywords as a function. Add a
287 hack-local-variables-hook function. 294 hack-local-variables-hook function.
288 (fortran-line-length, fortran-hack-local-variables): New 295 (fortran-line-length, fortran-hack-local-variables): New functions.
289 functions. 296 (fortran-window-create, fortran-strip-sequence-nos): Doc fix.
290 (fortran-window-create, fortran-strip-sequence-nos): Doc fix. Use 297 Use fortran-line-length rather than 72.
291 fortran-line-length rather than 72.
292 (fortran-window-create-momentarily): Doc fix. 298 (fortran-window-create-momentarily): Doc fix.
293 299
2942007-07-31 Drew Adams <drew.adams@oracle.com> (tiny change) 3002007-07-31 Drew Adams <drew.adams@oracle.com> (tiny change)
295 301
296 * cus-edit.el (custom-group-value-create, custom-goto-parent): Fix 302 * cus-edit.el (custom-group-value-create, custom-goto-parent):
297 parent groups link. 303 Fix parent groups link.
298 304
2992007-07-31 Paul Pogonyshev <pogonyshev@gmx.net> 3052007-07-31 Paul Pogonyshev <pogonyshev@gmx.net>
300 306
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'."
249 :group 'tex) 249 :group 'tex)
250(put 'tex-fontify-script 'safe-local-variable 'booleanp) 250(put 'tex-fontify-script 'safe-local-variable 'booleanp)
251 251
252(defcustom tex-font-script-display '(-0.2 . 0.2) 252(defcustom tex-font-script-display '(-0.2 0.2)
253 "Display specification for subscript and superscript content. 253 "Display specification for subscript and superscript content.
254The car is used for subscript, the cdr is used for superscripts." 254The first is used for subscript, the second is used for superscripts."
255 :group 'tex 255 :group 'tex
256 :type '(cons (choice (float :tag "Subscript") 256 :type '(list (float :tag "Subscript")
257 (const :tag "No lowering" nil)) 257 (float :tag "Superscript")))
258 (choice (float :tag "Superscript")
259 (const :tag "No raising" nil))))
260 258
261(defvar tex-last-temp-file nil 259(defvar tex-last-temp-file nil
262 "Latest temporary file generated by \\[tex-region] and \\[tex-buffer]. 260 "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."
609 odd)) 607 odd))
610 (if (eq (char-after pos) ?_) 608 (if (eq (char-after pos) ?_)
611 `(face subscript display (raise ,(car tex-font-script-display))) 609 `(face subscript display (raise ,(car tex-font-script-display)))
612 `(face superscript display (raise ,(cdr tex-font-script-display)))))) 610 `(face superscript display (raise ,(cadr tex-font-script-display))))))
613 611
614(defun tex-font-lock-match-suscript (limit) 612(defun tex-font-lock-match-suscript (limit)
615 "Match subscript and superscript patterns up to LIMIT." 613 "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."
669 (let ((next (next-single-property-change beg 'display nil end)) 667 (let ((next (next-single-property-change beg 'display nil end))
670 (prop (get-text-property beg 'display))) 668 (prop (get-text-property beg 'display)))
671 (if (and (eq (car-safe prop) 'raise) 669 (if (and (eq (car-safe prop) 'raise)
672 (member (car-safe (cdr prop)) '(-0.3 +0.3)) 670 (member (car-safe (cdr prop)) tex-font-script-display)
673 (null (cddr prop))) 671 (null (cddr prop)))
674 (put-text-property beg next 'display nil)) 672 (put-text-property beg next 'display nil))
675 (setq beg next)))) 673 (setq beg next))))