emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: [Fwd: Re: beginning-of-defun]


From: Andreas Roehler
Subject: Re: [Fwd: Re: beginning-of-defun]
Date: Tue, 18 Jul 2006 08:27:42 +0200
User-agent: Thunderbird 1.5.0.4 (X11/20060516)

Richard Stallman schrieb:
    What was sent indeed was a `beginning-of-defun' in his
    true understanding (as I conceive that) - nothing more.

In Emacs we have used the term "defun" to mean "top level expression"
for 30 years.  There is no reason to change that.

So the question I am considering what kind of behavior a user editing
Emacs Lisp code might find more useful than the current C-M-a
behavior.


Heading for consensus:

In the most cases C-M-a DTRT. Just stumbled over the
question while looking for a utility to pick Emacs-Lisp
function-definitions for my general-purpose collection.

Probably the most convenient would be, to let C-M-a
basically as it is, just have a fork with C-u to get
the restriction onto `true defuns':) only.

This could be done by setting defun-prompt-regexp then.

Would be the most conservative, yet still helpful
proceeding.

Remain features of in-string-check and return-value.

Wrote meanwhile

(defun if-in-string-p ()
 "Check if point is inside a string.
Returns the ascii value of the char bordering such string.
Function doesn't rely on `beginning-of-defun' as it's designed to be inside that function.
`if-in-string-p' scanns from the beginning of buffer, this might be slow.
Try `in-string-p' from thingatpt.el for alternative then."
 (interactive)
 (progn (message "%s" (nth 3 (parse-partial-sexp 1 (point))))
    (nth 3 (parse-partial-sexp 1 (point)))))

Return-value once was value of point, as I need it. This
was changed to `t' long ago. Couldn't find the changing
in the RCS. Does someone know the reasons?

__
Andreas Roehler






reply via email to

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