(defun texinfo-index-word () "include word under cursor into cindex at the beginning of the paragraph" (interactive) (save-excursion (backward-word 1) (setq m1 (point-marker)) (forward-word 1) (setq w (buffer-substring m1 (point-marker))) (backward-paragraph) (insert (concat "@cindex " w)) (newline))) (defun texinfo-index-region () "include region into cindex at the beginning of the paragraph" (interactive) (save-excursion (setq w (buffer-substring (region-beginning) (region-end))) (backward-paragraph) (insert (concat "@cindex " w)) (newline)))