summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorChong Yidong <cyd@gnu.org>2012-10-23 10:17:36 +0800
committerChong Yidong <cyd@gnu.org>2012-10-23 10:17:36 +0800
commit608d9d7caf59345fafdb4d412a1706e7028e1c3c (patch)
tree5a04c4f59a45074fcf6fa0ee31304e175a61b1b0 /lisp/newcomment.el
parent4ff5b1b2939e0fbe30e7739367b63ee258d03d6a (diff)
downloademacs-608d9d7caf59345fafdb4d412a1706e7028e1c3c.tar.gz
* lisp/newcomment.el (comment-normalize-vars): Doc fix.
Fixes: debbugs:12583
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r--lisp/newcomment.el17
1 files changed, 12 insertions, 5 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index a754c89c4ae..2ddfb2439af 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -24,7 +24,13 @@
;;; Commentary:
-;; A replacement for simple.el's comment-related functions.
+;; This library contains functions and variables for commenting and
+;; uncommenting source code.
+
+;; Prior to calling any `comment-*' function, you should ensure that
+;; `comment-normalize-vars' is first called to set up the appropriate
+;; variables; except for the `comment-*' commands, which call
+;; `comment-normalize-vars' automatically as a subroutine.
;;; Bugs:
@@ -326,10 +332,11 @@ terminated by the end of line (i.e. `comment-end' is empty)."
;;;###autoload
(defun comment-normalize-vars (&optional noerror)
- "Check and setup the variables needed by other commenting functions.
-Any command calling functions from newcomment.el should call this function
-before any other, so the rest of the code can assume that the variables are
-properly set."
+ "Check and set up variables needed by other commenting functions.
+All the `comment-*' commands call this function to set up various
+variables, like `comment-start', to ensure that the commenting
+functions work correctly. Lisp callers of any other `comment-*'
+function should first call this function explicitly."
(unless (and (not comment-start) noerror)
(unless comment-start
(let ((cs (read-string "No comment syntax is defined. Use: ")))