From 15eae235d4441f7dbb7e81f6f30e4a7322afb741 Mon Sep 17 00:00:00 2001 From: Daniel Borchmann Date: Wed, 15 Aug 2018 21:14:09 +0200 Subject: [PATCH] =?UTF-8?q?[Misc]=20Update=20semantic=20parser=20addon=20t?= =?UTF-8?q?o=20recognize=20=E2=80=98use-package=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit horrible … --- init.el | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/init.el b/init.el index 5cc9a2b..172a5ea 100644 --- a/init.el +++ b/init.el @@ -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 + ;; won’t 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))