Function: eldoc--documentation-strategy-defcustom
eldoc--documentation-strategy-defcustom is a macro defined in
eldoc.el.gz.
Signature
(eldoc--documentation-strategy-defcustom MAIN SECONDARY VALUE DOCSTRING &rest MORE)
Documentation
Defcustom helper macro for sorting eldoc-documentation-strategy.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/eldoc.el.gz
;; JT@2020-07-10: ElDoc is pre-loaded, so in Emacs < 28 we can't
;; make the "old" `eldoc-documentation-function' point to the new
;; `eldoc-documentation-strategy', so we do the reverse. This allows
;; for ElDoc to be loaded in those older Emacs versions and work with
;; whomever (major-modes, extensions, user) sets one or the other
;; variable.
(defmacro eldoc--documentation-strategy-defcustom
(main secondary value docstring &rest more)
"Defcustom helper macro for sorting `eldoc-documentation-strategy'."
(declare (indent 2))
`(if (< emacs-major-version 28)
(progn
(defcustom ,secondary ,value ,docstring ,@more)
(define-obsolete-variable-alias ',main ',secondary "eldoc-1.1.0"))
(progn
(defcustom ,main ,value ,docstring ,@more)
(defvaralias ',secondary ',main ,docstring))))