Add highlighting in the report window if the line is mapped to a file
This commit is contained in:
parent
30dc7e349d
commit
67201ee850
2 changed files with 24 additions and 15 deletions
|
|
@ -86,6 +86,11 @@
|
|||
"Default face for pending (!) transactions in the reconcile window"
|
||||
:group 'ledger-faces)
|
||||
|
||||
(defface ledger-font-report-clickable-face
|
||||
`((t :foreground "#cb4b16" :weight normal ))
|
||||
"Default face for pending (!) transactions in the reconcile window"
|
||||
:group 'ledger-faces)
|
||||
|
||||
|
||||
(defvar ledger-font-lock-keywords
|
||||
'(("^[0-9]+[-/.=][-/.=0-9]+\\s-\\!\\s-+\\(([^)]+)\\s-+\\)?\\([^*].+?\\)\\(\\( ;\\| ;\\|$\\)\\)" 2 'ledger-font-pending-face)
|
||||
|
|
|
|||
|
|
@ -165,7 +165,8 @@ used to generate the buffer, navigating the buffer, etc."
|
|||
(defun ledger-report-name-exists (name)
|
||||
"Check to see if the given report name exists.
|
||||
|
||||
If name exists, returns the object naming the report, otherwise returns nil."
|
||||
If name exists, returns the object naming the report,
|
||||
otherwise returns nil."
|
||||
(unless (string-empty-p name)
|
||||
(car (assoc name ledger-reports))))
|
||||
|
||||
|
|
@ -186,9 +187,10 @@ If name exists, returns the object naming the report, otherwise returns nil."
|
|||
(defun ledger-report-ledger-file-format-specifier ()
|
||||
"Substitute the full path to master or current ledger file
|
||||
|
||||
The master file name is determined by the ledger-master-file buffer-local
|
||||
variable which can be set using file variables. If it is set, it is used,
|
||||
otherwise the current buffer file is used."
|
||||
The master file name is determined by the ledger-master-file
|
||||
buffer-local variable which can be set using file variables.
|
||||
If it is set, it is used, otherwise the current buffer file is
|
||||
used."
|
||||
(ledger-master-file))
|
||||
|
||||
;; General helper functions
|
||||
|
|
@ -301,6 +303,8 @@ the default."
|
|||
(widen)
|
||||
(ledger-goto-line line)
|
||||
(point-marker))))))
|
||||
(add-text-properties (line-beginning-position) (line-end-position)
|
||||
(list 'face 'ledger-font-report-clickable-face))
|
||||
(end-of-line))))
|
||||
(goto-char data-pos)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue