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

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

title function for boxquote


From: Sebastian Luque
Subject: title function for boxquote
Date: Sun, 30 Jan 2005 16:19:15 -0600
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux)

This should be simple, but I'm flailing badly here. I'm trying to put a title
to a boxquote that has been yanked from a region killed with
boxquote-kill-ring-save. Something that looks like:

file name [Lines: such -- such]

So I came up with this, but it doesn't work:

(defun my-title-function (from to)
   "Provide a phrase for boxquote-kill-ring-save-title."
   (interactive "r")
   (save-restriction
     (widen)
     (let ((first-line (count-lines (point-min) (from)))
          (last-line (count-lines (point-min) (to))))
       (concat buffer-name "[Lines: " first-line " -- " last-line "]"))))

(setq boxquote-kill-ring-save-title
      'my-title-function)

What's wrong with this picture? Thanks in advance.

-- 
Best wishes,
Sebastian




reply via email to

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