bongo-devel
[Top][All Lists]
Advanced

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

[bongo-devel] Re: Marks


From: Daniel Jensen
Subject: [bongo-devel] Re: Marks
Date: Fri, 06 Apr 2007 20:36:06 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.95 (gnu/linux)

Here is a feature that I forgot we talked about; the universal
argument M-&. I wrote a straightforward implementation based on how
Gnus does it.


(defun bongo-universal-argument ()
  "Perform the following command at every marked track line.
Reads a key sequence and executes the command it is bound to,
once at every marked track line in the buffer."
  (interactive)
  (let* ((key (read-key-sequence
               (substitute-command-keys
                "\\<bongo-mode-map>\\[bongo-universal-argument]-")))
         (command (key-binding key)))
    (if (null command)
        (error "%s is undefined" (key-description key))
      (save-excursion
        (goto-char (point-min))
        (while (and (not (eobp))
                    (bongo-snap-to-object-line 'no-error))
          (when (bongo-marked-track-line-p)
            (command-execute command))
          (goto-char (bongo-point-after-line)))
        (bongo-kill-marking)))))






reply via email to

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