; Mocklisp - example macro for Gosling Emacs
; Count occurrences of a string in the current buffer
(defun count-string-occurrences (str)
    (setq count 0)
    (beginning-of-file)
    (while (search-forward str)
        (setq count (+ count 1)))
    (message (concat "Found " (itoa count) " occurrences")))
