Changeset main,9 for main


Ignore:
Timestamp:
05/02/2020 01:17:03 AM (5 years ago)
Author:
David Owen <dsowen@…>
branch-nick:
org-autofocus
revision id:
dsowen@fugue88.ws-20200502011703-dpwvxknxviff44hv
Message:

Extracted ORG-AF--MARK, ORG-AF--UNMARK, and ORG-AF--MARKED-P

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/org-autofocus.el

    r8 r9  
    2121(put 'org-af-marked 'org-af-marked t)
    2222(put 'org-af-marked 'display "*")
     23
     24(defun org-af--mark (point)
     25  "Mark the task at POINT."
     26  (add-text-properties point (1+ point) '(category org-af-marked)))
     27
     28(defun org-af--unmark (point)
     29  "Unmark the task at POINT."
     30  (remove-text-properties point (1+ point) '(category org-af-marked)))
     31
     32(defun org-af--marked-p (point)
     33  "Test whether the task at POINT is marked."
     34  (get-text-property point 'org-af-marked))
    2335
    2436
     
    5870        bol marked)
    5971    (unless (org-af--dimmed-p task-point)
    60       (setq marked (not (get-text-property task-point 'org-af-marked)))
     72      (setq marked (not (org-af--marked-p task-point)))
    6173      (if marked
    62           (add-text-properties task-point (1+ task-point)
    63                                '(category org-af-marked))
    64         (remove-text-properties task-point (1+ task-point)
    65                                 '(category org-af-marked)))
     74          (org-af--mark task-point)
     75        (org-af--unmark task-point))
    6676
    6777      (save-excursion
     
    7080                    (setq bol (line-beginning-position))
    7181                    (get-text-property bol 'type)
    72                     (not (get-text-property bol 'org-af-marked))))
     82                    (not (org-af--marked-p bol))))
    7383
    74         (when (get-text-property bol 'org-af-marked)
     84        (when (org-af--marked-p bol)
    7585          (if marked
    7686              (org-af--dim bol (line-end-position))
Note: See TracChangeset for help on using the changeset viewer.