If I use M-x replace-regexp followed by "\(//\)[[:space:]] *" <RET> "\1 " <RET> the behaviour is correct - replacing any space between '//' ed comment text Ex. //___Text... => //_Text... where '_' is a space
If I use the same replace-regexp "\(//\)[[:space:]] *" "\1 " in a function no replacing is done - Replaced 0 occurences - (defun comment-formatting(start end) (interactive "*r") (save-excursion (save-restriction (narrow-to-region start end) (goto-char start) (replace-regexp "\(//\)[[:space:]] *" "\1 ")))) So M-x comment-formatting has differnt behaviour. Why? Thanks in advance, Luca. _______________________________________________ Help-gnu-emacs mailing list Help-gnu-emacs@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-emacs