* Fixed the "direct-keymaps" bug with `emulation-mode-map-alists'

* Fixed a bug when evaluating primary field expressions

* Completed importation of TextMate HTML snippets, some TextMate HTML commands missing.
This commit is contained in:
capitaomorte
2009-11-04 15:51:43 +00:00
parent 73bad7366f
commit 477f7c99e4
30 changed files with 111 additions and 82 deletions

View File

@@ -17,7 +17,7 @@
(setq word-begin (point))
(forward-word 1)
(setq word-end (point)))
(when (and (> word-end word-begin)
(when (and (< word-begin orig-point)
(>= word-end (point)))
(setq retval
(cons
@@ -57,12 +57,19 @@
(defun yas/html-wrap-each-line-in-openclose-tag ()
(let* ((mirror "${1:$(yas/html-first-word yas/text)}")
(yas/html-wrap-newline (when (string-match "\n" yas/selected-text) "\n"))
(template (concat (format "<${1:%s}>" (or yas/html-default-tag "p"))
yas/selected-text
"</" mirror ">")))
(setq template (replace-regexp-in-string "\n" (concat "</" mirror ">\n<" mirror ">") template))
(setq template (replace-regexp-in-string "\n" (concat "</" mirror ">\n<$1>") template))
(yas/expand-snippet template)))
(defun yas/html-wrap-selection-if-not-wrapped-already (wrapping)
(if (string-match (format "<%s>.*</%s>" wrapping wrapping) yas/selected-text)
(insert yas/selected-text)
(insert (format "<%s>%s</%s>" wrapping yas/selected-text wrapping))))
(defun yas/html-between-tag-pair-p ()
(save-excursion
(backward-word)