commit d241198495f612375c32da0e4c8af36441a4ddd8 parent 011c6c4132e46c786bfed8273fb915501cfbfe36 Author: Iqbal Ansari <iqbalansari02@yahoo.com> Date: Sat, 28 Nov 2015 23:22:51 +0530 Add some missing documentation Diffstat:
M | emojify.el | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/emojify.el b/emojify.el @@ -110,7 +110,12 @@ FORMAT-STRING and ARGS are same as the arguments to `message'." (insert "\n"))))) (defun emojify--get-relevant-region () - "Try getting region in buffer that completely covers the current window." + "Try getting region in buffer that completely covers the current window. + +This is used instead of directly using `window-start' and `window-end', since they +return the values corresponding buffer in currently selected window, which is +incorrect if the buffer where there are called is not actually the buffer visible +in the selected window." (let* ((window-size (- (window-end) (window-start))) (start (max (- (point) window-size) (point-min))) (end (min (+ (point) window-size) (point-max))))