File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 3131(require 'cl-lib )
3232(require 'eldoc )
3333(require 'nadvice )
34-
34+
35+ ; ; Custom variables:
3536(defgroup mldoc nil
3637 " Multi ElDoc integration"
3738 :group 'tools )
5253
5354(defvar-local mldoc-returns-string t
5455 " When not-NIL, MLDoc functions return ElDoc complatible string." )
55-
56+
57+ ; ; Utility functions
58+ (defsubst mldoc-in-string ()
59+ " Return non-nil if inside a string.
60+ it is the character that will terminate the string, or t if the string should be terminated by a generic string delimiter."
61+ (nth 3 (syntax-ppss )))
62+
63+ (defsubst mldoc-in-comment ()
64+ " Return nil if outside a comment, t if inside a non-nestable comment, else an integer (the current comment nesting)."
65+ (nth 4 (syntax-ppss )))
66+
67+ (defsubst mldoc-in-string-or-comment ()
68+ " Return character address of start of comment or string; nil if not in one."
69+ (nth 8 (syntax-ppss )))
70+
71+ ; ; Macros
5672(defmacro define-mldoc (name docstring &rest body )
5773 " Define `NAME' as a ElDoc-MLDOC compatible function.
5874The definition is (lambda ARGLIST [DOCSTRING] BODY...)."
You can’t perform that action at this time.
0 commit comments