How do I add functions to Zencoding-mode.el to make a - <a> tag - unfold to <a href=“ ” target=“ ”>?

StackOverflow https://stackoverflow.com/questions/2391934

  •  25-09-2019
  •  | 
  •  

Question

I would like to learn how to add functions to zencoding-mode.el (Zen Coding). Please list what steps a new Emacs user will need to take to enable them to learn Emacs Lisp.

I would love to help extend this Emacs mode.

Was it helpful?

Solution

It rather looks to me as if the Zen Coding mode is not what you want to be modifying to do this. From a quick look over the code, it doesn't seem like it has any per-tag rules at all beyond categorising the ones it recognises into either 'single', 'inline', or 'block' tags.

You could clearly write a.href.target to get the desired effect, but I don't think the Zen Coding mode is geared to do any automated expansions besides the ones you explicitly specify.

However, it also seems to have some integration with YASnippet, which most definitely is suited to the task. If the Zen Coding mode already does similar things to what you are asking, I would guess that it may actually be YASnippet at work.

As for learning Emacs Lisp, I would redirect you to this question:
https://stackoverflow.com/questions/41522/tips-for-learning-elisp

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top