Richard Stallman writes: > ! (unless (save-match-data > ! (save-excursion > ! (goto-char (match-beginning 0)) > ! (string-match > ! (format "^\t* \\{0,%d\\}$" > ! (- tab-width (1+ (mod (current-column) tab-width)))) > ! (match-string 0)))) > > That would be very slow. Please do it without using regexps, > perhaps using skip-chars-forward. I can come up with the following regexp-free, search-free patch that makes the job, and that uses Stefan's good proposal of using " [ \t]+" as `tabify-regexp'. However, the code now supposes that if a TAB appears in the match, a space must have preceded it. I specified that in the docstring.