-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lisp: introduce new kinds: variable, macro, and consant #2425
Conversation
TODO
|
Codecov Report
@@ Coverage Diff @@
## master #2425 +/- ##
==========================================
+ Coverage 86.45% 86.51% +0.05%
==========================================
Files 176 176
Lines 36014 36111 +97
==========================================
+ Hits 31136 31240 +104
+ Misses 4878 4871 -7
Continue to review full report at Codecov.
|
This is amazing. Seems most things in elisp are covered. Here are some more that may be reasonable to add:
and things offerd by
You can eval this in Emacs to get a list of callable symbols start with (let ((collection nil))
(dolist (sym
(append
(all-completions "def" obarray)
(all-completions "cl-def" obarray)))
(when (fboundp (intern sym))
(push sym collection)))
(dolist (elt collection)
(insert "\n")
(insert (format "%-35s" elt))
(when (documentation (intern elt))
(insert (car (split-string
(documentation (intern elt)) "\n")))))) |
Thank you. In this cycle, I will not work on cl- prefix. The original lisp parser heavily replies token starting from "def". I will add following items to this request as you suggested:
The rest of them will be supported in planed Sexp meta parser. |
Private memo:
|
The new parser can support more emacs specific kinds like defcustom. The keywords, define-global-minor-mode, define-inline, defun*, defsubst*, and defmacro* are suggsted by @AmaiKinono. More keyword candidates can be listed with following elisp (takne from the comment submitted by @AmaiKinono in universal-ctags#2425) (let ((collection nil)) (dolist (sym (append (all-completions "def" obarray) (all-completions "cl-def" obarray))) (when (fboundp (intern sym)) (push sym collection))) (dolist (elt collection) (insert "\n") (insert (format "%-35s" elt)) (when (documentation (intern elt)) (insert (car (split-string (documentation (intern elt)) "\n")))))) Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Close universal-ctags#2423. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
The parser is line oritend. So f in (defun f () 1) is not captured. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
The new parser can support more emacs specific kinds like defcustom. The keywords, define-global-minor-mode, define-inline, defun*, defsubst*, and defmacro* are suggsted by @AmaiKinono. More keyword candidates can be listed with following elisp (takne from the comment submitted by @AmaiKinono in universal-ctags#2425) (let ((collection nil)) (dolist (sym (append (all-completions "def" obarray) (all-completions "cl-def" obarray))) (when (fboundp (intern sym)) (push sym collection))) (dolist (elt collection) (insert "\n") (insert (format "%-35s" elt)) (when (documentation (intern elt)) (insert (car (split-string (documentation (intern elt)) "\n")))))) Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Added a test case including quote. |
Close universal-ctags#2425. TODO: This change doesn't handle anonymous functions like ``` auto lg5 = [](X<int,int> x,X<long,long>) -> X<double,double> { return X<double,double>(); }; ``` well. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Close universal-ctags#2425. TODO: This change doesn't handle anonymous functions like ``` auto lg5 = [](X<int,int> x,X<long,long>) -> X<double,double> { return X<double,double>(); }; ``` well. Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Close #2423.