From 98fb480ee31bf74cf554044f60f21df16566dd7f Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 25 Mar 2012 14:41:06 -0400 Subject: [PATCH] * lisp/newcomment.el (comment-inline-offset): Don't autoload. (comment-choose-indent): Obey comment-inline-offset. --- lisp/ChangeLog | 5 +++++ lisp/newcomment.el | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 729795b9bab..d6e8d259ae3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +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). 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))) -- 2.11.4.GIT