File tree Expand file tree Collapse file tree 1 file changed +16
-3
lines changed
Expand file tree Collapse file tree 1 file changed +16
-3
lines changed Original file line number Diff line number Diff line change 2626
2727(require 'docstr )
2828
29- (defcustom docstr-rust-style nil
29+ (defcustom docstr-rust-style 'rfc-430
3030 " Style specification for document string in Rust."
31- :type '(choice (const :tag " No specify" nil ))
31+ :type '(choice (const :tag " No specify" nil )
32+ (const :tag " RFC 430 documentation conventions" rfc-430))
3233 :group 'docstr )
3334
35+ (defcustom docstr-rust-prefix " * "
36+ " Prefix you use on each newline."
37+ :type 'string
38+ :group 'docstr )
39+
40+ (defun docstr-rust-config-rfc-430 ()
41+ " Configure for convention, RFC 430."
42+ (docstr-util-default-format)
43+ ; ; TODO:
44+ )
45+
3446(defun docstr-rust-config ()
3547 " Automatically configure style according to variable `docstr-rust-style' ."
3648 (cl-case docstr-rust-style
49+ (rfc-430 (docstr-rust-config-rfc-430))
3750 (t (docstr-util-default-format))))
3851
3952;;;### autoload
4053(defun docstr-writers-rust (search-string )
4154 " Insert document string for Rust using SEARCH-STRING."
4255 (docstr-rust-config)
43- (let* ((start (point )) (prefix " \n * " )
56+ (let* ((start (point )) (prefix docstr-rust-prefix )
4457 (paren-param-list (docstr-writers--paren-param-list-behind search-string " :" t ))
4558 (param-types (nth 0 paren-param-list))
4659 (param-vars (nth 1 paren-param-list))
You can’t perform that action at this time.
0 commit comments