Timeline for "Suffixed" version of a function without define it
Current License: CC BY-SA 4.0
12 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 20 at 7:07 | vote | accept | Gabriele | ||
Feb 20 at 4:09 | comment | added | phils | Sure; I've done that now. | |
Feb 20 at 4:08 | history | edited | phils | CC BY-SA 4.0 |
added 629 characters in body
|
Feb 18 at 17:43 | comment | added | Gabriele | Please add your last comment to your answer and I'll accept it. Thank you. | |
Feb 18 at 13:40 | comment | added | phils | I'd recommend simply using derivative commands in the menu, and not trying to obfuscate anything. If you have a list of commands to create derivatives of, and the same macro is applicable in each case, then simply loop over the list, generating a derivative for each one via your macro. | |
Feb 18 at 13:32 | comment | added | Gabriele |
Since my aim is to simplify code writing, I'll focus on finding a way to simplify "wrapping" functions in my macro when called through a menu built with easy-menu-define . Lamda function work but I'm searching for something "easier".
|
|
Feb 18 at 10:46 | comment | added | phils | Or you could define a function which can generate and call its own replacement function definition, and define your 'stub' functions in terms of that. Whatever you do, though, you do need to define something for each function -- if nothing has been defined for a given function name, calling that name is simply an error. | |
Feb 18 at 10:41 | comment | added | Gabriele | Ok, thanks. Your answer has nonetheless taught me something very useful. | |
Feb 18 at 10:36 | comment | added | phils |
There's no such thing, but you can simply use the autoload mechanism. See C-h i g (elisp)Autoload . The real function will be defined by loading the library specified by the autoload stub.
|
|
Feb 18 at 10:11 | comment | added | Gabriele | I mean when the "compiler" finds an undefined symbol with a given suffix it defines the function wrapping the basename function with the given macro. | |
Feb 18 at 10:09 | comment | added | Gabriele |
I'm sorry for the confusion. I mean I want to use the starred version of my mwe-function-1 but don't want to define it. I'm searching for a method to wrap SOME of my function with my macro when called from the menu. I though that a system to "autodefine" these functions could be a solution but I don't know if it is possible.
|
|
Feb 18 at 9:39 | history | answered | phils | CC BY-SA 4.0 |