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

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

Re: function Qs


From: Dan Bensen
Subject: Re: function Qs
Date: Sat, 24 Feb 2007 16:58:40 -0600
User-agent: Thunderbird 1.5 (X11/20051201)

weber wrote:
1. Documentation for functions is easily accessed with Control-h f and
then enter the name of the function.
Very nice.  Thank you.

Maybe it would be better if you told us what to you want to
accomplish... there might be an easier way.

Nah, that's no fun* :) The current problem isn't nearly as important as the general learning experience.

According to the help section for end-of-buffer,
point-max is the equivalent function I'm looking for.
Are there more functions like this? point-min? point-end-of-line? I don't see them documented.

The help section for set-mark says to define your own variable instead of using mark:
   (let ((beg (point))) (forward-line 1) (delete-region beg (point)))

With return values, this could be written something like
   (delete-region (point) (point-next-line))

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

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

--
Dan
www.prairienet.org/~dsb


reply via email to

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