;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\301%\210\310\311\312\313\314DD\315\316\317\307\304&\210\310\320\312\313\321DD\322\316\323\307\304&\210\310\324\312\313\325DD\326\316\313\307\304&\207" [require ivy browse-url custom-declare-group ivy-xcdoc nil "Search Xcode documents with ivy interface." :group custom-declare-variable ivy-xcdoc-command funcall function #[0 "\300\207" [#1="/Applications/Xcode.app/Contents/Developer/usr/bin/docsetutil"] 1 #1#] "Path of `docsletutil' utils, which can be found in Xcode.app. try \"find /Applications/Xcode.app -name docsetutil\" in your terminal to find it out." :type string ivy-xcdoc-docsets #[0 "\300\207" [(("OSX" . "~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.OSX.docset") ("iOS" . "~/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset"))] 1] "Association list of docsets to use, docsets come with Xcode, try \"find ~ -name '*.docset'\" in your terminal to find them out." (alist :key-type (string :tag "Name") :value-type (string :tag "Path")) ivy-xcdoc-url-browser-function #[0 "\300\207" [nil] 1] "Function use to open document topics, Topics is html files on local file system. Set to nil will use `eww-browse-url'."] 8) #@53 Use specified function to open topic url. (fn URL) (defalias 'ivy-xcdoc--show-topic #[257 "\203!\207\301\302\"\207" [ivy-xcdoc-url-browser-function eww-browse-url nil] 4 (#$ . 1347)]) #@56 Make query keywords safe for command line. (fn QUERY) (defalias 'ivy-xcdoc--make-safe-query #[257 "\300\301\302#\207" [replace-regexp-in-string "\"" "\\\""] 5 (#$ . 1544)]) #@69 Parse the result, construct url for each topic. (fn DOCSET OUTPUT) (defalias 'ivy-xcdoc--parse-result #[514 "@\300\301A!P\302\303\304#\305\211\2034\211@\302\306\304#\307@Q\310A@QBB\262\210A\266\202\202\207" ["file://" expand-file-name split-string "\n" t nil " " " " "/Contents/Resources/Documents/"] 13 (#$ . 1725)]) #@65 Invoke the docsetutil on single docset. (fn SAFE-QUERY DOCSET) (defalias 'ivy-xcdoc--docsetutil #[514 "\301\302A\260\303\304!\206\305\"\207" [ivy-xcdoc-command " search -skip-text -query \"" "\" " ivy-xcdoc--parse-result shell-command-to-string ""] 7 (#$ . 2069)]) #@61 Invoke the docsetutil on multi docsets. (fn QUERY DOCSETS) (defalias 'ivy-xcdoc--docsetutil-multi #[514 "\300!\262\301\211\203\211@\302\303\"\"\262A\266\202\202\207" [ivy-xcdoc--make-safe-query nil append ivy-xcdoc--docsetutil] 10 (#$ . 2350)]) #@57 Search topics and select one with ivy-read. (fn QUERY) (defalias 'ivy-xcdoc--search-and-select #[257 "\301\"\211\203\302\303\304\305\306\307\310\311&\207\312\313!\207" [ivy-xcdoc-docsets ivy-xcdoc--docsetutil-multi ivy-read "Select Topic: " :action #[257 "\301\302!!r\303\304\"\216\305@\306\"\210\307A!*\207" [ivy-last internal--before-with-selected-window ivy--get-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord ivy-xcdoc--show-topic] 5 "\n\n(fn X)"] :require-match t :caller ivy-xcdoc--search-and-select message "Topic not found."] 11 (#$ . 2616)]) #@26 Ivy xcdoc query history. (defvar ivy-xcdoc-query-history nil (#$ . 3245)) #@69 Prompt for query keywords and search them. (fn &optional AT-POINT) (defalias 'ivy-xcdoc--prompt-and-search #[256 "\301\302\303\205\n\304 \305\306\307\310\311\312\313\300&\f\207" [ivy-xcdoc-query-history ivy-read "Search Xcode API: " :initial-input ivy-thing-at-point :action #[257 "\301\302!!r\303\304\"\216\305@\306\"\210\307!*\207" [ivy-last internal--before-with-selected-window ivy--get-window make-closure #[0 "\301\300!\207" [V0 internal--after-with-selected-window] 2] select-window norecord ivy-xcdoc--search-and-select] 5 "\n\n(fn X)"] :require-match nil :caller ivy-xcdoc--prompt-and-search :history] 14 (#$ . 3325)]) #@42 Search Xcode documents for API keywords. (defalias 'ivy-xcdoc-search-api #[0 "\300\301!\207" [ivy-xcdoc--prompt-and-search nil] 2 (#$ . 3967) nil]) #@51 Search Xcode documents for API keywords at point. (defalias 'ivy-xcdoc-search-api-at-point #[0 "\300\301!\207" [ivy-xcdoc--prompt-and-search t] 2 (#$ . 4121) nil]) (provide 'ivy-xcdoc)