Function: reftex-index-new-phrase
reftex-index-new-phrase is an interactive and byte-compiled function
defined in reftex-index.el.gz.
Signature
(reftex-index-new-phrase &optional TEXT)
Documentation
Open a new line in the phrases buffer, insert TEXT.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/textmodes/reftex-index.el.gz
(defun reftex-index-new-phrase (&optional text)
"Open a new line in the phrases buffer, insert TEXT."
(interactive)
(if (and text (stringp text))
(progn
;; Check if the phrase is already in the buffer
(setq text (reftex-index-simplify-phrase text))
(goto-char (point-min))
(if (re-search-forward
(concat "^\\(\\S-*\\)\t\\(" (regexp-quote text)
"\\) *[\t\n]") nil t)
(progn
(goto-char (match-end 2))
(error "Phrase is already in phrases buffer")))))
;; Add the new phrase line after the last in the buffer
(goto-char (point-max))
(if (re-search-backward reftex-index-phrases-phrase-regexp12 nil t)
(end-of-line))
(if (not (bolp))
(insert "\n"))
(insert "\t")
(if (and text (stringp text))
(insert text)))