]> code.delx.au - gnu-emacs/blobdiff - lisp/whitespace.el
* lisp/emacs-lisp/package.el: Don't recompute dir. Use pkg-descs more.
[gnu-emacs] / lisp / whitespace.el
index c32155f54302d3e0ac7aa848e217b4b9fbda9279..801cdc52047bd571371aff96f07c8428bce2c372 100644 (file)
@@ -803,8 +803,8 @@ and the cons cdr is used for TABs visualization.
 
 Used when `whitespace-style' includes `indentation',
 `indentation::tab' or  `indentation::space'."
-  :type '(cons (regexp :tag "Indentation SPACEs")
-              (regexp :tag "Indentation TABs"))
+  :type '(cons (string :tag "Indentation SPACEs")
+              (string :tag "Indentation TABs"))
   :group 'whitespace)
 
 
@@ -834,7 +834,8 @@ and the cons cdr is used for TABs visualization.
 
 Used when `whitespace-style' includes `space-after-tab',
 `space-after-tab::tab' or `space-after-tab::space'."
-  :type '(regexp :tag "SPACEs After TAB")
+  :type '(cons (string :tag "SPACEs After TAB")
+              string)
   :group 'whitespace)
 
 
@@ -2243,7 +2244,8 @@ resultant list will be returned."
                  (whitespace-space-after-tab-regexp 'space)))
               1 whitespace-space-after-tab t)))))
     (font-lock-add-keywords nil whitespace-font-lock-keywords t)
-    (font-lock-fontify-buffer)))
+    (when font-lock-mode
+      (font-lock-fontify-buffer))))
 
 
 (defun whitespace-color-off ()
@@ -2253,7 +2255,8 @@ resultant list will be returned."
     (remove-hook 'post-command-hook #'whitespace-post-command-hook t)
     (remove-hook 'before-change-functions #'whitespace-buffer-changed t)
     (font-lock-remove-keywords nil whitespace-font-lock-keywords)
-    (font-lock-fontify-buffer)))
+    (when font-lock-mode
+      (font-lock-fontify-buffer))))
 
 
 (defun whitespace-trailing-regexp (limit)