[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/vc-fossil da4d895 084/111: Refactored header-line properti
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/vc-fossil da4d895 084/111: Refactored header-line propertizing function. |
Date: |
Wed, 29 Sep 2021 08:59:26 -0400 (EDT) |
branch: elpa/vc-fossil
commit da4d895118317710bb8187a70f9d19ddb3dccf47
Author: pdo <pdo>
Commit: pdo <pdo>
Refactored header-line propertizing function.
---
vc/el/vc-fossil.el | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/vc/el/vc-fossil.el b/vc/el/vc-fossil.el
index 32a2b56..1f293be 100644
--- a/vc/el/vc-fossil.el
+++ b/vc/el/vc-fossil.el
@@ -224,6 +224,10 @@ If `files` is nil return the status for all files."
(defun vc-fossil-checkout-model (files) 'implicit)
+(defun vc-fossil-propertize-header-line (name value)
+ (concat (propertize name 'face 'font-lock-type-face)
+ (propertize value 'face 'font-lock-variable-name-face)))
+
(defun vc-fossil-dir-extra-headers (dir)
(let ((info (vc-fossil--run "info"))
(settings (vc-fossil--run "settings"))
@@ -234,20 +238,19 @@ If `files` is nil return the status for all files."
(cond ((eql field :repository)
(string-match "repository: *\\(.*\\)$" info)
(let ((repo (match-string 1 info)))
- (push (propertize "Repository : " 'face 'font-lock-type-face)
lines)
- (push (propertize repo 'face 'font-lock-variable-name-face)
lines)))
+ (push (vc-fossil-propertize-header-line "Repository : " repo)
lines)))
((eql field :remote-url)
(let ((remote-url (car (split-string (vc-fossil--run
"remote-url")))))
- (push (propertize "Remote URL : " 'face 'font-lock-type-face)
lines)
- (push (propertize remote-url 'face
'font-lock-variable-name-face) lines)))
+ (push (vc-fossil-propertize-header-line "Remote URL : "
remote-url) lines)))
((eql field :synchro)
(let* ((as-match (string-match "^autosync.+\\([[:digit:]]\\)$"
settings))
(autosync (if as-match (match-string 1 settings) "0"))
(dp-match (string-match "^dont-push.+\\([[:digit:]]\\)$"
settings))
(dontpush (if dp-match (match-string 1 settings) "0")))
- (push (propertize "Synchro : " 'face 'font-lock-type-face)
lines)
- (push (propertize (concat "autosync=" autosync) 'face
'font-lock-variable-name-face) lines)
- (push (propertize (concat " dont-push=" dontpush) 'face
'font-lock-variable-name-face) lines)))
+ (push (vc-fossil-propertize-header-line "Synchro : "
+ (concat "autosync="
autosync
+ " dont-push="
dontpush))
+ lines)))
((eql field :checkout)
(let* ((posco (string-match "checkout: *\\([0-9a-fA-F]+\\)
\\([-0-9: ]+ UTC\\)" info))
(coid (substring (match-string 1 info) 0 10))
@@ -255,19 +258,18 @@ If `files` is nil return the status for all files."
(safe-date-to-time (match-string
2 info))))
(child-match (string-match "child: *\\(.*\\)$" info))
(leaf (if child-match "NON-LEAF" "leaf")))
- (push (propertize "Checkout : " 'face 'font-lock-type-face)
lines)
- (push (propertize (concat coid " " cots) 'face
'font-lock-variable-name-face) lines)
- (push (propertize (concat " (" leaf ")") 'face
'font-lock-variable-name-face) lines)))
+ (push (vc-fossil-propertize-header-line "Checkout : "
+ (concat coid " " cots
+ (concat " ("
leaf ")")))
+ lines)))
((eql field :comment)
(string-match "comment: *\\(.*\\)$" info)
(let ((msg (match-string 1 info)))
- (push (propertize "Comment : " 'face 'font-lock-type-face)
lines)
- (push (propertize msg 'face 'font-lock-variable-name-face)
lines)))
+ (push (vc-fossil-propertize-header-line "Comment : " msg)
lines)))
((eql field :tags)
(string-match "tags: *\\(.*\\)" info)
(let ((tags (match-string 1 info)))
- (push (propertize "Tags : " 'face 'font-lock-type-face)
lines)
- (push (propertize tags 'face 'font-lock-variable-name-face)
lines)))))
+ (push (vc-fossil-propertize-header-line "Tags : " tags)
lines)))))
(apply #'concat (nreverse lines))))
;;; STATE-CHANGING FUNCTIONS
- [nongnu] elpa/vc-fossil dffd034 069/111: Pipe commit message through log-edit-extract-headers., (continued)
- [nongnu] elpa/vc-fossil dffd034 069/111: Pipe commit message through log-edit-extract-headers., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 26c16f3 072/111: Create new branch named "pdo", ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 6f26a92 070/111: Implement the pull/update command., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 9b9736c 079/111: Add github mirror information and remove obsolete notes, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil c63995e 074/111: Added ability to cope with renamed files., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil b468088 083/111: Fixed accidental breakage., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil e0192e5 105/111: Bring in changes from upstream: Switch to using "fossil changes" (by ams)., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7bb3121 093/111: Push changes from pdo, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7815c30 111/111: vc-fossil.el: Update from fossil., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 31b0ee6 106/111: From ams: Work better when operating under a subdirectory. vc-fossil.el (vc-fossil--classify-all-files): List only files under directory we are in. (vc-fossil-dir-status-files): Since we are in DIR; don't try to figure out the relative name of the file., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil da4d895 084/111: Refactored header-line propertizing function.,
ELPA Syncer <=
- [nongnu] elpa/vc-fossil 9f90307 097/111: Add changes from pdo, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 7e84860 091/111: Attempted pushes. Sigh, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 73c5145 088/111: Tweaked :synchro and :checkout header line formats., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil d9190c0 100/111: Fossil at the end of the VC backends list., ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 5d66231 107/111: Changes from upstream, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil 4254ef5 104/111: Get changes from upstream upto 2020-09-20, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil f07cd00 108/111: Upstream updates, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil acb773e 098/111: Merge Changes, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil abdb548 099/111: Update to pdo's latest, ELPA Syncer, 2021/09/29
- [nongnu] elpa/vc-fossil f365e43 110/111: vc-fossil.el: Update from fossil., ELPA Syncer, 2021/09/29