diff options
| author | Stefan Monnier | 2001-11-19 20:55:30 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-11-19 20:55:30 +0000 |
| commit | 0603917d5f4e89880bb745058ac6430fb152e215 (patch) | |
| tree | 8e7abe3a23018645ea335f2b970fbdfd560a7e63 | |
| parent | 9b46de409f16b44152b225993c4d1ce88c05d31a (diff) | |
| download | emacs-0603917d5f4e89880bb745058ac6430fb152e215.tar.gz emacs-0603917d5f4e89880bb745058ac6430fb152e215.zip | |
(comment-column, comment-style, comment-multi-line)
(comment-auto-fill-only-comments): Remove :group arg.
(comment-padding): Add :type.
(comment-indent-new-line): Ignore comment-auto-fill-only-comments
if called interactively.
| -rw-r--r-- | lisp/newcomment.el | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el index 7c8b2a6e92c..d6f655e5279 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | ;; Author: code extracted from Emacs-20's simple.el | 5 | ;; Author: code extracted from Emacs-20's simple.el |
| 6 | ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> | 6 | ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> |
| 7 | ;; Keywords: comment uncomment | 7 | ;; Keywords: comment uncomment |
| 8 | ;; Revision: $Id: newcomment.el,v 1.38 2001/11/13 20:17:26 monnier Exp $ | 8 | ;; Revision: $Id: newcomment.el,v 1.39 2001/11/19 06:08:38 monnier Exp $ |
| 9 | 9 | ||
| 10 | ;; This file is part of GNU Emacs. | 10 | ;; This file is part of GNU Emacs. |
| 11 | 11 | ||
| @@ -91,8 +91,7 @@ Major modes should set this variable.") | |||
| 91 | Setting this variable automatically makes it local to the current buffer. | 91 | Setting this variable automatically makes it local to the current buffer. |
| 92 | Each mode establishes a different default value for this variable; you | 92 | Each mode establishes a different default value for this variable; you |
| 93 | can set the value for a particular mode using that mode's hook." | 93 | can set the value for a particular mode using that mode's hook." |
| 94 | :type 'integer | 94 | :type 'integer) |
| 95 | :group 'comment) | ||
| 96 | (make-variable-buffer-local 'comment-column) | 95 | (make-variable-buffer-local 'comment-column) |
| 97 | 96 | ||
| 98 | ;;;###autoload | 97 | ;;;###autoload |
| @@ -167,7 +166,6 @@ INDENT specifies that the `comment-start' markers should not be put at the | |||
| 167 | (defcustom comment-style 'plain | 166 | (defcustom comment-style 'plain |
| 168 | "*Style to be used for `comment-region'. | 167 | "*Style to be used for `comment-region'. |
| 169 | See `comment-styles' for a list of available styles." | 168 | See `comment-styles' for a list of available styles." |
| 170 | :group 'comment | ||
| 171 | :type (if (boundp 'comment-styles) | 169 | :type (if (boundp 'comment-styles) |
| 172 | `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles)) | 170 | `(choice ,@(mapcar (lambda (s) `(const ,(car s))) comment-styles)) |
| 173 | 'symbol)) | 171 | 'symbol)) |
| @@ -179,14 +177,14 @@ Can also be an integer which will be automatically turned into a string | |||
| 179 | of the corresponding number of spaces. | 177 | of the corresponding number of spaces. |
| 180 | 178 | ||
| 181 | Extra spacing between the comment characters and the comment text | 179 | Extra spacing between the comment characters and the comment text |
| 182 | makes the comment easier to read. Default is 1. nil means 0.") | 180 | makes the comment easier to read. Default is 1. nil means 0." |
| 181 | :type '(choice string integer (const nil))) | ||
| 183 | 182 | ||
| 184 | ;;;###autoload | 183 | ;;;###autoload |
| 185 | (defcustom comment-multi-line nil | 184 | (defcustom comment-multi-line nil |
| 186 | "*Non-nil means \\[comment-indent-new-line] continues comments, with no new terminator or starter. | 185 | "*Non-nil means \\[comment-indent-new-line] continues comments, with no new terminator or starter. |
| 187 | This is obsolete because you might as well use \\[newline-and-indent]." | 186 | This is obsolete because you might as well use \\[newline-and-indent]." |
| 188 | :type 'boolean | 187 | :type 'boolean) |
| 189 | :group 'comment) | ||
| 190 | 188 | ||
| 191 | ;;;; | 189 | ;;;; |
| 192 | ;;;; Helpers | 190 | ;;;; Helpers |
| @@ -923,8 +921,7 @@ Else, call `comment-indent'." | |||
| 923 | (defcustom comment-auto-fill-only-comments nil | 921 | (defcustom comment-auto-fill-only-comments nil |
| 924 | "Non-nil means to only auto-fill inside comments. | 922 | "Non-nil means to only auto-fill inside comments. |
| 925 | This has no effect in modes that do not define a comment syntax." | 923 | This has no effect in modes that do not define a comment syntax." |
| 926 | :type 'boolean | 924 | :type 'boolean) |
| 927 | :group 'comment) | ||
| 928 | 925 | ||
| 929 | (defun comment-valid-prefix (prefix compos) | 926 | (defun comment-valid-prefix (prefix compos) |
| 930 | (or | 927 | (or |
| @@ -956,6 +953,7 @@ unless optional argument SOFT is non-nil." | |||
| 956 | ;; don't do anything (unless no comment syntax is defined). | 953 | ;; don't do anything (unless no comment syntax is defined). |
| 957 | (unless (and comment-start | 954 | (unless (and comment-start |
| 958 | comment-auto-fill-only-comments | 955 | comment-auto-fill-only-comments |
| 956 | (not (interactive-p)) | ||
| 959 | (not (save-excursion | 957 | (not (save-excursion |
| 960 | (prog1 (setq compos (comment-beginning)) | 958 | (prog1 (setq compos (comment-beginning)) |
| 961 | (setq comin (point)))))) | 959 | (setq comin (point)))))) |