diff options
author | Dmitry Kurochkin <dmitry.kurochkin@gmail.com> | 2012-01-20 00:52:14 +0100 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-01-21 08:50:48 -0400 |
commit | d3aa6848da4519f6229426b1d0432afacf748f8b (patch) | |
tree | 8dc74f5aeb62ea86e0935ae32cc76528238a2906 /emacs/notmuch-hello.el | |
parent | a9a9e374e2567caad8601d1781a3b0af8a3dde13 (diff) |
emacs: add invisible dot instead of space at the end of notmuch-hello search box
This makes `show-trailing-whitespace' happy, i.e. it does not mark the
whole search box line as trailing spaces.
Since the dot is invisible, this change makes no visible difference
for `notmuch-hello'.
Edited-by: Pieter Praet <pieter@praet.org> to fix the tests.
Diffstat (limited to 'emacs/notmuch-hello.el')
-rw-r--r-- | emacs/notmuch-hello.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index ba48cd63..1a61768d 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -511,9 +511,12 @@ Complete list of currently available key bindings: (length "Search: "))) :action (lambda (widget &rest ignore) (notmuch-hello-search (widget-value widget)))) - ;; add an invisible space to make `widget-end-of-line' ignore - ;; trailine spaces in the search widget field - (widget-insert " ") + ;; Add an invisible dot to make `widget-end-of-line' ignore + ;; trailing spaces in the search widget field. A dot is used + ;; instead of a space to make `show-trailing-whitespace' + ;; happy, i.e. avoid it marking the whole line as trailing + ;; spaces. + (widget-insert ".") (put-text-property (1- (point)) (point) 'invisible t) (widget-insert "\n") |