Function: breadcrumb--format-project-node

breadcrumb--format-project-node is a natively compiled function defined in breadcrumb.el.

Signature

(breadcrumb--format-project-node P MORE ROOT PATH)

Documentation

Helper for bc--project-crumbs-1.

Formats path crumb P given optional MORE nodes. ROOT is the default directory of P's project. PATH is the path of P relative to ROOT.

Source Code

;; Defined in /nix/store/3gd3jzhj3g7mbwy1i3w6ci5d2md9d8r2-emacs-packages-deps/share/emacs/site-lisp/elpa/breadcrumb-1.0.1/breadcrumb.el
(defun bc--format-project-node (p more root path)
  "Helper for `bc--project-crumbs-1'.
Formats path crumb P given optional MORE nodes.  ROOT is the
default directory of P's project.  PATH is the path of P relative
to ROOT."
  (let ((l (lambda (&rest _event)
             (interactive)
             ;; TODO: See similar TODO in `bc--format-ipath-node'.
             (find-file (file-name-directory (expand-file-name path root))))))
    (propertize p 'face
                (if more 'bc-project-crumbs-face 'bc-project-leaf-face)
                'bc-dont-shorten (null more)
                'mouse-face 'header-line-highlight
                'help-echo (format "mouse-1: Go places near %s%s" root path)
                'keymap
                (let ((m (make-sparse-keymap)))
                  (define-key m bc--header-line-key l)
                  (define-key m bc--mode-line-key l)
                  m))))