changeset: 4488:34b42224a06634307fb9ea44c0d3805e0f859b7d
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed May 14 23:55:13 2008 +0200
files: lisp/ChangeLog lisp/subr.el
description:
Make the #'add-to-list implementation a little conciser and clearer for XEmacs
2008-05-14 Aidan Kehoe <kehoea(a)parhasard.net>
* subr.el (add-to-list): Implement the same logic with a more
concise syntax; thank you Stephen, in
http://mid.gmane.org/87ablomdwx.fsf@uwakimon.sk.tsukuba.ac.jp .
diff -r 42fad34efb3f4dcf7cc389b6dffcba286f67503d -r
34b42224a06634307fb9ea44c0d3805e0f859b7d lisp/ChangeLog
--- a/lisp/ChangeLog Wed May 14 23:47:58 2008 +0200
+++ b/lisp/ChangeLog Wed May 14 23:55:13 2008 +0200
@@ -1,3 +1,9 @@ 2008-02-25 bpalmer <bpalmer(a)gmail.com>
+2008-05-14 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * subr.el (add-to-list): Implement the same logic with a more
+ concise syntax; thank you Stephen, in
+
http://mid.gmane.org/87ablomdwx.fsf@uwakimon.sk.tsukuba.ac.jp .
+
2008-02-25 bpalmer <bpalmer(a)gmail.com>
* subr.el(add-to-list): add support for `compare-fn' to sync with
diff -r 42fad34efb3f4dcf7cc389b6dffcba286f67503d -r
34b42224a06634307fb9ea44c0d3805e0f859b7d lisp/subr.el
--- a/lisp/subr.el Wed May 14 23:47:58 2008 +0200
+++ b/lisp/subr.el Wed May 14 23:55:13 2008 +0200
@@ -402,9 +402,8 @@ into a hook function that will be run on
into a hook function that will be run only after loading the package.
`eval-after-load' provides one way to do this. In some cases
other hooks, such as major mode hooks, can do the job."
- (if (if (not compare-fn)
- (member element (symbol-value list-var))
- (member* element (symbol-value list-var) :test compare-fn))
+ (if (member* (member* element (symbol-value list-var)
+:test (or compare-fn #'equal)))
(symbol-value list-var)
(set list-var
(if append
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches