fix: sort by nesting depth before initial mirror update

this is still incomplete, but should be enough for most cases
This commit is contained in:
Joao Tavora 2013-11-07 00:46:08 +00:00
parent 660b90a746
commit ff48006f55

View File

@ -486,7 +486,11 @@ meaning is not decided yet"
;; (setq snippet--debug nil)
(defun snippet--activate-snippet (objects)
(let ((mirrors (cl-remove-if-not #'snippet--mirror-p objects))
(let ((mirrors (cl-sort (cl-remove-if-not #'snippet--mirror-p objects)
#'(lambda (p1 p2)
(cond ((not p2) t)
((not p1) nil)))
:key #'snippet--object-parent))
(fields (cl-sort (cl-remove-if-not #'snippet--field-p objects)
#'(lambda (n1 n2)
(cond ((not (integerp n2)) t)