From: Nicolas Goaziou Date: Thu, 22 Nov 2012 14:32:01 +0000 (+0100) Subject: org-export: uniquify and sort allowed keys in dispatcher expert UI X-Git-Tag: release_8.0-pre~792 X-Git-Url: https://repo.or.cz/w/org-mode.git/commitdiff_plain/68234d5a410c01ad9457f746bbd1f3d7fdfb0245 org-export: uniquify and sort allowed keys in dispatcher expert UI * contrib/lisp/org-export.el (org-export-dispatch-ui): uniquify and sort allowed keys. --- diff --git a/contrib/lisp/org-export.el b/contrib/lisp/org-export.el index cbe40b7a5..5195bab71 100644 --- a/contrib/lisp/org-export.el +++ b/contrib/lisp/org-export.el @@ -4857,9 +4857,9 @@ back to standard interface." ;; always available. (allowed-keys (nconc (list ?1 ?2 ?3 ?4) - (if (not first-key) (mapcar 'car backends) + (if (not first-key) (org-uniquify (mapcar 'car backends)) (let (sub-menu) - (dolist (backend backends (mapcar 'car sub-menu)) + (dolist (backend backends (sort (mapcar 'car sub-menu) '<)) (when (eq (car backend) first-key) (setq sub-menu (append (nth 2 backend) sub-menu)))))) (cond ((eq first-key ?P) (list ?f ?p ?x ?a))