Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
This commit is contained in:
commit
97fc54c693
3 changed files with 21 additions and 14 deletions
|
@ -141,9 +141,9 @@ Define @var{name} as an identifier for @var{rules}.
|
|||
@example
|
||||
@group
|
||||
(define-peg-ruleset number-grammar
|
||||
'((number sign digit (* digit))
|
||||
digit ;; A reference to the definition above.
|
||||
(sign (or "+" "-" ""))))
|
||||
;; `digit' here references the definition above.
|
||||
(number () sign digit (* digit))
|
||||
(sign () (or "+" "-" "")))
|
||||
@end group
|
||||
@end example
|
||||
|
||||
|
|
|
@ -760,17 +760,24 @@ the C sources, too."
|
|||
(high-doc (cdr high)))
|
||||
(unless (and (symbolp function)
|
||||
(get function 'reader-construct))
|
||||
(insert high-usage "\n")
|
||||
(when-let* ((gate help-display-function-type)
|
||||
(res (comp-function-type-spec function))
|
||||
(type-spec (car res))
|
||||
(kind (cdr res)))
|
||||
(insert (format
|
||||
(if (eq kind 'inferred)
|
||||
"\nInferred type: %s\n"
|
||||
"\nDeclared type: %s\n")
|
||||
type-spec))))
|
||||
(insert high-usage "\n"))
|
||||
(fill-region fill-begin (point))
|
||||
(when-let* (help-display-function-type
|
||||
(res (comp-function-type-spec function))
|
||||
(type-spec (car res))
|
||||
(kind (cdr res)))
|
||||
(insert (if (eq kind 'inferred)
|
||||
"\nInferred type:\n "
|
||||
"\nDeclared type:\n "))
|
||||
(with-demoted-errors "%S"
|
||||
(let ((beg (point)))
|
||||
(pp type-spec (current-buffer))
|
||||
;; Put it on a single line if it fits.
|
||||
(and (eql beg (+ 2 (line-beginning-position 0)))
|
||||
(save-excursion
|
||||
(forward-char -1)
|
||||
(<= (current-column) (- fill-column 12)))
|
||||
(cl--set-buffer-substring (- beg 3) beg " ")))))
|
||||
high-doc)))))
|
||||
|
||||
(defun help-fns--parent-mode (function)
|
||||
|
|
|
@ -369,7 +369,7 @@ defaults to `ignore'."
|
|||
"Define PEG rule NAME as equivalent to PEXS.
|
||||
The PEG expressions in PEXS are implicitly combined with the
|
||||
sequencing `and' operator of PEG grammars."
|
||||
(declare (indent 1))
|
||||
(declare (indent 2))
|
||||
(let ((inline nil))
|
||||
(while (keywordp (car pexs))
|
||||
(pcase (pop pexs)
|
||||
|
|
Loading…
Add table
Reference in a new issue