diff options
author | Yuchen Pei <hi@ypei.me> | 2022-10-05 11:28:34 +1100 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-10-05 11:28:34 +1100 |
commit | c4403522df754627d698f0806d3920764e3d1291 (patch) | |
tree | 11e8eedc5a361e003ec38af6a0a0600e107b0f7e /hcel-utils.el | |
parent | 7f67167d097b6f5123946568fde14c7d43bbfd1e (diff) |
Adding ability to navigate within help buffer
Diffstat (limited to 'hcel-utils.el')
-rw-r--r-- | hcel-utils.el | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hcel-utils.el b/hcel-utils.el index d5b75cf..be152f5 100644 --- a/hcel-utils.el +++ b/hcel-utils.el @@ -191,5 +191,15 @@ Example of an idSrcSpan: (or (get-text-property (point) prop) (get-text-property (max (point-min) (1- (point))) prop))) +(defun hcel-string-with-text-property-at-point (prop) + "Find the string with property PROP at point. + +Does not check whether point does indeed has property PROP." + (save-excursion + (let ((beg) (end)) + (setq end (next-single-char-property-change (point) prop)) + (setq beg (previous-single-char-property-change end prop)) + (buffer-substring-no-properties beg end)))) + (provide 'hcel-utils) ;;; hcel-utils.el ends here. |