Function: hywiki-add-info-index

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

Signature

(hywiki-add-info-index WIKIWORD)

Documentation

Make WIKIWORD display an Info manual index item and return it.

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

After successfully adding the Info index item, 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-info-index (wikiword)
  "Make WIKIWORD display an Info manual index item and return it.

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

After successfully adding the Info index item, 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 ((item (save-window-excursion
		(info)
		(Info-read-index-item-name "Info index item: "))))
    (when (stringp item)
      (unless (= (aref item 0) ?\()
	(setq item (format "(%s)%s" (Info-current-filename-sans-extension) item)))
      (hywiki-add-referent wikiword (cons 'info-index item)))))