]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/newcomment.el (comment-inline-offset): Don't autoload.
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 25 Mar 2012 18:41:06 +0000 (14:41 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sun, 25 Mar 2012 18:41:06 +0000 (14:41 -0400)
(comment-choose-indent): Obey comment-inline-offset.

lisp/ChangeLog
lisp/newcomment.el

index 729795b9bab0d3461124723a8f7d7b66871b88c3..d6e8d259ae3b15ed65f279f3f3371a7d02714b59 100644 (file)
@@ -1,3 +1,8 @@
+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).
index 2d5608cb2253570697cefc305748da00cf127018..bac218e4e91d5b2c7af41b3aa83339ca2b57621e 100644 (file)
@@ -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)))