8000 Questions About Using With Evil Macros · Issue #24 · Malabarba/names · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Questions About Using With Evil Macros #24

New issue 8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
noctuid opened this issue Oct 10, 2015 · 2 comments
Open

Questions About Using With Evil Macros #24

noctuid opened this issue Oct 10, 2015 · 2 comments

Comments

@noctuid
Copy link
noctuid commented Oct 10, 2015

First off, thank you for the great package.

I want to use this for my packages that create evil text objects, and I noticed that I still have to type the namespace prefix when using evil-define-text-object. I'm guessing this is because the macro's debug section does not have what Names is looking for:

(debug (&define name lambda-list
                           [&optional stringp]
                           [&rest keywordp sexp]
                           def-body))

Is there another way to get names to correctly handle this or does the debug section in the macro have to be changed?

Also, when not using Names, magic autoload comments don't recognize evil-define-text-object, so the full autoload has to be specified (e.g. ;;;###autoload (autoload 'name ...). Can this be done with :autoload?

@Malabarba
Copy link
Owner

Hey there. At first sight I don't see anything wrong with that debug spec. But I haven't had my morning coffee yet, so I might be missing something silly.
Could you give a concrete example where you need to write the full namespaces? Then I can try to investigate why it doesn't work for you.

As for the autoloads, I can't say I understand you. :) (But maybe I'm just half-asleep still). Inside a define-namespace, the :autoload keywords should work just like the ;;;###autload cookies. Could you give an example of your situation?

@noctuid
Copy link
Author
noctuid commented Oct 10, 2015

As an example, if the namespace is evil-textobj-anyblock-, I still have to type it out after evil-define-text-object:

(evil-define-text-object evil-textobj-anyblock-inner-block (..args...)
...)

This will not be touched and will end up defined just as inner-block using Names:

(evil-define-text-object inner-block (..args...)
...)

If you need to see more, this is the package I'm using Names with.

As for the autoloads, can they be followed by a sexp corresponding to the full autoload that needs to be generated? I'm just checking to make sure that :autoload works how I would expect it to when something like a defun does not follow it.

This is what I would have without Names:

;;;###autoload (autoload 'evil-textobj-anyblock-inner-block "evil-textobj-anyblock" nil t)

This is what I would want to have with Names:

:autoload (autoload 'evil-textobj-anyblock-inner-block "evil-textobj-anyblock" nil t)

The sexp after :autoload would be put into the autoload file as it is.

noctuid added a commit to noctuid/evil-textobj-column that referenced this issue Dec 23, 2015
- Allow creation of text objects with non-word-related motions
- Get rid of cl-lib dependency
- Add missing evil dependency
- Improve documentation
- Add autoload cookies
- Move text object definitions out of names namespace at least for now
  (Malabarba/names#24)
- Fix edge case where the forward-end motion jumps past the current line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0