help-gnu-emacs
[Top][All Lists]
Advanced

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

indent-buffer


From: Emanuel Berg
Subject: indent-buffer
Date: Tue, 15 Feb 2022 02:20:29 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

(defun indent-buffer ()
  (interactive)
  (indent-region (point-min) (point-max)) )

If one did it from scratch, perhaps one would have BEG and END
formal parameters for `indent-region' that were optional and
defaulting to (point-min) and (point-max), however as it
stands `indent-region' already has an optional COLUMN.

(Yeah, should be BEG, END, and COL, not START, END,
and COLUMN.)

There is also `pp--indent-buffer' that looks like this:

(defun pp--indent-buffer ()
  (goto-char (point-min))
  (while (not (eobp))
    (lisp-indent-line)
    (forward-line 1)))

(forward-line 1) is the same as (forward-line) BTW ... don't
know when that changed, I myself has 8 occurences of
(forward-line 1) ...

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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