Function: hi-lock-write-interactive-patterns
hi-lock-write-interactive-patterns is an autoloaded, interactive and
byte-compiled function defined in hi-lock.el.gz.
Signature
(hi-lock-write-interactive-patterns)
Documentation
Write interactively added patterns, if any, into buffer at point.
Interactively added patterns are those normally specified using
highlight-regexp and highlight-lines-matching-regexp; they can
be found in variable hi-lock-interactive-patterns.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/hi-lock.el.gz
;;;###autoload
(defun hi-lock-write-interactive-patterns ()
"Write interactively added patterns, if any, into buffer at point.
Interactively added patterns are those normally specified using
`highlight-regexp' and `highlight-lines-matching-regexp'; they can
be found in variable `hi-lock-interactive-patterns'."
(interactive)
(if (null hi-lock-interactive-patterns)
(user-error "There are no interactive patterns"))
(let ((beg (point)))
(mapc
(lambda (pattern)
(insert (format "%s: (%s)\n"
hi-lock-file-patterns-prefix
(prin1-to-string pattern))))
hi-lock-interactive-patterns)
(comment-region beg (point)))
(when (> (point) hi-lock-file-patterns-range)
(warn "Inserted keywords not close enough to top of file")))