Skip to content

Commit 96f1be1

Browse files
committed
Add actypes:activities for external package activities
1 parent 1d3e9b1 commit 96f1be1

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2025-09-26 Mats Lidell <matsl@gnu.org>
2+
3+
* hsys-activities.el (activity, hsys-activities-read): Add
4+
actypes:activity for the external package activities.
5+
16
2025-09-25 Mats Lidell <matsl@gnu.org>
27

38
* hycontrol.el (hycontrol-global-text-scale-adjust): Modification of

hsys-activities.el

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
;;; hsys-activities.el --- actype for external package activities -*- lexical-binding: t; -*-
2+
;;
3+
;; Author: Mats Lidell
4+
;;
5+
;; Orig-Date: 21-Sep-25 at 20:41:48
6+
;; Last-Mod: 21-Sep-25 at 22:15:36 by Mats Lidell
7+
;;
8+
;; SPDX-License-Identifier: GPL-3.0-or-later
9+
;;
10+
;; Copyright (C) 2025 Free Software Foundation, Inc.
11+
;; See the "HY-COPY" file for license information.
12+
;;
13+
;; This file is part of GNU Hyperbole.
14+
15+
;;; Commentary:
16+
;;
17+
;; Stores the name of the activity rather than the activity itself.
18+
;;
19+
;; This actype resumes the activity. For reseting the default state
20+
;; for the activity use activites-resume with a prefix argument. With
21+
;; the default key binding for activities this is: {C-u C-x C-a g}
22+
23+
;;; Code:
24+
25+
(require 'hypb)
26+
(declare-function activities-activity-name "ext:activities")
27+
(declare-function activities-completing-read "ext:activities")
28+
(declare-function activities-named "ext:activities")
29+
(declare-function activities-resume "ext:activities")
30+
31+
(defun hsys-activities-read ()
32+
"Prompt user for activity and return the activity name."
33+
(hypb:require-package 'activities)
34+
(activities-activity-name (activities-completing-read :prompt "Activity")))
35+
36+
(defact activity (activity)
37+
"Action type for activities."
38+
(interactive (list (hsys-activities-read)))
39+
(hypb:require-package 'activities)
40+
(when (stringp activity)
41+
(activities-resume (activities-named activity))))
42+
43+
(provide 'hsys-activities)
44+
;;; hsys-activities.el ends here

0 commit comments

Comments
 (0)