[Misc] Update semantic parser addon to recognize ‘use-package’

horrible …
This commit is contained in:
Daniel - 2018-08-15 21:14:09 +02:00
parent 6ab52f11ed
commit 15eae235d4
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 9 additions and 11 deletions

20
init.el
View File

@ -1376,17 +1376,15 @@ are assumed to be of the form *.crt."
(require 'semantic/ia)
(require 'semantic/bovine/el)
;; recognize `use-package' as include statement; for some reason,
;; this form needs to be wrapped in a backquote so that the lambda
;; form is evaluated before parser is installed; otherwise, the
;; lambda-form is not recognized as a function and the parsing does
;; not work
(eval-after-load 'semantic/bovine/el
`(semantic-elisp-setup-form-parser
,(lambda (form start end)
(ignore start end)
(semantic-tag-new-include (symbol-name (nth 1 form)) nil))
use-package))))
;; recognize `use-package' as include statement; the function seems
;; to have to be a byte-compiled function, for otherwise it just
;; wont work … ?
(eval `(semantic-elisp-setup-form-parser
,(lambda (form start end)
(ignore start end)
(semantic-tag-new-include (symbol-name (nth 1 form))
nil))
use-package))))
(use-package synonyms
:commands (synonyms))