X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fsimple.el;h=51cc77da059bc5d18501a6be8a367147632b8f29;hb=fe8e655a02c383927563d735c025f1044cf7d384;hp=38fd6fa737279cf3d5b6c6235aef5ffc43702594;hpb=14144012929ab5944f367d5d1b323ab8268abb05;p=chise%2Fxemacs-chise.git- diff --git a/lisp/simple.el b/lisp/simple.el index 38fd6fa..51cc77d 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2544,8 +2544,7 @@ If nil, use `comment-end' instead." :group 'fill-comments) (defun indent-for-comment () - "Indent this line's comment to comment column, or insert an empty -comment. Comments starting in column 0 are not moved." + "Indent this line's comment to comment column, or insert an empty comment." (interactive "*") (let* ((empty (save-excursion (beginning-of-line) (looking-at "[ \t]*$"))) @@ -2572,19 +2571,13 @@ comment. Comments starting in column 0 are not moved." (skip-syntax-backward "^ " (match-beginning 0))))) (setq begpos (point)) ;; Compute desired indent. - ;; XEmacs change: Preserve indentation of comments starting in - ;; column 0, as documented. - (cond - ((= (current-column) 0) - (goto-char begpos)) - ((= (current-column) - (setq indent (funcall comment-indent-function))) - (goto-char begpos)) - (t + (if (= (current-column) + (setq indent (funcall comment-indent-function))) + (goto-char begpos) ;; If that's different from current, change it. (skip-chars-backward " \t") (delete-region (point) begpos) - (indent-to indent))) + (indent-to indent)) ;; An existing comment? (if cpos (progn (goto-char cpos)