[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/treeview 3130757444 05/25: Added new function treeview-cal
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/treeview 3130757444 05/25: Added new function treeview-call-for-node-at-point |
Date: |
Sat, 10 Sep 2022 17:59:37 -0400 (EDT) |
branch: elpa/treeview
commit 3130757444c0cdd7423c01a471dabedbf82083ca
Author: Tilman Rassy <tilman.rassy@googlemail.com>
Commit: Tilman Rassy <tilman.rassy@googlemail.com>
Added new function treeview-call-for-node-at-point
---
treeview.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/treeview.el b/treeview.el
index d3010b0613..4b9b83cbb2 100644
--- a/treeview.el
+++ b/treeview.el
@@ -743,7 +743,7 @@ after this cons cell. NODE is also displayed if the parent
is expanded."
(defun treeview-add-child-at-front (parent node)
"Insert NODE at the beginning of the children of PARENT.
Thus, NODE becomes the new first child of PARENT. NODE is also displayed if
-PARENT is expanded.."
+PARENT is expanded."
(let ( (read-only-p buffer-read-only)
(children (treeview-get-node-children parent)) )
(setq children (cons node children))
@@ -891,6 +891,13 @@ See also `treeview-toggle-node-state'."
(offset (/ (- end start) 2)) )
(+ start offset)))
+(defun treeview-call-for-node-at-point (action-function)
+ "Call ACTION-FUNCTION with the node at point as argument.
+ACTION-FUNCTION is the symbol of the function. If there is no node at point,
+does nothing."
+ (let ( (node (treeview-get-node-at-pos (point))) )
+ (when node (funcall action-function node))))
+
(defvar treeview-suggest-point-pos-in-control-function
'treeview-get-overlay-center
"Function to suggest an appropriate position for the point in a node control.
Called with one argument, the control overlay. Auxiliary for implementing
- [nongnu] branch elpa/treeview created (now 09c8c1d045), ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview d8b8b4a533 02/25: First version of README.md, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 2d6b185055 10/25: Updated package URL and years in copyright, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview b53c339572 13/25: Bugfix for updating hidden nodes, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview a058a07149 12/25: Minor changes in library header comments, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 6b22e03b15 21/25: Implemented selection of nodes, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 09c8c1d045 25/25: Additions to documentation, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 3130757444 05/25: Added new function treeview-call-for-node-at-point,
ELPA Syncer <=
- [nongnu] elpa/treeview 0044b119e7 11/25: Updated documentation, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 86d6734aef 15/25: Renamed function treeview-display-node-internal to treeview-render-node, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview ad9c094d89 23/25: Implemented selection of files and highlighting of nodes, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 0681739fdd 01/25: Initial commit, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 0d66ef2322 22/25: Made treeview-after-node-expanded-function and treeview-after-node-folded-function buffer-local, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 00a4ab92bd 19/25: Changed http to https in link to GNU licenses, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview e601230367 20/25: Removed needless intern statements, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 07ea52cd7f 16/25: Added package dependency on emacs 24.4, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview 8382de4bdd 18/25: Sharp-quoted function name, ELPA Syncer, 2022/09/10
- [nongnu] elpa/treeview f0c0711070 04/25: Insering/removing nodes; treeview-after-node-expanded-function and treeview-after-node-folded-function, ELPA Syncer, 2022/09/10