1
0
Fork 0

Don't fail if a snippet can't be found

On my laptop the ‘mode-table’ is nil and causes the other function calls to
fail. I'm not quite sure why this happens, but this shouldn't fail the
operation.
This commit is contained in:
Tom Willemse 2023-12-12 08:53:30 -08:00
parent 023282133f
commit 2a58268486

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2023.0712.232619
;; Version: 2023.1212.085307
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
;; This program is free software; you can redistribute it and/or modify
@ -36,7 +36,7 @@
(defun oni-yasnippet-remove-snippet-by-name (name mode)
"Remove the snippet NAME from MODE's snippet tables."
(let* ((mode-table (gethash mode yas--tables))
(and-let* ((mode-table (gethash mode yas--tables))
(uuidhash-table (yas--table-uuidhash mode-table))
(hash-table (yas--table-hash mode-table))
(snippet (gethash name uuidhash-table))