Bläddra i källkod

org-macs: Add missing docstring

* lisp/org-macs.el (org-current-line-string): Add missing docstring.
Nicolas Goaziou 6 år sedan
förälder
incheckning
e7911a0fb1
1 ändrade filer med 5 tillägg och 1 borttagningar
  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.