;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\322\323\324$\207" [require cl-lib cl-generic warnings eieio defalias rudel-backend-p eieio-make-class-predicate rudel-backend rudel-backend--eieio-childp eieio-make-child-predicate rudel-backend-child-p make-obsolete "use (cl-typep ... \\='rudel-backend) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal nil ((version :initarg :version :type list :documentation "A list of the form (MAJOR MINOR [MICRO\nWHATEVER*]) describing the version of the backend.") (capabilities :initarg :capabilities :type list :initform nil :documentation "A list of symbols, or lists whose car is a\nsymbol, that each describe one capability of the backend.")) (:documentation "Base class for backend classes." :abstract t)] 6) #@71 You cannot create a new object of type `rudel-backend'. (fn &rest _) (defalias 'rudel-backend #[128 "\300\301!\207" [error "Class rudel-backend is abstract"] 3 (#$ . 1320)]) (byte-code "\300\301\302\303\302\304%\210\305\306\307\310!\"\210\305\311\312\310!\"\210\305\313\311\"\210\314\313\315\316#\210\317\310\320\311#\321\310\302\322\323$\207" [cl-generic-define-method rudel-capable-of-p nil ((this rudel-backend) capability) #[514 "\300\301\"\235\207" [slot-value capabilities] 7 "Return t if the backend THIS is capable of CAPABILITY.\n\n(fn THIS CAPABILITY)"] defalias rudel-backend-factory-p eieio-make-class-predicate rudel-backend-factory rudel-backend-factory--eieio-childp eieio-make-child-predicate rudel-backend-factory-child-p make-obsolete "use (cl-typep ... \\='rudel-backend-factory) instead" "25.1" define-symbol-prop cl-deftype-satisfies eieio-defclass-internal ((backends :initarg :backends :type hash-table :documentation "Mapping of symbolic names to classes (prior to\ninstantiation) or objects (after instantiation) for all backends\nknown to the factory object.") (factories :type hash-table :initform (make-hash-table :test #'eq) :allocation :class :documentation "Mapping of backend categories to responsible\nfactory objects.")) (:documentation "Factory class that holds an object for each known backend\ncategory. Objects manage backend implementation for one backend\ncategory each.")] 6) #@78 Create a new object of class type `rudel-backend-factory'. (fn &rest SLOTS) (defalias 'rudel-backend-factory #[128 "\300\301\302#\207" [apply make-instance rudel-backend-factory] 5 (#$ . 2747)]) (byte-code "\300\301\302\303#\300\207" [function-put rudel-backend-factory compiler-macro rudel-backend-factory--anon-cmacro] 4) #@26 (fn WHOLE &rest SLOTS) (defalias 'rudel-backend-factory--anon-cmacro #[385 "\211@;\204\207\300\301\302@@#@\303@DABB\"\207" [macroexp--warn-and-return format "Obsolete name arg %S to constructor %S" identity] 7 (#$ . 3079)]) (cl-generic-define-method 'initialize-instance nil '((this rudel-backend-factory) &rest _slots) t #[642 " \210\300\301\302\303\304\"#\207" [eieio-oset backends make-hash-table :test eq] 9 "Initialize slots of THIS with SLOTS.\n\n(fn THIS &rest SLOTS)"]) #@25 (fn PLACE &rest CODE) (defalias 'rudel--with-memoization '(macro . #[385 "\300\301\302\303\304\305!\306\"\307\310%\"\207" [gv-get make-byte-code 514 "\301\302\300!\303!\203\211\202\304\305!\306!E=\203\"\211\202)\307DC\"\266\203E\207" vconcat vector [or macroexp-progn macroexp-const-p make-symbol "val" progn macroexp-let*] 10 "\n\n(fn GETTER SETTER)"] 10 (#$ . 3575)])) (byte-code "\300\301\302\303#\304\301\305\306#\210\307\310\311\312\311\313%\210\307\314\311\315\311\316%\210\307\317\311\320\311\321%\210\307\322\311\323\311\324%\210\307\325\311\326\311\327%\210\307\330\311\331\311\332%\207" [function-put rudel--with-memoization lisp-indent-function 1 put edebug-form-spec t cl-generic-define-method rudel-get-factory nil ((this (subclass rudel-backend-factory)) category) #[514 "\211\300\301\"\302\"\206\303\304!\305#\210\211\262\207" [eieio-oref-default factories gethash make-instance rudel-backend-factory puthash] 9 "Return the factory responsible for CATEGORY.\nIf there is no responsible factory, create one and return it.\n\n(fn THIS CATEGORY)"] rudel-add-backend ((this rudel-backend-factory) name class &optional replace) #[1027 "\300\301\302\"\"\203\205\303\301\302\"#\207" [gethash slot-value backends puthash] 11 "Add factory class CLASS with name NAME to THIS.\nif REPLACE is non-nil, replace a registered implementation of the\nsame name.\n\n(fn THIS NAME CLASS &optional REPLACE)"] rudel-get-backend ((this rudel-backend-factory) name) #[514 "\300!\210\301\302\303\"\"\211\205B\262\207" [rudel-load-backends gethash slot-value backends] 8 "Return backend object for name NAME or nil if there is none.\nThe returned backend is of the form (NAME . OBJECT).\n\nBackends are loaded, if necessary.\n\n(fn THIS NAME)"] rudel-all-backends ((this rudel-backend-factory) &optional only-loaded) #[513 "\300C\301\302\303\304\305\306\"\307\"\310\311%\312\313\"\"\266\211\242\207" [nil maphash make-byte-code 514 "\300\203\n\302!\205\301B\301\242B\240\207" vconcat vector [object-p] 5 "\n\n(fn NAME CLASS)" slot-value backends] 12 "Return a list of all backends registered with THIS.\nEach list element is of the form (NAME . CLASS-OR-OBJECT).\nIf optional argument ONLY-LOADED is non-nil, return only elements\nfor which CLASS-OR-OBJECT is an object.\n\n(fn THIS &optional ONLY-LOADED)"] rudel-suitable-backends ((this rudel-backend-factory) predicate) #[514 "\300!\210\211\203\301\302\303\304\305\306!\307\"\310\311%\312\313\"\"\207\312\313\"\207" [rudel-load-backends cl-remove-if-not make-byte-code 257 "\300A!\207" vconcat vector [] 3 "\n\n(fn CELL)" rudel-all-backends t] 9 "Return a list of backends which satisfy PREDICATE.\nEach list element is of the form (NAME . OBJECT).\nBackends are loaded, if necessary.\n\n(fn THIS PREDICATE)"] rudel-load-backends ((this rudel-backend-factory)) #[257 "\211\300\301\302\303\304\305!\306\"\307\310%\311\312\"\"\207" [maphash make-byte-code 514 "\301!?\2052\3021\303\304\305!\"\306\300\307\"#0\207\310\311\312!#\210\313\314\315\316\312!#\317#\262\207" vconcat vector [object-p (error) puthash make-instance symbol-name slot-value backends put rudel-backend-last-load-error error-message-string display-warning (rudel backend) format "Could not load backend `%s': %s" :warning] 10 "\n\n(fn NAME CLASS)" slot-value backends] 9 "Load backends in THIS factory if necessary.\nLoading errors are not reported explicitly, but can be detected\nby checking for backends that still are classes rather than\nobjects.\n\n(fn THIS)"]] 7) #@71 Check whether CELL is a cons of a backend name and object. (fn CELL) (defalias 'rudel-backend-cons-p #[257 "\211:\205\211@9\205\300A!\207" [object-p] 3 (#$ . 7151)]) (put 'rudel-backend-cons-p 'byte-optimizer 'byte-compile-inline-expand) #@132 A shortcut for getting backend NAME of category CATEGORY. The returned backend is of the form (NAME . OBJECT). (fn CATEGORY NAME) (defalias 'rudel-backend-get #[514 "\300\301!\"\207" [rudel-get-backend rudel-backend-get-factory] 5 (#$ . 7402)]) #@72 A shortcut for getting the factory object for CATEGORY. (fn CATEGORY) (defalias 'rudel-backend-get-factory #[257 "\300\301\"\207" [rudel-get-factory rudel-backend-factory] 4 (#$ . 7656)]) #@139 Return backends from category CATEGORY that satisfy PREDICATE. Each list element is of the form (NAME . OBJECT). (fn CATEGORY PREDICATE) (defalias 'rudel-backend-suitable-backends #[514 "\300\301!\"\207" [rudel-suitable-backends rudel-backend-get-factory] 5 (#$ . 7853)]) #@187 Choose a backend from CATEGORY satisfying PREDICATE automatically or by asking the user. The returned backend is of the form (NAME . CLASS-OR-OBJECT). (fn CATEGORY &optional PREDICATE) (defalias 'rudel-backend-choose #[513 "\300\"\211\204\f\301\302!\210\211G\303U\203'\211@\304\305\306@!\"\210\307\310!\210\211\262\2028\311\312!\210\313\314\315\316\306!!\"\317#\207" [rudel-backend-suitable-backends error "No backends available" 1 message "Using backend `%s'" symbol-name sit-for 0.5 require rudel-interactive rudel-read-backend format "%s backend: " capitalize object] 10 (#$ . 8135)]) #@191 Create display information about backends in a buffer. If LOAD is non-nil, load all backends before display. This makes available information available for the backends (fn &optional LOAD) (defalias 'rudel-backend-dump #[256 "\300\301!q\210\302 \210\303\304p\"\210\305\306\307\310\311\312!\313\"\314\315%\316\317\320\"\"\210p\207" [get-buffer-create "*Rudel Backends*" erase-buffer set-window-buffer nil maphash make-byte-code 514 "\300\301U\204\n\302!\210\303\304\305\"\306\307#c\210\310\304\311\312\313\314\"#c\210\315!\211\203G\211@\316A!\2045\211@\317N\204;\320!\202>\321!c\210A\266\202\202!\210\322c\207" vconcat vector [0 rudel-load-backends propertize format "Category %s\n" face bold apply " %-20s %-6s %-7s %s\n" mapcar #[257 "\300\301\302#\207" [propertize face italic] 5 "\n\n(fn HEADER)"] ("name" "loaded" "version" "capabilities") rudel-all-backends object-p rudel-backend-last-load-error rudel-backend--format-backend-normal rudel-backend--format-backend-error "\n"] 8 "\n\n(fn CATEGORY FACTORY)" eieio-oref-default rudel-backend-factory factories] 8 (#$ . 8741) "p"]) #@69 Format name, version and other properties of BACKEND. (fn BACKEND) (defalias 'rudel-backend--format-backend-normal #[257 "\300\301\302\303@!\304\305#\302\306\307A!!\304\310#\302\307A!\203+\311\306\312A\313\"\314#\202,\315\304\316#\302\307A!\203E\311\306\312 A\317\"\320#\202F\315\304\316#%\207" [format " %-20s %-6s %-7s (%s)\n" propertize symbol-name face font-lock-type-face prin1-to-string object-p font-lock-variable-name-face mapconcat eieio-oref version "." "?" font-lock-constant-face capabilities " "] 12 (#$ . 9848)]) #@65 Format name and loading error message of BACKEND. (fn BACKEND) (defalias 'rudel-backend--format-backend-error #[257 "\300\301\302\303@!\304\305#\302\306\304\307#\302@\310N\304\311#$\207" [format " %-20s %s %s\n" propertize symbol-name face font-lock-type-face "error:" font-lock-warning-face rudel-backend-last-load-error font-lock-comment-face] 9 (#$ . 10397)]) (provide 'rudel-backend)