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

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

RE: function Qs


From: Drew Adams
Subject: RE: function Qs
Date: Sat, 24 Feb 2007 15:50:02 -0800

> Are there more functions like this?  point-min?  point-end-of-line?  I
> don't see them documented.

M-x apropos point

Command `apropos' is your friend.

The Elisp manual, not the Emacs manual, is the reference for Emacs-Lisp
code. All of the functions you have asked about are explained there. Both
manuals are available via `C-h i'.

> So it sounds like changing point is standard procedure, but changing
> mark is discouraged?

Correct. Actually, both are discouraged if the user doesn't expect any
change. To move point temporarily to obtain a location, wrap the movement in
`save-excursion'.

Again, this is explained in the Elisp manual.

> *This is what I've been trying to do (it seems to work now):
> (defun indent-buffer ()
>    (interactive)
>    (indent-region 1 (point-max) nil))

(point-min), not 1.





reply via email to

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