[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9820: 24.0.90; Behaviour of add-file-local-variable
From: |
Stefan Monnier |
Subject: |
bug#9820: 24.0.90; Behaviour of add-file-local-variable |
Date: |
Sat, 15 Jun 2013 20:50:15 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
> - (insert (format "%s%S: %S%s\n" prefix variable value suffix)))))))
> + (insert (format "%s%S: %S%s\n" prefix variable value suffix)))
> +
> + (when (and interactive
> + (not (and (symbolp variable)
> + (boundp variable)
> + (equal (symbol-value variable) value))))
> + (message "%s" (substitute-command-keys
> + "For this change to take effect revisit file using
> \\[revert-buffer]"))))))))
Looks good, thanks.
> - (unless (eq (char-after) ?\s) (insert " "))))))))
> + (unless (eq (char-after) ?\s) (insert " "))))))
> +
> + (when (and interactive
> + (not (and (symbolp variable)
> + (boundp variable)
> + (equal (symbol-value variable) value))))
> + (message "%s" (substitute-command-keys
> + "For this change to take effect revisit file using
> \\[revert-buffer]")))))
But please eliminate this code duplication.
Stefan