Merge pull request #1196 from VitoVan/master

(yas--all-parents): delete-dups for fundamental-mode
This commit is contained in:
monnier 2024-04-06 09:14:51 -04:00 committed by GitHub
commit eb5ba2664c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -848,6 +848,7 @@ which decides on the snippet to expand.")
(cons (if (eq mode 'fundamental-mode) ()
(append (cdr ap) '(fundamental-mode)))
extras))))
(delete-dups
(cons mode
(yas--merge-ordered-lists
(mapcar #'yas--all-parents
@ -859,7 +860,7 @@ which decides on the snippet to expand.")
,(let ((alias (symbol-function mode)))
(when (symbolp alias) alias))
,@(get mode 'derived-mode-extra-parents)
,@(gethash mode yas--parents)))))))))
,@(gethash mode yas--parents))))))))))
(dolist (parent all-parents)
(cl-pushnew mode (get parent 'yas--cached-children)))
(put mode 'yas--all-parents all-parents)))))