Function: compilation-directory-properties
compilation-directory-properties is a byte-compiled function defined
in compile.el.gz.
Signature
(compilation-directory-properties IDX LEAVE)
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/compile.el.gz
;; Internal function for calculating the text properties of a directory
;; change message. The compilation-directory property is important, because it
;; is the stack of nested enter-messages. Relative filenames on the following
;; lines are relative to the top of the stack.
(defun compilation-directory-properties (idx leave)
(if leave (setq leave (match-end leave)))
;; find previous stack, and push onto it, or if `leave' pop it
(let ((dir (compilation--previous-directory (match-beginning 0))))
(setq dir (if dir (or (get-text-property (1- dir) 'compilation-directory)
(get-text-property dir 'compilation-directory))))
`(font-lock-face ,(if leave
compilation-leave-directory-face
compilation-enter-directory-face)
compilation-directory ,(if leave
(or (cdr dir)
'(nil)) ; nil only isn't a property-change
(cons (match-string-no-properties idx) dir))
;; Place a `compilation-message' everywhere we change text-properties
;; so compilation--remove-properties can know what to remove.
compilation-message ,(compilation--make-message nil 0 nil nil)
mouse-face highlight
keymap compilation-button-map
help-echo "mouse-2: visit destination directory")))