branch: externals/cape
commit 249362281381e7bdbfceac62f52ba88d1838a4cd
Author: Daniel Mendler <[email protected]>
Commit: Daniel Mendler <[email protected]>

    Formatting
---
 cape.el | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/cape.el b/cape.el
index 0b256e4976..edb7380001 100644
--- a/cape.el
+++ b/cape.el
@@ -1130,23 +1130,22 @@ This function can be used as an advice around an 
existing Capf."
   "Create completion TABLE with PROPERTIES.
 The properties of the table must be overridden too, since they take
 precedence over the properties specified as part of the Capf result."
-  (let* ((dsort (plist-get properties :display-sort-function))
+  (let* ((cat (plist-get properties :category))
+         (dsort (plist-get properties :display-sort-function))
          (csort (plist-get properties :cycle-sort-function))
-         (cat (plist-get properties :category))
          (ann (plist-get properties :annotation-function))
          (aff (plist-get properties :affixation-function))
-         (alist (append (and dsort `((display-sort-function . ,dsort)))
+         (alist (append (and cat `((category . ,cat)))
+                        (and dsort `((display-sort-function . ,dsort)))
                         (and csort `((cycle-sort-function . ,csort)))
-                        (and cat `((category . ,cat)))
                         (and ann `((annotation-function . ,ann)))
                         (and aff `((affixation-function . ,aff))))))
     (if alist
         (lambda (str pred action)
           (if (eq action 'metadata)
-              `(metadata
-                ,@alist
-                ,@(and (functionp table)
-                       (cdr (funcall table str pred action))))
+              `(metadata ,@alist
+                         ,@(and (functionp table)
+                                (cdr (funcall table str pred action))))
             (complete-with-action action table str pred)))
       table)))
 

Reply via email to