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

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

Re: title function for boxquote


From: Sebastian Luque
Subject: Re: title function for boxquote
Date: Mon, 31 Jan 2005 08:43:33 -0600
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

On Mon, 31 Jan 2005 10:46:06 +0100, sigurd@12move.de (Karl Pflästerer) wrote:

[...]

> `from' and `to' are variables but you used them like functions.  
> Furthermore you write it as an interactive function but that function
> should get called from `boxquote-kill-ring-save'; on the other hand
> `buffer-name' is a function not a variable.

Thanks for pointing those out, I should read the lisp intro again!

[...]

> Or you forget about the name and write:
>
> (setq boxquote-kill-ring-save-title
>         (lambda ()
>           (save-restriction
>             (widen)
>             (format "%s [Lines: %s --- %s]" 
>                     (buffer-name)
>                     (line-number-at-pos (region-beginning))
>                     (line-number-at-pos (region-end))))))

That's much more efficient than mine.


Thank you!

-- 
Best wishes,
Sebastian




reply via email to

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