Function: xdg-desktop-read-group

xdg-desktop-read-group is a byte-compiled function defined in xdg.el.gz.

Signature

(xdg-desktop-read-group)

Documentation

Return hash table of group of desktop entries in the current buffer.

Source Code

;; Defined in /usr/src/emacs/lisp/xdg.el.gz
(defun xdg-desktop-read-group ()
  "Return hash table of group of desktop entries in the current buffer."
  (let ((res (make-hash-table :test #'equal)))
    (while (not (or (eobp) (looking-at xdg-desktop-group-regexp)))
      (skip-chars-forward "[:blank:]")
      (cond
       ((eolp))
       ((= (following-char) ?#))
       ((looking-at xdg-desktop-entry-regexp)
        (puthash (match-string 1) (match-string 2) res))
       ;; Filter localized strings
       ((looking-at (rx (group-n 1 (+ (in alnum "-"))) (* blank) "[")))
       (t (error "Malformed line: %s"
                 (buffer-substring (point) (point-at-eol)))))
      (forward-line))
    res))