all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Lambda in ido-ignore-*.
@ 2006-09-14 12:55 Michaël Cadilhac
  2006-09-14 14:42 ` Kim F. Storm
  0 siblings, 1 reply; 2+ messages in thread
From: Michaël Cadilhac @ 2006-09-14 12:55 UTC (permalink / raw)
  Cc: storm


[-- Attachment #1.1.1: Type: text/plain, Size: 309 bytes --]

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.


[-- Attachment #1.1.2: ido.patch --]
[-- Type: text/x-patch, Size: 1853 bytes --]

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  <michael.cadilhac@lrde.org>
+ 
+ 	* ido.el (ido-ignore-item-p): Allow any kind of functions in
+ 	ignore lists.
+ 

[-- Attachment #1.1.3: Type: text/plain, Size: 400 bytes --]


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: micha@amessage.be --'                                   -  --'

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Lambda in ido-ignore-*.
  2006-09-14 12:55 Lambda in ido-ignore-* Michaël Cadilhac
@ 2006-09-14 14:42 ` Kim F. Storm
  0 siblings, 0 replies; 2+ messages in thread
From: Kim F. Storm @ 2006-09-14 14:42 UTC (permalink / raw)
  Cc: emacs-devel

michael@cadilhac.name (Michaël Cadilhac) writes:

> 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.

Thank you very much.  I have installed your patch.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

end of thread, other threads:[~2006-09-14 14:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14 12:55 Lambda in ido-ignore-* Michaël Cadilhac
2006-09-14 14:42 ` Kim F. Storm

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.