A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/emacs-php/muldoc below:

GitHub - emacs-php/muldoc: Multi ElDoc integration

MulDoc - Multi ElDoc integration

MulDoc extends ElDoc and makes function definition very easy.

ElDoc is a minor mode to show documentation in echo area. ElDoc function is implemented for several languages besides Emacs Lisp.

MulDoc solves ElDoc problem.

MulDoc has APIs for end users and Lisp package developers.

Note: no end-user MulDoc implementation yet.

(defun my-foo-mode-setup ()
  "Setup function for `foo-mode'."
  (muldoc-mode 1)
  (push muldoc-documentation-functions #'muldoc-foo)
  (push muldoc-documentation-functions #'muldoc-html))

(with-eval-after-load "foo-mode"
  (add-hook 'foo-mode-hook 'my-foo-mode-setup))
(defcustom foo-muldoc-function-form
  '(return-type " " function "(" (params ", " :type " " :name) ")")
  "MulDoc display format for Foo function call."
  :group 'muldoc-foo
  :type 'sexp)

(define-muldoc foo-muldoc-func
  "MulDoc function for Foo language."
  ;; This function is extremely simplified, but represents the specification of
  ;; the value that an actual implementation should return.
  (muldoc-list foo-muldoc-function-form
              :params '((:type "string" :name "message"))
              :current-param 0
              :values (list :function "print")))

Actually the DSL is just a list. Its structure is (cons form plist).

form is a notation for converting a list to a string.

It is an Property List with the following keys.

macro (define-muldoc name docstring &rest body)

This macro is very similar to defun. It’s actually just a defun wrapper, but it is responsible for converting between MulDoc DSL and ElDoc output formats.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4