emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r115110: * lisp/loadhist.el (read-feature): Get rid


From: Leo Liu
Subject: [Emacs-diffs] trunk r115110: * lisp/loadhist.el (read-feature): Get rid of fake feature nil.
Date: Fri, 15 Nov 2013 06:54:36 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 115110
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15889
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Fri 2013-11-15 14:52:40 +0800
message:
  * lisp/loadhist.el (read-feature): Get rid of fake feature nil. 
  
  * src/minibuf.c (Ftry_completion, Fall_completions)
  (Ftest_completion): Use FUNCTIONP.  (Bug#15889)
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/loadhist.el               loadhist.el-20091113204419-o5vbwnq5f7feedwu-564
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/minibuf.c                  minibuf.c-20091113204419-o5vbwnq5f7feedwu-242
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-11-14 20:30:11 +0000
+++ b/lisp/ChangeLog    2013-11-15 06:52:40 +0000
@@ -1,3 +1,7 @@
+2013-11-15  Leo Liu  <address@hidden>
+
+       * loadhist.el (read-feature): Get rid of fake feature nil.  (Bug#15889)
+
 2013-11-14  Stefan Monnier  <address@hidden>
 
        * progmodes/gud.el (ctl-x-map):

=== modified file 'lisp/loadhist.el'
--- a/lisp/loadhist.el  2013-01-01 09:11:05 +0000
+++ b/lisp/loadhist.el  2013-11-15 06:52:40 +0000
@@ -101,14 +101,10 @@
   "Read feature name from the minibuffer, prompting with string PROMPT.
 If optional second arg LOADED-P is non-nil, the feature must be loaded
 from a file."
-  (intern
-   (completing-read prompt
-                   (cons nil features)
-                   (and loaded-p
-                        #'(lambda (f)
-                            (and f     ; ignore nil
-                                 (feature-file f))))
-                   loaded-p)))
+  (intern (completing-read prompt
+                          features
+                          (and loaded-p #'feature-file)
+                          loaded-p)))
 
 (defvaralias 'loadhist-hook-functions 'unload-feature-special-hooks)
 (defvar unload-feature-special-hooks

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2013-11-15 01:59:57 +0000
+++ b/src/ChangeLog     2013-11-15 06:52:40 +0000
@@ -1,3 +1,8 @@
+2013-11-15  Leo Liu  <address@hidden>
+
+       * minibuf.c (Ftry_completion, Fall_completions)
+       (Ftest_completion): Use FUNCTIONP.  (Bug#15889)
+
 2013-11-15  Paul Eggert  <address@hidden>
 
        * lisp.h (DEFINE_GDB_SYMBOL_BEGIN, DEFINE_GDB_SYMBOL_END):

=== modified file 'src/minibuf.c'
--- a/src/minibuf.c     2013-11-06 04:11:04 +0000
+++ b/src/minibuf.c     2013-11-15 06:52:40 +0000
@@ -1199,9 +1199,7 @@
     type = (HASH_TABLE_P (collection) ? hash_table
            : VECTORP (collection) ? obarray_table
            : ((NILP (collection)
-               || (CONSP (collection)
-                   && (!SYMBOLP (XCAR (collection))
-                       || NILP (XCAR (collection)))))
+               || (CONSP (collection) && !FUNCTIONP (collection)))
               ? list_table : function_table));
   ptrdiff_t idx = 0, obsize = 0;
   int matchcount = 0;
@@ -1460,9 +1458,7 @@
   Lisp_Object allmatches;
   int type = HASH_TABLE_P (collection) ? 3
     : VECTORP (collection) ? 2
-    : NILP (collection) || (CONSP (collection)
-                           && (!SYMBOLP (XCAR (collection))
-                               || NILP (XCAR (collection))));
+    : NILP (collection) || (CONSP (collection) && !FUNCTIONP (collection));
   ptrdiff_t idx = 0, obsize = 0;
   ptrdiff_t bindcount = -1;
   Lisp_Object bucket, tem, zero;
@@ -1691,9 +1687,7 @@
 
   CHECK_STRING (string);
 
-  if ((CONSP (collection)
-       && (!SYMBOLP (XCAR (collection)) || NILP (XCAR (collection))))
-      || NILP (collection))
+  if (NILP (collection) || (CONSP (collection) && !FUNCTIONP (collection)))
     {
       tem = Fassoc_string (string, collection, completion_ignore_case ? Qt : 
Qnil);
       if (NILP (tem))


reply via email to

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