[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 669599b 1/3: Doc clarification in two comment-* fun
From: |
Lars Ingebrigtsen |
Subject: |
[Emacs-diffs] master 669599b 1/3: Doc clarification in two comment-* functions |
Date: |
Sat, 17 Aug 2019 19:36:08 -0400 (EDT) |
branch: master
commit 669599b0f4b59029fd977609be02f754a3b075eb
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>
Doc clarification in two comment-* functions
* lisp/newcomment.el (comment-padright, comment-padleft): Note
that `comment-normalize-vars' must be called first (bug#11944).
---
lisp/newcomment.el | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index ac706b9..027c204 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -825,7 +825,9 @@ If STR already contains padding, the corresponding amount is
ignored from `comment-padding'.
N defaults to 0.
If N is `re', a regexp is returned instead, that would match
-the string for any N."
+the string for any N.
+
+Ensure that `comment-normalize-vars' has been called before you use this."
(setq n (or n 0))
(when (and (stringp str) (string-match "\\S-" str))
;; Separate the actual string from any leading/trailing padding
@@ -860,8 +862,10 @@ It also adds N copies of the first non-whitespace chars of
STR.
If STR already contains padding, the corresponding amount is
ignored from `comment-padding'.
N defaults to 0.
-If N is `re', a regexp is returned instead, that would match
- the string for any N."
+If N is `re', a regexp is returned instead, that would match the
+string for any N.
+
+Ensure that `comment-normalize-vars' has been called before you use this."
(setq n (or n 0))
(when (and (stringp str) (not (string= "" str)))
;; Only separate the left pad because we assume there is no right pad.