auctex-commit
[Top][All Lists]
Advanced

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

[AUCTeX-commit] Changes to auctex/font-latex.el,v


From: Ralf Angeli
Subject: [AUCTeX-commit] Changes to auctex/font-latex.el,v
Date: Sat, 17 Mar 2007 10:38:53 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    07/03/17 10:38:52

Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.162
retrieving revision 5.163
diff -u -b -r5.162 -r5.163
--- font-latex.el       4 Mar 2007 19:28:45 -0000       5.162
+++ font-latex.el       17 Mar 2007 10:38:52 -0000      5.163
@@ -115,11 +115,13 @@
 
 If value `auto' is chosen, an attempt is being made in deriving
 the type of quotation mark matching from document settings like
-the language option supplied to the babel package."
-  :type '(choice (const auto) (const french) (const german))
+the language option supplied to the babel package.
+
+If nil, quoted content will not be fontified."
+  :type '(choice (const auto) (const french) (const german) (const nil))
   :group 'font-latex)
 (put 'font-latex-quotes 'safe-local-variable
-     '(lambda (x) (memq x '(auto french german))))
+     '(lambda (x) (memq x '(auto french german nil))))
 
 (defun font-latex-add-quotes (quotes)
   "Add QUOTES to `font-latex-quote-list'.
@@ -1631,10 +1633,12 @@
 \"< french \"> and \"`german\"' quotes.
 The quotes << french >> and 8-bit french are used if `font-latex-quotes' is
 set to french, and >>german<< (and 8-bit) are used if set to german."
+  (when font-latex-quotes
   (font-latex-update-quote-list)
   ;; Search for matches.
   (catch 'match
-    (while (TeX-re-search-forward-unescaped font-latex-quote-regexp-beg limit 
t)
+      (while (TeX-re-search-forward-unescaped
+             font-latex-quote-regexp-beg limit t)
       (unless (font-latex-faces-present-p '(font-lock-comment-face
                                            font-latex-verbatim-face
                                            font-latex-math-face)
@@ -1651,7 +1655,8 @@
               (point-of-surrender (+ beg font-latex-multiline-boundary)))
          ;; Find closing quote taking nested quotes into account.
          (while (progn
-                  (re-search-forward (concat opening-quote "\\|" closing-quote)
+                    (re-search-forward
+                     (concat opening-quote "\\|" closing-quote)
                                      point-of-surrender 'move)
                   (when (and (< (point) point-of-surrender) (not (eobp)))
                     (if (string= (match-string 0) opening-quote)
@@ -1667,10 +1672,12 @@
                (store-match-data (list after-beg after-beg beg after-beg)))
            (font-latex-put-multiline-property-maybe beg (point))
            (store-match-data (list beg (point) (point) (point))))
-         (throw 'match t))))))
+           (throw 'match t)))))))
 
 (defun font-latex-extend-region-backwards-quotation (beg end)
   "Extend region backwards if necessary for a multiline construct to fit in."
+  (if font-latex-quotes
+      (progn
   (font-latex-update-quote-list)
   (let ((regexp-end (regexp-opt (mapcar 'cadr font-latex-quote-list) t)))
     (save-excursion
@@ -1691,7 +1698,8 @@
                     (re-search-backward (concat opening-quote "\\|"
                                                 closing-quote)
                                         point-of-surrender 'move)
-                    (when (and (> (point) point-of-surrender) (not (bobp)))
+                          (when (and (> (point) point-of-surrender)
+                                     (not (bobp)))
                       (if (string= (match-string 0) closing-quote)
                           (setq nest-count (1+ nest-count))
                         (when (/= nest-count 0)
@@ -1699,6 +1707,7 @@
            (when (< (point) beg)
              (throw 'extend (point)))))
        beg))))
+    beg))
 
 (defun font-latex-match-script (limit)
   "Match subscript and superscript patterns up to LIMIT."




reply via email to

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