Function: hywiki-word-is-p

hywiki-word-is-p is a byte-compiled function defined in hywiki.el.

Signature

(hywiki-word-is-p WORD)

Documentation

Return non-nil if WORD is a HyWikiWord and optional #section:Lnum:Cnum.

WORD may not yet have a referent (non-existent). Use hywiki-get-referent to determine whether a HyWikiWord referent exists.

Return nil if WORD is a prefixed, typed hy:HyWikiWord, since these are handled by the Org mode link handler.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hywiki.el
(defun hywiki-word-is-p (word)
  "Return non-nil if WORD is a HyWikiWord and optional #section:Lnum:Cnum.
WORD may not yet have a referent (non-existent).  Use `hywiki-get-referent'
to determine whether a HyWikiWord referent exists.

Return nil if WORD is a prefixed, typed hy:HyWikiWord, since
these are handled by the Org mode link handler."
  (and (stringp word) (not (string-empty-p word))
       (let (case-fold-search)
	 (and (or (string-match hywiki-word-with-optional-suffix-exact-regexp word)
		  ;; For now this next version allows spaces and tabs in
		  ;; the suffix part
		  (eq 0 (string-match
			 hywiki-word-with-optional-suffix-exact-regexp
			 word)))
	      ;; If has a #section, ensure there are no invalid chars
	      (if (string-match-p "#" word)
		  (string-match "#[^][#()<>{}\"\n\r\f]+\\'" word)
		t)))))