Function: dape--format-file-name-line

dape--format-file-name-line is a natively compiled function defined in dape.el.

Signature

(dape--format-file-name-line FILENAME LINE)

Documentation

Formats FILENAME and LINE to string.

Source Code

;; Defined in /nix/store/1fiaif8pifqj2jh65rbg3fkhg3i56q42-emacs-packages-deps/share/emacs/site-lisp/elpa/dape-0.27.1/dape.el
(defun dape--format-file-name-line (filename line)
  "Formats FILENAME and LINE to string."
  (let* ((conn (dape--live-connection 'last t))
         (config
          (and conn (dape--config (dape--root-of conn))))
         (root-guess (dape--guess-root config))
         ;; Normalize paths for `file-relative-name'
         (filename (tramp-file-local-name filename))
         (root-guess (tramp-file-local-name root-guess)))
    (concat
     (string-truncate-left (file-relative-name filename root-guess)
                           dape-info-file-name-max)
     (when line
       (format ":%d" line)))))