unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Speeding up hook function
@ 2008-03-14 14:26 Joel J. Adamson
  2008-03-19  1:00 ` Xavier Maillard
  0 siblings, 1 reply; 3+ messages in thread
From: Joel J. Adamson @ 2008-03-14 14:26 UTC (permalink / raw)
  To: help-gnu-emacs


Howdy,

I've got the following function set as a hook for ibuffer.  This closes
all filter groups when I enter ibuffer.

(defun ibuffer-toggle-all-filters ()
  (interactive)
  (if (not (eq major-mode 'ibuffer-mode))
      nil
    (progn
      (goto-char 0)
      (setq prev-point 0)
      (ibuffer-forward-filter-group)
      (while (< prev-point (point))
	(setq prev-point (point))
	(ibuffer-forward-filter-group)
	(ibuffer-toggle-filter-group)))))


This does what I want, but it's really slow.  Any suggestions on how to
speed it up?

Thanks,
Joel
-- 
Joel J. Adamson
Biostatistician
Pediatric Psychopharmacology Research Unit
Massachusetts General Hospital
Boston, MA  02114
(617) 643-1432
(303) 880-3109
Public key: http://pgp.mit.edu

The information transmitted in this electronic communication is intended only
for the person or entity to whom it is addressed and may contain confidential
and/or privileged material. Any review, retransmission, dissemination or other
use of or taking of any action in reliance upon this information by persons or
entities other than the intended recipient is prohibited. If you received this
information in error, please contact the Compliance HelpLine at 800-856-1983 and
properly dispose of this information.







^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-03-19 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-14 14:26 Speeding up hook function Joel J. Adamson
2008-03-19  1:00 ` Xavier Maillard
2008-03-19 17:31   ` Joel J. Adamson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).