diff --git a/etc/ChangeLog b/etc/ChangeLog index a16d47d0e454ae4cd27a49be4283d69475942fec..4013ca88dc4fc92bdfceb614790260ac1a4300a5 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 1d06e827dfa9eca209308c574af7617bb849195a..2b98ac46cb2a216e97c869c52c0cbd62ff9067b5 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 9091d9768cfa279c8bec3a2c923f26ce749f0bab..1db707fa2eb19897b61da642aa66bccf8a7e0a64 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 7d5244162b7bfd2a459e95da7c17265434335be5..859f69540f95fc9933ca6636546f07a46ca2fa85 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)