[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ilist ed18678569 05/24: new: get group and marks
From: |
ELPA Syncer |
Subject: |
[elpa] externals/ilist ed18678569 05/24: new: get group and marks |
Date: |
Tue, 28 Dec 2021 16:58:13 -0500 (EST) |
branch: externals/ilist
commit ed186785695b85d00de40f144cb73ccf94861f38
Author: JSDurand <mmemmew@gmail.com>
Commit: JSDurand <mmemmew@gmail.com>
new: get group and marks
* ilist.el (ilist-get-group): Return the underlying group, if any.
(ilist-get-marks): Return the underlying marks, if any.
---
ilist.el | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/ilist.el b/ilist.el
index 466bcfd17f..4c347c39fa 100644
--- a/ilist.el
+++ b/ilist.el
@@ -553,6 +553,14 @@ If point is not at an element, return nil."
(declare (side-effect-free t))
(get-text-property (point) 'ilist-index))
+;;; Get group header
+
+(defun ilist-get-group ()
+ "Return the group header at point.
+If point is not at a group header return nil."
+ (declare (side-effect-free t))
+ (get-text-property (point) 'ilist-group-header))
+
;;; marks related
;; It is possible that some user-package does not need the
@@ -608,6 +616,27 @@ If END is non-nil, it specifies the end of the search."
res)))
res))))
+;;;; find marks
+
+(defun ilist-get-marks ()
+ "Return the list of marks on the line.
+The marks are in descending order, i.e. the mark that occurs
+later on the line come earlier in the result list.
+
+It is considered a mark only if the value is not t or nil.
+Non-mark values are simply ignored."
+ (delq
+ nil
+ (mapcar
+ (lambda (cons-cell)
+ (let ((value (get-text-property
+ (car cons-cell) 'ilist-mark-column)))
+ (cond
+ ((and value
+ (not (eq value t)))
+ value))))
+ (ilist-mark-columns (point)))))
+
;;;; mark
(defun ilist-mark-with-char (char)
- [elpa] externals/ilist d03de0ea64 02/24: README, (continued)
- [elpa] externals/ilist d03de0ea64 02/24: README, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 5ba04b79bd 03/24: * ilist.el (ilist-string): Add support for sorting., ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 457f0b0d87 06/24: no trailing whitespaces if demanded, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 4fb5695fe1 09/24: Add manuals and update README, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 95bcbf4b00 12/24: ilist: leave new lines when hiding groups, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 8b5d5f382f 22/24: Update docs, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist f021d7d8ab 20/24: fix: account for an invisible beginning, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 282f60c93a 21/24: I forgot to byte-compile again. Silly me!, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist c3f0e61360 13/24: fix missing parameter, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist b2bf67c5d8 24/24: Add changelog, and update documentation, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist ed18678569 05/24: new: get group and marks,
ELPA Syncer <=
- [elpa] externals/ilist 5362c106a8 04/24: more functionalities, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 347effebbe 07/24: fix the calculation of lengths of strings, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist ebb207c520 08/24: Fix an ilist error, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 76f29b61bb 10/24: Minor format change, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 8c4efd3d7c 11/24: add invisible text property., ELPA Syncer, 2021/12/28
- [elpa] externals/ilist c4a48491ee 15/24: fix previous bugs caused by invisibility, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 1b16d5789d 14/24: ilist: fix some errors caused by invisibility again., ELPA Syncer, 2021/12/28
- [elpa] externals/ilist c9b456103c 16/24: Fix errors and byte-compile, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist df91da4d46 17/24: ilist: try to fix a bug, ELPA Syncer, 2021/12/28
- [elpa] externals/ilist 0892dd8ffc 18/24: ilist: update the byte-compiled version, ELPA Syncer, 2021/12/28