help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

interference with whitespace-mode and write-file-hooks?


From: Will Parsons
Subject: interference with whitespace-mode and write-file-hooks?
Date: 14 Sep 2013 14:16:56 GMT
User-agent: slrn/1.0.1 (FreeBSD)

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?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]