all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* align values in a lisp let form
@ 2005-09-23  0:01 Kevin Ryde
  0 siblings, 0 replies; 3+ messages in thread
From: Kevin Ryde @ 2005-09-23  0:01 UTC (permalink / raw)


Is there a way to align values in a let when editing, ie. to go from

    (let ((x 1)
          (foo 2)
          (zz 3))

to

    (let ((x   1)
          (foo 2)
          (zz  3))

I made myself a bit of code to do it, but I'd be surprised if nobody
else has done something like this before.  align.el doesn't seem to
suit.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: align values in a lisp let form
       [not found] <mailman.8151.1127433756.20277.help-gnu-emacs@gnu.org>
@ 2005-09-24 16:38 ` Stefan Monnier
  2005-09-26 19:23 ` Alan Wehmann
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2005-09-24 16:38 UTC (permalink / raw)


> Is there a way to align values in a let when editing, ie. to go from
>     (let ((x 1)
>           (foo 2)
>           (zz 3))

> to

>     (let ((x   1)
>           (foo 2)
>           (zz  3))

> I made myself a bit of code to do it, but I'd be surprised if nobody
> else has done something like this before.  align.el doesn't seem to
> suit.

The align.el package (see C-h f align RET) is meant to do those kinds of
things, tho it doesn't seem to have an alignment rule for the above case.
You can also try C-h f align-regexp.


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: align values in a lisp let form
       [not found] <mailman.8151.1127433756.20277.help-gnu-emacs@gnu.org>
  2005-09-24 16:38 ` align values in a lisp let form Stefan Monnier
@ 2005-09-26 19:23 ` Alan Wehmann
  1 sibling, 0 replies; 3+ messages in thread
From: Alan Wehmann @ 2005-09-26 19:23 UTC (permalink / raw)


Kevin Ryde <user42@zip.downwithspam.com.au> writes:

> Is there a way to align values in a let when editing, ie. to go from
>
>     (let ((x 1)
>           (foo 2)
>           (zz 3))
>
> to
>
>     (let ((x   1)
>           (foo 2)
>           (zz  3))
>
> I made myself a bit of code to do it, but I'd be surprised if nobody
> else has done something like this before.  align.el doesn't seem to
> suit.
>
>

pretty-column.el has function pretty-rectangle, which will work for the
example you've given--in a fashion.  I tried it out and got the
following:


>     (let ((x   1)   
>           (foo 2)   
>           (zz  3))  

If I choose the rectangle slightly differently, I get this:

>     (let ((x   1) 
>           (foo 2  )
>           (zz  3) )

-- 
Alan Wehmann
wehmann(no_spam)@fnal.gov

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-09-26 19:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.8151.1127433756.20277.help-gnu-emacs@gnu.org>
2005-09-24 16:38 ` align values in a lisp let form Stefan Monnier
2005-09-26 19:23 ` Alan Wehmann
2005-09-23  0:01 Kevin Ryde

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.