Function: hywiki-add-glossary-entry

hywiki-add-glossary-entry is a byte-compiled function defined in hywiki.el.

Signature

(hywiki-add-glossary-entry TERM)

Documentation

Add/edit TERM as a HyWiki glossary entry with a definition.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260822.1645/hywiki.el
(defun hywiki-add-glossary-entry (term)
  "Add/edit TERM as a HyWiki glossary entry with a definition."
  (let ((glossary (hywiki-get-glossary-file))
        (hyrolo-date-format "")) ;; don't add a date
    (if (= 1 (hyrolo-grep (hywiki-get-term-variant-regexp term)
                          1 glossary nil t t))
        ;; Edit the existing entry; ensures use the exact term variant
        ;; matched
        (progn (hyrolo-set-buffer hyrolo-display-buffer)
               (goto-char (point-min))
               ;; Skip past file header
               (hyrolo-to-next-entry)
               (hyrolo-edit-entry))
      ;; add a new definition entry using the original term, not any
      ;; wikiword transformed version
      (hyrolo-add term glossary)))
  ;; Connect wikiword version of term to the glossary definition
  (hywiki-add-referent (hywiki-string-to-wikiword term)
                       (cons 'glossary-entry term)))