Hey Tamas,
this patch adds a new buffer type with actions to switch or pop to it,
just displaying it or killing it.
--8<---------------cut here---------------start------------->8---
diff -u /home/heimdall/elisp/anything.el.orig /home/heimdall/elisp/anything.el
--- /home/heimdall/elisp/anything.el.orig 2007-07-20 12:00:26.000000000
+0200
+++ /home/heimdall/elisp/anything.el 2007-07-20 11:59:14.000000000 +0200
@@ -58,8 +58,7 @@
;; This is only an example. Customize it to your own taste!
(defvar anything-sources `(((name . "Buffers")
(candidates . anything-buffer-list)
- (action . (("Switch to Buffer" . switch-to-buffer)
- ("Kill Buffer" . kill-buffer))))
+ (type . buffer))
((name . "File Name History")
(candidates . file-name-history)
@@ -195,7 +194,11 @@
("Delete File" . (lambda (file)
(if (y-or-n-p (format "Really delete file %s? "
file))
- (delete-file file)))))))
+ (delete-file file))))))
+ (buffer . (("Switch to Buffer" . switch-to-buffer)
+ ("Pop to Buffer" . pop-to-buffer)
+ ("Display Buffer" . display-buffer)
+ ("Kill Buffer" . kill-buffer)))))
"A list of (TYPE . ACTION) pairs specifying actions for sources
which have no action defined. See the `action' attribute of
`anything-sources' for possible action values.")
Diff finished. Fri Jul 20 12:00:44 2007
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
--
A child of five could understand this! Fetch me a child of five!
_______________________________________________
gnu-emacs-sources mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnu-emacs-sources