changeset 11975:dd80dd6aa77f

(indent-for-comment): move to beginning of line only if there is a comment syntax.
author Karl Heuer <kwzh@gnu.org>
date Mon, 29 May 1995 06:19:46 +0000
parents 1a038aa90ad6
children e862c6697f39
files lisp/simple.el
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.