diff options
author | Yuchen Pei <hi@ypei.me> | 2022-09-19 13:11:22 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2022-09-19 13:11:22 +1000 |
commit | 3da82c44a4a6ed7e3760fe2e9d37ebf2cfd669d1 (patch) | |
tree | 73b135b8d0dbe7330492e4c91455ad8143dcbb0e /hcel-utils.el | |
parent | c14271c3732f02ae391c3847ed7a687171ef4013 (diff) |
find definition / references / eldoc now look at previous point too.
Diffstat (limited to 'hcel-utils.el')
-rw-r--r-- | hcel-utils.el | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/hcel-utils.el b/hcel-utils.el index 18e1062..e5a82e7 100644 --- a/hcel-utils.el +++ b/hcel-utils.el @@ -166,4 +166,9 @@ Example of an idSrcSpan: (shr-render-region (point-min) (point-max)) (buffer-string)))) +(defun hcel-text-property-near-point (prop) + "Find property prop at point, or just before point." + (or (get-text-property (point) prop) + (get-text-property (1- (point)) prop))) + (provide 'hcel-utils) |