[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Elisp beginner's question
From: |
Uwe Siart |
Subject: |
Elisp beginner's question |
Date: |
Thu, 18 Sep 2008 09:16:45 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.3 (windows-nt) |
Dear all,
the value of the buffer local variable 'show-trailing-whitespace'
determines highlighting of trailing whitespace. This variable can be
customized. However, I could not find an interactive function to toggle
highlighting of trailing whitespace in a particular buffer. Therefore my
attempt to provide such a function is as follows:
;; --------------------------------------------
(defun toggle-show-trailing-whitespace ()
"Toggle highlighting of trailing whitespace."
(interactive)
(if show-trailing-whitespace
(setq show-trailing-whitespace nil)
(setq show-trailing-whitespace t)))
;; --------------------------------------------
And - well - it works somehow, I don't see any misbehaviour so far. But
I'd appreciate some experts' advice whether this approach is ok or
whether it should be done differently.
Thank you.
--
Uwe