Function: hywiki-get-plural-wikiword
hywiki-get-plural-wikiword is a byte-compiled function defined in
hywiki.el.
Signature
(hywiki-get-plural-wikiword WIKIWORD)
Documentation
Return the pluralized version of the given WIKIWORD.
hywiki-allow-plurals-flag must be non-nil or nil is always returned.
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-get-plural-wikiword (wikiword)
"Return the pluralized version of the given WIKIWORD.
`hywiki-allow-plurals-flag' must be non-nil or nil is always returned."
;; You add "-es" to make a noun plural when the singular noun ends
;; in "s", "x", "z", "sh", or "ch". However, there are some
;; exceptions to this rule, such as words ending in "-ch" that are
;; pronounced with a hard "k", like "monarchs" and "stomachs".
(when hywiki-allow-plurals-flag
(cond ((let ((case-fold-search t))
(string-match-p "\\(es\\|.[^es]s\\)$" wikiword))
;; Already plural
wikiword)
((let ((case-fold-search t))
(string-match-p "\\(ch\\|sh\\|[sxz]\\)$" wikiword))
(concat wikiword (if (string-match-p "[[:lower:]]" wikiword)
"es"
"ES")))
(t (concat wikiword (if (string-match-p "[[:lower:]]" wikiword)
"s"
"S"))))))