Function: xdg-data-dirs

xdg-data-dirs is a byte-compiled function defined in xdg.el.gz.

Signature

(xdg-data-dirs)

Documentation

Return the data directory search path as a list.

According to the XDG Base Directory Specification version
0.8 (8th May 2021):

    "$XDG_DATA_DIRS defines the preference-ordered set of base
    directories to search for data files in addition to the
    $XDG_DATA_HOME base directory. The directories in
    $XDG_DATA_DIRS should be separated with a colon ':'.

    "If $XDG_DATA_DIRS is either not set or empty, a value equal
    to /usr/local/share/:/usr/share/ should be used."

Source Code

;; Defined in /usr/src/emacs/lisp/xdg.el.gz
(defun xdg-data-dirs ()
  "Return the data directory search path as a list.

According to the XDG Base Directory Specification version
0.8 (8th May 2021):

    \"$XDG_DATA_DIRS defines the preference-ordered set of base
    directories to search for data files in addition to the
    $XDG_DATA_HOME base directory.  The directories in
    $XDG_DATA_DIRS should be separated with a colon ':'.

    \"If $XDG_DATA_DIRS is either not set or empty, a value equal
    to /usr/local/share/:/usr/share/ should be used.\""
  (let ((env (getenv "XDG_DATA_DIRS")))
    (if (or (null env) (string= env ""))
        '("/usr/local/share/" "/usr/share/")
      (parse-colon-path env))))