unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* interference with whitespace-mode and write-file-hooks?
@ 2013-09-14 14:16 Will Parsons
  0 siblings, 0 replies; only message in thread
From: Will Parsons @ 2013-09-14 14:16 UTC (permalink / raw)
  To: help-gnu-emacs

I generally like to time-stamp my files when saving, but sometimes I want to
turn if off, so some time ago I put in my .emacs file a function to do that:

----------
(add-hook 'write-file-hooks 'time-stamp)

(defun wbp-toggle-time-stamp ()
  "Toggle time-stamp on saving."
  (interactive)
  (if (member 'time-stamp write-file-hooks)
      (progn
        (remove-hook 'write-file-hooks 'time-stamp)
        (message "Setting time-stamp on saving turned off."))
    (add-hook 'write-file-hooks 'time-stamp)
    (message "Setting time-stamp on saving turned on.")))

(global-set-key [(hyper t)] 'wbp-toggle-time-stamp)
----------

I recently noticed that this broke, and H-t always turns the time-stamp on.

After carefully reviewing the changes I'd made to .emacs since I originally
put this function in, the culprit seems to be the following addition:

(global-whitespace-mode 1)

This doesn't make too much sense to me, anyone have an idea what's wrong?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-14 14:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-14 14:16 interference with whitespace-mode and write-file-hooks? Will Parsons

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).