* bug#51226: 29.0.50; `align' doc string is unclear
@ 2021-10-15 10:04 Lars Ingebrigtsen
2021-10-15 11:00 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-15 10:04 UTC (permalink / raw)
To: 51226
`align' doesn't mention the prefix arg in the doc string, but in certain
modes, different alignment rules are picked based on what prefix you
give to the command. For instance, text mode:
;; With a numeric prefix argument, or C-u, space delimited text
;; tables will be aligned.
(text-column
(regexp . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
(group . 2)
(modes . align-text-modes)
(repeat . t)
(run-if . ,(lambda ()
(and current-prefix-arg
(not (eq '- current-prefix-arg))))))
;; With a negative prefix argument, lists of dollar figures will
;; be aligned.
(text-dollar-figure
(regexp . "\\$?\\(\\s-+[0-9]+\\)\\.")
(modes . align-text-modes)
(justify . t)
(run-if . ,(lambda ()
(eq '- current-prefix-arg))))
It's also not clear why `M-x align' in text modes do nothing -- you
have to give it a prefix to make it do anything.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#51226: 29.0.50; `align' doc string is unclear
2021-10-15 10:04 bug#51226: 29.0.50; `align' doc string is unclear Lars Ingebrigtsen
@ 2021-10-15 11:00 ` Eli Zaretskii
2021-10-19 20:39 ` Lars Ingebrigtsen
0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2021-10-15 11:00 UTC (permalink / raw)
To: Lars Ingebrigtsen, John Wiegley; +Cc: 51226
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 15 Oct 2021 12:04:01 +0200
>
>
> `align' doesn't mention the prefix arg in the doc string, but in certain
> modes, different alignment rules are picked based on what prefix you
> give to the command. For instance, text mode:
>
> ;; With a numeric prefix argument, or C-u, space delimited text
> ;; tables will be aligned.
> (text-column
> (regexp . "\\(^\\|\\S-\\)\\([ \t]+\\)\\(\\S-\\|$\\)")
> (group . 2)
> (modes . align-text-modes)
> (repeat . t)
> (run-if . ,(lambda ()
> (and current-prefix-arg
> (not (eq '- current-prefix-arg))))))
>
> ;; With a negative prefix argument, lists of dollar figures will
> ;; be aligned.
> (text-dollar-figure
> (regexp . "\\$?\\(\\s-+[0-9]+\\)\\.")
> (modes . align-text-modes)
> (justify . t)
> (run-if . ,(lambda ()
> (eq '- current-prefix-arg))))
>
> It's also not clear why `M-x align' in text modes do nothing -- you
> have to give it a prefix to make it do anything.
John, could you help us out here by explaining this stuff?
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#51226: 29.0.50; `align' doc string is unclear
2021-10-15 11:00 ` Eli Zaretskii
@ 2021-10-19 20:39 ` Lars Ingebrigtsen
0 siblings, 0 replies; 3+ messages in thread
From: Lars Ingebrigtsen @ 2021-10-19 20:39 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: John Wiegley, 51226
Eli Zaretskii <eliz@gnu.org> writes:
>> It's also not clear why `M-x align' in text modes do nothing -- you
>> have to give it a prefix to make it do anything.
>
> John, could you help us out here by explaining this stuff?
I've now clarified this in the doc string (i.e., that `C-u' has an
effect), and I've also made `M-x align' (without a prefix) actually do
something in text-mode.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-19 20:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-15 10:04 bug#51226: 29.0.50; `align' doc string is unclear Lars Ingebrigtsen
2021-10-15 11:00 ` Eli Zaretskii
2021-10-19 20:39 ` Lars Ingebrigtsen
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).