Commit 98fb480e authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/newcomment.el (comment-inline-offset): Don't autoload.

(comment-choose-indent): Obey comment-inline-offset.
parent 8eb5d48f
2012-03-25 Stefan Monnier <>
* newcomment.el (comment-inline-offset): Don't autoload.
(comment-choose-indent): Obey comment-inline-offset.
2012-03-25 Philipp Haselwarter <> (tiny change)
* newcomment.el (comment-inline-offset): New custom var (bug#11090).
......@@ -268,7 +268,6 @@ makes the comment easier to read. Default is 1. nil means 0."
:type '(choice string integer (const nil))
:group 'comment)
(defcustom comment-inline-offset 1
"Inline comments have to be preceded by at least this many spaces.
This is usefull when style-conventions require a certain minimal offset.
......@@ -598,7 +597,7 @@ Point is expected to be at the start of the comment."
(save-excursion (end-of-line) (current-column)))))
(other nil)
(min (save-excursion (skip-chars-backward " \t")
(1+ (current-column)))))
(+ comment-inline-offset (current-column)))))
;; Fix up the range.
(if (< max min) (setq max min))
;; Don't move past the fill column.
......@@ -698,7 +697,8 @@ If CONTINUE is non-nil, use the `comment-continue' markers if any."
(skip-chars-backward " \t")
(unless (bolp)
(setq indent (max indent (+ (current-column) comment-inline-offset)))))
(setq indent (max indent
(+ (current-column) comment-inline-offset)))))
;; If that's different from comment's current position, change it.
(unless (= (current-column) indent)
(delete-region (point) (progn (skip-chars-backward " \t") (point)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment