HOME


sh-3ll 1.0
DIR:/proc/thread-self/root/usr/share/emacs/26.1/lisp/
Upload File :
Current File : //proc/thread-self/root/usr/share/emacs/26.1/lisp/xdg.elc
;ELC
;;; Compiled
;;; in Emacs version 26.1
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


#@29 

(fn ENVIRON DEFAULT-PATH)
(defalias 'xdg--dir-home '(macro . #[514 "\300\301!\302\303DDC\304\305\306D\307\310DDE\311DFE\207" [make-symbol "env" let getenv if or null not file-name-absolute-p expand-file-name] 11 (#$ . 408)]))
(put 'xdg--dir-home 'edebug-form-spec '(stringp stringp))
#@66 Return the base directory for user specific configuration files.
(defalias 'xdg-config-home #[0 "\300\301!\211\203
\302!\204\303\304!\202\211\207" [getenv "XDG_CONFIG_HOME" file-name-absolute-p expand-file-name "~/.config"] 3 (#$ . 708)])
#@58 Return the base directory for user specific cache files.
(defalias 'xdg-cache-home #[0 "\300\301!\211\203
\302!\204\303\304!\202\211\207" [getenv "XDG_CACHE_HOME" file-name-absolute-p expand-file-name "~/.cache"] 3 (#$ . 959)])
#@57 Return the base directory for user specific data files.
(defalias 'xdg-data-home #[0 "\300\301!\211\203
\302!\204\303\304!\202\211\207" [getenv "XDG_DATA_HOME" file-name-absolute-p expand-file-name "~/.local/share"] 3 (#$ . 1199)])
#@39 Return the value of $XDG_RUNTIME_DIR.
(defalias 'xdg-runtime-dir #[0 "\300\301!\207" [getenv "XDG_RUNTIME_DIR"] 2 (#$ . 1443)])
#@52 Return the config directory search path as a list.
(defalias 'xdg-config-dirs #[0 "\300\301!\211\203
\211\302\230\203\303\202\304!\207" [getenv "XDG_CONFIG_DIRS" "" ("/etc/xdg") parse-colon-path] 3 (#$ . 1577)])
#@50 Return the data directory search path as a list.
(defalias 'xdg-data-dirs #[0 "\300\301!\211\203
\211\302\230\203\303\202\304!\207" [getenv "XDG_DATA_DIRS" "" ("/usr/local/share/" "/usr/share/") parse-colon-path] 3 (#$ . 1801)])
#@145 Return the canonical URI for FILENAME.
If FILENAME has absolute file name /foo/bar.jpg, its canonical URI is
file:///foo/bar.jpg

(fn FILENAME)
(defalias 'xdg-thumb-uri #[257 "\300\301!P\207" ["file://" expand-file-name] 4 (#$ . 2043)])
#@72 Return the appropriate thumbnail filename for FILENAME.

(fn FILENAME)
(defalias 'xdg-thumb-name #[257 "\300\301!!\302P\207" [md5 xdg-thumb-uri ".png"] 4 (#$ . 2287)])
#@76 Return modification time of FILENAME as an Emacs timestamp.

(fn FILENAME)
(defalias 'xdg-thumb-mtime #[257 "\300!\3018\207" [file-attributes 5] 4 (#$ . 2462)])
#@66 Regexp matching non-comment lines in xdg-user-dirs config files.
(defconst xdg-line-regexp "XDG_\\(?1:\\(?:D\\(?:ESKTOP\\|O\\(?:CUMENTS\\|WNLOAD\\)\\)\\|MUSIC\\|P\\(?:ICTURES\\|UBLICSHARE\\)\\|\\(?:TEMPLATE\\|VIDEO\\)S\\)\\)_DIR=\"\\(?2:\\(?:\\(?:\\(?:\\$HOME\\)?/\\)\\)\\(?:[^\"]\\|\\\\\"\\)*?\\)\"" (#$ . 2631))
#@37 Alist of directory keys and values.
(defvar xdg-user-dirs nil (#$ . 2951))
#@12 

(fn STR)
(defalias 'xdg--substitute-home-env #[257 "\300!\203\207\301 \302\303\304\305\306!\307\"\310$\216\311\312\"\205#\313\314\315\316\303%)\207" [file-name-absolute-p match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match "^$HOME/" replace-match "~/" t nil] 8 (#$ . 3032)])
#@123 Return pair of user-dirs key to directory value in LINE, otherwise nil.
This should be called at the beginning of a line.
(defalias 'xdg--user-dirs-parse-line #[0 "\301\302w\210g\303U?\205&\304!\205&\305\306!\305\307!\205$\211\205$\310!B\266\202\207" [xdg-line-regexp "[:blank:]" nil 35 looking-at match-string 1 2 xdg--substitute-home-env] 5 (#$ . 3377)])
#@61 Return alist of xdg-user-dirs from FILENAME.

(fn FILENAME)
(defalias 'xdg--user-dirs-parse-file #[257 "\300\211\301!\203<\302\303!r\211q\210\304\305\306\307\310!\311\"\312$\216\313!\210eb\210m\204:\314 \262:\2034B\262\300y\210\202\"*\210\207" [nil file-readable-p generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents xdg--user-dirs-parse-line] 10 (#$ . 3748)])
#@54 Return the directory referred to by NAME.

(fn NAME)
(defalias 'xdg-user-dir #[257 "\204\f\301\302\303\304 \"!\305\"A\211\205\302!\207" [xdg-user-dirs xdg--user-dirs-parse-file expand-file-name "user-dirs.dirs" xdg-config-home assoc] 5 (#$ . 4217)])
#@50 Regexp matching desktop file group header names.
(defconst xdg-desktop-group-regexp "\\[\\(?1:[ -Z\\^-~]+?\\)]" (#$ . 4481))
#@53 Regexp matching desktop file entry key-value pairs.
(defconst xdg-desktop-entry-regexp "\\(?1:[-0-9A-Za-z]+\\)[[:blank:]]*=[[:blank:]]*\\(?2:.*\\)" (#$ . 4612))
#@70 Return hash table of group of desktop entries in the current buffer.
(defalias 'xdg-desktop-read-group #[0 "\302\303\304\"m\204C\305!\204C\306\307w\210l\204=g\310U\204=\305	!\203/\311\312\313!\312\314!#\210\202=\305\315!\204=\316\317`\320 {\"\210\307y\210\202\211\207" [xdg-desktop-group-regexp xdg-desktop-entry-regexp make-hash-table :test equal looking-at "[:blank:]" nil 35 puthash match-string 1 2 "\\(?1:[-[:alnum:]]+\\)[[:blank:]]*\\[" error "Malformed line: %s" point-at-eol] 5 (#$ . 4779)])
#@160 Return group contents of desktop file FILENAME as a hash table.
Optional argument GROUP defaults to the string "Desktop Entry".

(fn FILENAME &optional GROUP)
(defalias 'xdg-desktop-read-file #[513 "\301\302!r\211q\210\303\304\305\306\307!\310\"\311$\216\312!\210eb\210\313\314 w\2031l\204+g\315U\2031\316y\210\202\317!\204?\320\321`\322 {\"\210\203S\323\316\324#\203S\325\326!\232\203C\316y\210\327 *\207" [xdg-desktop-group-regexp generate-new-buffer " *temp*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 insert-file-contents-literally "[:blank:]" line-end-position 35 nil looking-at error "Expected group name!  Instead saw: %s" point-at-eol re-search-forward t match-string 1 xdg-desktop-read-group] 9 (#$ . 5297)])
#@78 Partition VALUE into elements delimited by unescaped semicolons.

(fn VALUE)
(defalias 'xdg-desktop-strings #[257 "\301\301\302\303\206\n\304\305Q\"\203\306\307\310\211$\202\266\202\262\311\312\313\314#\315\"\211\203=\211@\312\314\315#B\262A\266\202\202'\210\316@\301\310\302#)\266\203\204S\211A\262\211\237\207" [inhibit-changing-match-data nil string-match "\\`\\(?:" "[ 	\n
]+" "\\)" replace-match "" t split-string replace-regexp-in-string "\\\\;" "" ";" "[^[:blank:]]"] 9 (#$ . 6085)])
(provide 'xdg)