FUEL: Better $snippet handling.

db4
Jose A. Ortega Ruiz 2009-01-25 11:57:27 +01:00
parent 8d943b9625
commit f64303a3c8
1 changed files with 7 additions and 3 deletions

View File

@ -156,7 +156,7 @@
(defvar fuel-markup--maybe-nl nil)) (defvar fuel-markup--maybe-nl nil))
(defun fuel-markup--print (e) (defun fuel-markup--print (e)
(cond ((null e)) (cond ((null e) (insert "f"))
((stringp e) (fuel-markup--insert-string e)) ((stringp e) (fuel-markup--insert-string e))
((and (listp e) (symbolp (car e)) ((and (listp e) (symbolp (car e))
(assoc (car e) fuel-markup--printers)) (assoc (car e) fuel-markup--printers))
@ -253,8 +253,12 @@
(insert (cadr e)))) (insert (cadr e))))
(defun fuel-markup--snippet (e) (defun fuel-markup--snippet (e)
(let ((snip (format "%s" (cadr e)))) (insert (mapconcat '(lambda (s)
(insert (fuel-font-lock--factor-str snip)))) (if (stringp s)
(fuel-font-lock--factor-str s)
(fuel-markup--print-str s)))
(cdr e)
" ")))
(defun fuel-markup--code (e) (defun fuel-markup--code (e)
(fuel-markup--insert-nl-if-nb) (fuel-markup--insert-nl-if-nb)