+2012-03-25 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * newcomment.el (comment-inline-offset): Don't autoload.
+ (comment-choose-indent): Obey comment-inline-offset.
+
2012-03-25 Philipp Haselwarter <philipp.haselwarter@gmx.de> (tiny change)
* newcomment.el (comment-inline-offset): New custom var (bug#11090).
:type '(choice string integer (const nil))
:group 'comment)
-;;;###autoload
(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.
(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.
(save-excursion
(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)))