Function: emacs-news-cycle-tag

emacs-news-cycle-tag is an interactive and byte-compiled function defined in emacs-news-mode.el.gz.

Signature

(emacs-news-cycle-tag)

Documentation

Cycle documentation tag of current headline in the Emacs NEWS file.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/emacs-news-mode.el.gz
(defun emacs-news-cycle-tag ()
  "Cycle documentation tag of current headline in the Emacs NEWS file."
  (interactive nil emacs-news-mode)
  (save-excursion
    (goto-char (line-beginning-position))
    (cond ((or (looking-at (rx bol (or "---" "+++") eol)))
           (forward-line 2))
          ((or (looking-at (rx bol "**"
                               (zero-or-more "*")
                               " ")))
           (forward-line 1)))
    (outline-previous-visible-heading 1)
    (forward-line -1)
    (cond ((not (looking-at (rx bol (or "---" "+++") eol)))
           (insert "\n---"))
          ((looking-at (rx bol "---" eol))
           (delete-char 3)
           (insert "+++"))
          ((looking-at (rx bol "+++" eol))
           (delete-char 4))
          (t (user-error "Invalid headline tag; can't cycle")))))