Variable: nroff-font-lock-keywords

nroff-font-lock-keywords is a customizable variable defined in nroff-mode.el.gz.

Value

("^[.']\\s-*\\sw+" "\\\\\\([f*n]*\\[.+?]\\|(..\\|[^(\"#]\\)")

Documentation

Font-lock highlighting control in nroff-mode.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/nroff-mode.el.gz
(defcustom nroff-font-lock-keywords
  (list
   ;; Directives are . or ' at start of line, followed by
   ;; optional whitespace, then command (which my be longer than
   ;; 2 characters in groff).  Perhaps the arguments should be
   ;; fontified as well.
   "^[.']\\s-*\\sw+"
   ;; There are numerous groff escapes; the following get things
   ;; like \-, \(em (standard troff) and \f[bar] (groff
   ;; variants).  This won't currently do groff's \A'foo' and
   ;; the like properly.  One might expect it to highlight an escape's
   ;; arguments in common cases, like \f.
   (concat "\\\\"		      ; backslash
	 "\\("			      ; followed by various possibilities
         (mapconcat #'identity
		    '("[f*n]*\\[.+?]" ; some groff extensions
		      "(.."	      ; two chars after (
		      "[^(\"#]"	      ; single char escape
		      ) "\\|")
	 "\\)")
   )
  "Font-lock highlighting control in `nroff-mode'."
  :type '(repeat regexp))