unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "William Xue" <william.xue@gmail.com>
To: "Dan Nicolaescu" <dann@ics.uci.edu>
Cc: emacs-devel@gnu.org
Subject: Re: how to align the comments to start from the same column?
Date: Sat, 14 Jul 2007 14:04:31 +0800	[thread overview]
Message-ID: <op.tvfxttd9hkv0w5@williamnb> (raw)
In-Reply-To: <200707131818.l6DIIoG1003172@oogie-boogie.ics.uci.edu>

On Sat, 14 Jul 2007 02:18:49 +0800, Dan Nicolaescu <dann@ics.uci.edu>  
wrote:

> "William Xue" <william.xue@gmail.com> writes:
>
>   > 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.
>
>
> You can find this package:
>
> ;;; bc-mode.el --- Minor mode for formatting right-margin block comments.
> ;;
> ;; Copyright (C) 1991-1996 Steve Burgett <burgett@eecs.berkeley.edu>
> ;; $Id: bc-mode.el,v 1.1 1996/10/19 18:54:00 burgett Exp burgett $
> ;;
> ;; Author: Steve Burgett <burgett@eecs.berkeley.edu>
> ;; Created: July 1992
> ;; Version: 1.1
> ;; Keywords: comment minor-mode programming editing
> ;; HTTP: http://robotics.eecs.berkeley.edu/~burgett/
>
> It has very sophisticated comment handling, I think it does what you  
> want.

Thanks for the information. But the url seems invalid here.
I have googled about it, not found any place to download it.
---8<--------------------------------------------->8---
;;; bc-mode.el --- BC code editing commands for Emacs
;; Copyright (C) 2005  Kumar Appaiah

;; Author: Kumar Appaiah <akumar_NOSPAM@ee.iitm.ac.in>
;; Keywords:

---8<--------------------------------------------->8---
this file seems not the same with yours.

Could you send it to me by mail?
In advance thanks!

-- 
Sincerely yours,
William

      reply	other threads:[~2007-07-14  6:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-10  2:44 how to align the comments to start from the same column? William Xue
2007-07-10 11:31 ` 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 [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=op.tvfxttd9hkv0w5@williamnb \
    --to=william.xue@gmail.com \
    --cc=dann@ics.uci.edu \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).