emacs-devel
[Top][All Lists]
Advanced

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

RE: Suggestion for a witty Emacs command for a mug?


From: Drew Adams
Subject: RE: Suggestion for a witty Emacs command for a mug?
Date: Thu, 25 Jan 2018 09:40:10 -0800 (PST)

Use `auto-fill-mode' - or perhaps `auto-fill-mug'.

After that as a heading, include the doc in a _tiny_ font.

For that, we could use what `C-h f' says, but it's not so great:

  auto-fill-mode is an interactive compiled Lisp function in
  `simple.el'.

  (auto-fill-mode &optional ARG)

  Toggle automatic line breaking (Auto Fill mode).
  Interactively, with a prefix argument, enable
  Auto Fill mode if the prefix argument is positive,
  and disable it otherwise.  If called from Lisp, toggle
  the mode if ARG is ‘toggle’, disable the mode if ARG is
  a non-positive integer, and enable the mode otherwise
  (including if ARG is omitted or nil or a positive integer).

  When Auto Fill mode is enabled, inserting a space at a column
  beyond ‘current-fill-column’ automatically breaks the line at a
  previous space.

  When ‘auto-fill-mode’ is on, the ‘auto-fill-function’ variable is
  non-nil.

  The value of ‘normal-auto-fill-function’ specifies the function to use
  for ‘auto-fill-function’ when turning Auto Fill mode on.

Much better would be to use what (emacs) `Auto Fill' says:

  Auto Fill Mode
  --------------

  “Auto Fill” mode is a buffer-local minor mode (see Minor Modes) in
  which lines are broken automatically at spaces when the line becomes too
  wide.

  ‘M-x auto-fill-mode’
       Enable or disable Auto Fill mode.
  ‘<SPC>’
  ‘<RET>’
       In Auto Fill mode, break lines when appropriate.

     The mode command ‘M-x auto-fill-mode’ toggles Auto Fill mode in the
  current buffer.  Like any other minor mode, with a positive numeric
  argument, it enables Auto Fill mode, and with a negative argument it
  disables it.  To enable Auto Fill mode automatically in certain major
  modes, add ‘auto-fill-mode’ to the mode hooks (*note Major Modes::).
  When Auto Fill mode is enabled, the mode indicator ‘Fill’ appears in the
  mode line (see Mode Line).

     Auto Fill mode breaks lines automatically at spaces whenever they get
  longer than the desired width.  This line breaking occurs only when you
  type <SPC> or <RET>.  If you wish to insert a space or newline without
  permitting line-breaking, type ‘C-q <SPC>’ or ‘C-q C-j’ respectively.
  Also, ‘C-o’ inserts a newline without line breaking.

     When Auto Fill mode breaks a line, it tries to obey the “adaptive
  fill prefix”: if a fill prefix can be deduced from the first and/or
  second line of the current paragraph, it is inserted into the new line
  (see Adaptive Fill).  Otherwise the new line is indented, as though
  you had typed <TAB> on it (see Indentation).  In a programming
  language mode, if a line is broken in the middle of a comment, the
  comment is split by inserting new comment delimiters as appropriate.

     Auto Fill mode does not refill entire paragraphs; it breaks lines but
  does not merge lines.  Therefore, editing in the middle of a paragraph
  can result in a paragraph that is not correctly filled.  To fill it,
  call the explicit fill commands (see Fill Commands).

This makes the point/joke, while showing Emacs as the self-documenting,
self-deprecating/self-kidding editor.



reply via email to

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