summaryrefslogtreecommitdiff
path: root/lisp/newcomment.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-03-25 14:41:06 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-03-25 14:41:06 -0400
commit98fb480ee31bf74cf554044f60f21df16566dd7f (patch)
tree9bd83d6ee0fe2e55f74fb718303108f2167e63fa /lisp/newcomment.el
parent8eb5d48f36bbb758d46a867c52fbc23d7ad7d71f (diff)
downloademacs-98fb480ee31bf74cf554044f60f21df16566dd7f.tar.gz
emacs-98fb480ee31bf74cf554044f60f21df16566dd7f.tar.bz2
emacs-98fb480ee31bf74cf554044f60f21df16566dd7f.zip
* lisp/newcomment.el (comment-inline-offset): Don't autoload.
(comment-choose-indent): Obey comment-inline-offset.
Diffstat (limited to 'lisp/newcomment.el')
-rw-r--r--lisp/newcomment.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/newcomment.el b/lisp/newcomment.el
index 2d5608cb225..bac218e4e91 100644
--- a/lisp/newcomment.el
+++ b/lisp/newcomment.el
@@ -268,7 +268,6 @@ makes the comment easier to read. Default is 1. nil means 0."
: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.
@@ -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."
(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)))