[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: which-function => DEFUN?
From: |
Lennart Borgman |
Subject: |
Re: which-function => DEFUN? |
Date: |
Mon, 10 May 2010 17:56:32 +0200 |
On Mon, May 10, 2010 at 5:09 PM, Juanma Barranquero <address@hidden> wrote:
> On Mon, May 10, 2010 at 16:39, Lennart Borgman
> <address@hidden> wrote:
>
>> ;; Check if we are at the beginning of the function already
>> (unless (eobp) (forward-char))
>
> Yes, nice catch. Thanks.
>
>> (beginning-of-defun)
>> (when (< here (point)) (beginning-of-defun))
>
> What does this protect against?
We might have stepped into the next function.
> And, why did you go for (let ((here (point))) ...) instead of
> `save-excursion'? Efficiency?
Efficiency. And actually readability.
> Juanma
>
- which-function => DEFUN?, Lennart Borgman, 2010/05/10
- Re: which-function => DEFUN?, Stefan Monnier, 2010/05/10
- Re: which-function => DEFUN?, Juanma Barranquero, 2010/05/10
- Global match data considered harmful, Stephen J. Turnbull, 2010/05/10
- Re: Global match data considered harmful, Stefan Monnier, 2010/05/11
- Re: Global match data considered harmful, Stephen J. Turnbull, 2010/05/11
- Re: Global match data considered harmful, tomas, 2010/05/12