It turns the symbol into a keyword. See chapter 12.2 Variables that Never Change in the Emacs Lisp manual.
Keywords are frequently used to identify named arguments to Lisp functions and macros. When the implementation of define-minor-mode needs to know whether the mode should be global or not, it walks down the list of arguments looking for :global, then ...
cl-defun handles this usecase:
(cl-defun test (&key foo bar)
(list foo bar))
(test :foo 1 :bar 2) ; (1 2)
(test :foo 1 :bar 2 :baz 3) ; Error: "Keyword argument :baz not one of (:foo :bar)"
In case you want the opposite behavior, pass &allow-other-keys after the key list.
The doc says:
The second possibility is to use TODO keywords to indicate different
types of action items. For example, you might want to indicate that
items are for “work” or “home”. Or, when you work with several people
on a single project, you might want to assign action items directly to
persons, by using their names as TODO keywords. This type of
You can use a source block with a self-defined major mode.
It is easy to define a customized major mode with helper functions like define-derived-mode.
Let us name your new major mode myorg-mode. Then the name of the function executed on C-c C-c is org-babel-execute:myorg.
It is called with two arguments. The first arg is the content of the source block as a ...