emacs-devel
[Top][All Lists]
Advanced

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

Lambda in ido-ignore-*.


From: Michaël Cadilhac
Subject: Lambda in ido-ignore-*.
Date: Thu, 14 Sep 2006 14:55:03 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

Before I switched to ido, I used iswitchb with a weighty
iswitchb-buffer-ignore-list, defined as a lambda.

The point is that ido-ignore-* vars don't allow lambda here, because
ido-ignore-item-p use (fboundp) instead of (functionp).

The following proposal fixes it, and AFAIK don't break any
functionality.

Index: lisp/ido.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/ido.el,v
retrieving revision 1.104
diff -c -r1.104 ido.el
*** lisp/ido.el 10 Sep 2006 21:40:44 -0000      1.104
--- lisp/ido.el 14 Sep 2006 12:52:34 -0000
***************
*** 3618,3624 ****
                  ((stringp nextstr)
                   (and (>= flen (setq slen (length nextstr)))
                        (string-equal (substring name (- flen slen)) nextstr)))
!                 ((fboundp nextstr) (funcall nextstr name))
                  (t nil))
                 (setq ignorep t
                       ext-list nil
--- 3618,3624 ----
                  ((stringp nextstr)
                   (and (>= flen (setq slen (length nextstr)))
                        (string-equal (substring name (- flen slen)) nextstr)))
!                 ((functionp nextstr) (funcall nextstr name))
                  (t nil))
                 (setq ignorep t
                       ext-list nil
***************
*** 3628,3634 ****
             (setq nextstr (car re-list))
             (if (cond
                  ((stringp nextstr) (string-match nextstr name))
!                 ((fboundp nextstr) (funcall nextstr name))
                  (t nil))
                 (setq ignorep t
                       re-list nil)
--- 3628,3634 ----
             (setq nextstr (car re-list))
             (if (cond
                  ((stringp nextstr) (string-match nextstr name))
!                 ((functionp nextstr) (funcall nextstr name))
                  (t nil))
                 (setq ignorep t
                       re-list nil)
Index: lisp/ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.10058
diff -c -0 -r1.10058 ChangeLog
*** lisp/ChangeLog      14 Sep 2006 11:08:38 -0000      1.10058
--- lisp/ChangeLog      14 Sep 2006 12:52:51 -0000
***************
*** 0 ****
--- 1,5 ----
+ 2006-09-14  Michaël Cadilhac  <address@hidden>
+ 
+       * ido.el (ido-ignore-item-p): Allow any kind of functions in
+       ignore lists.
+ 
TIA !

-- 
/!\ My mail address changed, please update your files accordingly.
 |      Michaël `Micha' Cadilhac   |  Pour les 35-40 ans, l'humour          |
 |         Epita/LRDE Promo 2007   |       c'est une plus-value.            |
 |  http://michael.cadilhac.name   |          -- Guillaume L.               |
 `--  -   JID: address@hidden --'                                   -  --'

Attachment: pgpyme0zZrSzc.pgp
Description: PGP signature


reply via email to

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