Function: hywiki-add-command

hywiki-add-command is an interactive and byte-compiled function defined in hywiki.el.

Signature

(hywiki-add-command WIKIWORD)

Documentation

Set a custom command symbol for WIKIWORD and return it.

Command is the symbol used in the definition expression, which may be an Emacs command or a Hyperbole action type. When invoked, it receives the single argument of WIKIWORD.

If WIKIWORD is invalid, trigger a user-error if called interactively or return nil if not.

After successfully adding the actype, run hywiki-add-referent-hook.

Use hywiki-get-referent to determine whether WIKIWORD exists prior to calling this function.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-add-command (wikiword)
  "Set a custom command symbol for WIKIWORD and return it.
Command is the symbol used in the definition expression, which
may be an Emacs command or a Hyperbole action type.  When invoked,
it receives the single argument of WIKIWORD.

If WIKIWORD is invalid, trigger a `user-error' if called interactively
or return nil if not.

After successfully adding the actype, run `hywiki-add-referent-hook'.

Use `hywiki-get-referent' to determine whether WIKIWORD exists prior to
calling this function."
  (interactive (list (or (hywiki-word-at)
			 (hywiki-word-read-new "Add/Edit HyWikiWord: "))))
  (let ((command (hui:actype nil (format "Command for %s: " wikiword))))
    (hywiki-add-referent wikiword (cons 'command command))))