From: Vinicius Jose Latorre Date: Fri, 25 Jul 2008 02:34:31 +0000 (+0000) Subject: New function diff-show-trailing-blanks in diff-mode.el. X-Git-Tag: emacs-pretest-23.0.90~3901 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=355b422fd2203c1f6990bdf98c3dfc34f1469b69;p=emacs.git New function diff-show-trailing-blanks in diff-mode.el. --- diff --git a/etc/ChangeLog b/etc/ChangeLog index a16d47d0e45..4013ca88dc4 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2008-07-24 Vinicius Jose Latorre + + * NEWS: New function `diff-show-trailing-blanks' in diff-mode.el. + 2008-07-24 Michael Albinus * NEWS: Add xesam.el. diff --git a/etc/NEWS b/etc/NEWS index 1d06e827dfa..2b98ac46cb2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -516,6 +516,9 @@ which have installed this software. * Changes in Specialized Modes and Packages in Emacs 23.1 +** Diff mode +*** New function `diff-show-trailing-blanks'. + ** Abbrev has been rewritten in Elisp and extended with more flexibility. *** New functions: abbrev-get, abbrev-put, abbrev-table-get, abbrev-table-put, abbrev-table-p, abbrev-insert, abbrev-table-menu. diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9091d9768cf..1db707fa2eb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-07-24 Vinicius Jose Latorre + + * diff-mode.el (diff-show-trailing-blanks): New fun. Show trailing + blanks in modified lines for diff-mode. + 2008-07-24 Michael Albinus * Makefile.in (ELCFILES): Add net/xesam.el. diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el index 7d5244162b7..859f69540f9 100644 --- a/lisp/diff-mode.el +++ b/lisp/diff-mode.el @@ -1881,6 +1881,13 @@ I.e. like `add-change-log-entry-other-window' but applied to all hunks." ;; When there's no more hunks, diff-hunk-next signals an error. (error nil))))) +(defun diff-show-trailing-blanks () + "Show trailing blanks in modified lines for diff-mode." + (interactive) + (let ((whitespace-style '(trailing)) + (whitespace-trailing-regexp "^[-\+!<>].*?\\([\t ]+\\)$")) + (whitespace-mode 1))) ; display trailing blanks in diff buffer + ;; provide the package (provide 'diff-mode)