Function: whitespace-regexp

whitespace-regexp is a byte-compiled function defined in whitespace.el.gz.

Signature

(whitespace-regexp REGEXP &optional KIND)

Documentation

Return REGEXP depending on indent-tabs-mode(var)/indent-tabs-mode(fun).

Source Code

;; Defined in /usr/src/emacs/lisp/whitespace.el.gz
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; User command - report


(defun whitespace-regexp (regexp &optional kind)
  "Return REGEXP depending on `indent-tabs-mode'."
  (format
   (cond
    ((or (eq kind 'tab)
         indent-tabs-mode)
     (car regexp))
    ((or (eq kind 'space)
         (not indent-tabs-mode))
     (cdr regexp)))
   tab-width))