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:
parent
023282133f
commit
2a58268486
1 changed files with 6 additions and 6 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2023.0712.232619
|
;; Version: 2023.1212.085307
|
||||||
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
|
;; Package-Requires: (yasnippet yasnippet-snippets diminish)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; 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)
|
(defun oni-yasnippet-remove-snippet-by-name (name mode)
|
||||||
"Remove the snippet NAME from MODE's snippet tables."
|
"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))
|
(uuidhash-table (yas--table-uuidhash mode-table))
|
||||||
(hash-table (yas--table-hash mode-table))
|
(hash-table (yas--table-hash mode-table))
|
||||||
(snippet (gethash name uuidhash-table))
|
(snippet (gethash name uuidhash-table))
|
||||||
|
|
Loading…
Reference in a new issue