all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "William Xue" <william.xue@gmail.com>
To: emacs-devel@gnu.org
Subject: how to align the comments to start from the same column?
Date: Tue, 10 Jul 2007 10:44:58 +0800	[thread overview]
Message-ID: <op.tu79w8dbhkv0w5@williamnb> (raw)

Hi,
when I am coding in cpp files, I will use M-; to make some comments, like  
following:

                         IoCreateFileSpecifyDeviceObjectHint(&h_rd_file, //  
file handle
                                                             GENERIC_READ |  
GENERIC_WRITE, // desire access
                                                             &rd_file_obj_attr,  
// object attributes
                                                             &rd_io_status_block,  
// io status block
                                                             0, //  
allocation size
                                                             FILE_ATTRIBUTE_NORMAL,  
// file attributes
                                                             FILE_SHARE_READ,  
// share access

Is there a way to format the comments to the same column?

I want something like:

1. select the codes as a region
2. press a magic keybinding
3. the comments align to the longest column of comments in the region.

:)

-- 
Sincerely yours,
William

             reply	other threads:[~2007-07-10  2:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  2:44 William Xue [this message]
2007-07-10 11:31 ` how to align the comments to start from the same column? Alan Mackenzie
2007-07-10 13:41 ` Stefan Monnier
2007-07-11  1:44   ` William Xue
2007-07-11  4:01     ` Stefan Monnier
2007-07-11  7:03       ` William Xue
2007-07-13 18:18 ` Dan Nicolaescu
2007-07-14  6:04   ` William Xue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.tu79w8dbhkv0w5@williamnb \
    --to=william.xue@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.