emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: align mysteries


From: H. Dieter Wilhelm
Subject: Re: align mysteries
Date: Thu, 14 Oct 2021 23:19:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Is anybody here using `M-x align'?  If so, is it doing what you expect
> it to?  :-)

For my needs it is working perfectly (I didn't study it, because it
works so nicely in my programming mode "APDL-Mode" on Melpa). Here's an
example when setting parameters:

mp = 3333333
l =40.0
kkkkk=8

M-x apdl-align

mp    = 3333333
l     =      40.0
kkkkk =       8

(Don't know if this is convincing for you :-))

(defun apdl-align (p-min p-max)
  "Align current paragraph or selection of APDL variable definitions.
If a region is selected align it (with the region borders P-MIN
and P-MAX) otherwise align the current code paragraph."
  (interactive "r")
  (if mark-active
      (align p-min p-max)
    (align-current))) ; align-current needs a mark


    Dieter
-- 
Best wishes
H. Dieter Wilhelm
Zwingenberg, Germany



reply via email to

[Prev in Thread] Current Thread [Next in Thread]