diff options
| author | Chong Yidong | 2012-10-23 10:17:36 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-10-23 10:17:36 +0800 |
| commit | 608d9d7caf59345fafdb4d412a1706e7028e1c3c (patch) | |
| tree | 5a04c4f59a45074fcf6fa0ee31304e175a61b1b0 | |
| parent | 4ff5b1b2939e0fbe30e7739367b63ee258d03d6a (diff) | |
| download | emacs-608d9d7caf59345fafdb4d412a1706e7028e1c3c.tar.gz emacs-608d9d7caf59345fafdb4d412a1706e7028e1c3c.zip | |
* lisp/newcomment.el (comment-normalize-vars): Doc fix.
Fixes: debbugs:12583
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/newcomment.el | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3a196095597..bd40d0f0d30 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-10-23 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * newcomment.el (comment-normalize-vars): Doc fix (Bug#12583). | ||
| 4 | |||
| 1 | 2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca> | 5 | 2012-10-23 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 6 | ||
| 3 | * subr.el (internal-temp-output-buffer-show): Rename from | 7 | * subr.el (internal-temp-output-buffer-show): Rename from |
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 @@ | |||
| 24 | 24 | ||
| 25 | ;;; Commentary: | 25 | ;;; Commentary: |
| 26 | 26 | ||
| 27 | ;; A replacement for simple.el's comment-related functions. | 27 | ;; This library contains functions and variables for commenting and |
| 28 | ;; uncommenting source code. | ||
| 29 | |||
| 30 | ;; Prior to calling any `comment-*' function, you should ensure that | ||
| 31 | ;; `comment-normalize-vars' is first called to set up the appropriate | ||
| 32 | ;; variables; except for the `comment-*' commands, which call | ||
| 33 | ;; `comment-normalize-vars' automatically as a subroutine. | ||
| 28 | 34 | ||
| 29 | ;;; Bugs: | 35 | ;;; Bugs: |
| 30 | 36 | ||
| @@ -326,10 +332,11 @@ terminated by the end of line (i.e. `comment-end' is empty)." | |||
| 326 | 332 | ||
| 327 | ;;;###autoload | 333 | ;;;###autoload |
| 328 | (defun comment-normalize-vars (&optional noerror) | 334 | (defun comment-normalize-vars (&optional noerror) |
| 329 | "Check and setup the variables needed by other commenting functions. | 335 | "Check and set up variables needed by other commenting functions. |
| 330 | Any command calling functions from newcomment.el should call this function | 336 | All the `comment-*' commands call this function to set up various |
| 331 | before any other, so the rest of the code can assume that the variables are | 337 | variables, like `comment-start', to ensure that the commenting |
| 332 | properly set." | 338 | functions work correctly. Lisp callers of any other `comment-*' |
| 339 | function should first call this function explicitly." | ||
| 333 | (unless (and (not comment-start) noerror) | 340 | (unless (and (not comment-start) noerror) |
| 334 | (unless comment-start | 341 | (unless comment-start |
| 335 | (let ((cs (read-string "No comment syntax is defined. Use: "))) | 342 | (let ((cs (read-string "No comment syntax is defined. Use: "))) |