aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2001-11-19 20:55:30 +0000
committerStefan Monnier2001-11-19 20:55:30 +0000
commit0603917d5f4e89880bb745058ac6430fb152e215 (patch)
tree8e7abe3a23018645ea335f2b970fbdfd560a7e63
parent9b46de409f16b44152b225993c4d1ce88c05d31a (diff)
downloademacs-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.el16
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.")
91Setting this variable automatically makes it local to the current buffer. 91Setting this variable automatically makes it local to the current buffer.
92Each mode establishes a different default value for this variable; you 92Each mode establishes a different default value for this variable; you
93can set the value for a particular mode using that mode's hook." 93can 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'.
169See `comment-styles' for a list of available styles." 168See `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
179of the corresponding number of spaces. 177of the corresponding number of spaces.
180 178
181Extra spacing between the comment characters and the comment text 179Extra spacing between the comment characters and the comment text
182makes the comment easier to read. Default is 1. nil means 0.") 180makes 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.
187This is obsolete because you might as well use \\[newline-and-indent]." 186This 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.
925This has no effect in modes that do not define a comment syntax." 923This 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))))))