Browse Source

org-macs: Add missing docstring

* lisp/org-macs.el (org-current-line-string): Add missing docstring.
Nicolas Goaziou 6 năm trước cách đây
mục cha
commit
e7911a0fb1
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      lisp/org-macs.el

+ 5 - 1
lisp/org-macs.el

@@ -887,7 +887,11 @@ removed."
   (org-unbracket-string "\"" "\"" string))
 
 (defsubst org-current-line-string (&optional to-here)
-  (buffer-substring (point-at-bol) (if to-here (point) (point-at-eol))))
+  "Return current line, as a string.
+If optional argument TO-HERE is non-nil, return string from
+beginning of line up to point."
+  (buffer-substring (line-beginning-position)
+		    (if to-here (point) (line-end-position))))
 
 (defun org-shorten-string (s maxlength)
   "Shorten string S so that it is no longer than MAXLENGTH characters.