unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* 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

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).