auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] Changes to auctex/multi-prompt.el,v


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/multi-prompt.el,v
Date: Mon, 13 Apr 2009 16:54:36 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    09/04/13 16:54:36

Index: multi-prompt.el
===================================================================
RCS file: /cvsroot/auctex/auctex/multi-prompt.el,v
retrieving revision 5.11
retrieving revision 5.12
diff -u -b -r5.11 -r5.12
--- multi-prompt.el     4 Apr 2009 20:10:38 -0000       5.11
+++ multi-prompt.el     13 Apr 2009 16:54:36 -0000      5.12
@@ -171,6 +171,16 @@
      predicate
      flag)))
 
+(defun multi-prompt-expand-completion-table (table)
+  "Return an expanded version of completion table TABLE.
+This is achieved by eval'ing all variables in the value parts of
+the alist elements."
+  (mapcar (lambda (x)
+           (if (and (cadr x) (symbolp (cadr x)) (not (functionp (cadr x))))
+               (cons (car x) (list (eval (cadr x))))
+             x))
+         table))
+
 ;; Silence the byte compiler.
 (defvar crm-local-must-match-map)
 (defvar crm-local-completion-map)
@@ -195,7 +205,13 @@
         (minibuffer-completion-predicate predicate)
         (minibuffer-completion-confirm
          (unless (eq require-match t) require-match))
-        (multi-prompt-completion-table table)
+        (multi-prompt-completion-table
+         ;; Expand the table here because completion would otherwise
+         ;; interpret symbols in the table as functions.  However, it
+         ;; would be nicer if this could be done during the actual
+         ;; completion in order to avoid walking through the whole
+         ;; table.
+         (multi-prompt-expand-completion-table table))
         (map (if require-match
                  crm-local-must-match-map
                crm-local-completion-map))




reply via email to

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