Questions tagged [defun]

The tag has no usage guidance.

4 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
127 views

Optional docstring in defun

After taking a look at the definition of defun in byte-run.el, it seems that the macro does some very interesting things regarding checking for the existence of a docstring. First, it uses a declare ...
1
vote
0answers
27 views

How to define interactive function that will not auto-complete?

If I do this: (defun foo-bar-baz () (interactive) (message "foo-bar-baz")) And then M-x foo-baz RET (note no "bar") then completion matches foo-bar-baz and it executes. Is ...
1
vote
0answers
56 views

Defining a function that takes keyword arguments and a variable number of positional ones

I want to define a function that takes both keyword arguments (as in &key) and a variable number of positional ones (&rest). They should be independent of each other, the keyword list should ...
1
vote
0answers
200 views

Sublime Text like Ctrl-Delete/Backspace

Is there any easy way (or maybe a package) which provides Ctrl-Del/Backspace behavior like in Sublime? The default rule of sublime is delete-to-next-word-boundary. I did not find similar options. ...