Function: org-cite-basic--shorten-names
org-cite-basic--shorten-names is a byte-compiled function defined in
oc-basic.el.gz.
Signature
(org-cite-basic--shorten-names NAMES)
Documentation
Return a list of family names from a list of full NAMES.
NAMES can be a string or raw string object.
To better accommodate corporate names, this will only shorten personal names of the form "family, given".
Source Code
;; Defined in /usr/src/emacs/lisp/org/oc-basic.el.gz
(defun org-cite-basic--shorten-names (names)
"Return a list of family names from a list of full NAMES.
NAMES can be a string or raw string object.
To better accommodate corporate names, this will only shorten
personal names of the form \"family, given\"."
(let (names-string raw-p)
(cond
((stringp names) (setq names-string names))
((org-element-type-p names 'raw)
(setq names-string (mapconcat #'identity (org-element-contents names) "")
raw-p t)))
(when names-string
(setq names-string
(mapconcat
(lambda (name)
(if (eq 1 (length name))
(cdr (split-string name))
(car (split-string name ", "))))
(split-string names-string " and ")
", "))
(if raw-p (org-export-raw-string names-string)
names-string))))