Function: git-rebase-mode-font-lock-keywords

git-rebase-mode-font-lock-keywords is a byte-compiled function defined in git-rebase.el.

Signature

(git-rebase-mode-font-lock-keywords)

Documentation

Font lock keywords for Git-Rebase mode.

Source Code

;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/git-rebase.el
(defun git-rebase-mode-font-lock-keywords ()
  "Font lock keywords for Git-Rebase mode."
  `((,(concat "^" (cdr (assq 'commit git-rebase-line-regexps)))
     (1 'git-rebase-action)
     (3 'git-rebase-hash)
     (4 'font-lock-comment-face nil t)
     (5 'git-rebase-description nil t))
    (,(concat "^" (cdr (assq 'exec git-rebase-line-regexps)))
     (1 'git-rebase-action)
     (3 'git-rebase-description))
    (,(concat "^" (cdr (assq 'bare git-rebase-line-regexps)))
     (1 'git-rebase-action))
    (,(concat "^" (cdr (assq 'label git-rebase-line-regexps)))
     (1 'git-rebase-action)
     (3 'git-rebase-label)
     (4 'font-lock-comment-face nil t)
     (5 'git-rebase-description nil t))
    (,(concat "^" (cdr (assq 'merge git-rebase-line-regexps)))
     (1  'git-rebase-action)
     (21 'git-rebase-action nil t)
     (22 'git-rebase-hash t t)
     (3  'magit-branch-local)
     (4  'font-lock-comment-face nil t)
     (5  'git-rebase-description nil t))
    (,(format "^%s Branch \\(.*\\)" comment-start)
     (1 'magit-branch-local t))
    ("^drop \\(.+\\)"
     (1 'git-rebase-killed-action t))
    (,(concat git-rebase-comment-re " *"
              (cdr (assq 'commit git-rebase-line-regexps)))
     (0 'git-rebase-killed-action t))
    (git-rebase-match-comment-line
     (0 'font-lock-comment-face))
    ("\\[[^[]*\\]"
     (0 'magit-keyword t))
    ("\\(?:fixup!\\|squash!\\|amend!\\)"
     (0 'magit-keyword-squash t))
    (,(format "^%s Rebase \\([^ ]*\\) onto \\([^ ]*\\)" comment-start)
     (1 'git-rebase-comment-hash t)
     (2 'git-rebase-comment-hash t))
    (,(format "^%s \\(Commands:\\)" comment-start)
     (1 'git-rebase-comment-heading t))))