问题
I use single quote when writing html, but zencoding-mode's expanding code use double quote.
I can't find a customize option about this, my zencoding-mode comes from https://github.com/rooney/zencoding
回答1:
It looks like the "
is hard-coded into the source, so there's not direct way to customize it. It would be easy to do, so perhaps you could submit a feature request to the maintainer.
In the meantime, it looks like what you need is a modified version of zencoding-make-html-tag
, replacing all instances of "\""
with "'"
. You could add a custom version of the function to your .emacs, with a hook to load it after zencoding. Something like the following might do it:
(defun my-zencoding-hook ()
(zencoding-mode))
(eval-after-load "zencoding-mode"
'(defun zencoding-make-html-tag ()
"Insert your modified version of zencoding-make-html-tag here"
...))
(add-hook 'sgml-mode-hook 'my-zencoding-hook)
Easier but more prone to surprises would be to do a search-and-replace in the source of zencoding-mode.el itself, since it runs from wherever you downloaded it to. This will break whenever you update your version, and might break behaviour for other markup languages, but it's quick and easy.
来源:https://stackoverflow.com/questions/8137540/how-to-make-emacs-zencoding-mode-use-single-quote-insted-of-double-quote