;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 "\302\303!\210\304\305!:\204*\306\3071!\310\301!?\206 \311\234\312=0\202%\210\202*\203*\313\302\314!\210\302\315!\210\302\316!\210\317\320\321\322!\203B\322\202H\317\323\324\"\210\325\"\210\317\326\321\327!\203V\327\202W\330\"\210\317\331\321\332!\203e\332\202f\333\"\210\334\335!\204t\336\335\337\340#\210\334\341!\204\200\336\341\337\342#\210\334\343!\204\214\336\343\337\344#\210\334\345!\204\230\336\345\337\346#\210\347\207" [edebug-inhibit-emacs-lisp-mode-bindings global-edebug-prefix require cl-lib key-binding "" t (error) boundp 0 24 "" edebug bytecomp advice defalias names--function-get fboundp function-get names--autoload-do-load #[514 "\300A@\301\"\204\302\303A@#\210\211K\207" [load noerror error "Macro `%s' is autoloaded, but its file (%s) couldn't be loaded"] 6 "Load autoloaded definition DEF from function named NAME.\n\n(fn DEF NAME)"] #[642 "\3009\2032N\211\262\2042\301!\2032K\211\211\242\302=\262\203+\211\303\"\232\203.\211\262\210\202\211\207" [nil fboundp autoload names--autoload-do-load] 9 "Return the value of property PROP of function F.\nIf F is an autoloaded macro, try to autoload it in the hope that\nit will set PROP.\n\n(fn F PROP &rest _)"] names--compat-macrop macrop #[257 "\3001\f\301\302\"0\202\210\202\206 \3031\301!0\202 \210\304\211:\205;\211@\305=\206;\211\211\242\306=\262\205;\3078\310>\207" [(error) indirect-function t (error) nil macro autoload 4 (macro t)] 5 "Non-nil if and only if OBJECT is a macro.\n\n(fn OBJECT)"] names--autoloadp autoloadp #[257 "\211\242\300=\207" [autoload] 3 "Non-nil if OBJECT is an autoload.\n\n(fn OBJECT)"] get-edebug-spec cl-defun put edebug-form-spec defun* cl-defmacro defmacro* setq-local setq loop (&rest &or [[&or "for" "as" "with" "and"] sexp] [[&or "from" "upfrom" "downfrom" "to" "upto" "downto" "above" "below" "by" "in" "on" "=" "across" "repeat" "while" "until" "always" "never" "thereis" "collect" "append" "nconc" "sum" "count" "maximize" "minimize" "if" "unless" "return"] form] symbolp form) nil] 5) #@34 Version of the names.el package. (defconst names-version "20151201.0" (#$ . 2477)) #@68 Name of the current namespace inside the `define-namespace' macro. (defvar names--name nil (#$ . 2566)) #@32 Regexp matching `names--name'. (defvar names--regexp nil (#$ . 2676)) #@145 The file where the current version of Names was loaded. This is used by `names--check-for-update' to check if a new version has been installed. (defvar names--load-file (byte-code "\205\301!\207" [load-file-name expand-file-name] 2) (#$ . 2753)) #@46 List of variables defined in this namespace. (defvar names--bound nil (#$ . 3009)) #@46 List of functions defined in this namespace. (defvar names--fbound nil (#$ . 3098)) #@43 List of macros defined in this namespace. (defvar names--macro nil (#$ . 3188)) #@128 Keywords that were passed to the current namespace. See `names--keyword-list' for a list and description of possible keywords. (defvar names--keywords nil (#$ . 3275)) #@125 Non-global vars that are let/lambda bound at the moment. These won't be namespaced, as local takes priority over namespace. (defvar names--local-vars nil (#$ . 3450)) #@138 Leading chars used to identify protected symbols. Don't customise this. Instead use the :protection keyword when defining the namespace. (defvar names--protection nil (#$ . 3624)) #@56 Either 1 or 2, depending on which runthrough we're in. (defvar names--current-run nil (#$ . 3810)) #@45 List of variables the user shouldn't touch. (defvar names--var-list '(names--name names--regexp names--bound names--version names--package names--group-parent names--macro names--current-run names--fbound names--keywords names--local-vars names--protection) (#$ . 3915)) #@61 Used in `make-autoload' to indicate we're making autoloads. (defvar names--inside-make-autoload nil (#$ . 4192)) #@158 Package, name to be used by the :group and :version keywords. Is derived from `load-file-name', unless the :package keyword is passed to `define-namespace'. (defvar names--package nil (#$ . 4312)) #@122 The name of the parent to be given to `defgroup'. Is only non-nil if the :group keyword is passed to `define-namespace'. (defvar names--group-parent nil (#$ . 4516)) #@80 The version number given by :version. Used to define a constant and a command. (defvar names--version nil (#$ . 4688)) #@493 Function-like macros, even if their debug-spec says otherwise. When expanding the namespace, these macros will be treated exactly like functions. This means that their contents will be namespaced like regular function arguments. To add macros to this list, pass the :functionlike-macros keyword to your namespace along with a list of macro names (as unquoted symbols). Example: (define-namespace foo- :functionlike-macros (-> ->> thread-first thread-last) ;; Rest of code ) (defvar names--functionlike-macros nil (#$ . 4814)) #@436 List of keywords used by `define-namespace'. Each element is a list containing (KEYWORD N DEFINITION DOCUMENTATION) where: - KEYWORD is the keyword's name, a symbol satifying `keywordp'. - N is the number of arguments it takes, an integer. - DEFINITION is a function (symbol or lambda) that takes N arguments and does whatever you need for implementing the keyword. - DOCUMENTATION is a string explaining the keyword's behaviour. (defconst names--keyword-list (byte-code "\300\301\302\303BBB\304\301\305\306BBB\307\301\310\311BBB\312\301\313\314BBB\315\301\316\317BBB\320BBBBB\207" [:group 1 #[257 "\2119\204\n\211<\203\211\211\207\301\302\"\207" [names--group-parent names--warn "Argument given to :group is not a symbol: %s"] 4 "\n\n(fn X)"] ("Indicate `define-namespace' should make a `defgroup' for you.\nThe name of the group is the package name (see :package keyword).\nThis keyword should be given one argument, the name of the PARENT\ngroup as an unquoted symbol.\n\nAlternatively, the argument can be a list, in which case it is a\nlist of arguments to be passed to `defgroup' (essentially, a full\ngroup definition without the leading `defgroup').\n\nIf this keyword is provided, besides including a defgroup, Names\nwill also include a :group keyword in every `defcustom' (and\nsimilar forms) that don't already contain one.") :version #[257 "\211;\203 \211\211\207\301\302\"\207" [names--version names--warn "Argument given to :version is not a string: %s"] 4 "\n\n(fn X)"] ("Indicate `define-namespace' should define the version number.\nThis keyword should be given one argument, a string describing\nthe package's version number.\n\nWith this, Names will generate a `defconst' and an interactive\n`defun', each named `PACKAGE-NAME-version'. The function messages\nand returns the version number. See the :package keyword.") :package #[257 "\2119\203 \211\211\207\301\302\"\207" [names--package names--warn "Argument given to :package is not a symbol: %s"] 4 "\n\n(fn X)"] ("Set the name of this package to the given symbol.\nThis keyword should be given one argument, a symbol corresponding\nto the name of this package.\n\nIf this keyword isn't used, the package name is taken as the the\nfile's basename, but only if its actually needed. This name is\nneeded by the :version and :group keywords.") :protection #[257 "\301!\302\303\304!\"\211\207" [names--protection symbol-name format "\\`%s" regexp-quote] 6 "\n\n(fn X)"] ("Change the value of the `names--protection' variable.") :functionlike-macros #[257 "\301\"\211\207" [names--functionlike-macros append] 4 "\n\n(fn X)"] ("A list of values to be appended to `names--functionlike-macros'.") ((:no-let-vars 0 nil "Indicates variables assigned in let-bind are NOT candidates for namespacing.") (:verbose 0 nil "Cause a message to be called on each special form.") (:global 0 nil "Accept namespaced names from outside current namespace definition.") (:assume-var-quote 0 nil "Indicate symbols quoted with `quote' should be considered variable names.") (:dont-assume-function-quote 0 nil "Indicate symbols quoted with `function' should NOT be considered function names.") (:clean-output 0 nil "Indicate only forms actually inside the namespace should be present in the output.\nThis is for internal use. It is used by `names-eval-defun' to\nprevent `define-namespace' from adding things like `defgroup' or\n`defconst's to the output."))] 8) (#$ . 5365)) #@33 Return namespace+SBL. (fn SBL) (defalias 'names--prepend '(macro . #[257 "\300\301\302\303FD\207" [intern format "%s%s" names--name] 6 (#$ . 8815)])) (put 'names--prepend 'edebug-form-spec '(symbolp)) #@105 If VAR is bound and is a list, take the car of its elements which satify PRED. (fn VAR &optional PRED) (defalias 'names--filter-if-bound '(macro . #[513 "\300\301\302DD\303\304\305\306\307\300\310\311\n\312BB\313BB\314BBEEEE\207" [when boundp quote remove nil mapcar lambda (x) funcall or (#'identity) ((or (car-safe x) x)) ((or (car-safe x) x))] 14 (#$ . 9025)])) (put 'names--filter-if-bound 'edebug-form-spec '(symbolp &optional function-form)) #@128 If car of BODY is a known keyword, `pop' it (and its arguments) from body. Returns a list (KEYWORD . ARGUMENTLIST). (fn BODY) (defalias 'names--next-keyword '(macro . #[257 "\300\301\302DD\303B\304\301\305\306\307\310\311\312\313 D\314BBE\315BBBBBBE\207" [let kar car-safe (out n) and (keywordp kar) (setq n (assoc kar names--keyword-list)) (setq n (cadr n)) dotimes (_ (1+ n) out) push pop (out) ((nreverse out))] 13 (#$ . 9485)])) (put 'names--next-keyword 'edebug-form-spec 'sexp) #@74 Whether `names--reload-if-upgraded' has already been called in this run. (defvar names--has-reloaded nil (#$ . 9978)) #@1518 Inside the namespace NAME, execute BODY. NAME can be any symbol (not quoted), but it's highly recommended to use some form of separator (such as :, /, or -). For a complete description of this macro, please visit the frontpage with \[names-view-manual]. In summary, this macro has two main effects: 1. Any definitions inside BODY will have NAME prepended to the symbol given. Ex: (define-namespace foo- (defvar bar 1 "docs") ) expands to (defvar foo-bar 1 "docs") 2. Any function calls and variable names get NAME prepended to them if such a variable or function exists. Ex: (define-namespace foo: (defun message (x y) nil) (message "%s" my-var) ) expands to (defun foo:message (x y) nil) (foo:message "%s" my-var) Note how `message' is expanded to `foo:message' in the second form, because that function exists. Meanwhile, `bar' is left untouched because `foo:bar' is not a known variable name. =============================== AUTOLOAD In order for `define-namespace' to work with ";;;###autoload" comments must replace all instances of ";;;###autoload" inside your `define-namespace' with `:autoload'. Afterwards, add an ";;;###autoload" comment just above your `define-namespace'. =============================== KEYWORDS Immediately after NAME you may add keywords which customize the behaviour of `define-namespace'. For a list of possible keywords and a description of their effects, see the variable `names--keyword-list'. (fn NAME [KEYWORD ...] BODY) (defalias 'define-namespace '(macro . #[385 "\211\204 \301\302 \210\303 \210\304\")\207" [names--has-reloaded t names--reload-if-upgraded names--error-if-using-vars names--define-namespace-implementation] 6 (#$ . 10104)])) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put define-namespace lisp-indent-function (lambda (&rest x) 0) put edebug-form-spec (&define name [&rest keywordp &optional [&or symbolp (symbolp . symbolp)]] body)] 5) #@89 Namespace BODY using NAME. See `define-namespace' for more information. (fn NAME BODY) (defalias 'names--define-namespace-implementation #[514 "\306\216\307\310\311!!P\312\313\314\315\304!\205\316\317\320\321\f\"\"\315\305!\205+\316\317\320\322 \"\"\"+\314\315\323!\205=\316\317\320\324\"\"\315\325!\205K\316\317\320\326\"\"\",\314\315\323!\205]\316\317\320\327\"\"\315\325!\205k\316\317\320\330\"\"\"-..\317\211/0\317\2111\317\21123\242\317\211\205\314\331!\205\314\3324\"\211\262\205\314\211A@\211\262\205\314\211T\312\211W\203\301\211\211A\262 \242B\262\210\211T\262\202\247\211\262\266\202\205\314\237\266\203\211\262\203\341\333!\210\211/B/\202\2025\203\356\334\335\"\210\202\363\334\336\"\210\nT\337\3403\205\341\342!?\205\343 C1\205\341\342!?\205\344 \320\3365\203#\345!\202%\"#B\262\315\346!\203[&\203[5\204[\3476\350\"\203[\315\323!\205J\334\351A\"\210\352\")\202\\. \262)\207" [names--name names--regexp names--current-run names--protection byte-compile-bound-variables byte-compile-variables #[0 "\301\302\"\207" [names--var-list mapc #[257 "\211\300L\207" [nil] 3 "\n\n(fn X)"]] 3] "\\`" regexp-quote symbol-name 0 "\\`::" names--remove-namespace-from-list boundp remove nil mapcar #[257 "\211\242\204 \211\205\211\242\206\211\207" #1=[] 2 "\n\n(fn X)"] #[257 "\211\242\204 \211\205\211\242\206\211\207" #1# 2 "\n\n(fn X)"] byte-compile-macro-environment #[257 "\300\242\206!\205\211\242\206\211\207" [names--compat-macrop] 3 "\n\n(fn X)"] byte-compile-function-environment #[257 "\300\242\206!\205\211\242\206\211\207" [names--compat-macrop] 3 "\n\n(fn X)"] #[257 "\300\242\206!\205\211\242\206\211\207" [#[257 "\300!?\207" [names--compat-macrop] 3 "\n\n(fn X)"]] 3 "\n\n(fn X)"] #[257 "\300\242\206!\205\211\242\206\211\207" [#[257 "\300!?\207" [names--compat-macrop] 3 "\n\n(fn X)"]] 3 "\n\n(fn X)"] keywordp assoc names--handle-keyword mapc #[257 "\3001 \301!0\207\210\302\207" [(error) names-convert-form nil] 3 "\n\n(fn FORM)"] names-convert-form progn append names--keyword :clean-output names--generate-defgroup names--generate-version names--extract-autoloads byte-compile-current-buffer version< "24.4" names--add-macro-to-environment macroexpand-all names--bound names--fbound names--macro names--functionlike-macros names--keywords names--local-vars names--version names--package names--group-parent names--keyword-list names--inside-make-autoload emacs-version] 12 (#$ . 12087)]) #@90 Verify if there's a more recent version of Names in the `load-path'. If so, evaluate it. (defalias 'names--reload-if-upgraded #[0 "\3021^\303\304!\210\305\306\307!!\310\205Z\230?\205Z\311!\205Z\312\313!r\211q\210\314\315\316\317\320!\321\"\322$\216\323!\210eb\210\212\324\325\310\326#\205E\327\330!)\262\205W\331 \"\205W\332\310\"*\262\266\2020\207\210\310\207" [names--load-file names-version (error) require find-func expand-file-name find-library-name "names" 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-literally search-forward-regexp "(defconst\\s-+names-version\\s-+\"\\([^\"]+\\)\"" t match-string-no-properties 1 version< eval-buffer] 9 (#$ . 14649)]) #@184 Do namespace conversion on FORM. FORM is any legal elisp form. Namespace name is defined by the global variable `names--name'. See macro `namespace' for more information. (fn FORM) (defalias 'names-convert-form #[257 "\211\204\207\211:\203h\211@\3029\203(\303!\211\262\203(\304\305\"\210\306A\"\202g:\203E\307!\204>\310V\203>\311\312\"\210\313\314\"\202g\315!\203b\304\316\"\210\317\320\321\322 #!A\323!#\202g\306A\"\207\2119\203\207\304\324\"\210\303!\206\210\325!\203\206\320\321\322 #!\207\207\211\207" [names--current-run names--name nil names--remove-protection names--message "Protected: %s" names--handle-args functionp 1 names--warn "Ran into the following strange form.\nEither it's an undefined macro, a macro with a bad debug declaration, or we have a bug.\n%s" mapcar names-convert-form names--fboundp "Namespaced: %s" names--args-of-function-or-macro intern format "%s%s" names--macrop "Symbol handling: %s" names--boundp] 9 (#$ . 15452)]) #@60 Call `browse-url' to view the manual of the Names package. (defalias 'names-view-manual #[0 "\300\301!\207" [browse-url "http://github.com/Malabarba/names"] 2 (#$ . 16451) nil]) #@175 Return the package name as a symbol. Decide package name based on several factors. In order: 1. The :package keyword, 2. The namespace NAME, removing the final char. (defalias 'names--package-name #[0 "\206\302 !\303\304\305O!\211\306\307\"\210\262\207" [names--package names--name symbol-name intern 0 -1 names--warn "No :package given. Guessing `%s'"] 5 (#$ . 16636)]) #@53 Return a `defgroup' form for the current namespace. (defalias 'names--generate-defgroup #[0 "<\203 \302B\207\302\303 \304\305\306\303 \"\307\310 !\311\312D\257\207" [names--group-parent names--name defgroup names--package-name nil format "Customization group for %s." :prefix symbol-name :group quote] 9 (#$ . 17028)]) #@131 Return a `defun' and a `defconst' forms declaring the package version. Also adds `version' to `names--fbound' and `names--bound'. (defalias 'names--generate-version #[0 "\302\303\304\"\210\302\305\304\"\210\306\307\310\311\304#! \310\312\313 \"F\314\307\310\311\304#!\315\310\312\313 \"\316\317\310\320\313 #D \257D\207" [names--name names--version add-to-list names--fbound version names--bound defconst intern format "%s%s" "Version of the %s package." names--package-name defun nil (interactive) message "%s version: %s"] 11 (#$ . 17359)]) #@82 If FORM declares a macro, add it to `byte-compile-macro-environment'. (fn FORM) (defalias 'names--add-macro-to-environment #[257 "\211\301\242!\203\3021\303\"0\202\210\304\262\202\211\205g\211\242\205g\211\242\305>\2033\306\307A\"\206g\211\242\310=\205g\3111G\312\3138!0\202I\210\304\301!\205e\3141\\\312A@!0\202^\210\304\243BB\211\262\207" [byte-compile-macro-environment names--compat-macrop (error) macroexpand nil (progn prog1 prog2) mapc names--add-macro-to-environment defalias (error) eval 2 (error)] 5 (#$ . 17912)]) (eval-after-load 'find-func #[0 "\300\301\302\303\304$\210\305\301\304\"\210\301\207" [ad-add-advice find-function-search-for-symbol (names-around-find-function-search-for-symbol-advice nil t (advice lambda (symbol type library) "Make sure `find-function-search-for-symbol' understands namespaces." ad-do-it (ignore-errors (unless (cdr ad-return-value) (with-current-buffer (car ad-return-value) (search-forward-regexp "^(define-namespace\\_>") (skip-chars-forward " \n[:blank:]") (let* ((names--regexp (concat "\\`" (regexp-quote (symbol-name (read (current-buffer)))))) (short-symbol (let ((name (symbol-name symbol))) (when (string-match names--regexp name) (intern (replace-match "" nil nil name)))))) (when short-symbol (ad-set-arg 0 short-symbol) ad-do-it))))))) around nil ad-activate] 5]) #@70 Return a list of the forms in BODY preceded by :autoload. (fn BODY) (defalias 'names--extract-autoloads #[257 "\300\301>\211\262\205\211A@\302AA!B\207" [nil :autoload names--extract-autoloads] 5 (#$ . 19271)]) (byte-code "\300\301\302\303\304$\210\305\301\304\"\207" [ad-add-advice make-autoload (names-before-make-autoload-advice nil t (advice lambda (form file &optional expansion) "Make sure `make-autoload' understands `define-namespace'.\nUse the `names--inside-make-autoload' variable to indicate to\n`define-namespace' that we're generating autoloads." (require 'names) (if (null (eq (car-safe form) 'define-namespace)) ad-do-it (setq names--inside-make-autoload t) (setq form (macroexpand form)) (setq names--inside-make-autoload nil) (if (version< emacs-version "24.3") (setq ad-return-value (cons 'progn (mapcar (lambda (x) (names--make-autoload-compat x file)) (cdr form)))) (ad-set-arg 2 'expansion) (ad-set-arg 0 form) ad-do-it)))) around nil ad-activate] 5) #@18 (fn FORM FILE) (defalias 'names--make-autoload-compat #[514 "\242\300=\203 \207\301\"\207" [defalias make-autoload] 5 (#$ . 20255)]) #@77 The name of functions/macros/special-forms which we return without reading. (defvar names--ignored-forms '(declare) (#$ . 20401)) #@88 Generic handling for the form (FUNC . ARGS), without namespacing FUNC. (fn FUNC ARGS) (defalias 'names--handle-args #[514 ">\203\nB\207\301\302\303\"!\304!\203#\305\306\"\210\211B!\202+\307\310!#\207" [names--ignored-forms intern-soft format "names--convert-%s" fboundp names--message "Special handling: %s" names--args-of-function-or-macro names--compat-macrop] 8 (#$ . 20537)]) #@69 If :verbose is on, pass F and REST to `message'. (fn F &rest REST) (defalias 'names--message #[385 "\300\301!\205 \302\303\304P#\207" [names--keyword :verbose apply message "[names] "] 6 (#$ . 20940)]) #@92 Pass F and REST to `message', unless byte-compiling or non-interactive. (fn F &rest REST) (defalias 'names--warn #[385 "\301\302!?\205\303\300!\205?\205\304\305\306P#\207" [byte-compile-function-environment names--keyword :verbose boundp apply message "[names] "] 6 (#$ . 21152)]) #@59 Remind the developer that variables are not customizable. (defalias 'names--error-if-using-vars #[0 "\301\302\"\207" [names--var-list mapcar #[257 "\300!\205 \301\302\303#\207" [eval error "[names] Global value of variable %s should be nil! %s" "Set it using keywords instead"] 5 "\n\n(fn X)"]] 3 (#$ . 21449)]) #@176 Return a concatenated un-namespaced version of LISTS. Symbols in LISTS that aren't namespaced are removed, symbols that are namespaced become un-namespaced. (fn &rest LISTS) (defalias 'names--remove-namespace-from-list #[128 "\300\301\302\303\304\305\"\"\"\207" [delq nil mapcar names--remove-namespace apply append] 8 (#$ . 21772)]) #@84 Return SYMBOL with namespace removed, or nil if it wasn't namespaced. (fn SYMBOL) (defalias 'names--remove-namespace #[257 "\301\"\207" [names--regexp names--remove-regexp] 4 (#$ . 22115)]) #@83 Remove the leading :: from SYMBOL if possible, otherwise return nil. (fn SYMBOL) (defalias 'names--remove-protection #[257 "\301\"\207" [names--protection names--remove-regexp] 4 (#$ . 22314)]) #@69 Return S with regexp R removed, or nil if S didn't match. (fn S R) (defalias 'names--remove-regexp #[514 "\300!\301\"\205\302\303\304\305\211$!\207" [symbol-name string-match intern replace-match "" nil] 9 (#$ . 22517)]) #@56 Is SBL a function which quotes its argument? (fn SBL) (defalias 'names--quote-p #[257 "\211\300>\207" ['function] 3 (#$ . 22751)]) #@46 Is namespace+SBL a fboundp symbol? (fn SBL) (defalias 'names--fboundp #[257 "\211>\206\211 >\206\303\304!\205\305\306\307\310\n#!!\207" [names--fbound names--macro names--name names--keyword :global fboundp intern format "%s%s"] 7 (#$ . 22889)]) #@46 Is namespace+SBL a fboundp symbol? (fn SBL) (defalias 'names--macrop #[257 "\211>\206\302\303!\205\304\305\306\307 #!!\207" [names--macro names--name names--keyword :global names--compat-macrop intern format "%s%s"] 7 (#$ . 23150)]) #@80 Was KEYWORD one of the keywords passed to the `namespace' macro? (fn KEYWORD) (defalias 'names--keyword #[257 "\301\"\207" [names--keywords assoc] 4 (#$ . 23396)]) #@120 Is namespace+SBL a boundp symbol? If SBL has a let binding, that takes precendence so this also returns nil. (fn SBL) (defalias 'names--boundp #[257 "\211>?\205\211 >\206\303\304!\205\305\306\307\310\n#!!\207" [names--local-vars names--bound names--name names--keyword :global boundp intern format "%s%s"] 7 (#$ . 23570)]) #@128 If non-nil, verbose message are printed regardless of the :verbose keyword. Use this to easily turn on verbosity during tests. (defvar names--verbose nil (#$ . 23909)) #@108 Namespace FUNCTION's arguments ARGS, with special treatment if MACRO is non-nil. (fn FUNCTION ARGS MACRO) (defalias 'names--args-of-function-or-macro #[771 "\211\2038\302!\303=\304\305#\210\211\306\232\204 >\203%\307\310#\2026\211\311\232\2031B\2026\312B!)\207\313\314\"B\207" [names--verbose names--functionlike-macros names--get-edebug-spec push names--message "Edebug-spec of `%s' is %s" t names--args-of-function-or-macro nil 0 names--macro-args-using-edebug mapcar names-convert-form] 8 (#$ . 24084)]) #@59 Get 'edebug-form-spec property of symbol NAME. (fn NAME) (defalias 'names--get-edebug-spec #[257 "\300\2119\203\301\302\303#\211\262\203\211\262\202\207" [nil names--function-get edebug-form-spec macro] 7 (#$ . 24619)]) #@57 Auxiliary var used in `names--macro-args-using-edebug'. (defvar names--is-inside-macro nil (#$ . 24857)) #@61 Counter used to uniquify symbols generated `names--gensym'. (defvar names--gensym-counter 0 (#$ . 24968)) #@447 Namespace the arguments of macro FORM by hacking into edebug. This takes advantage of the fact that macros (should) declare a `debug' specification which tells us which arguments are actually Elisp forms. Ideally, we would read this specification ourselves and see how it matches (cdr FORM), but that would take a lot of work and we'd be reimplementing something that edebug already does phenomenally. So we hack into edebug instead. (fn FORM) (defalias 'names--macro-args-using-edebug #[257 "\304\305!\210\304\306!\210\211\307K\310K\311K\312K\313K\314\211\315\316\317\320\321\322     %\323\"\324$\216\307\325M\210\310\326M\210\311\327M\210\312\330M\210\313\331M\210\3321\200\3331r\334\335!r\211q\210\316\317\336\321\322!\337\"\324$\216\340\341\"\210eb\210\342 *\26200\202\2220\343\344 \"\210\262\202\222\211\243\242\345\232\203\216\343\346 \"\210\262-\207" [names--is-inside-macro edebug-all-defs edebug-all-forms max-lisp-eval-depth require edebug cl-lib edebug-make-enter-wrapper edebug-form cl-gensym get-edebug-spec message t 3000 make-byte-code 0 "\305\300M\210\306\301M\210\307\302M\210\310\303M\210\311\304M\207" vconcat vector [edebug-make-enter-wrapper edebug-form cl-gensym get-edebug-spec message] 2 names--edebug-make-enter-wrapper names--edebug-form names--gensym names--get-edebug-spec names--edebug-message (error) (invalid-read-syntax) generate-new-buffer " *temp*" "\301\300!\205 \302\300!\207" [buffer-name kill-buffer] pp insert edebug-read-top-level-form names--warn "Couldn't namespace this macro using its (debug ...) declaration: %s" "Lisp nesting exceeds `max-lisp-eval-depth'" "Lisp nesting exceeded `max-lisp-eval-depth' at the following form: %s"] 18 (#$ . 25081)]) #@63 Where names stores `message's definition while overriding it. (defvar names--message-backup (byte-code "\300\301N\203\n\302\300!\207\300K\207" [message ad-advice-info ad-get-orig-definition] 2) (#$ . 26811)) #@19 (fn &rest ARGS) (defalias 'names--edebug-message #[128 "\302\303!\204\n\203\304 \"\207\211\205\304\305\"\207" [names--verbose names--message-backup names--keyword :verbose apply format] 4 (#$ . 27026)]) #@14 (fn FORMS) (defalias 'names--edebug-make-enter-wrapper #[257 "\206 \206 \302\303!\304B\207" [edebug-def-name edebug-old-def-name names--gensym "edebug-anon" progn] 3 (#$ . 27245)]) #@135 Generate a new uninterned symbol. The name is made by appending a number to PREFIX and preppending "names", default "G". (fn PREFIX) (defalias 'names--gensym #[257 "\211T\301\302\303;\203\202\304#!\207" [names--gensym-counter make-symbol format "names-%s%d" "G"] 7 (#$ . 27441)]) #@86 Parse form given by CURSOR using edebug, and namespace it if necessary. (fn CURSOR) (defalias 'names--edebug-form #[257 "\301\302!\210\303\304\"\211A@\262\305=\204\232\203\306\202\307\211\307=\203)\305\202*\310\311\"\210\310\312\"\210:\203}\211\307=\203F\307!\202\211@\2119\205P\313!\314\":\203u@\315=\203u\316@\317\n!\320!AB$\202x\321!\266\203\202\2119\203\210\211!\202\211\322!\210)\207" [names--is-inside-macro require edebug edebug-top-element-required "Expected form" t identity names-convert-form names--message " [Edebug] Ran into this: %S" " Cursor: %S" get-edebug-spec edebug-new-cursor &define edebug-defining-form edebug-after-offset symbol-name edebug-list-form edebug-move-cursor] 13 (#$ . 27737)]) #@161 Append (:group `names--package') to FORM. Only if the :group keyword was passed to `define-namespace' and if the form doesn't already have a :group. (fn FORM) (defalias 'names--maybe-append-group #[257 "\203\n\301>\203 \207\302\301\303\304 DD\"\207" [names--group-parent :group append quote names--package-name] 6 (#$ . 28515)]) #@371 Call the function that handles the keyword at the car of BODY. Such function must be listed in `names--keyword-list'. If it is nil, this function just returns. Regardless of whether a function was called, the keyword is added to the variable `names--keywords'. The car of BODY is the keyword itself and the other elements are the keyword arguments, if any. (fn BODY) (defalias 'names--handle-keyword #[257 "\301\302@\"8\303!\205\304A\"\207" [names--keyword-list 2 assoc functionp apply] 5 (#$ . 28857)]) #@51 Special treatment for `defmacro' FORM. (fn FORM) (defalias 'names--convert-defmacro #[257 "\211A@\301\302\303#!\304\305\306\"\210\305\307\"\210\3101C\3118\242\312=\203(\3118\202?\3118;\203>\3138\242\312=\203>\3138\202?\3040\202E\210\304\211\262\203^\314\315A\"\243@\262\211\203^\316\317#\210@\320AAB!B\207" [names--name intern format "%s%s" nil add-to-list names--macro names--fbound (error) 3 declare 4 assoc debug put edebug-form-spec names--convert-lambda] 8 (#$ . 29377)]) (defalias 'names--convert-defmacro* 'names--convert-defmacro) #@54 Special treatment for `defvaralias' FORM. (fn FORM) (defalias 'names--convert-defvaralias #[257 "\211@\300\301A\"B\302\303\3041\305A@!0\202\210\302!\262\211\203%\306\307\"\210\207" [mapcar names-convert-form nil names--remove-namespace (error) eval add-to-list names--bound] 6 (#$ . 29950)]) #@51 Special treatment for `defalias' FORM. (fn FORM) (defalias 'names--convert-defalias #[257 "\211@\300\301A\"B\302\303\3041\305A@!0\202\210\302!\262\211\203%\306\307\"\210\207" [mapcar names-convert-form nil names--remove-namespace (error) eval add-to-list names--fbound] 6 (#$ . 30259)]) #@134 Special treatment for `defvar' FORM. If DONT-ADD is nil, the FORM's `cadr' is added to `names--bound'. (fn FORM &optional DONT-ADD) (defalias 'names--convert-defvar #[513 "A@\204\f\301\302\"\210\303@\304\305\306#!D\307\310AA\"\"\207" [names--name add-to-list names--bound append intern format "%s%s" mapcar names-convert-form] 10 (#$ . 30564)]) (defalias 'names--convert-defconst 'names--convert-defvar "Special treatment for `defconst' FORM.") #@52 Special treatment for `defcustom' FORM. (fn FORM) (defalias 'names--convert-defcustom #[257 "\300\301!!\207" [names--maybe-append-group names--convert-defvar] 4 (#$ . 31026)]) #@66 Special treatment for `custom-declare-variable' FORM. (fn FORM) (defalias 'names--convert-custom-declare-variable #[257 "\301A@!AA@\302\303\"\210\304@\305\306\307\310#!D\311\242!\203-@\312A@!D\2020\312!\312AAA@!F\313\312AAAA\"\"\207" [names--name eval add-to-list names--bound append quote intern format "%s%s" names--quote-p names-convert-form mapcar] 11 (#$ . 31210)]) #@143 Special treatment for `defface' FORM. Identical to defvar, just doesn't add the symbol to the boundp list. And maybe use a :group. (fn FORM) (defalias 'names--convert-defface #[257 "\300\301\302\"!\207" [names--maybe-append-group names--convert-defvar :dont-add] 5 (#$ . 31606)]) #@62 Special treatment for `define-derived-mode' FORM. (fn FORM) (defalias 'names--convert-define-derived-mode #[257 "\211A@\301\302\"\210\301\303\"\210\301\303\304\305\306\"!\"\210\301\303\304\305\307\"!\"\210\310\311@\304\305\312#!\3138\314\3158!\314\316 8!\257!\317\314AAAAA\"\"\207" [names--name add-to-list names--fbound names--bound intern format "%s-map" "%s-hook" append names--maybe-append-group "%s%s" 2 names-convert-form 3 4 mapcar] 11 (#$ . 31894)]) #@60 Special treatment for `define-minor-mode' FORM. (fn FORM) (defalias 'names--convert-define-minor-mode #[257 "\211A@\3018\302\303\"\210\302\304\"\210\302\304\305\306\307\"!\"\210\211\203$\2119\2042\302\304\305\306\310\"!\"\210\202@\311!\211\262\203@\302\304\"\210\312\313@\305\306\314#!\3158\316\317 8!\316\320\n8!\316\301 8!\316\321\f8!\257!\322\316AA\"\"\207" [names--name 5 add-to-list names--fbound names--bound intern format "%s-hook" "%s-map" names--remove-namespace append names--maybe-append-group "%s%s" 2 names-convert-form 3 4 6 mapcar] 14 (#$ . 32374)]) #@500 Special treatment for `define-globalized-minor-mode' FORM. The NAME of the global mode will NOT be namespaced, despite being a definition. It is kept verbatim. This is because people tend to name their global modes as `global-foo-mode', and namespacing would make this impossible. The MODE and TURN-ON arguments are converted as function names. Everything else is converted as regular forms (which usually means no conversion will happen since it's usually keywords and quoted symbols). (fn FORM) (defalias 'names--convert-define-globalized-minor-mode #[257 "\300A@!\301!\203!\302\303\"\210\302\304\"\210\302\304\305\306\307\"!\"\210\310\311\211A\262\242\211A\262\242\312\211A\262\242!\312\211A\262\242!F\313\314\"\"!\207" [names--remove-namespace cl-copy-list add-to-list names--fbound names--bound intern format "%s-hook" names--maybe-append-group append names--handle-symbol-as-function mapcar names-convert-form] 11 (#$ . 32974)]) (byte-code "\300\301\302\"\210\300\303\302\"\207" [defalias names--convert-define-global-minor-mode names--convert-define-globalized-minor-mode names--convert-easy-mmode-define-global-mode] 3) #@333 Special treatment for `quote' FORM. When FORM is (quote argument), argument too arbitrary to be logically namespaced and is never parsed for namespacing (but see :assume-var-quote in `names--keyword-list'). When FORM is (function form), a symbol is namespaced as a function name, a list is namespaced as a lambda form. (fn FORM) (defalias 'names--convert-quote #[257 "\211A@@\211\301=\203<\203\211\302!D\202_9\203^\211\301=\2031\303\304!\2041\301\305!D\202_\211\306=\203Z\303\307!\203Z\306\310!\206V\311!\203U\312\313\314#!\202VD\202_\202_\207" [names--name function names-convert-form names--keyword :dont-assume-function-quote names--handle-symbol-as-function quote :assume-var-quote names--remove-protection names--boundp intern format "%s%s"] 9 (#$ . 34129)]) #@48 Namespace symbol S as a function name. (fn S) (defalias 'names--handle-symbol-as-function #[257 "\301!\206\302!\203\303\304\305#!\207\211\207" [names--name names--remove-protection names--fboundp intern format "%s%s"] 6 (#$ . 34931)]) (defalias 'names--convert-function 'names--convert-quote) #@98 Special treatment for `macro' form. Return (macro . (names-convert-form (cdr FORM))). (fn FORM) (defalias 'names--convert-macro #[257 "\300\301A!B\207" [macro names-convert-form] 4 (#$ . 35239)]) #@49 Special treatment for `lambda' FORM. (fn FORM) (defalias 'names--convert-lambda #[257 "\301\302A@!\"AA\301@A@D@;\205!@CA\262@\242\303=\2058@@\304@A@!DCA\262\305\304\"$)\207" [names--local-vars append names--vars-from-arglist interactive names-convert-form mapcar] 10 (#$ . 35443)]) #@50 Special treatment for `clojure' FORM. (fn FORM) (defalias 'names--convert-clojure #[257 "\301\302!\210\303\304A@!\"\211@\305A!)B\207" [names--local-vars names--warn "Found a `closure'! You should use `lambda's instead" append names--vars-from-arglist names--convert-lambda] 4 (#$ . 35752)]) #@75 Get a list of local variables from a generalized arglist ARGS. (fn ARGS) (defalias 'names--vars-from-arglist #[257 "\300\301\302\303\"\"\207" [remove nil mapcar #[257 "\211\242\243\206\f\211\242\206\f\211\2119\205#\300\301\302!\"?\205#\211\303=?\205#\211\207" [string-match "^&" symbol-name t] 6 "\n\n(fn X)"]] 6 (#$ . 36054)]) #@48 Special treatment for `defun' FORM. (fn FORM) (defalias 'names--convert-defun #[257 "\211A@\301\302\"\210@\303\304\305\306#!AAB!B\207" [names--name add-to-list names--fbound names--convert-lambda intern format "%s%s"] 9 (#$ . 36396)]) (byte-code "\300\301\302\"\210\300\303\302\"\210\300\304\302\"\207" [defalias names--convert-defun* names--convert-defun names--convert-defsubst names--convert-defsubst*] 3) #@129 Try to convert SYM unless :no-let-vars is in use. If ADD is non-nil, add resulting symbol to `names--local-vars'. (fn SYM ADD) (defalias 'names--let-var-convert-then-add #[514 "\300\301!\204\f\302!\202 \203\303\304\"\210\211\207" [names--keyword :no-let-vars names-convert-form add-to-list names--local-vars] 6 (#$ . 36819)]) #@100 Special treatment for `let' FORM. If STAR is non-nil, parse as a `let*'. (fn FORM &optional STAR) (defalias 'names--convert-let #[513 "\301\302\303\304\305\306!\307\"\310\311%A@\"\204 \312\301\313\"\"\312@D\301\314AA\"\")\207" [names--local-vars mapcar make-byte-code 257 "\211\242\203\301@\300\"\302A@!D\207\301\300\"\207" vconcat vector [names--let-var-convert-then-add names-convert-form] 4 "\n\n(fn X)" append #[257 "\211\242\206\211\207" [] 2 "\n\n(fn X)"] names-convert-form] 9 (#$ . 37161)]) #@46 Special treatment for `let' FORM. (fn FORM) (defalias 'names--convert-let* #[257 "\300\301\"\207" [names--convert-let t] 4 (#$ . 37688)]) #@47 Special treatment for `cond' FORM. (fn FORM) (defalias 'names--convert-cond #[257 "\211@\300\301A\"B\207" [mapcar #[257 "\300\301\"\207" [mapcar names-convert-form] 4 "\n\n(fn X)"]] 5 (#$ . 37834)]) #@57 Special treatment for `condition-case' FORM. (fn FORM) (defalias 'names--convert-condition-case #[257 "\300@A@\301AA@!E\302\303AAA\"\"\207" [append names-convert-form mapcar #[257 "\211@\300\301A\"B\207" [mapcar names-convert-form] 5 "\n\n(fn X)"]] 6 (#$ . 38042)]) (provide 'names)