215 |
|
|
216 |
;;;###autoload |
;;;###autoload |
217 |
(defcustom comment-multi-line nil |
(defcustom comment-multi-line nil |
218 |
"*Non-nil means \\[comment-indent-new-line] continues comments, with no new terminator or starter. |
"*Non-nil means `comment-indent-new-line' continues comments. |
219 |
This is obsolete because you might as well use \\[newline-and-indent]." |
That is, it inserts no new terminator or starter. |
220 |
|
This affects `auto-fill-mode', which is the main reason to |
221 |
|
customize this variable. |
222 |
|
|
223 |
|
It also affects \\[indent-new-comment-line]. However, if you want this |
224 |
|
behavior for explicit filling, you might as well use \\[newline-and-indent]." |
225 |
:type 'boolean) |
:type 'boolean) |
226 |
|
|
227 |
(defcustom comment-empty-lines nil |
(defcustom comment-empty-lines nil |
423 |
(defun comment-beginning () |
(defun comment-beginning () |
424 |
"Find the beginning of the enclosing comment. |
"Find the beginning of the enclosing comment. |
425 |
Returns nil if not inside a comment, else moves point and returns |
Returns nil if not inside a comment, else moves point and returns |
426 |
the same as `comment-search-forward'." |
the same as `comment-search-backward'." |
427 |
;; HACK ATTACK! |
;; HACK ATTACK! |
428 |
;; We should really test `in-string-p' but that can be expensive. |
;; We should really test `in-string-p' but that can be expensive. |
429 |
(unless (eq (get-text-property (point) 'face) 'font-lock-string-face) |
(unless (eq (get-text-property (point) 'face) 'font-lock-string-face) |
435 |
(and |
(and |
436 |
;; For modes where comment-start and comment-end are the same, |
;; For modes where comment-start and comment-end are the same, |
437 |
;; the search above may have found a `ce' rather than a `cs'. |
;; the search above may have found a `ce' rather than a `cs'. |
438 |
(or (not (looking-at comment-end-skip)) |
(or (if comment-end-skip (not (looking-at comment-end-skip))) |
439 |
;; Maybe font-lock knows that it's a `cs'? |
;; Maybe font-lock knows that it's a `cs'? |
440 |
(eq (get-text-property (match-end 0) 'face) |
(eq (get-text-property (match-end 0) 'face) |
441 |
'font-lock-comment-face) |
'font-lock-comment-face) |