# HG changeset patch # User Karl Heuer # Date 801728386 0 # Node ID dd80dd6aa77f61599edf0fb831733a3b24a1ee4d # Parent 1a038aa90ad6e6e75cef1c4da282c708ebe18e95 (indent-for-comment): move to beginning of line only if there is a comment syntax. diff -r 1a038aa90ad6 -r dd80dd6aa77f lisp/simple.el --- a/lisp/simple.el Mon May 29 06:15:30 1995 +0000 +++ b/lisp/simple.el Mon May 29 06:19:46 1995 +0000 @@ -1992,7 +1992,6 @@ (defun indent-for-comment () "Indent this line's comment to comment column, or insert an empty comment." (interactive "*") - (beginning-of-line 1) (let* ((empty (save-excursion (beginning-of-line) (looking-at "[ \t]*$"))) (starter (or (and empty block-comment-start) comment-start)) @@ -2001,6 +2000,7 @@ (error "No comment syntax defined") (let* ((eolpos (save-excursion (end-of-line) (point))) cpos indent begpos) + (beginning-of-line) (if (re-search-forward comment-start-skip eolpos 'move) (progn (setq cpos (point-marker)) ;; Find the start of the comment delimiter.